PVE Adopt a KVM Windows Guest: Difference between revisions
mNo edit summary |
|||
Line 14: | Line 14: | ||
Setup the guest VM as it is shown at {{Media-cite|v|1}}. We will not perform a clean installation but will import a KVM image with Window 11 which is setup to use [[:File:Tesla-K20X-BD-06397-001-v07.pdf|NVIDIA Tesla K20Xm]] as primary GPU via RDP. So after the creation of the VM we have to do few more steps before start it. | Setup the guest VM as it is shown at {{Media-cite|v|1}}. We will not perform a clean installation but will import a KVM image with Window 11 which is setup to use [[:File:Tesla-K20X-BD-06397-001-v07.pdf|NVIDIA Tesla K20Xm]] as primary GPU via RDP. So after the creation of the VM we have to do few more steps before start it. | ||
''How to isolate the GPU, at the PVM host's side, to be ready for passthrough is described in the article [[PVE IOMMU Isolation for Passthrough]] and move details are provided in the article [[KVM and GPU Passthrough to Windows VM]].'' | ''How to isolate the GPU, at the PVM host's side, to be ready for passthrough is described in the article [[PVE IOMMU Isolation for Passthrough]] and move details are provided in the article [[QEMU/KVM and GPU Passthrough in Details|KVM and GPU Passthrough to Windows VM]].'' | ||
UEFI BIOS is recommended for GPU pass­th­rou­gh at all but required for Windows 11. The TPM option is also mandatory for Windows 11. | UEFI BIOS is recommended for GPU pass­th­rou­gh at all but required for Windows 11. The TPM option is also mandatory for Windows 11. |
Latest revision as of 19:46, 10 November 2024
Setup the Virtual Machine
Setup the guest VM as it is shown at Video 1. We will not perform a clean installation but will import a KVM image with Window 11 which is setup to use NVIDIA Tesla K20Xm as primary GPU via RDP. So after the creation of the VM we have to do few more steps before start it.
How to isolate the GPU, at the PVM host's side, to be ready for passthrough is described in the article PVE IOMMU Isolation for Passthrough and move details are provided in the article KVM and GPU Passthrough to Windows VM.
UEFI BIOS is recommended for GPU passthrough at all but required for Windows 11. The TPM option is also mandatory for Windows 11.
Actually, the disk image created at Video 1 has been deleted – let's remembered we will import an existing KVM Image – but with this approach we've reserved the name vm-205-disk‑0
for the primary VM's image. The CPU type host
is important to allow virtualization at the guest side – for WSL2 in the current case.
Convert the KVM Image into a Proxmox Image
Create an new VM on Proxmox VE (already done) and add the existing disk image to this new VM (this step), set the boot order and start source.
qm importdisk 205 Windows.11.img local-lvm
importing disk 'Windows.11.img' to VM 205 ...
Logical volume "vm-205-disk-0" created.
...this takes a while...
transferred 60.0 GiB of 60.0 GiB (100.00%)
Successfully imported disk as 'unused0:local-lvm:vm-205-disk-0'
In the above command:
205
is the id of the VM.Windows.11.img
is the image that was created before.local-lvm
is the name of a storage as listed inpvesm status
.
qm importdisk
adds the image as unused disk to the virtual machine. Thus, making it the boot disk is still necessary.
qm set 205 --scsi0 local-lvm:vm-205-disk-0
update VM 205: -scsi0 local-lvm:vm-205-disk-0
Fine tuning of the Configuration file
Modify and add the lines marked in the above snippet. Note 205
is the id of the virtual machine. When the file is saved the relevant changes will be automatically applied and updated within the Proxmox's WEB GUI.
nano /etc/pve/qemu-server/205.conf
agent: 1,fstrim_cloned_disks=1
args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,kvm=off'
bios: ovmf
boot: order=scsi0
cores: 4
cpu: host,hidden=1,flags=+pcid
efidisk0: local-lvm:vm-205-disk-1,efitype=4m,pre-enrolled-keys=1,size=4M
hostpci0: 0000:02:00,pcie=1
ide2: none,media=cdrom
localtime: 1
machine: pc-q35-6.1
memory: 4096
meta: creation-qemu=6.1.0,ctime=1647272520
name: Windows.11
net0: e1000=62:42:2D:03:C4:C9,bridge=vmbr0,firewall=1
numa: 0
ostype: win11
scsi0: local-lvm:vm-205-disk-0,discard=on,size=60G
scsihw: virtio-scsi-pci
smbios1: uuid=ec286656-a060-42c5-956c-099feba059ab
sockets: 1
tpmstate0: local-lvm:vm-205-disk-2,size=4M,version=v2.0
vmgenid: f45ed16c-d22b-4d3d-b4d7-68cb0438fe48
References
- pve:Migration of servers to Proxmox VE
- Reddit: The Ultimate Beginner's Guide to GPU Passthrough (Proxmox, Windows 10)
- Proxmox PVE: Documentation – Qemu/KVM Virtual Machines (explanation about all options within the Qemu/KVM VM interface)