Closed KrzysztofPlaczek closed 2 years ago
Just in case someone stumbles across issue like this. This is the solution that helped for me in case like described above. https://github.com/cockpit-project/cockpit/issues/13343#issuecomment-570611574
# install cockpit on ubuntu 19.10
sudo apt-get install -y cockpit cockpit-machines libvirt-dbus
# fix for issue 'machines list is empty'
# https://github.com/cockpit-project/cockpit/issues/13343
sudo usermod -a -G libvirt libvirtdbus
# must reboot (or restart the affected systemd services) for changes to take effect
Ubuntu 19.10 is extremely old at this point and would have a very old version of Cockpit. Any changes we make now won't show up for you (or anyone else) on 19.10.
19.10 actually reached EOL status over 2 years ago! You should've upgraded before mid-July of 2020! Your system is extremely out of date and has a lot of bugs, including severe security issues.
https://itsfoss.com/ubuntu-19-10-end-of-life/
If you don't want to do a major upgrade every year, look into long term support distributions, such as Ubuntu LTS (Ubuntu Server LTS linked; Ubuntu LTS desktop is also available) which end with .04 instead of .10, such as 22.04, CentOS Stream 9, Alma Linux 9, Rocky Linux 9, openSUSE Leap, and, of course, Debian Stable.
For commercial offerings, there's Red Hat Enterprise Linux, SUSE Linux Enterprise Server, and Ubuntu has paid support for their LTS too. But, as your distro choice is wildly out of date and a community version, I assume you'd probably want one of the ones mentioned in the previous paragraph.
With all this said, the smoothest update for you would be to (back up and then) do an in-place upgrade to Ubuntu LTS. The ItsFoss article linked above talks about upgrading to 20.04, which is based on 19.10, so it's probably the best path for you for right now. However, if you're doing a fresh re-installation, you'd want to choose the most up to date version of whatever distro (mentioned in the above paragraph) for more current packages (including Cockpit).
I'm not sure if upgrading in-place from 19.10 to 22.04 would work (theoretically, it might), but you could probably go from 19.10 to 20.04 to 22.04 just fine. (Or upgrade to and stay on 20.04 for now.)
Ubuntu's release cycle page @ https://ubuntu.com/about/release-cycle explains their release cycle well and includes this graphic:
All the other "long term", "stable", "enterprise" distributions mentioned above have a similar concept for updates and (some level of) support (free and/or paid, depending on which distribution) as well.
I run ubuntu 22.04. I just pasted the information from the comment that i linked in my previous comment. So the information about the ubuntu 19 is about my machine. The point is that this solution worked now or 2 years ago.
With everything said above, if this is still happening in current versions of Cockpit on a currently supported version of Ubuntu, then:
libvirt-dbus
is a dependency (if it isn't already and is needed).It would be awesome if Cockpit itself could fix the issue, but we should at a minimum explain what the problem is and suggest a solution (even if that needs to be run manually, like "libvirt is not properly configured. Please run sudo usermod -a -G libvirt libvirtdbus
in a terminal as an administrator.).
Re-opening this issue with a request to check if it's still a problem in current versions of Cockpit on supported versions of Ubuntu.
If it's no longer a problem, we can close this again. If it is still a problem, then we should fix it, as outlined above.
I run ubuntu 22.04. I just pasted the information from the comment that i linked in my previous comment. So the information about the ubuntu 19 is about my machine. The point is that this solution worked now or 2 years ago.
Aha! OK. Great! :+1:
I elaborated just in case someone else having the same problem with an older version of Ubuntu might stumble across this too. (I usually try to not cause the xkcd forum problem: https://m.xkcd.com/979/ where someone else might stumble across old information without an update.)
If you're still having the issue in 22.04, then we still need to fix it as I suggest above, so others don't have to debug why it's not working like you (and others) had to.
Oh, I just noticed in https://github.com/cockpit-project/cockpit/issues/13343#issuecomment-701105435, it says:
DO NOT add the
libvirt-qemu
user to the libvirt group, or VMs may be able to access the socket, which would open up a security hole.
Your comment above, https://github.com/cockpit-project/cockpit-machines/issues/832#issuecomment-1283582268, mentions adding it. So you might want to remove libvirt-qemu
from the libvirt
group on your system... if you followed the quote in your comment verbatim.
@KrzysztofPlaczek Just make sure to install cockpit-machines from backports. Please reopen if it won't work for you.
sudo apt install -y -t ${UBUNTU_CODENAME}-backports cockpit-machines
I got this message after installation of cockpit-machines. Libvirt local socket and libvirtd.service are both running fine. Is there something i can do to get rid of the message and start using the plugin?