Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1096343 - virt-install --import fails with guest-agent-related error
Summary: virt-install --import fails with guest-agent-related error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: TRACKER-bugs-affecting-libguestfs
TreeView+ depends on / blocked
 
Reported: 2014-05-09 17:32 UTC by Richard W.M. Jones
Modified: 2016-04-10 18:16 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-10 18:16:10 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2014-05-09 17:32:13 UTC
Description of problem:

I built a disk image in my home directory using virt-builder, then
tried to import it into libvirt (as non-root).  It fails with:

Starting install...
ERROR    internal error: process exited while connecting to monitor: qemu-system-x86_64: -chardev socket,id=charchannel0,path=/home/rjones/.config/libvirt/qemu/lib/channel/target/nested.org.qemu.guest_agent.0,server,nowait: Failed to bind socket: No such file or directory
chardev: opening backend "socket" failed

Note that ~/.config/libvirt/qemu/lib/channel/target does not exist.

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

libvirt-daemon-1.1.3.5-1.fc20.x86_64
virt-install-1.0.1-3.fc20.noarch
libguestfs-tools-c-1.26.1-2.fc20.x86_64

How reproducible:

100%

Steps to Reproduce:

Run the following commands as non-root in your home dir:

virt-builder fedora-20
virt-install --import --ram 1024 --vcpus=2 --name nested --disk path=fedora-20.img,format=raw --os-variant fedora20

Actual results:

The virt-install command fails with the error shown above.

Comment 1 Richard W.M. Jones 2014-05-09 17:33:54 UTC
From /home/rjones/.cache/libvirt/qemu/log/nested.log:

2014-05-09 17:28:43.133+0000: starting up
LC_ALL=C PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/rjones/.local/bin:/home/rjones/bin HOME=/home/rjones USER=rjones LOGNAME=rjones QEMU_AUDIO_DRV=none /usr/bin/qemu-kvm -name nested -S -machine pc-i440fx-1.6,accel=kvm,usb=off -cpu qemu64 -m 1024 -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid 830b51e8-aea2-48af-a41b-59cf0cb90329 -nographic -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/home/rjones/.config/libvirt/qemu/lib/nested.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x3.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x3 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x3.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x3.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x4 -drive file=/home/rjones/fedora-20.img,if=none,id=drive-virtio-disk0,format=raw -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev user,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:5c:0a:5e,bus=pci.0,addr=0x2 -chardev socket,id=charchannel0,path=/home/rjones/.config/libvirt/qemu/lib/channel/target/nested.org.qemu.guest_agent.0,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -chardev pty,id=charconsole0 -device virtconsole,chardev=charconsole0,id=console0 -device usb-tablet,id=input0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6
qemu-system-x86_64: -chardev socket,id=charchannel0,path=/home/rjones/.config/libvirt/qemu/lib/channel/target/nested.org.qemu.guest_agent.0,server,nowait: Failed to bind socket: No such file or directory
chardev: opening backend "socket" failed
2014-05-09 17:28:43.343+0000: shutting down

Comment 2 Richard W.M. Jones 2014-05-09 17:35:02 UTC
qemu version is:
qemu-kvm-1.6.2-4.fc20.x86_64

Comment 3 Cole Robinson 2014-05-11 22:57:16 UTC
Libvirt should be generating that path and creating it for us

Comment 4 Richard W.M. Jones 2014-06-11 07:53:45 UTC
Happened again, this time with a regular virt-install:

virt-install-1.0.1-3.fc20.noarch
libvirt-1.1.3.5-1.fc20.x86_64
qemu-2.0.0-0.1.rc0.fc21.x86_64

+ virt-install --name=tmp-0d9fb3ab --ram=2048 --cpu=host --vcpus=2 --os-type=linux --os-variant=rhel7 --initrd-inject=/tmp/tmp.Km4Q6VFCex '--extra-args=ks=file:/tmp.Km4Q6VFCex console=tty0 console=ttyS0,115200' --disk /home/rjones/d/libguestfs/builder/website/rhel-7.0,size=6 --location=http://download.devel.redhat.com/released/RHEL-7/7.0/Server/x86_64/os --nographics --noreboot
WARNING  'console=ttyS0' found in --extra-args, but the device attached to the guest likely requires 'console=hvc0'. You may not see text install output from the guest.
WARNING  To make '--extra-args console=ttyS0' work, you can force a plain serial device with '--console pty'

Starting install...
Retrieving file .treeinfo...                             | 4.4 kB     00:00 !!! 
Retrieving file vmlinuz...                               | 9.3 MB     02:02 !!! 
Retrieving file initrd.img...                            |  68 MB     15:37 !!! 
Allocating 'rhel-7.0'                                    | 6.0 GB     00:00     
ERROR    internal error: process exited while connecting to monitor: qemu-system-x86_64: -chardev socket,id=charchannel0,path=/home/rjones/.config/libvirt/qemu/lib/channel/target/tmp-0d9fb3ab.org.qemu.guest_agent.0,server,nowait: Failed to bind socket: No such file or directory
qemu-system-x86_64: -chardev socket,id=charchannel0,path=/home/rjones/.config/libvirt/qemu/lib/channel/target/tmp-0d9fb3ab.org.qemu.guest_agent.0,server,nowait: chardev: opening backend "socket" failed

Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///session start tmp-0d9fb3ab
otherwise, please restart your installation.

Comment 5 Cole Robinson 2016-04-10 18:16:10 UTC
A few releases back libvirt was updated to create the socket directory if needed, so this should no longer be an issue


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