Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QEMU+Virt-manager can't connect to virtlxcd-sock

I've installed qemu virt-manager libvirt on Linux Mint 20, I have a AMD FX(tm)-4300 Quad-Core Processor with AMD-V enabled in the bios, restarted a lot but virt-manager(Virtual Machine Manager) is saying:

Unable to connect to libvirt lxc:///.
Failed to connect socket to '/var/run/libvirt/virtlxcd-sock': No such file or directory
Libvirt URI is: lxc:///

I am running this locally. The file/socket does not exist, but there is a "libvirt-sock" (and other files) in that folder. The service is running, but reporting the same error:

    libvirtd.service - Virtualization daemon
     Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2020-09-01 10:11:27 BST; 12min ago
TriggeredBy: ● libvirtd.socket
             ● libvirtd-ro.socket
             ● libvirtd-admin.socket
       Docs: man:libvirtd(8)
             https://libvirt.org
   Main PID: 731 (libvirtd)
      Tasks: 19 (limit: 32768)
     Memory: 34.2M
     CGroup: /system.slice/libvirtd.service
             ├─ 731 /usr/sbin/libvirtd
             ├─1041 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt>
             └─1042 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt>

Sep 01 10:11:29 mainlinux dnsmasq[1041]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Sep 01 10:11:29 mainlinux dnsmasq-dhcp[1041]: read /var/lib/libvirt/dnsmasq/default.hostsfile
Sep 01 10:12:35 mainlinux libvirtd[731]: libvirt version: 6.0.0, package: 0ubuntu8.3 (Marc Deslauriers <[email protected]> Thu, 30 >
Sep 01 10:12:35 mainlinux libvirtd[731]: hostname: mainlinux
Sep 01 10:12:35 mainlinux libvirtd[731]: Failed to connect socket to '/var/run/libvirt/virtlxcd-sock': No such file or directory
Sep 01 10:12:35 mainlinux libvirtd[731]: End of file while reading data: Input/output error

I'm updated my kernel to 5.8.5-generic, but other than that, running Mint 20 (based on Ubuntu focal). Anyone know how to fix this, or display a log as to why virtlxcd-sock is not being created? Also tried sudo chmod 777 on the libvirt subfolder and restarted libvirtd, same error.

like image 441
Scott Hather Avatar asked Sep 01 '20 09:09

Scott Hather


People also ask

How do I connect to Virt-Manager?

Start virt-manager . Launch the Virtual Machine Manager application from the Applications menu and System Tools submenu. Alternatively, run the virt-manager command as root. Select the hypervisor and click the Connect button to connect to the remote hypervisor.

How do I check my Libvirt status?

Use the following commands to start and stop libvirtd or check its status: tux > sudo systemctl start libvirtd tux > sudo systemctl status libvirtd libvirtd.

What is Libvirt Lxc?

The libvirt LXC driver manages "Linux Containers". At their simplest, containers can just be thought of as a collection of processes, separated from the main host processes via a set of resource namespaces and constrained via control groups resource tunables.


1 Answers

Been googling for hours, finally found the one that worked for me, seems like installing libvirt and lxc does not install this package:

sudo apt install libvirt-daemon-driver-lxc
sudo systemctl restart libvirtd
like image 197
Scott Hather Avatar answered Oct 24 '22 06:10

Scott Hather