On Sat, Mar 30, 2019 at 4:23 PM Richard W.M. Jones <rjones@redhat.com> wrote:> [Please keep replies on the list] >I wasn't approved yet by moderator ;)> > > > 4. Looks like there is no way to type a pool name to export to > (if I > > > > select libvirt) or am I missing something? (let's say I have a > pool > > > called > > > > NAS-10G). In the -os field I'm trying to put the NAS-10G (as the > > > virt-v2v > > > > man page suggests), but this seems not work. > > > > > > Put the pool name into the storage (-os) field. > > > > > > > that's the problem. Once I remove the default "/var/tmp" and try to put > my > > pool name and starts the conversion, it thinks that I'm using the Local > > mode (and I selected the libvirt mode) and when it finishes and it > fails, > > the end of the log shows: > > > > virt-v2v: error: -o libvirt: output pool ‘NAS-10G’ is not a directory > > (type='dir'). See virt-v2v-output-local(1) > > It could well be a bug, but take a look at the virt-p2v logs which are > saved under /tmp/virt-p2v-* on the conversion server. That will tell > you what exact command line was used. >I did, and I'm enclosing gzipped copy of the file. Line 4197 clearly shows it got the correct parameter: Initializing the target -o libvirt -os NAS-10G> > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat > http://people.redhat.com/~rjones > Read my programming and virtualization blog: http://rwmj.wordpress.com > virt-builder quickly builds VMs from scratch > http://libguestfs.org/virt-builder.1.html >
Richard W.M. Jones
2019-Mar-30 13:59 UTC
Re: [Libguestfs] few things I found about virt-p2v
On Sat, Mar 30, 2019 at 04:32:31PM +0300, Hetz Ben Hamo wrote:> On Sat, Mar 30, 2019 at 4:23 PM Richard W.M. Jones <rjones@redhat.com> > wrote: > > It could well be a bug, but take a look at the virt-p2v logs which are > > saved under /tmp/virt-p2v-* on the conversion server. That will tell > > you what exact command line was used. > > > > I did, and I'm enclosing gzipped copy of the file. Line 4197 clearly shows > it got the correct parameter: > Initializing the target -o libvirt -os NAS-10GAh I see. This is a limitation: https://github.com/libguestfs/libguestfs/blob/f79129b8dc92470e3a5597daf53c84038bd6859e/v2v/output_libvirt.ml#L107 Actually not one that I recall from before (the vast majority of people using virt-p2v are either creating a file or writing to RHV/OpenStack/etc). However this should be easy enough to work around: Set the output (-os) to some directory on the conversion appliance with plenty of space. Do the conversion, you'll end up with a libvirt XML file and the disk images as files. Then use normal ‘virsh’ commands to copy the disk images to the pool you actually want to use, adjust the libvirt XML to point to the pool, and create the VM also using ‘virsh’ commands. Would suggest reading the libvirt documentation if unsure about these steps. 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/
> > > > I did, and I'm enclosing gzipped copy of the file. Line 4197 clearly > shows > > it got the correct parameter: > > Initializing the target -o libvirt -os NAS-10G > > Ah I see. This is a limitation: > > > https://github.com/libguestfs/libguestfs/blob/f79129b8dc92470e3a5597daf53c84038bd6859e/v2v/output_libvirt.ml#L107 > >I see. This situation is great if someone wants to move 1 VM from Hyper-V (for example) to a laptop or to a workstation where he/she is using virt-manager.> Actually not one that I recall from before (the vast majority of > people using virt-p2v are either creating a file or writing to > RHV/OpenStack/etc). >I got 2 more questions: 1. Is it possible to add to the virt-p2v-make-disk program a parameter to add kernel parameters? (right now I have to create the image and edit manually the grub.conf file in the image in order to edit them) - this could help in situations where someone cannot setup PXE. 2. Is there a way to create the image as a bootable ISO? Hyper-V for example, doesn't like standard "hard disk" images. I see that kiwi has this functionality, but it's only for SuSE. Thanks again