#[SOLVED] can't connect qemu/kvm

91 messages · Page 1 of 1 (latest)

azure frigate
#

So all of a sudden my virtual machine manager won't connect to my libvirt does anyone know how to resolve this issue and get my virtual machines backed up and running again

topaz seal
#

sudo systemctl status libvirtd

#

what does that say

azure frigate
topaz seal
#

or start it I guess

#

but, what does status say?

#

does your journalctl say anything about it?

azure frigate
topaz seal
#

try to start it again now?

#

looks like you might have tried to start it too many times too quickly?

azure frigate
#

systemctl status libvirtd
× libvirtd.service - libvirt legacy monolithic daemon
Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Fri 2024-01-05 19:37:45 UTC; 29s ago
Duration: 33min 32.677s
TriggeredBy: × libvirtd.socket
× libvirtd-admin.socket
× libvirtd-ro.socket
Docs: man:libvirtd(8)
https://libvirt.org/
Process: 7682 ExecStart=/usr/bin/libvirtd $LIBVIRTD_ARGS (code=exited, status=1/FAILURE)
Main PID: 7682 (code=exited, status=1/FAILURE)
Tasks: 4 (limit: 32768)
Memory: 25.4M (peak: 29.9M)
CPU: 30.111s
CGroup: /system.slice/libvirtd.service
├─2669 "[libvirtd]"
├─4227 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
└─4228 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper

Jan 05 19:37:45 overlord systemd[1]: libvirtd.service: Scheduled restart job, restart counter is at 5.
Jan 05 19:37:45 overlord systemd[1]: libvirtd.service: Start request repeated too quickly.
Jan 05 19:37:45 overlord systemd[1]: libvirtd.service: Failed with result 'exit-code'.
Jan 05 19:37:45 overlord systemd[1]: libvirtd.service: Unit process 4227 (dnsmasq) remains running after unit stopped.
Jan 05 19:37:45 overlord systemd[1]: libvirtd.service: Unit process 4228 (dnsmasq) remains running after unit stopped.
Jan 05 19:37:45 overlord systemd[1]: libvirtd.service: Unit process 2669 (libvirtd) remains running after unit stopped.
Jan 05 19:37:45 overlord systemd[1]: Failed to start libvirt legacy monolithic daemon.

#

Job for libvirtd.service failed because the control process exited with error code.
See "systemctl status libvirtd.service" and "journalctl -xeu libvirtd.service" for details.

#

says the same thing as before

topaz seal
#

fun

azure frigate
#

?

topaz seal
#

are you using this:
libvirt-hooks
?

azure frigate
#

i think so but you know what happened last time lol maybe we should check if i actually do just in case

topaz seal
#

hmmm

#

can you reboot, then check status, then see if there's anything in journalctl if it failed again?

azure frigate
#

you mean reebot my system

topaz seal
#

yes

azure frigate
#

ok

topaz seal
#

if you can

#

first

#

pacman -Syu

azure frigate
#

