I am trying to create a KVM server on a (remotely hosted) VPS (Ubuntu 16.04 LTS).

I have installed these packages

sudo apt-get install kvm ubuntu-vm-builder libvirt-bin bridge-utils

sudo egrep '(vmx|svm)' --color=always /proc/cpuinfo

This does return VMX (8 times)



INFO: /dev/kvm exists
KVM acceleration can be used

However when I run the following command

virsh --connect qemu:///system list --all

It returns:

error: failed to connect to the hypervisor
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or di

When running

systemctl status libvirtd

it returns:

● libvirt-bin.service - Virtualization daemon
Loaded: loaded (/lib/systemd/system/libvirt-bin.service; enabled; vendor preset: enabled)
Active: inactive (dead) since di 2018-02-27 16:10:50 CET; 37min ago
Process: 465 ExecStart=/usr/sbin/libvirtd $libvirtd_opts (code=exited, status=0/SUCCESS)
Main PID: 465 (code=exited, status=0/SUCCESS)
feb 27 16:10:50 xxxxxxx.stratoserver.net libvirtd[465]: 488: error : udevGetDMIData:1578 : Failed to get udev device for syspath '/sys/devices/virtual/dmi/id' or '/sys/class/dmi/id'
feb 27 16:10:50 xxxxxxx.stratoserver.net libvirtd[465]: 488: error : udevEnumerateDevices:1456 : udev scan devices returned -2
feb 27 16:10:50 xxxxxxx.stratoserver.net libvirtd[465]: 488: error : virStateInitialize:783 : Initialization of udev state driver failed: Unknown problem
feb 27 16:10:50 xxxxxxx.stratoserver.net libvirtd[465]: 488: error : daemonRunStateInit:950 : Driver state initialization failed

I'm pretty much stuck here, the libvirt-sock file isn't there at all.

If anyone would be able to help me out, that would be very much appreciated!

Best regards,


P.S. I'm not sure if this has anything to do with the errors but in my /etc/network/interfaces file I've noticed that I have no "eth" interfaces but only "venet" interfaces.

  • What is the status of the libvirtd service? systemctl status libvirtd – Mikhail Khirgiy Feb 27 at 15:43
  • I've edited the question with the output of this command when i try to restart the service: Failed to restart libvirtd.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files See system logs and 'systemctl status libvirtd.service' for details. – Maxim Feb 27 at 16:01
  • Please run virt-what and post the output. – Michael Hampton Feb 27 at 17:07
  • It says "openvz". Does this mean I can only use OpenVZ as the virtualisation method? – Maxim Feb 27 at 17:38
up vote 0 down vote accepted

Your "VPS" is actually an OpenVZ Linux container, rather than a fully virtual machine. Libvirtd cannot start inside OpenVZ containers.

You'll need to obtain a VPS which is based on nestable virtualization, such as KVM, Hyper-V, Xen, VMware, etc., and on which the provider has enabled nested virtualization.

  • Is there another way I can host simultaneous Virtual Machines for multiple users, while still having this "OpenVZ" container? – Maxim Feb 27 at 18:12
  • Sure, as long as the virtual machines are running elsewhere. – Michael Hampton Feb 27 at 19:51

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.