Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 592202 - appliance fails to launch
Summary: appliance fails to launch
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-14 08:36 UTC by Jinxin Zheng
Modified: 2010-05-14 10:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-14 10:10:31 UTC


Attachments (Terms of Use)
output of libguestfs-test-tool (deleted)
2010-05-14 08:37 UTC, Jinxin Zheng
no flags Details

Description Jinxin Zheng 2010-05-14 08:36:35 UTC
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 08:37:43 UTC
Created attachment 413975 [details]
output of libguestfs-test-tool

Comment 2 Richard W.M. Jones 2010-05-14 09:09:00 UTC
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 09:37:26 UTC
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 10:10:31 UTC
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.