Proxmox Windows VM


Prerequisites

You’ll need the following;

  • An ISO file of Windows 11, or any other Windows version you’d want. I’m not going to provide any, you should be able to download it from the Microsoft servers.
  • An ISO of the VirtIO drivers and tools. You can download the latest stable release here. If for any reason it’s not working for you, have a look at this page to browse for whichever version you need.

    If you didn’t know, VirtIO drivers are like super cool for KVM. They let you get direct access to all the peripherals and devices of the guest VM. Emulated device drivers are like, way too slow man.

    Once you’ve fetched the ISOs, upload them to your Proxmox node or your main storage for ISOs.

Creating the VM

Under the General tab, enter the desired name for your VM and hit Next. Should you be using Clustering, pick your desired node.
Navigate to the OS tab and proceed to select the Windows ISO file from the ISO image field. It is imperative to ensure that the Type field is configured to Microsoft Windows and the Version field is set to 11/2022. In the event that an alternative Windows version is being utilized, these settings may be modified accordingly.
Please ensure that the settings on the System tab correspond with the screenshot provided below to prevent any potential issues with your Windows installation.
Details
  • The SCSI controller is set to VirtIO SCSI single, and the Qemu Agent option is checked.
  • Under firmware options, BIOS is set to OVMF (UEFI), add EFI disk is checked, EFI storage is selected, and the EFI storage format is Qemu Image Format (qcow2).
  • Check the Add TPM option, and select TPM storage and TPM version 2.0.
  • If you need PCIe support for GPU passthrough on your Windows VM, make sure the machine field is set to q35 instead of i440fx.
  • You can also change the graphics card from Default to SPICE (simple protocol for independent computing environments) for the best desktop experience.Tip: Proxmox uses raw disk format for the TPM disk, since the TPM emulator software does not support the qemu image (qcow2) formatIf you set local directory-based storage for the TPM disk, you will not be able to create live snapshots of the VM, and you will see a message stating, “The current guest configuration does not support taking new snapshots”.

To get around this problem, you should choose a storage for the TPM disk that allows snapshots of raw disk formats. A few examples of such storage types are ZFS, BTRFS, Ceph, and LVM-thin.

Ensure that the Bus/Device option is set to SCSI and the Cache is set to Write back on the Disks tab to optimize performance. The Discard option can be selected to enable the Proxmox node to recover free space, which is analogous to the TRIM option for SSD drives. Input the necessary disk size and maintain the disk format as QEMU image format. Subsequently, click on the Next button.
In the CPU tab, indicate the desired number of cores and select the host CPU type. Note that the kvm64 CPU type may have restricted instruction sets, potentially causing sluggishness in certain scenarios.
On the Memory tab, allocate your desired Memory to for the VM, and untick Ballooning Device.
That assures that the VM has all the allocated Memory at all times.
Select the appropriate bridge for your VM on the Network tab and ensure that the model is set to VirtIO (paravirtualized) to optimize network performance on your Windows VM.
Verify all settings and ensure that the “Start after created” option is not selected. It is necessary to include an additional DVD drive in our virtual machine to mount an ISO file containing VirtIO drivers prior to initiating the VM.
Once you’ve followed the previous steps, you should be left with something similar to this.

 In the Hardware tab, and then click Add to open a dropdown menu. Next, select the CD/DVD Drive option as shown.

Select the VirtIO ISO you downloaded earlier, and click Add.

If you’ve done everything correctly, you should be left with something similar to this.

Before we boot our VM, we need to make some adjustments to the Boot Order of the VM. Head into Options and hit Edit on the Boot Order.

Make sure to untick net0 and make sure the list corresponds as shown.


Installing Windows

Now you can fire up your Windows VM, hit the told key on-screen to initiate the Windows setup.
Just follow through the installer until you end up as shown on the next step.

Hit the Custom Install Windows only (advanced) option;
The subsequent step is noteworthy. It is evident that the absence of a Windows installation disk is due to the VirtIO SCSI controller being chosen for the VM disk, rendering the disk undetectable by Windows. Select the Load driver option, as depicted in the screenshot below.
Browse the folders, and select the folder matching your version of Winodws, in this case its; D:\vioscsi\w11\amd64. For Windows 10 installation, opt for the w10 folder. For Windows Server 2022 installation, choose the 2k22 folder.
The Windows setup will automatically select an appropriate driver for an SCSI controller, such as D:\vioscsi\w11\amd64\vioscsi.inf in our scenario. To continue with the identified driver, click Next.

Please note that the disk has been detected. To specify the VirtIO network adapter driver, please click on Load driver once again and select the VMNet folder.

Again, do pick the correct folder for your choice of Windows version. In this case its; D:\NetKVM\w11\amd64.

During the setup of Windows 11, when you get to this section, you can either sign in to your account if you want.
You can also skip this easily;
  • Type in; no@thankyou.com for the Email.
  • For the password, just type anything.

What will happen, is that an error will show, and you can just hit skip and continue on with creating your Local Account.


Post-Installation

Upon completion of the Windows installation, open File Explorer and navigate to the drive where the VirtIO ISO file is mounted. Locate and execute the virtio-win-gt-x64.msi (or virtio-win-gt-x86.msi) file, which may have a different name for alternative Windows versions.

The installation process will include all necessary VirtIO drivers for your Windows VM, along with the ballooning service if you chose to utilize that feature.

After the driver installation, access the guest-agent directory and execute the qemu-ga-x86_64.msi file to deploy the qemu guest agent. Although not mandatory, it facilitates data exchange between the Proxmox node and guest OS, and enables remote command execution.


Completion of the Windows VM Guide

Once drivers and Guest-Agent is all set and done, go ahead and shut down your Windows VM.
Head back into the Hardware tab;

Back in here, click on the shown CD/DVD disks (ide0 and ide2). You can now remove them from your VM, as they’re no longer needed.

Congratulations on your successfully installed Windows VM!

Want to get more out of your VM?
Check out my PCI Passthrough Guide!