Home > Uncategorized > adding pci device to vm

adding pci device to vm

If you want to use a pci device in a vm, you first have to detach it from the host. List the devices and look for the one you want to use in the vm:

virsh nodedev-list --tree

In my case (CentOS7) I needed to enable iommu in order for this to work. This involves adding a kernel parameter:

kpath=`grubby --default-kernel`
grubby --update-kernel=$kpath --args="intel_iommu=on”
cat /proc/cmdline

After the reboot, /proc/cmdline should now include the iommu flag. Also check whether all the needed modules are loaded, in my case these are:

  • vfio_pci
  • vfio_iommu_type1
  • vfio
  • kvm_intel
  • kvm

You can then detach the pci device:

virsh nodedev-dettach pci_0000_05_00_1

I then used virt-manager, powered off the vm, and added the “Physical Host Device”.

Categories: Uncategorized Tags:
  1. December 14th, 2015 at 05:28 | #1

    John Wild is vice president of Absolute Access & Security.
    It’s possible you’ll even search for evaluations online.
    Only the pins and tumblers of the locks are replaced, thereby
    invalidating existing keys.

  2. July 19th, 2016 at 22:48 | #2

    Really no matter if someone doesn’t be aware of afterward
    its up to other visitors that they will assist,
    so here it occurs.

  3. August 1st, 2016 at 05:59 | #3

    Marvelous, what a blog it is! This web site provides valuable information to us,
    keep it up.

  4. September 13th, 2016 at 08:45 | #4

    Wonderful blog! Do you have any hints for aspiring writers?
    I’m planning to start my own site soon but I’m a little lost on everything.
    Would you recommend starting with a free platform like WordPress or go for a paid option? There are so
    many options out there that I’m completely confused ..

    Any suggestions? Appreciate it!

  5. November 4th, 2016 at 11:26 | #5

    Goood Ԁay I am sо glad I foynd yoour blog, Ⅰ really found yoou
    by accident, whiloe ӏ wаѕ lоoking on Bingg ffor ѕomething else, Nonethelkess I am ɦere now and would just like to saay many thaanks fߋr a tremendous post annd ɑ
    all roind intеresting blog (Ⅰ alxo love thе theme/design), Ӏ don’t
    haѵe timme tо loοk oνeг it all at the inute but I
    have book-marked it andd аlso adԁed іn ʏour RSS feeds, so ѡhen I haѵe
    tіme I willl bbe back to reaԁ morе, Pldase ⅾо keep
    uup the superb jo.

  6. November 29th, 2016 at 11:44 | #6

    There is also a wide selection to select from simple to tactic to arcades to racing and in many cases board games, each one of these with single and multiplayer mode.
    The touchscreen technology facility and wider screen makes i –
    Pod the very best gadget you are able to have.
    Make your family’s launch in to the returning to school mode a bit less turbulent with
    some family apps to simplify those tedious tasks which might be essential throughout the school year.

  7. November 30th, 2016 at 20:47 | #7

    naturally like your web site however you have to take a look at the spelling on quite a few of your posts.
    Several of them are rife with spelling problems and I in finding
    it very bothersome to inform the truth on the
    other hand I’ll surely come again again.

  8. April 2nd, 2017 at 01:39 | #8

    Notre mission première reste toujours la même que lorsque nous avons commencé :
    Être le meilleur information de poker en ligne et le meilleur web site pour
    les nouveaux joueurs, et garantir à tous
    les meilleurs bonus d’inscription possibles.

  1. December 14th, 2015 at 17:27 | #1
  2. December 15th, 2015 at 06:00 | #2
  3. December 15th, 2015 at 08:01 | #3
  4. December 15th, 2015 at 08:06 | #4
  5. December 15th, 2015 at 09:03 | #5
  6. December 15th, 2015 at 11:10 | #6
  7. December 15th, 2015 at 15:05 | #7
  8. December 15th, 2015 at 22:42 | #8
  9. December 21st, 2015 at 04:43 | #9
  10. December 21st, 2015 at 05:37 | #10
  11. December 21st, 2015 at 05:38 | #11
  12. December 21st, 2015 at 06:25 | #12
  13. December 21st, 2015 at 07:43 | #13
  14. December 23rd, 2015 at 21:00 | #14
  15. December 23rd, 2015 at 22:49 | #15
  16. December 23rd, 2015 at 23:35 | #16
  17. December 23rd, 2015 at 23:55 | #17
  18. December 29th, 2015 at 17:22 | #18
  19. December 31st, 2015 at 08:52 | #19
  20. January 5th, 2016 at 20:45 | #20
  21. January 5th, 2016 at 20:47 | #21
  22. January 5th, 2016 at 21:35 | #22
  23. January 5th, 2016 at 21:39 | #23
  24. January 5th, 2016 at 21:43 | #24
  25. January 5th, 2016 at 21:44 | #25
  26. January 5th, 2016 at 22:31 | #26
  27. January 5th, 2016 at 22:32 | #27
  28. January 5th, 2016 at 23:02 | #28
  29. January 5th, 2016 at 23:27 | #29
  30. January 6th, 2016 at 00:11 | #30
  31. January 6th, 2016 at 00:34 | #31
  32. January 10th, 2016 at 14:53 | #32
  33. January 10th, 2016 at 14:59 | #33
  34. January 10th, 2016 at 15:03 | #34
  35. January 10th, 2016 at 15:11 | #35
  36. January 10th, 2016 at 15:18 | #36
  37. January 10th, 2016 at 15:23 | #37