3

I want to apologize before I begin-- I know that this problem has been asked about before, and I've found some of the threads. Unfortunately, I'm extremely new to Linux, and I'm getting lost trying to navigate through other people's work.

I'm attempting to create a virtual machine on a host machine. I have RHEL7 for the host machine, and I'm making a VM using RHEL6.4 I'm using Virtual Machine Manager, and I successfully booted from an ISO without issue. So far so good.

I'm now attempting to establish a connection with the virtual machine from the host machine, and I'm struggling. I'm trying to add connections using Hypervisor QEMU/KVM, hostname of my host machine, username is my username. Initially, I got a failure message, until I installed openssh and oepnssh-askpass. Now it prompts me for my password, which I enter. Okay, working as intended.

After I enter the password, I get a popup error that reads

Virutal machine Manager Connection Failure Unable to connect to libvirt qemu+ssh:// me@myMachine

Authentication unvaliable: no polkit agent available to authenticate action 'org.libvirt.unix.manage'

Verify that the "libvirtd" daemon is running on the remote host.

I've spent quite a bit trying to figure this out, and I'm at a loss. I've tried updating the libvertpd.pid file, but when I try to run systemcl start/stop libvirt-bin, I get an alert that Unit libvirt-bin.service is not loaded. (I'm honestly, not sure what that should or should not be doing, I'm just following someone else's instructions with the hope that it eventually works.)

If I try to run libvirtd -d, I get an error saying "Unable to obtain pidfile. Check /var/log/messages or run without --daemon for more info." I've navigated to the appropriate folder and confirmed the libvirtd.pid does in fact exist, and is hanging out right where it should. When I try to check the messages section, there are no messages from today-- only from 4 days ago.

My best guess is that there's something wrong with my libvirtd, but I don't know what, and I don't know how to diagnose it. In trying to identify the problem/blindly following other people's advice, I've installed firewalld, dmidecode, dnsmasq, libvirt, libvirt-python, libguestfs-tools, and virt-install, none of which appear to have changed the problem in any way. I'm still getting the same errors that I was before.

If anyone knows how to fix this (and can hold my hand a little bit about where to navigate and what to enter), I would very much appreciate it.

1 Answer 1

5

If you run the libvirt CLI client, virsh --connect qemu:///system, on your VM host, it'd prompt you for a password to manage system VMs. That prompt is actually done by a policy kit (polkit) agent.

It's trying to do the same thing when virt-manager logs in as your user, but since there isn't actually a terminal to ask you on, it's failing. That's the weird error you're seeing.

The fix is relatively simple: allow your user to manage VMs without a password. You can do this by adding your user to the correct group, libvirt (the same group is used on both RedHat and Debian/Ubuntu).

5
  • Well, I've managed to do some hunting and I've at least changed my error message slightly. Now I'm getting: Unable to connect to [system] End of file while reading data: Ncat: No such file or directory.: Input/output error Verify that the libvirtd daemon is running on the remote host. Commented Dec 5, 2019 at 18:39
  • Update: I forgot to start up the daemon. It took its sweet time, but it eventually connected. Problem is solved, I am so gee dang grateful. That's five hours of frustration resolved. Thank you, thank you, thank you! Commented Dec 5, 2019 at 18:45
  • @NegativeFriction glad to hear that. Is the group libvirt on RHEL as well?
    – derobert
    Commented Dec 5, 2019 at 19:01
  • It's actually a storage folder that I didn't need to modify. I needed libvertd to play nicely with me. I had to enter groupadd --system libvirtd usermod -a -G libvirt userName once that was done, it was just a matter of running libvirt -d to mount the daemon, and it (finally) played nice with me Commented Dec 5, 2019 at 19:06
  • @NegativeFriction BTW: It sounds like in your hours of troubleshooting, something else went weird — systemctl ought to start libvirtd just fine. systemctl start libvirtd.service; libvirt-bin.service is something from older Ubuntu versions, AFAIK. You might want to take a look at access.redhat.com/articles/1344173
    – derobert
    Commented Dec 5, 2019 at 19:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .