Check out https://wiki.smartos.org/display/DOC/Migrating+from+ESXi+4.x and
reverse the polatity on the command. ;)

I have not move a vm back to linux.

But on my linux/kvm nodes I use qemu-img alot and generally it works well.
Having it on the smartos node as well is very handy.


For example:


[root@node6 ~]# qemu-img info -f host_device
/dev/zvol/rdsk/zones/18dc2771-8be1-4f73-b2eb-6f64df4cbb26-disk0
image: /dev/zvol/rdsk/zones/18dc2771-8be1-4f73-b2eb-6f64df4cbb26-disk0
file format: host_device
virtual size: 40G (42949672960 bytes)
disk size: 0
[root@node6 ~]# mkdir /zones/tmp
[root@node6 ~]# cd /zones/tmp/

[root@node6 /zones/tmp]# time qemu-img convert -f host_device -O raw
/dev/zvol/rdsk/zones/18dc2771-8be1-4f73-b2eb-6f64df4cbb26-disk0 tmp.raw

real    4m16.370s
user    0m11.915s
sys     0m27.237s
[root@node6 /zones/tmp]# qemu-img info -f raw tmp.raw
image: tmp.raw
file format: raw
virtual size: 40G (42949672960 bytes)
disk size: 12G

[root@node6 /zones/tmp]# du -sh tmp.raw
  12G   tmp.raw

It's a sparse file so use rsync -S to move the file to your linux node.


Most recent linux kernels now are pretty flexibile - I have booted with
virtio or and without and they switch on the fly.

Windows is potentially more flaky, while the kvm paravirt kvm drivers might
work without needing to be uninstalled. It may be a safety option.


If you need to access the filesystem on the linux without booting it -
maybe to change some boot options - you can use kpartx and loop mount:
http://dgc.uchicago.edu/20130530/mounting-a-kvm-disk-image-without-kvm/


Nicholas



On 12 January 2015 at 16:00, Mailing Lists via smartos-discuss <
[email protected]> wrote:

> All,
>
> I'm considering moving from SmartOS as my virtualization platform to oVirt
> on Linux. Given that most of my VMs are KVMs running Linux or Windows, It
> seems like I should be able to export the disk image with DD to a file
> (i.e. dd <zfs_mount> disk.img), move it to Linux host, and point oVirt at
> it. The only blocker to this plan that I see is some sort of
> incompatibility between the SmartOS KVM and Linux KVM disk controller
> implementations. Has anyone tried this? Will it work?
>
> Thanks in advance,
>
> -David
> *smartos-discuss* | Archives
> <https://www.listbox.com/member/archive/184463/=now>
> <https://www.listbox.com/member/archive/rss/184463/25241303-ebebecbc> |
> Modify
> <https://www.listbox.com/member/?&;>
> Your Subscription <http://www.listbox.com>
>



-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to