Niranjan
2014-Nov-18 06:07 UTC
[Libguestfs] How to make virt-builder use qemu:///system instead of qemu:///session
Greetings I am trying to create quick fedora20 vm's and using virt-builder for it. Currently when i run virt-builder on Fedora 21 it fails with below errors: <snip> [juno@dhcp207-208 ~]$ virt-builder fedora-20 --cache ~/.cache/virt-builder [ 1.0] Downloading: http://libguestfs.org/download/builder/fedora-20.xz [ 1.0] Planning how to build this image [ 1.0] Uncompressing [ 9.0] Opening the new disk libvirt: XML-RPC error : Cannot recv data: Connection reset by peer virt-builder: error: libguestfs error: could not connect to libvirt (URI qemu:///session): Cannot recv data: Connection reset by peer [code=38 domain=7] If reporting bugs, run virt-builder with debugging enabled and include the complete output: virt-builder -v -x [...] </snip> Versions used: libguestfs-tools-c-1.28.2-3.fc21.x86_64 Fedora release 21 (Twenty One)[Host] libvirt-1.2.9.1-1.fc21.x86_64 I am trying virt-builder as non-root user. This user can connect through libvirt using qemu:///system. <snip> [juno@dhcp207-208 ~]$ virsh -c qemu:///system list Id Name State ---------------------------------------------------- </snip> but can't connect using qemu:///session <snip> [juno@dhcp207-208 ~]$ virsh -c qemu:///session error: failed to connect to the hypervisor error: Cannot recv data: Connection reset by peer </snip> Any help in this regard would be helpful. Regards Niranjan
Richard W.M. Jones
2014-Nov-18 12:01 UTC
Re: [Libguestfs] How to make virt-builder use qemu:///system instead of qemu:///session
On Tue, Nov 18, 2014 at 11:37:31AM +0530, Niranjan wrote:> libvirt: XML-RPC error : Cannot recv data: Connection reset by peer > virt-builder: error: libguestfs error: could not connect to libvirt (URI > qemu:///session): Cannot recv data: Connection reset by peer [code=38 > domain=7]This is a libvirt bug. Possibly: https://bugzilla.redhat.com/show_bug.cgi?id=1164773 or: https://bugzilla.redhat.com/show_bug.cgi?id=886454 Easiest thing is to ditch libvirt and have virt-builder run qemu directly: export LIBGUESTFS_BACKEND=direct Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
Niranjan
2014-Nov-18 14:55 UTC
Re: [Libguestfs] How to make virt-builder use qemu:///system instead of qemu:///session
Richard W.M. Jones wrote:> On Tue, Nov 18, 2014 at 11:37:31AM +0530, Niranjan wrote: > > libvirt: XML-RPC error : Cannot recv data: Connection reset by peer > > virt-builder: error: libguestfs error: could not connect to libvirt (URI > > qemu:///session): Cannot recv data: Connection reset by peer [code=38 > > domain=7] > > This is a libvirt bug. Possibly: > > https://bugzilla.redhat.com/show_bug.cgi?id=1164773 > > or: > > https://bugzilla.redhat.com/show_bug.cgi?id=886454 > > Easiest thing is to ditch libvirt and have virt-builder run qemu > directly: > > export LIBGUESTFS_BACKEND=directThanks that worked. <snip> [juno@dhcp207-208 ~]$ export LIBGUESTFS_BACKEND=direct [juno@dhcp207-208 ~]$ virt-builder fedora-20 --cache ~/.cache/virt-builder [ 1.0] Downloading: http://libguestfs.org/download/builder/fedora-20.xz [ 2.0] Planning how to build this image [ 2.0] Uncompressing [ 10.0] Opening the new disk [ 15.0] Setting a random seed [ 15.0] Setting passwords virt-builder: Setting random password of root to fDn0pqBwSdFUD28f [ 16.0] Finishing off Output file: fedora-20.img Output size: 4.0G Output format: raw Total usable space: 5.2G Free space: 4.5G (86%) </snip>> > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones > Read my programming and virtualization blog: http://rwmj.wordpress.com > Fedora Windows cross-compiler. Compile Windows programs, test, and > build Windows installers. Over 100 libraries supported. > http://fedoraproject.org/wiki/MinGW
Seemingly Similar Threads
- unable to creating/list storage pools using non-root user
- Re: How to make virt-builder use qemu:///system instead of qemu:///session
- Re: [ovirt-users] OVA import of FC21 VM hangs during virt-v2v conversion?
- Re: [ovirt-users] OVA import of FC21 VM hangs during virt-v2v conversion?
- How do I start using Vorbis Codec?