A la pointe


A la pointe could mean a tip or high-tech in french.

Anyway, Frederic Degraeve is a tall guy in NYC thinking about a ton of home projects and interested by a ton of high-tech subjects.


28 simple steps to run pci-passthrough in a virtual machine with Spice

Red Hat is a very important actor in the virtualization open-source world. So I ran a try with CentOs from Red Hat on my all Intel cpu + mobo. It’s definitely easier than Ubuntu. Here are the steps :

  1. go into your bios and enable vt-d
  2. download the netinstall of CentOS 6.3
  3. use UNetbootin to put that on your usb key
  4. let’s go to the netinstall!
  5. hard disk I created a
    • /boot 500mb
    • a volume vg_pctele with three partitions
      • /vg_pctele/root = / (10gb)
      • /vg_pctele/swap = swap (8 gb)
      • /vg_pctele/windows = /media/secondos (20gb)
  6. choose the configuration mini desktop and customize to add all the packages needed for virtualization
  7. #yum install kvm kvm_intel
  8. #yum upgrade
  9. #append intel_iommu=on to the kernel line in /boot/grub/grub.conf
  10. #/etc/sysconfig/network-scripts/ -> create a bridge br0 of eth0 (cf doc)
  11. #chkconfig NetworkManager off
  12. #chkconfig network on
  13. #/etc/init.d/NetworkManager stop;/etc/init.d/network restart
  14. get the name of your pci to passthrough with lspci -nn
  15. get the name of the driver using your pci with lspci -k
  16. #echo "blacklist mydriver" >> /etc/modprobe.d/blacklist4myvm.conf
  17. #reboot
  18. get the corresponding libvirt name in virsh nodedev-list | grep pci
  19. #virsh nodedev-dettach pci_0000_03_00_0
  20. #virt-install --connect qemu:///system --arch=x86_64 -n vm1 -r 4096 --vcpus=4 -c /dev/dvd --vnc --noautoconsole --os-type windows --os-variant winxp --network=bridge:br0 --disk path=/dev/vg --accelerate --host-device=pci_0000_03_00_0
  21. #chkconfig libvirtd on
  22. #service libvirtd start
  23. #nano /etc/polkit-1/localauthority/50-local.d/50-libvirt.pkla and paste :

    [libvirt Management Access]

  24. #sudo groupadd libvirt
  25. #usermod -G libvirt -a fred
  26. virt-manager
  27. I did two changes before starting the vm with my user fred:
    • Processor : copy Host configuration and set the topology to 4 cores 4 threads 1 socket (adjust these numbers to your fit!)
    • add Cdrom to the boot menu

  28. install the virtualized os with the driver for your pci card!

I hope every steps are in this article to help you.
I forgot smthg? please let me know.


  1. Spice for linux/windows xp/7
  2. no windows 8 won’t be possible for now due to a new kind of window manager from microsoft
  3. Tips
    • try virtio disk and virtio network to improve the performance.
    • personally, it didn’t work so well. I replaced the real tek network card by an e1000 to increase the network performance.