You are not logged in.

#1 2018-02-19 16:30:55

nikzy
Member
Registered: 2017-01-19
Posts: 10

[SOLVED] virt-manager unable to connect to qemu:///system. Hangs

Problem:
Afte i updated libvirt to  4.0.0 virt-manager seems to be unable to connect to libvirt. I does not throw an error. I just says: QEMU/KVM - Connecting.
if i run

sudo libvirt start <name>

nothing happens aswell.

Logs:
Output of systemctl status libvirtd after an attempt to run "sudo libvirt start <name>"

● libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2018-02-19 17:11:54 CET; 1min 28s ago
     Docs: man:libvirtd(8)
           https://libvirt.org
 Main PID: 485 (libvirtd)
    Tasks: 19 (limit: 32768)
   CGroup: /system.slice/libvirtd.service
           ├─485 /usr/bin/libvirtd
           ├─628 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
           └─629 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper

Feb 19 17:11:55 ARCH-HOME libvirtd[485]: 2018-02-19 16:11:55.449+0000: 524: error : virDirOpenInternal:2840 : cannot open directory '/run/media/archie/FreeAgent GoFlex Drive': No such file or directory
Feb 19 17:11:55 ARCH-HOME libvirtd[485]: 2018-02-19 16:11:55.449+0000: 524: error : storageDriverAutostartCallback:210 : internal error: Failed to autostart storage pool 'FreeAgent_GoFlex_Drive': cannot open directory '/run/media/arch
Feb 19 17:11:55 ARCH-HOME libvirtd[485]: 2018-02-19 16:11:55.449+0000: 524: error : virDirOpenInternal:2840 : cannot open directory '/run/media/archie/UTEN NAVN': No such file or directory
Feb 19 17:11:55 ARCH-HOME libvirtd[485]: 2018-02-19 16:11:55.449+0000: 524: error : storageDriverAutostartCallback:210 : internal error: Failed to autostart storage pool 'UTEN_NAVN': cannot open directory '/run/media/archie/UTEN NAVN'
Feb 19 17:11:57 ARCH-HOME dnsmasq[628]: reading /etc/resolv.conf
Feb 19 17:11:57 ARCH-HOME dnsmasq[628]: using nameserver 2001:700:4800:83ac:5aef:68ff:feb4:16be#53
Feb 19 17:12:01 ARCH-HOME dnsmasq[628]: reading /etc/resolv.conf
Feb 19 17:12:01 ARCH-HOME dnsmasq[628]: using nameserver 192.168.1.1#53
Feb 19 17:12:01 ARCH-HOME dnsmasq[628]: using nameserver 2001:700:4800:83ac:5aef:68ff:feb4:16be#53
Feb 19 17:13:20 ARCH-HOME libvirtd[485]: 2018-02-19 16:13:20.806+0000: 485: error : virNetSocketReadWire:1808 : End of file while reading data: Input/output error

/var/log/libvirt/qemu/<name> are empty.

I have tried:

  • I have tried downgrading libvirt to an earlier version.

  • Libvirt passes the tests spesified on its wiki page]

It does not seem to be a duplicate of this post as my libvirt does respond, and the fix (deleting a file), does not exist on my system.

Around the time this problem occoured I installed docker/docker-compose. Don't know if it's important, but throwing it out there.

Last edited by nikzy (2018-04-06 16:13:16)

Offline

#2 2018-03-04 06:38:17

xNN|Blackbyte
Member
Registered: 2018-03-04
Posts: 1

Re: [SOLVED] virt-manager unable to connect to qemu:///system. Hangs

I had a very similar  problem, i  added some libvirt storage-pools while my non-system hard drive was mounted to /run/media/. In the meantime (cause it was a  very fresh installation) i added it to fstab etc... on another mount-point, seems libvirt or virt-manager has linked the old mount-point which weren't available anymore.

