On Thu, 2009-04-16 at 07:48 -0400, Robert P. J. Day wrote:
apparently, i made one lame-brained move yesterday that almost
certainly caused my VM to run thigh-suckingly slowly. following the
linux KVM FAQ, i wanted to configure KVM so i could run it as a
non-root user. to that end, i
* created a "kvm" group,
* added my user account to the kvm group, and
* added the rules file /etc/udev/rules.d/60-kvm.rules:
KERNEL=="kvm", GROUP="kvm"
i re-initialized udev with:
# udevadm control --reload-rules (right?)
unloaded my kvm modules (kvm and kvm_amd), reloaded them and, sure
enough, my new /dev/kvm device file had a group affiliation of kvm.
excellent, i thought, and away i went ... with still painfully slow
performance, until i realized that i was still in my original desktop
session which *wasn't* considered part of the kvm group. so a quick
logout, log back in and things were much better.
*that's* the sort of thing i'm trying to document as i write all of
this up -- those slight oversights which no one bothers to mention
that eventually bite you in the butt.
You absolutely should not have needed to do that. We very much want this
to "just work".
Please give some more details so we can get to the bottom of what your
problem was.
in any event, back to my
original question -- what could i have checked that would have told
me, no, you are *not* taking advantage of the AMD-V HW virt
extensions? after all, my modules were loaded, /dev/kvm existed, it
clearly had the right group, but (and correct me if i'm wrong) i was
obviously not getting the benefit of HVM because my desktop session
wasn't considered part of the "kvm" group.
It's a very good question.
"info kvm" isn't suitable if you're using libvirt/virt-manager.
If it's a Fedora guest (i.e. one built with CONFIG_KVM_GUEST, you could
check the following in the guest:
$> grep CONFIG_KVM_GUEST /boot/config-$(uname -r)
CONFIG_KVM_GUEST=y
$> dmesg | grep -i kvm
Booting paravirtualized kernel on KVM
If you look in /var/log/libvirt/qemu/guest.log and saw
that /usr/bin/qemu-kvm had been run and there was no warning
about /dev/kvm, that would be a positive indication.
Also, if you do:
$> for iii in /proc/$(ps h -o tid -C qemu-kvm)/fd/*; do readlink $iii; done | grep
kvm
anon_inode:kvm-vcpu
/dev/kvm
anon_inode:kvm-vm
that would give you another indication that kvm is being used.
I've just updated the wiki with some of this info:
https://fedoraproject.org/wiki/Reporting_virtualization_bugs#Is_My_Guest_...
Cheers,
Mark.