@@ -84,45 +84,45 @@ After installing the VirtIO drivers, boot back into Linux and create a new VM in
|
||||
|
||||
1. Select "Manual Install" and make sure the architecture is set to "x86_64"
|
||||
|
||||

|
||||

|
||||
|
||||
2. Set the Operating System to "Microsoft Windows 10".
|
||||
|
||||

|
||||

|
||||
|
||||
3. Allocate as much memory as you need but make sure to leave some for the host as well. You can see how much memory the host is currently using by running `free -m`. Changing the CPU options doesn't really matter since we'll manually change them later.
|
||||
|
||||

|
||||

|
||||
|
||||
4. Do not enable storage for this virtual machine for now. We'll do that during the customization.
|
||||
|
||||

|
||||

|
||||
|
||||
5. Select "Customize configuration before install" and make sure that "Virtual network 'default': NAT" is chosen.
|
||||
|
||||

|
||||

|
||||
|
||||
A new window should pop up. This is where you can customize your virtual machine. Before booting it, you should change a couple of options:
|
||||
|
||||
Under "Overview", Set the Chipset to "Q35" and the Firmware to "UEFI x86_64: /usr/share/edk2-ovmf/x64/OVMF_CODE.fd". Make sure to click "Apply" before switching pages.
|
||||
|
||||

|
||||

|
||||
|
||||
Under "CPUs", deselect "Copy host CPU configuration" and pick `host-passthrough`. You should also select "Manually set CPU topology" and set 1 Socket, 6 Cores, and 2 Threads (12 total virtual cores), leaving 4 for the host. If you have a different CPU, you should make sure to change these options to fit your configuration.
|
||||
|
||||

|
||||

|
||||
|
||||
Click "Add Hardware > Storage" and add the drive that contains Windows. Set "Bus type" to "VirtIO" and "Cache mode" to "none" for better performance.
|
||||
|
||||
> [!warning]
|
||||
> Make sure that the drive contains the Windows Bootloader. If it doesn't, you can resize the Windows partition, boot from a rescue USB, and create a Bootloader using BCDBOOT.
|
||||
|
||||

|
||||

|
||||
|
||||
Set the Network Device and Video Device models to "VirtIO".
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
Finally, click "Begin Installation". You might have to manually add a Boot Entry to the UEFI by pressing the Escape key while the VM is booting, going to "Boot Maintenance Manager > Boot Options > Add Boot Option > Windows Disk > EFI > Microsoft > Boot > bootmgfw.efi".
|
||||
|
||||
@@ -182,6 +182,7 @@ IOMMU Group 8 00:18.7 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Dev
|
||||
IOMMU Group 9 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA104M [GeForce RTX 3070 Mobile / Max-Q] [10de:24dd] (rev a1)
|
||||
IOMMU Group 9 01:00.1 Audio device [0403]: NVIDIA Corporation GA104 High Definition Audio Controller [10de:228b] (rev a1)
|
||||
```
|
||||
|
||||
What we mainly care about are the GPU groups, specifically:
|
||||
|
||||
```bash
|
||||
@@ -284,7 +285,6 @@ IOMMU Group 9 00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH
|
||||
|
||||
## Creating the Hook Scripts
|
||||
|
||||
|
||||
Before doing any passthrough, we need to create the scripts that will allocate the necessary resources to the VM before it boots and de-allocate them after it shuts down. To do that, we are going to be using [libvirt hooks](https://libvirt.org/hooks.html) and The Passthrough Post's [hook helper](https://passthroughpo.st/simple-per-vm-libvirt-hooks-with-the-vfio-tools-hook-helper/). You can find all the needed scripts in this project's [git repository](https://git.karaolidis.com/karaolidis/legion-7-vfio).
|
||||
|
||||
> [!warning]
|
||||
|
Reference in New Issue
Block a user