引用:
原帖由 XT 於 2016-2-17 15:50 發表
KVM for normal home using?
How to? I'm interesting
It's actually very simple,
you first need hardware supporting VT-d, that is your mainboard and CPU.
This can be checked, for Intel,
http://ark.intel.com/, see if you can find VT-d in your CPU/mainboard chipset.
You also need 2 GPUs, 1 of them can be Intel Graphics, another is any discrete card.
At the end you need 2 video cables, connecting from both the Intel IGP and your discrete graphics card to the same monitor, or you can do a dual monitor setup like what I showed.
Then, follow this tutorial closely:
http://vfio.blogspot.ca/2015/05/ ... es-part-3-host.html
http://vfio.blogspot.ca/2015/05/ ... es-part-4-host.html
A shorter tutorial (which can be used without referring to the above two), is easier to follow but not using the best method (imho):
http://www.andrewklau.com/my-fed ... without-compromise/
And there is a good video showing the whole process from bare metal, he basically followed the first 2 links I gave:
https://www.youtube.com/watch?v=GtV_pYIgxOA
In short, here is what I did (just a general description, excluding detailed scripting, please refer to the above tutorials and their explanation are excellent)
1. Enable VT-d in BIOS/UEFI interface (suppose you have the mainboard+CPU, graphics card shouldn't matter except it's too old, I am using AMD HD7950)
2. In your Linux host, install the virtualization tools. I am using qemu-kvm and virt-manager, plus
OVMF (installed separated from the normal qemu-kvm packages)
3. Then enable IOMMU and set to prevent the graphics card from being loaded by Linux host (meaning that the pass-through GPU cannot be used by Linux).
For step 3 I suggest you follow the first 2 links, Alex's blog. It outlined a more advanced method with a direct vfio-bind, without first passing the graphics to pci-stub.
4.You can then move on to set up the virtual machine, and add the PCI devices in virt-manager.
-When creating the virtual machine, don't start it right away, check the box to configure it first. Over there,
in Overview set the Firmware to UEFI instead of BIOS.
-(very important, spent me 3 days to figure out) In CPUs configuration, in Model, type host-passthrough.
Without this, the virtual machine will always boot into BSoD.
-You have to add both the graphics card's graphic processor and HD audio, so there will be 2 PCI devices to be added.
If after adding, the machine doesn't boot, try to uncheck the box in the PCI devices "ROM_BAR". My machine works only without them. It seems they are useful when you want to give it a specific ROM file.
5. If everything works, you should be able to enter Windows and see the cards there. Go ahead and install the driver, on installation completed successfully, the graphics card will start to generate signal output.
It will be better if you start by following the tutorial, and I can then help with specific issues that you might find (I have 3 days of experience LOL)