even more progress
@@ -274,11 +274,65 @@ A new window should appear with more advanced configuration options. You can alt
|
||||
<img src="./img/virtman_6.png" width="450">
|
||||
</div><br>
|
||||
|
||||
Go to the CPUs page and remove the check next to `Copy host CPU configuration` and under Model type `host-passthrough`. Also make sure to check the option for `Enable available CPU security flaw mitigations` to prevent against Spectre/Meltdown vulnerabilities.
|
||||
|
||||
<div align="center">
|
||||
<img src="./img/virtman_7.png" width="450">
|
||||
</div><br>
|
||||
|
||||
I've chosen to remove several of the menu options that won't be useful to my setup (feel free to keep them if you'd like):
|
||||
|
||||
<div align="center">
|
||||
<img src="./img/virtman_8.png" width="450">
|
||||
</div><br>
|
||||
|
||||
### Part 3: Performance
|
||||
Let's add the virtIO drivers. Click 'Add Hardware' and under 'Storage', create a custom storage device of type `CDROM`. Make sure to locate the ISO image for the virtIO drivers from earlier:
|
||||
|
||||
<div align="center">
|
||||
<img src="./img/virtman_9.png" width="450">
|
||||
</div><br>
|
||||
|
||||
Under the NIC menu, change the device model to `virtIO` for improved performance:
|
||||
|
||||
<div align="center">
|
||||
<img src="./img/virtman_10.png" width="450">
|
||||
</div><br>
|
||||
|
||||
Now it's time to configure our passthrough devices! Click 'Add Hardware' and under 'PCI Host Device', select the Bus IDs corresponding to your GPU.
|
||||
|
||||
<div align="center">
|
||||
<img src="./img/virtman_11.png" width="450">
|
||||
</div><br>
|
||||
|
||||
Make sure to repeat this step for all the devices associated with your GPU in the same IOMMU group (usually VGA, audio controller, etc.):
|
||||
|
||||
<div align="center">
|
||||
<img src="./img/virtman_12.png" width="450">
|
||||
</div><br>
|
||||
|
||||
Since I'm passing through an entire disk to my VM, I selected the Bus ID corresponding to the 1TB Samsung NVMe SSD which has Windows 10 (and my games) installed on it.
|
||||
|
||||
<div align="center">
|
||||
<img src="./img/virtman_13.png" width="450">
|
||||
</div><br>
|
||||
|
||||
Then under the 'Boot Options' menu, I added a check next to `Enable boot menu` and reorganized the devices so that I could boot directly from the 1TB SSD:
|
||||
|
||||
<div align="center">
|
||||
<img src="./img/virtman_14.png" width="450">
|
||||
</div><br>
|
||||
|
||||
You can now go ahead and select the USB Host Devices you'd like to passthrough to your guest VM (usually a keyboard, mouse, etc.). Please note that these devices will be held by the guest VM from the moment it's created until its stopped and will be unavailable to the host.<sup>[10](#footnote10)</sup>
|
||||
|
||||
<div align="center">
|
||||
<img src="./img/virtman_15.png" width="450">
|
||||
</div><br>
|
||||
|
||||
Unfortunately, not everything can be accomplished using the virt-manager GUI. For the next several steps, we'll need to do some finer tuning by directly editing the XML:
|
||||
|
||||
### Part 4: VM Logistics
|
||||
|
||||
### Part 4: Performance
|
||||
|
||||
### Credits + Useful Resources
|
||||
|
||||
@@ -347,3 +401,5 @@ AMD CPUs/motherboards/chipsets tend to provide better ACS support than their Int
|
||||
|
||||
<a name="footnote9">9</a>. See [this link](https://www.stratoscale.com/blog/compute/using-bare-qemu-kvm-vs-libvirt-virt-install-virt-manager/) for more details and comparison between QEMU and virt-manager
|
||||
<br>
|
||||
|
||||
<a name="footnote10">10</a>. See [here](https://heiko-sieger.info/running-windows-10-on-linux-using-kvm-with-vga-passthrough/#About_keyboard_and_mouse) for several software and hardware solutions for sharing your keyboard and mouse across your host machine and guest VM.
|
||||
|
||||
|
After Width: | Height: | Size: 127 KiB |
|
After Width: | Height: | Size: 254 KiB |
|
After Width: | Height: | Size: 128 KiB |
|
After Width: | Height: | Size: 269 KiB |
|
After Width: | Height: | Size: 161 KiB |
|
After Width: | Height: | Size: 177 KiB |
|
After Width: | Height: | Size: 171 KiB |
|
After Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 151 KiB |
@@ -0,0 +1,111 @@
|
||||
<domain type="kvm">
|
||||
<name>win10</name>
|
||||
<uuid>d42813e5-3ada-459c-a83f-f0962cede5fa</uuid>
|
||||
<metadata>
|
||||
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
|
||||
<libosinfo:os id="http://microsoft.com/win/10"/>
|
||||
</libosinfo:libosinfo>
|
||||
</metadata>
|
||||
<memory unit="KiB">16777216</memory>
|
||||
<currentMemory unit="KiB">16777216</currentMemory>
|
||||
<vcpu>12</vcpu>
|
||||
<os>
|
||||
<type arch="x86_64" machine="q35">hvm</type>
|
||||
<loader readonly="yes" type="pflash">/usr/share/OVMF/OVMF_CODE.fd</loader>
|
||||
<bootmenu enable="yes"/>
|
||||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
<apic/>
|
||||
<hyperv>
|
||||
<relaxed state="on"/>
|
||||
<vapic state="on"/>
|
||||
<spinlocks state="on" retries="8191"/>
|
||||
</hyperv>
|
||||
<vmport state="off"/>
|
||||
</features>
|
||||
<cpu mode="host-passthrough"/>
|
||||
<clock offset="localtime">
|
||||
<timer name="rtc" tickpolicy="catchup"/>
|
||||
<timer name="pit" tickpolicy="delay"/>
|
||||
<timer name="hpet" present="no"/>
|
||||
<timer name="hypervclock" present="yes"/>
|
||||
</clock>
|
||||
<pm>
|
||||
<suspend-to-mem enabled="no"/>
|
||||
<suspend-to-disk enabled="no"/>
|
||||
</pm>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||
<disk type="file" device="cdrom">
|
||||
<driver name="qemu" type="raw"/>
|
||||
<source file="/home/bsteiner/.iso/Win10_1909_English_x64.iso"/>
|
||||
<target dev="sda" bus="sata"/>
|
||||
<readonly/>
|
||||
<boot order="2"/>
|
||||
</disk>
|
||||
<disk type="file" device="cdrom">
|
||||
<driver name="qemu" type="raw"/>
|
||||
<source file="/home/bsteiner/.iso/virtio-win-0.1.173.iso"/>
|
||||
<target dev="sdb" bus="sata"/>
|
||||
<readonly/>
|
||||
<boot order="3"/>
|
||||
</disk>
|
||||
<controller type="usb" index="0" model="qemu-xhci" ports="15"/>
|
||||
<interface type="network">
|
||||
<source network="default"/>
|
||||
<mac address="52:54:00:73:81:6d"/>
|
||||
<model type="virtio"/>
|
||||
</interface>
|
||||
<hostdev mode="subsystem" type="pci" managed="yes">
|
||||
<source>
|
||||
<address domain="0" bus="10" slot="0" function="0"/>
|
||||
</source>
|
||||
</hostdev>
|
||||
<hostdev mode="subsystem" type="pci" managed="yes">
|
||||
<source>
|
||||
<address domain="0" bus="10" slot="0" function="1"/>
|
||||
</source>
|
||||
</hostdev>
|
||||
<hostdev mode="subsystem" type="pci" managed="yes">
|
||||
<source>
|
||||
<address domain="0" bus="10" slot="0" function="2"/>
|
||||
</source>
|
||||
</hostdev>
|
||||
<hostdev mode="subsystem" type="pci" managed="yes">
|
||||
<source>
|
||||
<address domain="0" bus="10" slot="0" function="3"/>
|
||||
</source>
|
||||
</hostdev>
|
||||
<hostdev mode="subsystem" type="pci" managed="yes">
|
||||
<source>
|
||||
<address domain="0" bus="4" slot="0" function="0"/>
|
||||
</source>
|
||||
<boot order="1"/>
|
||||
</hostdev>
|
||||
<hostdev mode="subsystem" type="usb" managed="yes">
|
||||
<source>
|
||||
<vendor id="0x046d"/>
|
||||
<product id="0xc539"/>
|
||||
</source>
|
||||
</hostdev>
|
||||
<hostdev mode="subsystem" type="usb" managed="yes">
|
||||
<source>
|
||||
<vendor id="0x2516"/>
|
||||
<product id="0x008f"/>
|
||||
</source>
|
||||
</hostdev>
|
||||
<hostdev mode="subsystem" type="usb" managed="yes">
|
||||
<source>
|
||||
<vendor id="0x046d"/>
|
||||
<product id="0x085c"/>
|
||||
</source>
|
||||
</hostdev>
|
||||
<hostdev mode="subsystem" type="usb" managed="yes">
|
||||
<source>
|
||||
<vendor id="0x262a"/>
|
||||
<product id="0x100d"/>
|
||||
</source>
|
||||
</hostdev>
|
||||
</devices>
|
||||
</domain>
|
||||