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.
running with -v -x I see this just above the failure: guestfsd: main_loop: new request, len 0x3c commandrvf: stdout=n stderr=y flags=0x0 commandrvf: mount -o ro /dev/sda /sysroot/ mount: wrong fs type, bad option, bad superblock on /dev/sda, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so. guestfsd: error: /dev/sda on / (options: 'ro'): mount: wrong fs type, bad option, bad superblock on /dev/sda, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so. guestfsd: main_loop: proc 73 (mount_ro) took 0.08 seconds libguestfs: trace: v2v: mount_ro = -1 (error) libguestfs: trace: v2v: inspect_get_roots libguestfs: trace: v2v: inspect_get_roots = [] libguestfs: trace: v2v: inspect_os = [] 08.10.2017, 10:13, "stef204" <stef204@yandex.com>:> 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.
Richard W.M. Jones
2017-Oct-08 18:22 UTC
Re: [Libguestfs] Virtualbox vdi Input Format and man pages
On Sun, Oct 08, 2017 at 10:28:39AM -0600, stef204 wrote:> running with -v -x I see this just above the failure: > > guestfsd: main_loop: new request, len 0x3c > commandrvf: stdout=n stderr=y flags=0x0 > commandrvf: mount -o ro /dev/sda /sysroot/ > mount: wrong fs type, bad option, bad superblock on /dev/sda, > missing codepage or helper program, or other error > > In some cases useful info is found in syslog - try > dmesg | tail or so. > guestfsd: error: /dev/sda on / (options: 'ro'): mount: wrong fs type, bad option, bad superblock on /dev/sda, > missing codepage or helper program, or other error > > In some cases useful info is found in syslog - try > dmesg | tail or so. > guestfsd: main_loop: proc 73 (mount_ro) took 0.08 seconds > libguestfs: trace: v2v: mount_ro = -1 (error) > libguestfs: trace: v2v: inspect_get_roots > libguestfs: trace: v2v: inspect_get_roots = [] > libguestfs: trace: v2v: inspect_os = []I need to see the entire log. 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/
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