virt-manager can't connect to libvirt
up vote
23
down vote
favorite
I'm running Ubuntu 12.04.2 32 bits.
The error doesn't show up if I start gksudo virt-manager
.
libvirt-bin
is installed.- I don't know how to check for the daemon.
- I am a member of
libvirtd
.
Output of ps ax | grep libvirt
:
9225 ? Sl 0:04 /usr/sbin/libvirtd -d
9302 ? S 0:00 /usr/sbin/dnsmasq -u libvirt-dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/default.pid --conf-file= --except-interface lo --listen-address 192.168.122.1 --dhcp-range 192.168.122.2,192.168.122.254 --dhcp-leasefile=/var/lib/libvirt/dnsmasq/default.leases --dhcp-lease-max=253 --dhcp-no-override`
Output of ls -l /var/run/libvirt/libvirt-sock
:
srwxrwx--- 1 root libvirtd 0 Set 13 15:04 /var/run/libvirt/libvirt-sock
Output of getent group libvirtd
:
libvirtd:x:130:OTHERUSER,MYUSER
Detailed error message
Unable to connect to libvirt.
Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied
Verify that:
- The 'libvirt-bin' package is installed
- The 'libvirtd' daemon has been started
- You are member of the 'libvirtd' group
Libvirt URI is: qemu:///system
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/connection.py", line 1185, in _open_thread
self.vmm = self._try_open()
File "/usr/share/virt-manager/virtManager/connection.py", line 1167, in _try_open
flags)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 102, in openAuth
if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied
virtualization kvm qemu
add a comment |
up vote
23
down vote
favorite
I'm running Ubuntu 12.04.2 32 bits.
The error doesn't show up if I start gksudo virt-manager
.
libvirt-bin
is installed.- I don't know how to check for the daemon.
- I am a member of
libvirtd
.
Output of ps ax | grep libvirt
:
9225 ? Sl 0:04 /usr/sbin/libvirtd -d
9302 ? S 0:00 /usr/sbin/dnsmasq -u libvirt-dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/default.pid --conf-file= --except-interface lo --listen-address 192.168.122.1 --dhcp-range 192.168.122.2,192.168.122.254 --dhcp-leasefile=/var/lib/libvirt/dnsmasq/default.leases --dhcp-lease-max=253 --dhcp-no-override`
Output of ls -l /var/run/libvirt/libvirt-sock
:
srwxrwx--- 1 root libvirtd 0 Set 13 15:04 /var/run/libvirt/libvirt-sock
Output of getent group libvirtd
:
libvirtd:x:130:OTHERUSER,MYUSER
Detailed error message
Unable to connect to libvirt.
Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied
Verify that:
- The 'libvirt-bin' package is installed
- The 'libvirtd' daemon has been started
- You are member of the 'libvirtd' group
Libvirt URI is: qemu:///system
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/connection.py", line 1185, in _open_thread
self.vmm = self._try_open()
File "/usr/share/virt-manager/virtManager/connection.py", line 1167, in _try_open
flags)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 102, in openAuth
if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied
virtualization kvm qemu
The error doesn't show up if I startgksudo virt-manager
– That Brazilian Guy
Sep 13 '13 at 18:52
What are the contents of your/etc/libvirt/libvirtd.conf
file?
– Bruno Pereira
Sep 13 '13 at 19:41
Not the perfect place, but if you're on arch like I am and installedqemu
andvirt-manager
, try runningsudo systemctl start libvirtd
and optionallysudo systemctl enable libvirtd
if you want it to start at startup.
– Ave
Apr 30 '17 at 23:15
add a comment |
up vote
23
down vote
favorite
up vote
23
down vote
favorite
I'm running Ubuntu 12.04.2 32 bits.
The error doesn't show up if I start gksudo virt-manager
.
libvirt-bin
is installed.- I don't know how to check for the daemon.
- I am a member of
libvirtd
.
Output of ps ax | grep libvirt
:
9225 ? Sl 0:04 /usr/sbin/libvirtd -d
9302 ? S 0:00 /usr/sbin/dnsmasq -u libvirt-dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/default.pid --conf-file= --except-interface lo --listen-address 192.168.122.1 --dhcp-range 192.168.122.2,192.168.122.254 --dhcp-leasefile=/var/lib/libvirt/dnsmasq/default.leases --dhcp-lease-max=253 --dhcp-no-override`
Output of ls -l /var/run/libvirt/libvirt-sock
:
srwxrwx--- 1 root libvirtd 0 Set 13 15:04 /var/run/libvirt/libvirt-sock
Output of getent group libvirtd
:
libvirtd:x:130:OTHERUSER,MYUSER
Detailed error message
Unable to connect to libvirt.
Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied
Verify that:
- The 'libvirt-bin' package is installed
- The 'libvirtd' daemon has been started
- You are member of the 'libvirtd' group
Libvirt URI is: qemu:///system
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/connection.py", line 1185, in _open_thread
self.vmm = self._try_open()
File "/usr/share/virt-manager/virtManager/connection.py", line 1167, in _try_open
flags)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 102, in openAuth
if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied
virtualization kvm qemu
I'm running Ubuntu 12.04.2 32 bits.
The error doesn't show up if I start gksudo virt-manager
.
libvirt-bin
is installed.- I don't know how to check for the daemon.
- I am a member of
libvirtd
.
Output of ps ax | grep libvirt
:
9225 ? Sl 0:04 /usr/sbin/libvirtd -d
9302 ? S 0:00 /usr/sbin/dnsmasq -u libvirt-dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/default.pid --conf-file= --except-interface lo --listen-address 192.168.122.1 --dhcp-range 192.168.122.2,192.168.122.254 --dhcp-leasefile=/var/lib/libvirt/dnsmasq/default.leases --dhcp-lease-max=253 --dhcp-no-override`
Output of ls -l /var/run/libvirt/libvirt-sock
:
srwxrwx--- 1 root libvirtd 0 Set 13 15:04 /var/run/libvirt/libvirt-sock
Output of getent group libvirtd
:
libvirtd:x:130:OTHERUSER,MYUSER
Detailed error message
Unable to connect to libvirt.
Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied
Verify that:
- The 'libvirt-bin' package is installed
- The 'libvirtd' daemon has been started
- You are member of the 'libvirtd' group
Libvirt URI is: qemu:///system
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/connection.py", line 1185, in _open_thread
self.vmm = self._try_open()
File "/usr/share/virt-manager/virtManager/connection.py", line 1167, in _try_open
flags)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 102, in openAuth
if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied
virtualization kvm qemu
virtualization kvm qemu
edited May 1 '17 at 5:16
Zanna
49.2k13124234
49.2k13124234
asked Sep 13 '13 at 18:29
That Brazilian Guy
1,75541639
1,75541639
The error doesn't show up if I startgksudo virt-manager
– That Brazilian Guy
Sep 13 '13 at 18:52
What are the contents of your/etc/libvirt/libvirtd.conf
file?
– Bruno Pereira
Sep 13 '13 at 19:41
Not the perfect place, but if you're on arch like I am and installedqemu
andvirt-manager
, try runningsudo systemctl start libvirtd
and optionallysudo systemctl enable libvirtd
if you want it to start at startup.
– Ave
Apr 30 '17 at 23:15
add a comment |
The error doesn't show up if I startgksudo virt-manager
– That Brazilian Guy
Sep 13 '13 at 18:52
What are the contents of your/etc/libvirt/libvirtd.conf
file?
– Bruno Pereira
Sep 13 '13 at 19:41
Not the perfect place, but if you're on arch like I am and installedqemu
andvirt-manager
, try runningsudo systemctl start libvirtd
and optionallysudo systemctl enable libvirtd
if you want it to start at startup.
– Ave
Apr 30 '17 at 23:15
The error doesn't show up if I start
gksudo virt-manager
– That Brazilian Guy
Sep 13 '13 at 18:52
The error doesn't show up if I start
gksudo virt-manager
– That Brazilian Guy
Sep 13 '13 at 18:52
What are the contents of your
/etc/libvirt/libvirtd.conf
file?– Bruno Pereira
Sep 13 '13 at 19:41
What are the contents of your
/etc/libvirt/libvirtd.conf
file?– Bruno Pereira
Sep 13 '13 at 19:41
Not the perfect place, but if you're on arch like I am and installed
qemu
and virt-manager
, try running sudo systemctl start libvirtd
and optionally sudo systemctl enable libvirtd
if you want it to start at startup.– Ave
Apr 30 '17 at 23:15
Not the perfect place, but if you're on arch like I am and installed
qemu
and virt-manager
, try running sudo systemctl start libvirtd
and optionally sudo systemctl enable libvirtd
if you want it to start at startup.– Ave
Apr 30 '17 at 23:15
add a comment |
11 Answers
11
active
oldest
votes
up vote
41
down vote
accepted
Rebooting the system where virt-manager
is installed solved the issue.
8
not a typical Linux solution!
– Woeitg
Feb 3 '17 at 9:55
1
On 16.04 its libvirt-bin .service not libvirtd .service if you wonder. So the daemon is there.
– Bulat M.
Mar 11 '17 at 4:30
1
Usually just logout/login should be enough in this case to make the group membership changes propagate into current session, but for me personally there's not much difference between relogin and reboot (causes very similar disruption, the reboot takes just about 7s longer), so I rather used reboot "just in case".
– Ped7g
Feb 12 at 12:58
add a comment |
up vote
25
down vote
After installing KVM, run this command then that error will not occur again.
sudo virt-manager
whoa!!! What is this, How did this work?
– Kishor Pawar
Feb 10 '16 at 6:07
It worked because ofsudo
. read explanation in another answer ask.fedoraproject.org/en/question/45805/…
– Kishor Pawar
Feb 10 '16 at 6:28
Should be the acepted answer.
– Magno C
Mar 13 '16 at 21:23
1
It works but needed root to use. I want to use it from normal user. What can i do for it?
– Puneet Dixit
Apr 29 '17 at 20:37
2
As @andrew-grasso states, you need to logout/login for the group membership changes to apply. Usingsudo
is not recommended.
– Alex Willison
Jun 8 '17 at 14:34
|
show 1 more comment
up vote
5
down vote
I'm managing both Qemu and Virtualbox on my Ubuntu 14.02 machine, and after installing Virtualbox libvirt-bin failed to autostart. So check if libvirt-bin is running:
ps faux | grep libvirt-bin
if you don't see it in ps output - start in manually, then run virt-manager:
sudo service libvirt-bin start
add a comment |
up vote
4
down vote
On Ubuntu 16.04.3 LTS
systemctl start virtlogd.socket
was the only answer. The socket has its own daemon.
That's unusual.
add a comment |
up vote
3
down vote
For me, the error was caused because group membership changes don't apply without a logout-login (or reboot). I had just installed KVM and libvirt-bin. The installer automatically added my user to the libvirtd group, I had restarted the libvirt-bin service, but I was still getting the error.
Simply logging out and back in resolved the problem by applying my new group membership.
Assuming you just installed libvirt-bin and already confirmed that your current user is a member of the libvirtd group as the error message suggests, you will need to log out and back in for the new group membership to apply.
Don't change file permissions to 777
Don't just run everything as root or sudo to avoid understanding what's wrong.
I hope this helps someone.
add a comment |
up vote
0
down vote
The problem is discussed on Launchpad and the cause of this problem can be solved by installing the xen-utils
package (xen-utils-4.4
on Ubuntu 14.04). I previously was getting around this issue by virt-manager
through sudo
at the command line.
xen
is similar tokvm
wiki.archlinux.org/index.php/KVM, if you already havekvm
installed do not installxen
. It override mykvm
installation and my vms stopped running. when I removedxen
back vms started running.
– Kishor Pawar
Feb 10 '16 at 7:07
add a comment |
up vote
0
down vote
For me the case was that when using service libvirt-bin status
it showed that everything was just running fine though I could not connect like:
● libvirt-bin.service - Virtualization daemon
Loaded: loaded (/lib/systemd/system/libvirt-bin.service; enabled; vendor preset: enabled)
Active: active (running) since Do 2016-09-22 13:22:16 CEST; 6min ago
[...]
In /var/run/libvirt/
there should be these two files:
srwxrwxrwx 1 root libvirtd 0 Sep 22 13:22 libvirt-sock=
srwxrwxrwx 1 root libvirtd 0 Sep 22 13:22 libvirt-sock-ro=
If the sockets are not showing, use service libvirt-bin stop; service libvirt-bin start
to completely restart the process. Using service libvirt-bin restart
is not sufficient and will not re-create the socket.
The libvirt-bin
service can safely be stopped and will not poweroff the guests.
add a comment |
up vote
0
down vote
As of Ubuntu 17.10, I had to also add myself to group libvirt. I had already added myself to libvirtd and did not remove myself from that group. I do not know if both are required or not.
I did this since I noticed the contents of /var/run/libvirt were owned by libvirt instead of by libvirtd.
To be a full answer you need to say how to add oneself to the extra groups.
– pbhj
Mar 5 at 23:26
add a comment |
up vote
0
down vote
After installing all of the packages stated by the op, you can log out then log back in. Anything that add you to user groups you need to log out and back in to be added to the new groups. It is a minor inconvenience, less of one than rebooting.
This was flagged as not complete however this goes as a general rule for adding your user to a group. A relog is needed, that was the missing part that I did not see here.
1
Welcome to Ask Ubuntu! In its current form your answer is not as good as it could be. Could you review How to Write a Good Answer, and Style guide for questions and answers. You could clarify what packages need installed.
– J. Starnes
Jan 9 at 3:17
add a comment |
up vote
-1
down vote
I had this same problem and in the detailed error report it talks about lack of permission to the libvirt-sock
file. Changing the permission of the file /var/run/libvirt/libvirt-sock
to 777 made it work for me.
3
Changing permission masks to 0777 is bad. Don't recommend potentially harmful actions without explaining the consequences! -1
– David Foerster
Sep 27 '16 at 14:46
add a comment |
up vote
-1
down vote
use Ubuntu Software to uninstall virtual manager, log out, log back in, install virtual manager, and run it normally without using sudo or even using the command line.
1
You could improve your answer by expanding on why these steps are necessary instead of a simply reinstalling. Or following one of the other answers. From Review
– J. Starnes
Dec 20 '17 at 4:44
add a comment |
11 Answers
11
active
oldest
votes
11 Answers
11
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
41
down vote
accepted
Rebooting the system where virt-manager
is installed solved the issue.
8
not a typical Linux solution!
– Woeitg
Feb 3 '17 at 9:55
1
On 16.04 its libvirt-bin .service not libvirtd .service if you wonder. So the daemon is there.
– Bulat M.
Mar 11 '17 at 4:30
1
Usually just logout/login should be enough in this case to make the group membership changes propagate into current session, but for me personally there's not much difference between relogin and reboot (causes very similar disruption, the reboot takes just about 7s longer), so I rather used reboot "just in case".
– Ped7g
Feb 12 at 12:58
add a comment |
up vote
41
down vote
accepted
Rebooting the system where virt-manager
is installed solved the issue.
8
not a typical Linux solution!
– Woeitg
Feb 3 '17 at 9:55
1
On 16.04 its libvirt-bin .service not libvirtd .service if you wonder. So the daemon is there.
– Bulat M.
Mar 11 '17 at 4:30
1
Usually just logout/login should be enough in this case to make the group membership changes propagate into current session, but for me personally there's not much difference between relogin and reboot (causes very similar disruption, the reboot takes just about 7s longer), so I rather used reboot "just in case".
– Ped7g
Feb 12 at 12:58
add a comment |
up vote
41
down vote
accepted
up vote
41
down vote
accepted
Rebooting the system where virt-manager
is installed solved the issue.
Rebooting the system where virt-manager
is installed solved the issue.
edited Jun 15 at 15:12
answered Sep 13 '13 at 21:37
That Brazilian Guy
1,75541639
1,75541639
8
not a typical Linux solution!
– Woeitg
Feb 3 '17 at 9:55
1
On 16.04 its libvirt-bin .service not libvirtd .service if you wonder. So the daemon is there.
– Bulat M.
Mar 11 '17 at 4:30
1
Usually just logout/login should be enough in this case to make the group membership changes propagate into current session, but for me personally there's not much difference between relogin and reboot (causes very similar disruption, the reboot takes just about 7s longer), so I rather used reboot "just in case".
– Ped7g
Feb 12 at 12:58
add a comment |
8
not a typical Linux solution!
– Woeitg
Feb 3 '17 at 9:55
1
On 16.04 its libvirt-bin .service not libvirtd .service if you wonder. So the daemon is there.
– Bulat M.
Mar 11 '17 at 4:30
1
Usually just logout/login should be enough in this case to make the group membership changes propagate into current session, but for me personally there's not much difference between relogin and reboot (causes very similar disruption, the reboot takes just about 7s longer), so I rather used reboot "just in case".
– Ped7g
Feb 12 at 12:58
8
8
not a typical Linux solution!
– Woeitg
Feb 3 '17 at 9:55
not a typical Linux solution!
– Woeitg
Feb 3 '17 at 9:55
1
1
On 16.04 its libvirt-bin .service not libvirtd .service if you wonder. So the daemon is there.
– Bulat M.
Mar 11 '17 at 4:30
On 16.04 its libvirt-bin .service not libvirtd .service if you wonder. So the daemon is there.
– Bulat M.
Mar 11 '17 at 4:30
1
1
Usually just logout/login should be enough in this case to make the group membership changes propagate into current session, but for me personally there's not much difference between relogin and reboot (causes very similar disruption, the reboot takes just about 7s longer), so I rather used reboot "just in case".
– Ped7g
Feb 12 at 12:58
Usually just logout/login should be enough in this case to make the group membership changes propagate into current session, but for me personally there's not much difference between relogin and reboot (causes very similar disruption, the reboot takes just about 7s longer), so I rather used reboot "just in case".
– Ped7g
Feb 12 at 12:58
add a comment |
up vote
25
down vote
After installing KVM, run this command then that error will not occur again.
sudo virt-manager
whoa!!! What is this, How did this work?
– Kishor Pawar
Feb 10 '16 at 6:07
It worked because ofsudo
. read explanation in another answer ask.fedoraproject.org/en/question/45805/…
– Kishor Pawar
Feb 10 '16 at 6:28
Should be the acepted answer.
– Magno C
Mar 13 '16 at 21:23
1
It works but needed root to use. I want to use it from normal user. What can i do for it?
– Puneet Dixit
Apr 29 '17 at 20:37
2
As @andrew-grasso states, you need to logout/login for the group membership changes to apply. Usingsudo
is not recommended.
– Alex Willison
Jun 8 '17 at 14:34
|
show 1 more comment
up vote
25
down vote
After installing KVM, run this command then that error will not occur again.
sudo virt-manager
whoa!!! What is this, How did this work?
– Kishor Pawar
Feb 10 '16 at 6:07
It worked because ofsudo
. read explanation in another answer ask.fedoraproject.org/en/question/45805/…
– Kishor Pawar
Feb 10 '16 at 6:28
Should be the acepted answer.
– Magno C
Mar 13 '16 at 21:23
1
It works but needed root to use. I want to use it from normal user. What can i do for it?
– Puneet Dixit
Apr 29 '17 at 20:37
2
As @andrew-grasso states, you need to logout/login for the group membership changes to apply. Usingsudo
is not recommended.
– Alex Willison
Jun 8 '17 at 14:34
|
show 1 more comment
up vote
25
down vote
up vote
25
down vote
After installing KVM, run this command then that error will not occur again.
sudo virt-manager
After installing KVM, run this command then that error will not occur again.
sudo virt-manager
edited May 1 '17 at 3:49
d a i s y
3,24482244
3,24482244
answered Feb 9 '16 at 18:06
Abhi Abhishek
25132
25132
whoa!!! What is this, How did this work?
– Kishor Pawar
Feb 10 '16 at 6:07
It worked because ofsudo
. read explanation in another answer ask.fedoraproject.org/en/question/45805/…
– Kishor Pawar
Feb 10 '16 at 6:28
Should be the acepted answer.
– Magno C
Mar 13 '16 at 21:23
1
It works but needed root to use. I want to use it from normal user. What can i do for it?
– Puneet Dixit
Apr 29 '17 at 20:37
2
As @andrew-grasso states, you need to logout/login for the group membership changes to apply. Usingsudo
is not recommended.
– Alex Willison
Jun 8 '17 at 14:34
|
show 1 more comment
whoa!!! What is this, How did this work?
– Kishor Pawar
Feb 10 '16 at 6:07
It worked because ofsudo
. read explanation in another answer ask.fedoraproject.org/en/question/45805/…
– Kishor Pawar
Feb 10 '16 at 6:28
Should be the acepted answer.
– Magno C
Mar 13 '16 at 21:23
1
It works but needed root to use. I want to use it from normal user. What can i do for it?
– Puneet Dixit
Apr 29 '17 at 20:37
2
As @andrew-grasso states, you need to logout/login for the group membership changes to apply. Usingsudo
is not recommended.
– Alex Willison
Jun 8 '17 at 14:34
whoa!!! What is this, How did this work?
– Kishor Pawar
Feb 10 '16 at 6:07
whoa!!! What is this, How did this work?
– Kishor Pawar
Feb 10 '16 at 6:07
It worked because of
sudo
. read explanation in another answer ask.fedoraproject.org/en/question/45805/…– Kishor Pawar
Feb 10 '16 at 6:28
It worked because of
sudo
. read explanation in another answer ask.fedoraproject.org/en/question/45805/…– Kishor Pawar
Feb 10 '16 at 6:28
Should be the acepted answer.
– Magno C
Mar 13 '16 at 21:23
Should be the acepted answer.
– Magno C
Mar 13 '16 at 21:23
1
1
It works but needed root to use. I want to use it from normal user. What can i do for it?
– Puneet Dixit
Apr 29 '17 at 20:37
It works but needed root to use. I want to use it from normal user. What can i do for it?
– Puneet Dixit
Apr 29 '17 at 20:37
2
2
As @andrew-grasso states, you need to logout/login for the group membership changes to apply. Using
sudo
is not recommended.– Alex Willison
Jun 8 '17 at 14:34
As @andrew-grasso states, you need to logout/login for the group membership changes to apply. Using
sudo
is not recommended.– Alex Willison
Jun 8 '17 at 14:34
|
show 1 more comment
up vote
5
down vote
I'm managing both Qemu and Virtualbox on my Ubuntu 14.02 machine, and after installing Virtualbox libvirt-bin failed to autostart. So check if libvirt-bin is running:
ps faux | grep libvirt-bin
if you don't see it in ps output - start in manually, then run virt-manager:
sudo service libvirt-bin start
add a comment |
up vote
5
down vote
I'm managing both Qemu and Virtualbox on my Ubuntu 14.02 machine, and after installing Virtualbox libvirt-bin failed to autostart. So check if libvirt-bin is running:
ps faux | grep libvirt-bin
if you don't see it in ps output - start in manually, then run virt-manager:
sudo service libvirt-bin start
add a comment |
up vote
5
down vote
up vote
5
down vote
I'm managing both Qemu and Virtualbox on my Ubuntu 14.02 machine, and after installing Virtualbox libvirt-bin failed to autostart. So check if libvirt-bin is running:
ps faux | grep libvirt-bin
if you don't see it in ps output - start in manually, then run virt-manager:
sudo service libvirt-bin start
I'm managing both Qemu and Virtualbox on my Ubuntu 14.02 machine, and after installing Virtualbox libvirt-bin failed to autostart. So check if libvirt-bin is running:
ps faux | grep libvirt-bin
if you don't see it in ps output - start in manually, then run virt-manager:
sudo service libvirt-bin start
answered Aug 16 '15 at 14:45
Valentin Kantor
30636
30636
add a comment |
add a comment |
up vote
4
down vote
On Ubuntu 16.04.3 LTS
systemctl start virtlogd.socket
was the only answer. The socket has its own daemon.
That's unusual.
add a comment |
up vote
4
down vote
On Ubuntu 16.04.3 LTS
systemctl start virtlogd.socket
was the only answer. The socket has its own daemon.
That's unusual.
add a comment |
up vote
4
down vote
up vote
4
down vote
On Ubuntu 16.04.3 LTS
systemctl start virtlogd.socket
was the only answer. The socket has its own daemon.
That's unusual.
On Ubuntu 16.04.3 LTS
systemctl start virtlogd.socket
was the only answer. The socket has its own daemon.
That's unusual.
answered Nov 12 '17 at 15:41
mr.zog
1412
1412
add a comment |
add a comment |
up vote
3
down vote
For me, the error was caused because group membership changes don't apply without a logout-login (or reboot). I had just installed KVM and libvirt-bin. The installer automatically added my user to the libvirtd group, I had restarted the libvirt-bin service, but I was still getting the error.
Simply logging out and back in resolved the problem by applying my new group membership.
Assuming you just installed libvirt-bin and already confirmed that your current user is a member of the libvirtd group as the error message suggests, you will need to log out and back in for the new group membership to apply.
Don't change file permissions to 777
Don't just run everything as root or sudo to avoid understanding what's wrong.
I hope this helps someone.
add a comment |
up vote
3
down vote
For me, the error was caused because group membership changes don't apply without a logout-login (or reboot). I had just installed KVM and libvirt-bin. The installer automatically added my user to the libvirtd group, I had restarted the libvirt-bin service, but I was still getting the error.
Simply logging out and back in resolved the problem by applying my new group membership.
Assuming you just installed libvirt-bin and already confirmed that your current user is a member of the libvirtd group as the error message suggests, you will need to log out and back in for the new group membership to apply.
Don't change file permissions to 777
Don't just run everything as root or sudo to avoid understanding what's wrong.
I hope this helps someone.
add a comment |
up vote
3
down vote
up vote
3
down vote
For me, the error was caused because group membership changes don't apply without a logout-login (or reboot). I had just installed KVM and libvirt-bin. The installer automatically added my user to the libvirtd group, I had restarted the libvirt-bin service, but I was still getting the error.
Simply logging out and back in resolved the problem by applying my new group membership.
Assuming you just installed libvirt-bin and already confirmed that your current user is a member of the libvirtd group as the error message suggests, you will need to log out and back in for the new group membership to apply.
Don't change file permissions to 777
Don't just run everything as root or sudo to avoid understanding what's wrong.
I hope this helps someone.
For me, the error was caused because group membership changes don't apply without a logout-login (or reboot). I had just installed KVM and libvirt-bin. The installer automatically added my user to the libvirtd group, I had restarted the libvirt-bin service, but I was still getting the error.
Simply logging out and back in resolved the problem by applying my new group membership.
Assuming you just installed libvirt-bin and already confirmed that your current user is a member of the libvirtd group as the error message suggests, you will need to log out and back in for the new group membership to apply.
Don't change file permissions to 777
Don't just run everything as root or sudo to avoid understanding what's wrong.
I hope this helps someone.
answered Nov 11 '16 at 18:07
Andrew Grasso
413
413
add a comment |
add a comment |
up vote
0
down vote
The problem is discussed on Launchpad and the cause of this problem can be solved by installing the xen-utils
package (xen-utils-4.4
on Ubuntu 14.04). I previously was getting around this issue by virt-manager
through sudo
at the command line.
xen
is similar tokvm
wiki.archlinux.org/index.php/KVM, if you already havekvm
installed do not installxen
. It override mykvm
installation and my vms stopped running. when I removedxen
back vms started running.
– Kishor Pawar
Feb 10 '16 at 7:07
add a comment |
up vote
0
down vote
The problem is discussed on Launchpad and the cause of this problem can be solved by installing the xen-utils
package (xen-utils-4.4
on Ubuntu 14.04). I previously was getting around this issue by virt-manager
through sudo
at the command line.
xen
is similar tokvm
wiki.archlinux.org/index.php/KVM, if you already havekvm
installed do not installxen
. It override mykvm
installation and my vms stopped running. when I removedxen
back vms started running.
– Kishor Pawar
Feb 10 '16 at 7:07
add a comment |
up vote
0
down vote
up vote
0
down vote
The problem is discussed on Launchpad and the cause of this problem can be solved by installing the xen-utils
package (xen-utils-4.4
on Ubuntu 14.04). I previously was getting around this issue by virt-manager
through sudo
at the command line.
The problem is discussed on Launchpad and the cause of this problem can be solved by installing the xen-utils
package (xen-utils-4.4
on Ubuntu 14.04). I previously was getting around this issue by virt-manager
through sudo
at the command line.
edited Dec 13 '15 at 20:11
Jakuje
5,13471831
5,13471831
answered Dec 13 '15 at 15:48
Jay Philips
362
362
xen
is similar tokvm
wiki.archlinux.org/index.php/KVM, if you already havekvm
installed do not installxen
. It override mykvm
installation and my vms stopped running. when I removedxen
back vms started running.
– Kishor Pawar
Feb 10 '16 at 7:07
add a comment |
xen
is similar tokvm
wiki.archlinux.org/index.php/KVM, if you already havekvm
installed do not installxen
. It override mykvm
installation and my vms stopped running. when I removedxen
back vms started running.
– Kishor Pawar
Feb 10 '16 at 7:07
xen
is similar to kvm
wiki.archlinux.org/index.php/KVM, if you already have kvm
installed do not install xen
. It override my kvm
installation and my vms stopped running. when I removed xen
back vms started running.– Kishor Pawar
Feb 10 '16 at 7:07
xen
is similar to kvm
wiki.archlinux.org/index.php/KVM, if you already have kvm
installed do not install xen
. It override my kvm
installation and my vms stopped running. when I removed xen
back vms started running.– Kishor Pawar
Feb 10 '16 at 7:07
add a comment |
up vote
0
down vote
For me the case was that when using service libvirt-bin status
it showed that everything was just running fine though I could not connect like:
● libvirt-bin.service - Virtualization daemon
Loaded: loaded (/lib/systemd/system/libvirt-bin.service; enabled; vendor preset: enabled)
Active: active (running) since Do 2016-09-22 13:22:16 CEST; 6min ago
[...]
In /var/run/libvirt/
there should be these two files:
srwxrwxrwx 1 root libvirtd 0 Sep 22 13:22 libvirt-sock=
srwxrwxrwx 1 root libvirtd 0 Sep 22 13:22 libvirt-sock-ro=
If the sockets are not showing, use service libvirt-bin stop; service libvirt-bin start
to completely restart the process. Using service libvirt-bin restart
is not sufficient and will not re-create the socket.
The libvirt-bin
service can safely be stopped and will not poweroff the guests.
add a comment |
up vote
0
down vote
For me the case was that when using service libvirt-bin status
it showed that everything was just running fine though I could not connect like:
● libvirt-bin.service - Virtualization daemon
Loaded: loaded (/lib/systemd/system/libvirt-bin.service; enabled; vendor preset: enabled)
Active: active (running) since Do 2016-09-22 13:22:16 CEST; 6min ago
[...]
In /var/run/libvirt/
there should be these two files:
srwxrwxrwx 1 root libvirtd 0 Sep 22 13:22 libvirt-sock=
srwxrwxrwx 1 root libvirtd 0 Sep 22 13:22 libvirt-sock-ro=
If the sockets are not showing, use service libvirt-bin stop; service libvirt-bin start
to completely restart the process. Using service libvirt-bin restart
is not sufficient and will not re-create the socket.
The libvirt-bin
service can safely be stopped and will not poweroff the guests.
add a comment |
up vote
0
down vote
up vote
0
down vote
For me the case was that when using service libvirt-bin status
it showed that everything was just running fine though I could not connect like:
● libvirt-bin.service - Virtualization daemon
Loaded: loaded (/lib/systemd/system/libvirt-bin.service; enabled; vendor preset: enabled)
Active: active (running) since Do 2016-09-22 13:22:16 CEST; 6min ago
[...]
In /var/run/libvirt/
there should be these two files:
srwxrwxrwx 1 root libvirtd 0 Sep 22 13:22 libvirt-sock=
srwxrwxrwx 1 root libvirtd 0 Sep 22 13:22 libvirt-sock-ro=
If the sockets are not showing, use service libvirt-bin stop; service libvirt-bin start
to completely restart the process. Using service libvirt-bin restart
is not sufficient and will not re-create the socket.
The libvirt-bin
service can safely be stopped and will not poweroff the guests.
For me the case was that when using service libvirt-bin status
it showed that everything was just running fine though I could not connect like:
● libvirt-bin.service - Virtualization daemon
Loaded: loaded (/lib/systemd/system/libvirt-bin.service; enabled; vendor preset: enabled)
Active: active (running) since Do 2016-09-22 13:22:16 CEST; 6min ago
[...]
In /var/run/libvirt/
there should be these two files:
srwxrwxrwx 1 root libvirtd 0 Sep 22 13:22 libvirt-sock=
srwxrwxrwx 1 root libvirtd 0 Sep 22 13:22 libvirt-sock-ro=
If the sockets are not showing, use service libvirt-bin stop; service libvirt-bin start
to completely restart the process. Using service libvirt-bin restart
is not sufficient and will not re-create the socket.
The libvirt-bin
service can safely be stopped and will not poweroff the guests.
answered Sep 22 '16 at 11:29
Flatron
627620
627620
add a comment |
add a comment |
up vote
0
down vote
As of Ubuntu 17.10, I had to also add myself to group libvirt. I had already added myself to libvirtd and did not remove myself from that group. I do not know if both are required or not.
I did this since I noticed the contents of /var/run/libvirt were owned by libvirt instead of by libvirtd.
To be a full answer you need to say how to add oneself to the extra groups.
– pbhj
Mar 5 at 23:26
add a comment |
up vote
0
down vote
As of Ubuntu 17.10, I had to also add myself to group libvirt. I had already added myself to libvirtd and did not remove myself from that group. I do not know if both are required or not.
I did this since I noticed the contents of /var/run/libvirt were owned by libvirt instead of by libvirtd.
To be a full answer you need to say how to add oneself to the extra groups.
– pbhj
Mar 5 at 23:26
add a comment |
up vote
0
down vote
up vote
0
down vote
As of Ubuntu 17.10, I had to also add myself to group libvirt. I had already added myself to libvirtd and did not remove myself from that group. I do not know if both are required or not.
I did this since I noticed the contents of /var/run/libvirt were owned by libvirt instead of by libvirtd.
As of Ubuntu 17.10, I had to also add myself to group libvirt. I had already added myself to libvirtd and did not remove myself from that group. I do not know if both are required or not.
I did this since I noticed the contents of /var/run/libvirt were owned by libvirt instead of by libvirtd.
answered Mar 5 at 21:46
K. Gimbel
1
1
To be a full answer you need to say how to add oneself to the extra groups.
– pbhj
Mar 5 at 23:26
add a comment |
To be a full answer you need to say how to add oneself to the extra groups.
– pbhj
Mar 5 at 23:26
To be a full answer you need to say how to add oneself to the extra groups.
– pbhj
Mar 5 at 23:26
To be a full answer you need to say how to add oneself to the extra groups.
– pbhj
Mar 5 at 23:26
add a comment |
up vote
0
down vote
After installing all of the packages stated by the op, you can log out then log back in. Anything that add you to user groups you need to log out and back in to be added to the new groups. It is a minor inconvenience, less of one than rebooting.
This was flagged as not complete however this goes as a general rule for adding your user to a group. A relog is needed, that was the missing part that I did not see here.
1
Welcome to Ask Ubuntu! In its current form your answer is not as good as it could be. Could you review How to Write a Good Answer, and Style guide for questions and answers. You could clarify what packages need installed.
– J. Starnes
Jan 9 at 3:17
add a comment |
up vote
0
down vote
After installing all of the packages stated by the op, you can log out then log back in. Anything that add you to user groups you need to log out and back in to be added to the new groups. It is a minor inconvenience, less of one than rebooting.
This was flagged as not complete however this goes as a general rule for adding your user to a group. A relog is needed, that was the missing part that I did not see here.
1
Welcome to Ask Ubuntu! In its current form your answer is not as good as it could be. Could you review How to Write a Good Answer, and Style guide for questions and answers. You could clarify what packages need installed.
– J. Starnes
Jan 9 at 3:17
add a comment |
up vote
0
down vote
up vote
0
down vote
After installing all of the packages stated by the op, you can log out then log back in. Anything that add you to user groups you need to log out and back in to be added to the new groups. It is a minor inconvenience, less of one than rebooting.
This was flagged as not complete however this goes as a general rule for adding your user to a group. A relog is needed, that was the missing part that I did not see here.
After installing all of the packages stated by the op, you can log out then log back in. Anything that add you to user groups you need to log out and back in to be added to the new groups. It is a minor inconvenience, less of one than rebooting.
This was flagged as not complete however this goes as a general rule for adding your user to a group. A relog is needed, that was the missing part that I did not see here.
edited Nov 28 at 18:31
answered Jan 9 at 2:16
tuxdalinuxpenguin
11
11
1
Welcome to Ask Ubuntu! In its current form your answer is not as good as it could be. Could you review How to Write a Good Answer, and Style guide for questions and answers. You could clarify what packages need installed.
– J. Starnes
Jan 9 at 3:17
add a comment |
1
Welcome to Ask Ubuntu! In its current form your answer is not as good as it could be. Could you review How to Write a Good Answer, and Style guide for questions and answers. You could clarify what packages need installed.
– J. Starnes
Jan 9 at 3:17
1
1
Welcome to Ask Ubuntu! In its current form your answer is not as good as it could be. Could you review How to Write a Good Answer, and Style guide for questions and answers. You could clarify what packages need installed.
– J. Starnes
Jan 9 at 3:17
Welcome to Ask Ubuntu! In its current form your answer is not as good as it could be. Could you review How to Write a Good Answer, and Style guide for questions and answers. You could clarify what packages need installed.
– J. Starnes
Jan 9 at 3:17
add a comment |
up vote
-1
down vote
I had this same problem and in the detailed error report it talks about lack of permission to the libvirt-sock
file. Changing the permission of the file /var/run/libvirt/libvirt-sock
to 777 made it work for me.
3
Changing permission masks to 0777 is bad. Don't recommend potentially harmful actions without explaining the consequences! -1
– David Foerster
Sep 27 '16 at 14:46
add a comment |
up vote
-1
down vote
I had this same problem and in the detailed error report it talks about lack of permission to the libvirt-sock
file. Changing the permission of the file /var/run/libvirt/libvirt-sock
to 777 made it work for me.
3
Changing permission masks to 0777 is bad. Don't recommend potentially harmful actions without explaining the consequences! -1
– David Foerster
Sep 27 '16 at 14:46
add a comment |
up vote
-1
down vote
up vote
-1
down vote
I had this same problem and in the detailed error report it talks about lack of permission to the libvirt-sock
file. Changing the permission of the file /var/run/libvirt/libvirt-sock
to 777 made it work for me.
I had this same problem and in the detailed error report it talks about lack of permission to the libvirt-sock
file. Changing the permission of the file /var/run/libvirt/libvirt-sock
to 777 made it work for me.
edited Sep 27 '16 at 14:58
storm
3,90032132
3,90032132
answered Sep 27 '16 at 14:07
Gebeyew
111
111
3
Changing permission masks to 0777 is bad. Don't recommend potentially harmful actions without explaining the consequences! -1
– David Foerster
Sep 27 '16 at 14:46
add a comment |
3
Changing permission masks to 0777 is bad. Don't recommend potentially harmful actions without explaining the consequences! -1
– David Foerster
Sep 27 '16 at 14:46
3
3
Changing permission masks to 0777 is bad. Don't recommend potentially harmful actions without explaining the consequences! -1
– David Foerster
Sep 27 '16 at 14:46
Changing permission masks to 0777 is bad. Don't recommend potentially harmful actions without explaining the consequences! -1
– David Foerster
Sep 27 '16 at 14:46
add a comment |
up vote
-1
down vote
use Ubuntu Software to uninstall virtual manager, log out, log back in, install virtual manager, and run it normally without using sudo or even using the command line.
1
You could improve your answer by expanding on why these steps are necessary instead of a simply reinstalling. Or following one of the other answers. From Review
– J. Starnes
Dec 20 '17 at 4:44
add a comment |
up vote
-1
down vote
use Ubuntu Software to uninstall virtual manager, log out, log back in, install virtual manager, and run it normally without using sudo or even using the command line.
1
You could improve your answer by expanding on why these steps are necessary instead of a simply reinstalling. Or following one of the other answers. From Review
– J. Starnes
Dec 20 '17 at 4:44
add a comment |
up vote
-1
down vote
up vote
-1
down vote
use Ubuntu Software to uninstall virtual manager, log out, log back in, install virtual manager, and run it normally without using sudo or even using the command line.
use Ubuntu Software to uninstall virtual manager, log out, log back in, install virtual manager, and run it normally without using sudo or even using the command line.
answered Dec 20 '17 at 2:16
knowyou
1
1
1
You could improve your answer by expanding on why these steps are necessary instead of a simply reinstalling. Or following one of the other answers. From Review
– J. Starnes
Dec 20 '17 at 4:44
add a comment |
1
You could improve your answer by expanding on why these steps are necessary instead of a simply reinstalling. Or following one of the other answers. From Review
– J. Starnes
Dec 20 '17 at 4:44
1
1
You could improve your answer by expanding on why these steps are necessary instead of a simply reinstalling. Or following one of the other answers. From Review
– J. Starnes
Dec 20 '17 at 4:44
You could improve your answer by expanding on why these steps are necessary instead of a simply reinstalling. Or following one of the other answers. From Review
– J. Starnes
Dec 20 '17 at 4:44
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f345218%2fvirt-manager-cant-connect-to-libvirt%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
The error doesn't show up if I start
gksudo virt-manager
– That Brazilian Guy
Sep 13 '13 at 18:52
What are the contents of your
/etc/libvirt/libvirtd.conf
file?– Bruno Pereira
Sep 13 '13 at 19:41
Not the perfect place, but if you're on arch like I am and installed
qemu
andvirt-manager
, try runningsudo systemctl start libvirtd
and optionallysudo systemctl enable libvirtd
if you want it to start at startup.– Ave
Apr 30 '17 at 23:15