Richard W.M. Jones
2017-Oct-08 19:50 UTC
Re: [Libguestfs] Virtualbox vdi Input Format and man pages
[stef204 sent me the full log since it contains sensitive information] The log says that virt-v2v cannot see anything at all on the 34.1 GB disk (as if the disk is blank). However I think the actual problem is that you've given the wrong disk type in the XML: <disk type='file' device='disk'> <driver name='qemu' type='raw'/> ^^^ <source file='xxx.vdi'/> <target dev='hda' bus='ide'/> </disk> ‘.vdi’ is probably not raw format but something else (most likely 'vdi') According to ‘qemu-img --help’, qemu supports the vdi format, hopefully at least enough to be able to read it which is all that virt-v2v needs. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
08.10.2017, 13:50, "Richard W.M. Jones" <rjones@redhat.com>:> [stef204 sent me the full log since it contains sensitive information] > > The log says that virt-v2v cannot see anything at all on the 34.1 GB > disk (as if the disk is blank). However I think the actual problem is > that you've given the wrong disk type in the XML: > > <disk type='file' device='disk'> > <driver name='qemu' type='raw'/> > ^^^ > <source file='xxx.vdi'/> > <target dev='hda' bus='ide'/> > </disk> > > ‘.vdi’ is probably not raw format but something else (most likely 'vdi') > > According to ‘qemu-img --help’, qemu supports the vdi format, > hopefully at least enough to be able to read it which is all that > virt-v2v needs. >OK, so to fix, just change this line--like this? <driver name='qemu' type='vdi'/>
Richard W.M. Jones
2017-Oct-08 20:40 UTC
Re: [Libguestfs] Virtualbox vdi Input Format and man pages
On Sun, Oct 08, 2017 at 02:16:43PM -0600, stef204 wrote:> > > 08.10.2017, 13:50, "Richard W.M. Jones" <rjones@redhat.com>: > > [stef204 sent me the full log since it contains sensitive information] > > > > The log says that virt-v2v cannot see anything at all on the 34.1 GB > > disk (as if the disk is blank). However I think the actual problem is > > that you've given the wrong disk type in the XML: > > > > <disk type='file' device='disk'> > > <driver name='qemu' type='raw'/> > > ^^^ > > <source file='xxx.vdi'/> > > <target dev='hda' bus='ide'/> > > </disk> > > > > ‘.vdi’ is probably not raw format but something else (most likely 'vdi') > > > > According to ‘qemu-img --help’, qemu supports the vdi format, > > hopefully at least enough to be able to read it which is all that > > virt-v2v needs. > > > > OK, so to fix, just change this line--like this? > > <driver name='qemu' type='vdi'/>I think so, yes. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/
08.10.2017, 13:50, "Richard W.M. Jones" <rjones@redhat.com>:> [stef204 sent me the full log since it contains sensitive information] > > The log says that virt-v2v cannot see anything at all on the 34.1 GB > disk (as if the disk is blank). However I think the actual problem is > that you've given the wrong disk type in the XML: > > <disk type='file' device='disk'> > <driver name='qemu' type='raw'/> > ^^^ > <source file='xxx.vdi'/> > <target dev='hda' bus='ide'/> > </disk> > > ‘.vdi’ is probably not raw format but something else (most likely 'vdi') >Running it currently with the following change in the xml file seems to be doing the job [it returns "libguestfs: closing guestfs handle 0x55f167f97db0 (state 0)"]: <driver name='qemu' type='vdi'/> I have an important question: While we were going back and forth here and I was waiting for your feedback (which I should repeat, is most appreciated) I tried this command, from reading the man pages: % virt-v2v -i disk Win7-convert.vdi -of qcow2 -on Win7.qcow2 -o local -os /mnt/partition2 The -on option probably was not needed as I ended up with a name like Win7.qcow2-sda when I just wanted Win7.qcow2 However, it completed without failure. I then created a new VM using libvirt/Virt-Manager and it booted just fine. Once booted, I went on to uninstall the virtualbox-guest-additions and install this: <https://www.spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-latest.exe> And all seems to work properly. I have a network connection and clipboard is shared, etc. This was just a test from a copy or the original vdi file I had made using dd. So I am going to possibly redo it "properly" now for a "final" conversion. The question is: What am I getting extra by using the -i libvirtxml option as opposed to the more plain: % virt-v2v -i disk Win7-convert.vdi -of qcow2 -o local -os /mnt/partition2
Richard W.M. Jones
2017-Oct-08 22:00 UTC
Re: [Libguestfs] Virtualbox vdi Input Format and man pages
On Sun, Oct 08, 2017 at 02:41:30PM -0600, stef204 wrote:> The question is: What am I getting extra by using the -i libvirtxml option as opposed to the more plain: > > % virt-v2v -i disk Win7-convert.vdi -of qcow2 -o local -os /mnt/partition2Guests consist of the disk images, plus copious metadata. When you give just the disk image to virt-v2v (‘-i disk disk.img’), it has to make many guesses about the metadata. See this file for details: https://github.com/libguestfs/libguestfs/blob/master/v2v/input_disk.ml Sometimes these guesses will be suboptimal, and by supplying the correct metadata you can get a more correct conversion (‘-i libvirtxml’ or even better getting the true metadata from VirtualBox). Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top