Only able to get to this now, but need additional help, if at all possible. See comments inline below. Thanks. 19.08.2017, 10:36, "Richard W.M. Jones" <rjones@redhat.com>:> On Sat, Aug 19, 2017 at 08:38:31AM -0600, stef204 wrote: >> Hi, >> >> I am new to v2v/libguestfs. > >> I need to convert a 30 GB virtual machine running Windows7 64 bit (a >> guest on a Linux system) from Virtualbox vdi format to qcow2 (or >> raw/img--another debate in itself) so I can use libvirt/qemu/kvm to >> run it and completely migrate away from Virtualbox. >>> > You will need the virtio drivers from: > https://fedoraproject.org/wiki/Windows_Virtio_Drivers > You can either install that package so it appears under > /usr/share/virtio-win, or you can use the .iso file from that package > and set the VIRTIO_WIN environment variable to point to it: > > http://libguestfs.org/virt-v2v.1.html#environment-variables >The above is done (easy).> Do you have metadata from VirtualBox (number of CPUs, RAM, etc) in > some format? If not, then you should probably use the ‘-i libvirtxml’ > input method. You will have to write or modify the metadata, as > documented here: > > http://libguestfs.org/virt-v2v.1.html#minimal-xml-for--i-libvirtxml-option >Please bear with me but I really don't have enough info as to HOW to modify the xml template., beyond the obvious stuff, MAC address, name of VM, etc. Might there bit a more detailed xml template in context of Windows to kvm/qemu I could use?> I believe that virt-v2v should be able to transparently convert > the .vdi source file. You might or might not need to use the > ‘-if vdi‘ option. > > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Richard W.M. Jones
2017-Oct-08 14:08 UTC
Re: [Libguestfs] Virtualbox vdi Input Format and man pages
On Sun, Oct 08, 2017 at 07:03:50AM -0600, stef204 wrote:> > http://libguestfs.org/virt-v2v.1.html#minimal-xml-for--i-libvirtxml-option > > > > Please bear with me but I really don't have enough info as to HOW to > modify the xml template., beyond the obvious stuff, MAC address, > name of VM, etc. > > Might there bit a more detailed xml template in context of Windows > to kvm/qemu I could use?I guess we should probably link to the real documentation: https://libvirt.org/formatdomain.html However virt-v2v has its own parser for libvirt XML and only parses a (very) small subset of these fields. Generally you only need to take that template and change a few fields, name, memory size, number of vCPUs, and make sure there is one <disk> section per disk and one <interface> section per virtual network adaptor. That'll cover 99% of use cases. Use ‘virt-v2v ... -o null’ to do a test conversion. 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
08.10.2017, 08:09, "Richard W.M. Jones" <rjones@redhat.com>:> > I guess we should probably link to the real documentation: > > https://libvirt.org/formatdomain.html > > However virt-v2v has its own parser for libvirt XML and only parses a > (very) small subset of these fields. Generally you only need to take > that template and change a few fields, name, memory size, number of > vCPUs, and make sure there is one <disk> section per disk and one > <interface> section per virtual network adaptor. That'll cover 99% of > use cases. > > Use ‘virt-v2v ... -o null’ to do a test conversion. > > Rich. >Thanks so much Rich. Will move forward and post here again.
08.10.2017, 08:09, "Richard W.M. Jones" <rjones@redhat.com>:> However virt-v2v has its own parser for libvirt XML and only parses a > (very) small subset of these fields. Generally you only need to take > that template and change a few fields, name, memory size, number of > vCPUs, and make sure there is one <disk> section per disk and one > <interface> section per virtual network adaptor. That'll cover 99% of > use cases. > > Use ‘virt-v2v ... -o null’ to do a test conversion. >I am undoubtedly doing something wrong but cannot spot it. Here is the xml file <https://bpaste.net/show/bd4df241ee37> Error message: % virt-v2v -i libvirtxml Win7.xml -o null [ 0.0] Opening the source -i libvirtxml Win7.xml [ 0.0] Creating an overlay to protect the source from being modified [ 0.1] Initializing the target -o null [ 0.1] Opening the overlay [ 4.3] Inspecting the overlay virt-v2v: error: inspection could not detect the source guest (or physical machine). Assuming that you are running virt-v2v/virt-p2v on a source which is supported (and not, for example, a blank disk), then this should not happen. No root device found in this operating system image. If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] I'm stuck here. I imagine the error is probably obvious but... not to me.