Bug 592202 - appliance fails to launch
appliance fails to launch
Status: CLOSED NOTABUG
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
All Linux
low Severity medium
: ---
: ---
Assigned To: Richard W.M. Jones
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-14 04:36 EDT by Jinxin Zheng
Modified: 2010-05-14 06:10 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-14 06:10:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
output of libguestfs-test-tool (24.39 KB, text/plain)
2010-05-14 04:37 EDT, Jinxin Zheng
no flags Details

  None (edit)
Description Jinxin Zheng 2010-05-14 04:36:35 EDT
Description of problem:
with the guestfish compiled from the most recent git, it just fails to run the 'launch' command.

Version-Release number of selected component (if applicable):
$ uname -a
Linux localhost 2.6.32.9-70.fc12.x86_64 #1 SMP Wed Mar 3 04:40:41 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux
$ qemu-kvm -version
QEMU PC emulator version 0.12.3 (qemu-kvm-0.12.3), Copyright (c) 2003-2008 Fabrice Bellard
$ ./fish/guestfish version
major: 1
minor: 3
release: 11
extra: 


How reproducible:
100%

Steps to Reproduce:
1. enter guestfish, add a image
2. issue launch
><fs> launch
  
Actual results:
libguestfs: error: child process died unexpectedly

Expected results:
the appliance successfully launched

Additional info:
it seems that the qemu's -net user,net=169.254... option is not working or has problem with the appliance's kernel.


the host's network configuration is following,
$ ifconfig 
eth0      Link encap:Ethernet  HWaddr 00:24:21:7F:B6:F3  
          inet addr:10.66.65.67  Bcast:10.66.65.255  Mask:255.255.254.0
          inet6 addr: fe80::224:21ff:fe7f:b6f3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:608721 errors:0 dropped:0 overruns:0 frame:0
          TX packets:582515 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:451271073 (430.3 MiB)  TX bytes:269846501 (257.3 MiB)
          Interrupt:18 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:136923 errors:0 dropped:0 overruns:0 frame:0
          TX packets:136923 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:30661204 (29.2 MiB)  TX bytes:30661204 (29.2 MiB)

virbr0    Link encap:Ethernet  HWaddr 22:12:0E:9F:11:B6  
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:58 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:8107 (7.9 KiB)


$ netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.122.0   0.0.0.0         255.255.255.0   U         0 0          0 virbr0
10.66.64.0      0.0.0.0         255.255.254.0   U         0 0          0 eth0
0.0.0.0         10.66.65.254    0.0.0.0         UG        0 0          0 eth0
Comment 1 Jinxin Zheng 2010-05-14 04:37:43 EDT
Created attachment 413975 [details]
output of libguestfs-test-tool
Comment 2 Richard W.M. Jones 2010-05-14 05:09:00 EDT
The problem here is that the 'init' script in the appliance
doesn't match the network configuration.  This is because
you're using the appliance from /usr/lib64/guestfs with
your locally compiled library.  If you look at the attachment:

guestfs_get_path: /usr/lib64/guestfs
[...]
[00000ms] PATH='/usr/lib64/guestfs':$PATH libguestfs-supermin-helper --verbose '/usr/lib64/guestfs' x86_64 fedora-12 /tmp/libguestfsVQmutr/kernel /tmp/libguestfsVQmutr/initrd
[...]
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.0.0.0        0.0.0.0         255.0.0.0       U         0 0          0 eth0
0.0.0.0         10.0.2.2        0.0.0.0         UG        0 0          0 eth0
[...]
vmchannel: tcp:169.254.2.2:45105

If you want to run libguestfs-test-tool on your local copy
it's a bit complex.  Please try the following commands:

rm -f appliance/make.sh
make clean
make
LD_LIBRARY_PATH=src/.libs \
LIBGUESTFS_PATH=appliance \
test-tool/libguestfs-test-tool --helper test-tool/libguestfs-test-tool-helper
Comment 3 Jinxin Zheng 2010-05-14 05:37:26 EDT
I followed your suggestion and found the test-tool could pass.

I have yum installed libguestfs on my host, and configured the git source with  --prefix=/usr --libdir=/usr/lib64 . I guess this is what's stopping me from running correctly because it can't be mixed with both path.

I'll reconfigure my source without the --libdir and --prefix options, this will not be a problem for me, as make install now could not be used with root.

if you do not think this is a bug, please close it.
Comment 4 Richard W.M. Jones 2010-05-14 06:10:31 EDT
I think this was just caused by mixing incompatible appliances,
so I will close this NOTABUG in accordance with comment 3.

Note You need to log in before you can comment on or make changes to this bug.