wrong ownership on /dev/kvm (Maverick)

Bug #703514 reported by Marco Davids
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qemu-kvm (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: qemu-kvm

Installed qemu-kvm, but it was *very* slow (while using virt-manager). Looked in /var/log/libvirt/qemu/xxxx.log and noticed that user libvirt-qemu had no access to /dev/kvm (access denied error) and that it was unable to use the KVM full virtualization support. Placing user libvirt-qemu in the kvm group did not solve the issue.

Looked at /dev/kvm an noticed it was own by root.

Changed group ownership to kvm and, in combination with libvirt-qemu being in the kvm-group, this dramatically increased the performance!

ls -al /dev/ | grep kvm
crw-rw---- 1 root kvm 10, 232 2011-01-15 22:06 kvm

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.10
Release: 10.10
Codename: maverick

Revision history for this message
Marco Davids (mdavids) wrote :

Okay, the error came back... (can't go unnoticed, it was painfully slow again)

open /dev/kvm: Permission denied
Could not initialize KVM, will disable KVM support

Turns out that the ownership is reset after 'qemu-kvm' is restarted. As a workaround I added 'chgrp kvm /dev/kvm' in the 'pre-start script' section of /etc/init/qemu-kvm.conf.

Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 703514] Re: wrong ownership on /dev/kvm (Maverick)

Hmm, I could not reproduce this...

kirkland@x201:~$ ls -halF /dev/kvm
crw-rw----+ 1 root kvm 10, 232 2011-01-15 17:23 /dev/kvm
kirkland@x201:~$ sudo service qemu-kvm stop
[sudo] password for kirkland:
qemu-kvm stop/waiting
kirkland@x201:~$ ls -halF /dev/kvm
ls: cannot access /dev/kvm: No such file or directory
kirkland@x201:~$ sudo service qemu-kvm start
qemu-kvm start/running
kirkland@x201:~$ ls -halF /dev/kvm
crw-rw----+ 1 root kvm 10, 232 2011-01-16 09:16 /dev/kvm

Can you give specific instructions to reproducing this?

Revision history for this message
Marco Davids (mdavids) wrote :

This is weird, can't reproduce it myself anymore either...
I went back to an older version of qemu-kvm en re-installed the current one again, after that, the issue seems to have disappeared. Don't have a clue why.

I do run into quite some other problems now, however....

They are related to this:
http://ubuntuforums.org/showthread.php?t=1621431

(But that is an entire other story, that should be in it's own bug-report, I suppose)

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Okay, thanks for following up.

In this case, I'm going to close this bug for now. Please do re-open it if you figure out how to reproduce it. Cheers.

Changed in qemu-kvm (Ubuntu):
status: New → Invalid
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.