Bug 588860

Summary: guestfish error: (null) at /usr/bin/virt-inspector line 215.
Product: [Community] Virtualization Tools Reporter: Milan Zázrivec <mzazrivec>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: mbooth, rjones, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-12 11:57:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 588851    
Bug Blocks:    
Attachments:
Description Flags
libguestfs-test-tool output
none
build.log none

Description Milan Zázrivec 2010-05-04 18:01:39 UTC
Created attachment 411360 [details]
libguestfs-test-tool output

Description of problem:
When running guestfish on RHEL 5.5 x86_64 host:

# guestfish -v -i rhel-55.img 
guestfish -i: running virt-inspector command:
a=`virt-inspector 'rhel-55.img' --fish` && guestfish $a -v
(null) at /usr/bin/virt-inspector line 215.
closing guestfs handle 0x11697050 (state 0)

Version-Release number of selected component (if applicable):
libguestfs-1.2.4-1.el5.10.x86_64

containing patches from:
https://www.redhat.com/archives/libguestfs/2010-May/msg00000.html

and a correction from:
https://www.redhat.com/archives/libguestfs/2010-May/msg00004.html

How reproducible:
Always

Steps to Reproduce:
1. Run: guestfish -v -i guest-image.img
  
Actual results:
Error above

Expected results:
No error, guestfish (and friends) work

Additional info:
Brew builds with patches sources:
https://brewweb.devel.redhat.com/taskinfo?taskID=2419148

Comment 1 Richard W.M. Jones 2010-05-04 19:21:00 UTC
Reassigning to upstream bugtracker component.

Comment 2 Richard W.M. Jones 2010-05-04 19:26:40 UTC
Created attachment 411382 [details]
build.log

Comment 3 Richard W.M. Jones 2010-05-04 19:32:04 UTC
I suspect this is down to the ancient version of
KVM in RHEL 5.  Perhaps it doesn't override aspects
of the network configuration such as the host IP
address when using -net user,vlan=0,net=169.254.0.0/16

Comment 4 Richard W.M. Jones 2010-05-04 19:38:36 UTC
In fact even worse than that ...  this old version of qemu ignores the
net=... parameter completely!

$ rpm -qf /usr/libexec/qemu-kvm 
kvm-83-164.el5
$ /usr/libexec/qemu-kvm -hda /dev/zero -net user,net=foobar
open /dev/kvm: No such file or directory
Could not initialize KVM, will disable KVM support
Warning: vlan 0 with no nics
Could not initialize SDL - exiting

Versus on Fedora that command exits with an error status
unless 'net=' is a valid parameter.  (Actually, there is no error
message, but that seems to be a different bug ...)

Conclusion: This fix is not supportable on RHEL 5. and we will
have to hope that no one tries to use virt-v2v when they have
machines using the 10.x network (or provide another workaround
for RHEL 5).

I'm still interested -- does this patch work on a recent Fedora?

Comment 5 Milan Zázrivec 2010-05-05 12:16:00 UTC
(In reply to comment #4)
> In fact even worse than that ...  this old version of qemu ignores the
> net=... parameter completely!
> 
> $ rpm -qf /usr/libexec/qemu-kvm 
> kvm-83-164.el5
> $ /usr/libexec/qemu-kvm -hda /dev/zero -net user,net=foobar
> open /dev/kvm: No such file or directory
> Could not initialize KVM, will disable KVM support
> Warning: vlan 0 with no nics
> Could not initialize SDL - exiting
> 
> Versus on Fedora that command exits with an error status
> unless 'net=' is a valid parameter.  (Actually, there is no error
> message, but that seems to be a different bug ...)
> 
> Conclusion: This fix is not supportable on RHEL 5. and we will
> have to hope that no one tries to use virt-v2v when they have
> machines using the 10.x network (or provide another workaround
> for RHEL 5).
> 
> I'm still interested -- does this patch work on a recent Fedora?    

I'm confirming that libguestfs-1.3.9-1 containing two patches
referenced above works on recent Fedora.

Comment 6 Richard W.M. Jones 2010-05-12 11:57:34 UTC
Those patches are both upstream, so closing.