Migrate a VM from VirtualBox to libvirt
Posted on Mon 02 January 2017 in linux • 1 min read
Assuming you are using KVM as the libvirt backend:
-
Find location of harddrive in filesystem
-
Release and remove harddrive from VirtualBox (has not worked without this step)
-
Convert to raw image with
VBoxManage clonehd --format RAW vboximage.vdi rawimage.raw
-
Convert to qcow2 image with
qemu-img convert -f raw rawimage.raw -O qcow2 image.qcow2
-
Copy image file as root to
/data/libvirt/images
(Adapt for your system) -
Create a new virtual machine with
virt-manager
and select the image. -
If it should be connected to physical network: Change Network source to shared device name and select
br0
-
Start machine, maybe it is necessary to update the device name in
/etc/network/interfaces
References