[libvirt-users] First & long question

Ján Tomko jtomko at redhat.com
Mon Dec 16 10:19:04 UTC 2013


On 12/16/2013 11:00 AM, Joaquim Barrera wrote:
> After make finishes I have compiled 1.2.0 libvirt in the source tree, and if I
> execute 'sudo ./run tools/virsh version' I get a this answer:
> 
> /Compiled against library: libvirt 1.2.0//
> //Using library: libvirt 1.2.0//
> //Using API: QEMU 1.2.0//
> //Running hypervisor: QEMU 1.5.0/
> 
> (/note that now I need to run virsh with sudo, I don't know exactly why/)

When run as root, virsh connects to the system libvirt daemon by default (URI
qemu:///system). As a non-privileged user, qemu:///session is used and the
daemon is run as the user.

See http://libvirt.org/uri.html#URI_qemu

> 
> So far, so good. I guess that, with --system flag, 1.2.0 custom libvirt uses
> config files from standard directories such as /etc/libvirt/libvirtd.conf, and
> if I used a custom directory instead, I would have to redefine my VMs, am I right?
> 
> Problems come when I want to use custom 1.2.0 daemon. If I execute "sudo
> service libvirt-bin stop" followed by "./daemon/libvirtd -d", then custom
> virsh gives me this error:
> 
> /error: failed to connect to the hypervisor//
> //error: no valid connection//
> //error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such
> file or directory/
> 

You need to run the daemon as root if you want it to listen on
/var/run/libvirt/libvirt-sock

> And I need to kill custom daemon and restart 1.1.1 libvirtd to recover from
> this. Any advice?
> 
> Finally (sorry about this large mail), there is one thing that does bother me
> quite a lot.
> 
> Using custom virsh, command history seems to vanish, as I press Arrow-UP and I
> get "^[[A" in the screen, instead of last command used. Tell me, please, that
> this is just some silly config I need to adjust... :_(
> 

Do you have the develompent headers for readline installed?

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20131216/a78e9be2/attachment.sig>


More information about the libvirt-users mailing list