On Tue, Jul 18, 2017 at 03:46:38PM +0200, Pino Toscano wrote:
On Tuesday, 18 July 2017 12:01:12 CEST Richard W.M. Jones wrote:
In SUSE guests, handle the case where Bootloader::Tools::GetDefaultSection () returns undef.
Previously this would return an empty string and cause a bogus error in subsequent code:
virt-v2v: error: libguestfs error: statns: statns_stub: path must start with a / character ---
I'm torn about this one: the test case for this comes from a simple
$ virt-builder opensuse-13.2 $ virt-v2v -i disk opensuse-13.2.img -o null
What I see is that the template available from the openSUSE repository is configured to configure itself at the first boot, which indeed takes longer than the subsequent boots. The grub.conf in the image is very simple, and apparently hand-made, and just makes the guest boot; after the first boot, it is replaced by a proper configuration made by grub2-mkconfig (which Bootloader::Tools handles correctly).
So I'd put this patch on hold for now, and see whether there's a real world guest with a grub2 configuration that Bootloader::Tools cannot handle.
What do you think?
I agree with the analysis. OTOH can the patch hurt in any way? It seems there is a possibility that Bootloader::Tools::GetDefaultSection() might return undef and we should have handled that case. 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