Moving Windows Server virtual machines from VirtualBox to kvm seems to have been relatively straightforward. Compatible interfaces helps. Moving the data is a simple matter of converting disk images from VirtualBox to raw and then writing the raw files to a ZVOL.
- For best results, make sure your VirtualBox guest is using
ideinterfaces for storage and Intel
e1000ginterfaces for networking.
- On the source host, clone the VirtualBox disk image to a raw format:
VBoxManage clonehd <source>.vmdk <destination>.img --format raw
- Copy it from the source host to the destination host, as with rsync.
- On the destination host, prepare the vm. The image doesn't really matter. But in the .json file, use
idefor the hard disk interface and
e1000gfor the networking interface, instead of
- Stop the vm.
- Make sure your new vm's
-disk0zvol is the right size for the image you want to write. If not, use
zfs setto fix it.
qemu-imgto write your
.imgfile to the zvol:
qemu-img convert \ -f raw \ -O host_device \ -o size=<gigabytes>G \ <source>.img \ /dev/zvol/rdsk/zones/<uuid>-disk0
When that's finished, you should be able to fire up the new vm and pick right up where you left off.