:: Synchronizing package databases...
core 128.3 KiB 611 KiB/s 00:00 [##################################################################] 100%
extra 8.3 MiB 46.9 MiB/s 00:00 [##################################################################] 100%
multilib-testing 748.0 B 21.5 KiB/s 00:00 [##################################################################] 100%
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (5) autoconf-2.72-1 libfdk-aac-2.0.3-1 libssh-0.10.6-2 noto-fonts-1:24.1.1-1 sdl2_image-2.8.2-1

Total Download Size: 29.10 MiB
Total Installed Size: 113.23 MiB
Net Upgrade Size: 0.00 MiB

:: Proceed with installation? [Y/n]

#

should i press yes

topaz seal
#

of course

azure frigate
#

ok

#

installed just fine should i still restart my pc?

topaz seal
#

yup

azure frigate
#

ok then

#

Ok restarted my computer what should I do now?

azure frigate
topaz seal
#

need to feed my dog, but will be back shortly

azure frigate
#

Ok no worries take your time

topaz seal
#

that's interesting, what's the red stuff about?

azure frigate
#

@topaz seal dont worry about that I solved it it was just my external hardrives

azure frigate
#

Just now by going into dolphin file manager and clicking mount on the disk drive

topaz seal
#

if yes, make an fstab entry for them

azure frigate
#

Yeah wouldn't mind that it would actually do me a huge benefit

topaz seal
#

yeah do that and then I think it'll start

azure frigate
#

Ok

azure frigate
#

@topaz seal I've restarted my system multiple times but it keeps on saying connecting what should I do

azure frigate
#

[SOLVED] can't connect qemu/kvm

topaz seal
azure frigate
#

@topaz seal i rsetarted libvirtd but now it says ailed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory

Libvirt URI is: qemu:///system

Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/connection.py", line 923, in _do_open
self._backend.open(cb, data)
File "/usr/share/virt-manager/virtinst/connection.py", line 171, in open
conn = libvirt.openAuth(self._open_uri,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/libvirt.py", line 147, in openAuth

#

hwne i try to connect it

azure frigate
#

@topaz seal now it went back to stuck on connecting when I restart my machine

topaz seal
#

I'm not 100% sure, I hope to look at it a little, but haven't used a VM for sometime

#

systemctl restart libvirtd ?

azure frigate
#

@topaz seal when I try that this happens

topaz seal
#

it's just waiting to complete?

#

what's the status say?

azure frigate
#

● libvirtd.service - libvirt legacy monolithic daemon
Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; preset: disabled)
Active: deactivating (final-sigterm) (Result: timeout) since Sat 2024-01-06 11:06:37 UTC; 3min 9s ago
TriggeredBy: ● libvirtd-admin.socket
● libvirtd-ro.socket
● libvirtd.socket
Docs: man:libvirtd(8)
https://libvirt.org/
Main PID: 735 (libvirtd)
Tasks: 4 (limit: 32768)
Memory: 37.8M (peak: 43.7M)
CPU: 3min 9.351s
CGroup: /system.slice/libvirtd.service
├─735 "[libvirtd]"
├─843 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
└─844 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper

Jan 06 11:05:46 overlord libvirtd[735]: cannot open directory '/run/media/ryan/Seagate Hub': No such file or directory
Jan 06 11:05:46 overlord libvirtd[735]: internal error: Failed to autostart storage pool 'Seagate_Hub': cannot open directory '/run/media/ryan/Seagate Hub': No s
uch file or directory
Jan 06 11:05:50 overlord dnsmasq[843]: reading /etc/resolv.conf
Jan 06 11:05:50 overlord dnsmasq[843]: using nameserver 192.168.0.1#53
Jan 06 11:05:50 overlord dnsmasq[843]: using nameserver 2001:730:3ec2::10#53
Jan 06 11:05:50 overlord dnsmasq[843]: using nameserver 2001:730:3ec2::11#53
Jan 06 11:06:37 overlord systemd[1]: Stopping libvirt legacy monolithic daemon...
Jan 06 11:08:07 overlord systemd[1]: libvirtd.service: State 'stop-sigterm' timed out. Killing.
Jan 06 11:08:07 overlord systemd[1]: libvirtd.service: Killing process 735 (libvirtd) with signal SIGKILL.
Jan 06 11:09:37 overlord systemd[1]: libvirtd.service: Processes still around after SIGKILL. Ignoring.

topaz seal
#

it keeps looking for this, is that not mounted?

#

Jan 06 11:05:46 overlord libvirtd[735]: cannot open directory '/run/media/ryan/Seagate Hub': No such file or directory

#

can you show me your lsblk -f and cat /etc/fstab

azure frigate
topaz seal
# azure frigate

can you mount your seagate hub to /run/media/ryan/seagate hub in your fstab?

azure frigate
#

what is the command to do it because i never did it before

topaz seal
#

you're adding an entry to /etc/fstab

azure frigate
#

/etc/fstab/: Not a directory am i i doing something wrong?

topaz seal
#

show me cat /etc/fstab

#

not /etc/fstab/ but /etc/fstab

azure frigate
topaz seal
#

yeah so add in the relevant lines, remember this is exfat for the file system, not vfat or ext4, and just do defaults 0 2 for the numbers at the end

#

and make it the last entry

azure frigate
#

@topaz seal ok managed to do that but now it says something else

topaz seal
#

reboot and try again now

azure frigate
#

Oh yeah about that do you ever come across a message when you try to restart or shut off but you get this

topaz seal
#

that's interesting

azure frigate
#

Is there anyway that I can resolve this or should I just do a hard reset and boot back in

topaz seal
#

I'd just try and do a hard reset now, see what happens

#

maybe it's worth reinstalling libvirt if it's still an issue after restarting

azure frigate
#

Ok

topaz seal
#

I don't know why it seems to need your seagate hub to be mounted, so that's something I'd like to look at anyway

#

is it something you've passed through to your VM?

azure frigate
#

I tried GPU passthrough but my windows system crash and ever since it's been saying not connected or stuck saying qemu/kvm-connecting

azure frigate
#

@topaz seal after the reset it went back to saying this

topaz seal
#

what is libvirtd saying now?

#

can you close down kvm and then reinstall libvirt?

topaz seal
azure frigate
topaz seal
#

@azure frigate can you show me /etc/hostsby catting it

azure frigate
#

@topaz seal do i do that by just typing that in to console?

topaz seal
#

you use the cat command

azure frigate
#

@topaz seal here is what it says in /etc/hosts