Saturday, June 27, 2009

Using KVM on Fedora 11, and Intel based systems

I have a small tip for those wishing to use qemu-kvm on Intel based systems - Like my work supplied Lenovo T500.

I found that even though the system supported hardware VT capabilities, I only ever had the qemu emulator available. I never had the opportunity to investigate much further.

When I was investigating implementing PCI device assignement ( allowing a virt guest direct access to a device - Like a PCI USB controller ) I realised my VM's were all non-hardware accelerated plain old qemu emulation, and I needed the ability to assign PCI devices. The only way to do that was to use the qemu-kvm emulator.

The reason is this BZ:

https://bugzilla.redhat.com/show_bug.cgi?id=490477

iommu is required to have VT-d available. iommmu feature is disabled for good reason, but if you are lucky you wont be effected by the bug. To enable it and get full hardware accelerated KVM :

- Edit /etc/grub.conf ( /boot/grub/grub.conf ) and add an arg intel_iommu=on to the kernel boot line, for example mine looks like so:

title Fedora (2.6.29.5-191.fc11.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_catfood-lv_root intel_iommu=on rhgb quiet
initrd /initrd-2.6.29.5-191.fc11.x86_64.img



After I made this change and rebooted, I was able to edit the guest's configurations using 'virsh edit win2k3.' My guest has a virt domain 'win2k3' . I had to change the domain configuration to use kvm instead of qemu, as well as the qemu-kvm emulator.

My guest systems that use qemu-kvm perform much better now that hardware acceleration is working!!

No comments:

Post a Comment