Bug 1089648 - libguestfs appliance failed to start up
Summary: libguestfs appliance failed to start up
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-21 10:42 UTC by sara
Modified: 2014-04-24 09:18 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-04-24 09:18:59 UTC
Embargoed:


Attachments (Terms of Use)
output of the command libguestfs-test-tool (35.88 KB, text/plain)
2014-04-21 10:44 UTC, sara
no flags Details
ouput of the command "sudo libguestfs-test-tool" (35.86 KB, text/plain)
2014-04-21 11:04 UTC, sara
no flags Details

Description sara 2014-04-21 10:42:26 UTC
Description of problem:
While I try to run the libguestfs in back-end in my python program:
        g.launch ()
it gives me the following error message
"g.launch ()
  File "/usr/lib/python2.7/dist-packages/guestfs.py", line 236, in launch
    return libguestfsmod.launch (self._o)
RuntimeError: unexpected end of file when reading from daemon.
This usually means the libguestfs appliance failed to start up.  Please
enable debugging (LIBGUESTFS_DEBUG=1) and rerun the command, then look at
the debug messages output prior to this error.
Or you can run 'libguestfs-test-tool' and post the complete output into
a bug report or message to the libguestfs mailing list."

Ran the testing tool "libguestfs-test-tool". PFA the bug-report file.

Version-Release number of selected component (if applicable):
1:1.14.8-1


How reproducible:
100%

Steps to Reproduce:

Run this python program :
import os
import guestfs       
output = "disk.img"       
g = guestfs.GuestFS ()

f = open (output, "w")
f.truncate (512 * 1024 * 1024)
f.close ()

g.set_trace (1)

g.set_autosync (1)

g.add_drive_opts (output, format = "raw", readonly = 0)

g.launch ()

devices = g.list_devices ()
assert (len (devices) == 1)

del g

Actual results:
RuntimeError: unexpected end of file when reading from daemon.
This usually means the libguestfs appliance failed to start up.

Expected results:
the appliance successfully launched

Additional info:
-> uname -a
Linux sara-dev 3.2.0-58-virtual #88-Ubuntu SMP Tue Dec 3 17:58:13 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Comment 1 sara 2014-04-21 10:44:09 UTC
Created attachment 888059 [details]
output of the command libguestfs-test-tool

Comment 2 sara 2014-04-21 11:04:03 UTC
Created attachment 888060 [details]
ouput of the command "sudo libguestfs-test-tool"

Comment 3 Richard W.M. Jones 2014-04-21 17:33:45 UTC
Does your kernel (3.2.0-58-virtual) have virtio-serial compiled in
or available as a module?  ie. look at /boot/config-* and check that

CONFIG_VIRTIO_CONSOLE=m
or
CONFIG_VIRTIO_CONSOLE=y

Another possible problem is your version of udev is too old to
have the virtio-serial ruleset.  It should have a rule in
/usr/lib/udev/rules.d/* which says something like this:

SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}"

(might not be precisely that).

Comment 4 sara 2014-04-22 09:29:13 UTC
Looked into /boot/config-3.2.0-58-virtual:

CONFIG_VIRTIO_CONSOLE=m was present.

upgraded the udev package :
-> dpkg -l | grep udev

ii  libudev0                         175-0ubuntu9.4                              udev library

ii  udev                             175-0ubuntu9.5                              rule-based device node and kernel event manager


modified the ruleset :

The udev had this rule:
  KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}"
while the current one added the SUBSYSTEM check:
 SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}"

(in /lib/udev/rules.d/50-udev-default.rules)

Still the same problem exist.

Comment 5 Richard W.M. Jones 2014-04-22 10:52:54 UTC
Hmm .. does the module file exist?  What does this say:

find /lib/modules/3.2.0-58-virtual -name 'virtio*console*'

Comment 6 sara 2014-04-23 06:21:13 UTC
--> find /lib/modules/3.2.0-58-virtual -name 'virtio*console*'
No Output

The module file by name "virtio*console*" does not exist.


--> sudo find / -name 'virtio*console*'
Output :
/usr/src/linux-headers-3.2.0-58-virtual/include/linux/virtio_console.h
/usr/src/linux-headers-3.2.0-58/include/linux/virtio_console.h
/usr/include/linux/virtio_console.h

Comment 7 Richard W.M. Jones 2014-04-23 09:45:02 UTC
So that's your problem.  Apparently your kernel was configured
with CONFIG_VIRTIO_CONSOLE=m but for some reason the module
was never built, or got deleted later, or needs to be installed
in some kind of "kernel-extras" package.

Comment 8 sara 2014-04-24 09:18:59 UTC
Installing the virtio-modules-3.5.0-21 package solved the issue.

--> find /lib/modules/3.2.0-58-virtual -name 'virtio*console*'

Output :
/lib/modules/3.2.0-58-virtual/kernel/drivers/char/virtio_console.ko

libguestfs appliance successfully starts up.

Thanks Richard.


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