Creating VM's using kvm. Error: Unit libvirtd.service could not be found?
sudo apt install libvirt-daemon-system
resolved the libvirtd.service
issue as pointed by @ajgringo619
samshers
Updated on September 18, 2022Comments
-
samshers over 1 year
TLDR;
On Ubuntu 20.04.1, I am trying to run VM's using KVM. After installing the required packages, I still get below error:sudo systemctl status libvirtd Unit libvirtd.service could not be found.
The below is what I have done -
a) check kvm support$ sudo kvm-ok INFO: /dev/kvm exists KVM acceleration can be used
b) install required packages
$ sudo apt install -y qemu qemu-kvm libvirt-daemon libvirt-clients bridge-utils virt-manager
Now, the above should be everything and I must be able to open the virt-manager gui and get going and the libvertd service should have been started already. But, there is no libvirtd service running on my machine still and there is no libvirtd.service unit installed.
And obviously, The virt-manager is not able to connect to the demon so the below errors - After doing
$ sudo virt-manager
--> the virt-manager GUI starts with root permissions.
Clearly the window says -The libvirtd service does not appear to be installed. Install and run the libvirtd service to manage virtualization on this host.
And obviously, no VM creation is feasible and below is the error on attempting for same.
Reference - How to Install KVM on Ubuntu 20.04
Note: This issue is not duplicate with - KVM Virt-Manager Error: No active connection to Install on
(one answer here ask to install - libvirt-bin , but this packages does not exist in the repo.$ apt list libvirt-bin Listing... Done
Hardware: This attempt is on Quad-Core, Intel CPU Laptop.
Edit - Following the comment from ajgringo619, i could solve the libvirtd.service issue. But other issues still persist.
Below is also posted as seperate Q @ Warning: KVM kernal modules are not loaded. Your VM may perform poorly?
This is the lsmod output -$ sudo lsmod | grep kvm kvm_intel 282624 0 kvm 663552 1 kvm_intel
Should I ignore the warning, is the performance really gonna be poor??
-
ajgringo619 over 3 yearsDid the
libvirt-daemon-system
package get installed? -
samshers over 3 yearsno, it is not. I installed it and got past the
libvirtd.service
issue. But new issues are rising. Editing the Q with new issues. -
Stephen Kitt over 3 yearsInstead of editing your question to add your follow-up, which you’ve also asked as a separate question, would you mind posting the resolution as an answer?
-
ajgringo619 over 3 yearsYour "kvm not loaded" link is broken.
-
samshers over 3 years@ajgringo619, thx for pointing. Fixed the broken link.
-
ajgringo619 over 3 yearsWhat groups is your user a member of? Did you reboot after the install?
-
samshers over 3 years@ajgringo619,
adm cdrom sudo dip plugdev lpadmin lxd sambashare vboxusers libvirt
is there still anything to worry about. -
samshers over 3 years@ajgringo619, yeah, I rebooted. and the issue of
KVM not available
is solved. But I don't get USB devices or Web Cam in the VM. -
ajgringo619 over 3 yearsThat should be asked as a new question; you'll get better and more focused responses.
-