Got this very similar output:

 * libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; disabled; vendor preset: disabled)
   Active: active (running) since Sun 2018-03-04 05:54:47 CET; 28s ago
     Docs: man:libvirtd(8)
           https://libvirt.org
 Main PID: 2641 (libvirtd)
    Tasks: 17 (limit: 32768)
   CGroup: /system.slice/libvirtd.service
           `-2641 /usr/bin/libvirtd

Mar 04 05:54:47 xNN-Octacore systemd[1]: Started Virtualization daemon.
Mar 04 05:54:51 xNN-Octacore libvirtd[2641]: 2018-03-04 04:54:51.712+0000: 2657: info : libvirt version: 4.0.0
Mar 04 05:54:51 xNN-Octacore libvirtd[2641]: 2018-03-04 04:54:51.712+0000: 2657: info : hostname: xNN-Octacore
Mar 04 05:54:51 xNN-Octacore libvirtd[2641]: 2018-03-04 04:54:51.712+0000: 2657: error : virDirOpenInternal:2840 : cannot open directory '/mnt/SSD/VFIO': No such file or directory
Mar 04 05:54:51 xNN-Octacore libvirtd[2641]: 2018-03-04 04:54:51.712+0000: 2657: error : storageDriverAutostartCallback:210 : internal error: Failed to autostart storage pool 'VFIO-1': cannot open directory '/mnt/SSD/VFIO': No such file o>
Mar 04 05:54:51 xNN-Octacore libvirtd[2641]: 2018-03-04 04:54:51.712+0000: 2657: error : virDirOpenInternal:2840 : cannot open directory '/run/media/xnn/SSD/VFIO': No such file or directory
Mar 04 05:54:51 xNN-Octacore libvirtd[2641]: 2018-03-04 04:54:51.712+0000: 2657: error : storageDriverAutostartCallback:210 : internal error: Failed to autostart storage pool 'VFIO': cannot open directory '/run/media/xnn/SSD/VFIO': No suc> 

Did you left a storage pool pointing on the old mount-point?
In my case it was a quick and dirty fix to recreate the missing folders and mounting my device back to /run/media/<mount-point>...


/var/log/libvirt/qemu/<name> are empty.

virtlogd.socket is enabled?


Around the time this problem occoured I installed docker/docker-compose. Don't know if it's important, but throwing it out there.

If i'm right and you remounted your device, (...like in my case) an old Docker container, pointing to a deprecated mount, could trigger this issue.

Last edited by xNN|Blackbyte (2018-03-04 06:40:18)


# github.com/xNNism

Offline

#3 2018-03-04 12:25:27

nikzy
Member
Registered: 2017-01-19
Posts: 10

Re: [SOLVED] virt-manager unable to connect to qemu:///system. Hangs

Did you left a storage pool pointing on the old mount-point?

I don't think so. All of the reported devices i jussed passed through to the guest machine (add usb in virt-manager).

Just creating the folders seem to make

No such file or directory

the errors go away. I also mounted almost all of the reported devices to the folders i created. But i cannot seem to find the last USB-device, so one of the folders remain unmapped to a device.
The problem still persists.

Doing some research, the error:

469: error : virNetSocketReadWire:1808 : End of file while reading data: Input/output error

seems not to be a breaking reason, as other people report this error aswell without libvirt freezing.

virtlogd.socket is enabled?

Started and enabled. Still no logs...

What puzzles me is that libvirtd.service seems to be completely unresponsive after i try to start a virt machine. Stopping and starting the service failes, and the computer will not shut down gracefully.
On shutdown i get

shutdown[1]: failed to wait for process: Protocol error
INFO: task libvirtd:532 blocked for more than 120 seconds.

"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disable this message"

Offline

#4 2018-04-06 16:09:04

nikzy
Member
Registered: 2017-01-19
Posts: 10

Re: [SOLVED] virt-manager unable to connect to qemu:///system. Hangs

Now i feel stupid. A while back i lost my /etc/mkinitcpio.conf during an update. When i configured it again i forgot to add:

MODULES=(... vfio_pci vfio vfio_iommu_type1 vfio_virqfd ...)

as specified by the wiki.

So the vfio-pci driver was not loaded first.

Last edited by nikzy (2018-04-06 16:09:49)

Offline

Board footer

Powered by FluxBB