KVM / QEMU / VMM : local host not connected
I am using Ubuntu 14.04. I have installed kvm
. When I try to open virtual machine, I get this error:
local host not connected
Unable to connect to libvirt.
Verify that:
- The 'libvirt-bin' package is installed
- The 'libvirtd' daemon has been started
- You are member of the 'libvirtd' group
Unable to connect to libvirt.
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 1027, in _open_thread
self.vmm = self._try_open()
File "/usr/share/virt-manager/virtManager/connection.py", line 1009, in _try_open
flags)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 105, in openAuth
if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied
Step 1 : Install all packages that are needed.
sudo apt-get install qemu virt-manager
If they already are installed, you get notified.
Step 2 : Add yourself to the libvirt(d) group.
sudo usermod -G libvirt -a <username>
(this is valid for newer KVM / Ubuntu versions)
sudo usermod -G libvirtd -a <username>
(this is valid for older KVM / Ubuntu versions)
Replace <username>
with your user name.
Step 3 : Reboot your host operating system.
sudo reboot
Now everything should work as expected.
In case you still get the same error again -
open virt-manager
with root privileges :
sudo apt-get install gksu
gksudo virt-manager
Close virt-manager
and restart the host.
sudo reboot
Finally it should work with user privileges !