[virt-tools-list] [PATCH] virt-v2v: Support for Converting VirtualBox Guests
Marko Myllynen
myllynen at redhat.com
Wed Feb 8 14:41:10 UTC 2012
Hi,
attached a patch proposal for virt-v2v to support converting VirtualBox
guests with VirtualBox Guest Additions [1] installed. With the patch
applied a VirtualBox RHEL 6 guest with Guest Additions can be converted
with:
# qemu-img convert virtual-rhel.vdi /var/lib/libvirt/images/virtual-rhel.img
# virsh --connect qemu:///system pool-refresh default
# virt-v2v -i libvirtxml -os default /tmp/virtual-rhel.xml
I've tested this patch on a RHEL 6.2 host running VirtualBox 4.1.8 using
a RHEL 6.2 guest, the guest works as expected with libvirt and all of
Guest Additions except for few log files were removed.
However, as can be seen from the patch it uses a hard-coded path to the
Guest Additions uninstallation script [2] - something like this on a
local file system would do the trick to locate the proper uninstallation
script to run:
find /opt/VBoxGuestAdditions* -wholename
'/opt/VBoxGuestAdditions-*/uninstall.sh' -print | sort | tail -n 1
But since we're talking about a guest fs I'm not sure what would be the
most elegant way to achieve the same with the libguestfs API?
guestfs_find [3] is available but I'm not sure would be ok to run
something corresponding to "find /opt" and then go through the results
in RedHat.pm (considering that in theory we might hit the message
protocol transfer limit if the /opt of the guest contains a huge amount
of files)?
1) http://www.virtualbox.org/manual/ch04.html
2) http://www.virtualbox.org/manual/ch04.html#idp11370256
3) http://libguestfs.org/guestfs.3.html#guestfs_find
Thanks,
--
Marko Myllynen
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Support-for-Converting-VirtualBox-Guests.patch
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20120208/908d8cfb/attachment.ksh>
More information about the virt-tools-list
mailing list