Bug 1089648
| Summary: | libguestfs appliance failed to start up | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Community] Virtualization Tools | Reporter: | sara <sars_31> | ||||||
| Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | ||||||
| Status: | CLOSED NOTABUG | QA Contact: | |||||||
| Severity: | urgent | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | unspecified | CC: | acathrow, mbooth, ptoscano, sars_31 | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | x86_64 | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2014-04-24 09:18:59 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
Created attachment 888059 [details]
output of the command libguestfs-test-tool
Created attachment 888060 [details]
ouput of the command "sudo libguestfs-test-tool"
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).
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.
Hmm .. does the module file exist? What does this say: find /lib/modules/3.2.0-58-virtual -name 'virtio*console*' --> 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 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. 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. |
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