[1.2.16] Failed to initialize KVM & other internal errors

Bug #1528136 reported by jean-christophe manciot
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

On Ubuntu Server 4.2.0-22-generic #27-Ubuntu SMP Thu Dec 17 22:57:08 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

sudo systemctl status libvirt-bin
● libvirt-bin.service - Virtualization daemon
   Loaded: loaded (/lib/systemd/system/libvirt-bin.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2015-12-21 09:47:02 CET; 3s ago
     Docs: man:libvirtd(8)
           http://libvirt.org
 Main PID: 20980 (libvirtd)
   CGroup: /system.slice/libvirt-bin.service
           └─20980 /usr/sbin/libvirtd

Dec 21 09:47:02 msi-ge60-ubuntu libvirtd[20980]: libvirt version: 1.2.16, package: 1.2.16-2ubuntu11.15.10.1
Dec 21 09:47:02 msi-ge60-ubuntu libvirtd[20980]: internal error: Unknown qemu capabilities flag vhost-user-multiqueue
Dec 21 09:47:03 msi-ge60-ubuntu libvirtd[20980]: internal error: QEMU / QMP failed: Could not access KVM kernel module: Permission denied
                                                 failed to initialize KVM: Permission denied
Dec 21 09:47:03 msi-ge60-ubuntu libvirtd[20980]: Failed to probe capabilities for /usr/bin/kvm: internal error: QEMU / QMP failed: Could not access KVM kernel module: Permission denied
                                                 failed to initialize KVM: Permission denied
Dec 21 09:47:03 msi-ge60-ubuntu libvirtd[20980]: internal error: Unknown qemu capabilities flag vhost-user-multiqueue
Dec 21 09:47:03 msi-ge60-ubuntu libvirtd[20980]: internal error: QEMU / QMP failed: Could not access KVM kernel module: Permission denied
                                                 failed to initialize KVM: Permission denied
Dec 21 09:47:03 msi-ge60-ubuntu libvirtd[20980]: Failed to probe capabilities for /usr/bin/kvm: internal error: QEMU / QMP failed: Could not access KVM kernel module: Permission denied
                                                 failed to initialize KVM: Permission denied
Dec 21 09:47:03 msi-ge60-ubuntu libvirtd[20980]: error creating bridge interface virbr0: File exists
Hint: Some lines were ellipsized, use -l to show in full.

Revision history for this message
jean-christophe manciot (manciot-jeanchristophe) wrote :

grep libvirt /etc/group
libvirtd:x:1001:actionmystique

kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used

description: updated
Revision history for this message
jean-christophe manciot (manciot-jeanchristophe) wrote :

I use qemu 2.5.0

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Are you running libvirt 1.2.21-2ubuntu1 or 1.2.21-2ubuntu2, or a custom built version?

Is the qemu version hand-built?

What does 'ls -l /dev/kvm' show?

Changed in libvirt (Ubuntu):
status: New → Incomplete
Revision history for this message
jean-christophe manciot (manciot-jeanchristophe) wrote :

Thanks for the quick answer.

I've installed libvirt-bin 1.2.16 from official repo.

I've just found a workaround in /etc/libvirt/qemu.conf:

user= "root"
group= "root"

I'm not sure why we have to specify these now:

 systemctl status libvirt-bin
● libvirt-bin.service - Virtualization daemon
   Loaded: loaded (/lib/systemd/system/libvirt-bin.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2015-12-21 19:22:28 CET; 1s ago
     Docs: man:libvirtd(8)
           http://libvirt.org
 Main PID: 10758 (libvirtd)
   CGroup: /system.slice/libvirt-bin.service
           ├─10758 /usr/sbin/libvirtd
           ├─32126 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leases...
           └─32129 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leases...

Dec 21 19:22:28 msi-ge60-ubuntu systemd[1]: Starting Virtualization daemon...
Dec 21 19:22:28 msi-ge60-ubuntu systemd[1]: Started Virtualization daemon.
Dec 21 19:22:28 msi-ge60-ubuntu dnsmasq[32126]: read /etc/hosts - 11 addresses
Dec 21 19:22:28 msi-ge60-ubuntu dnsmasq[32126]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Dec 21 19:22:28 msi-ge60-ubuntu dnsmasq-dhcp[32126]: read /var/lib/libvirt/dnsmasq/default.hostsfile

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1528136] Re: [1.2.16] Failed to initialize KVM & other internal errors

Quoting jean-christophe manciot (<email address hidden>):
> Thanks for the quick answer.
>
> I've installed libvirt-bin 1.2.16 from official repo.
>
> I've just found a workaround in /etc/libvirt/qemu.conf:
>
> user= "root"
> group= "root"
>
> I'm not sure why we have to specify these now:

Does ls -l /dev/kvm show

crw-rw---- 1 root kvm 10, 232 Dec 20 02:26 /dev/kvm

?

Revision history for this message
jean-christophe manciot (manciot-jeanchristophe) wrote :

ls -al /dev/kvm
crw-rw----+ 1 root root 10, 232 Dec 21 18:57 /dev/kvm

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Right this is a result of not having installed a package which
reset the /dev/kvm ownershpi and perms for you. Please restart libvirt after
doing

chgrp kvm /dev/kvm
chmod g+rw /dev/kvm

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for libvirt (Ubuntu) because there has been no activity for 60 days.]

Changed in libvirt (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Ishmael (ishmaelt3) wrote :

Hi,

if there is anyone to assist, please do so as I have compile libvirt and getting errors when starting up

root@saw:/home/ishmael/libvirt-1.3.4# /etc/init.d/libvirt-bin start
[....] Starting libvirt-bin (via systemctl): libvirt-bin.serviceJob for libvirt-bin.service failed because a timeout was exceeded. See "systemctl status libvirt-bin.service" and "journalctl -xe" for details.
 failed!

systemctl status libvirt-bin

May 13 15:10:33 saw libvirtd[31050]: Failed to probe capabilities for /usr/bin/kvm: internal error: QEMU / QMP failed: Could not access KVM kernel module: No such file or directory
                                     failed to initialize KVM: No such file or directory

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Please show the output of the two commands shown in the log message.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.