It's time for another bonus episode!
This will be episode 2.1: Windows, Virtio, QEMU...Oh my!
As I mentioned in the previous episode, there are some special things to keep in mind when it comes to installing Windows in Proxmox. After going through the video "Launching a Windows VM in Proxmox" by Learn Linux TV I was able to understand how to use Virtio drivers and get the QEMU agents working.
Before we begin, you might be thinking, "Why should I do this? I was able to get my VM installed no issues without these steps." The short answer has been summed up right within the Proxmox documentation:
"VirtIO Drivers (download link here) are paravirtualized drivers for kvm/Linux. In short, they enable direct (paravirtualized) access to devices and peripherals for virtual machines using them, instead of slower, emulated, ones. "
What this all means is by using Virtio, you are using "Paravirtualization" which allows for better performance for your VM which gives the VM direct access to the devices and peripherals connected to the VM as-opposed to emulated drivers which are slower.
"Whats a QEMU agent? Is that important?"
QEMU is an abbreviation that means Q(uick) EMU(lator) which is a free and open-source emulator that emulates a computers processor through dynamic binary translationand provides a set of different hardware and device models for the machine, enabling it to run a variety of guest operating systems. It can interoperate with Kernel-based Virtual Machine (KVM) to run virtual machines at near-native speed. QEMU can also do emulation for user-level processes, allowing applications compiled for one architecture to run on another.
Now with that out of the way we can finally begin deploying a Windows VM correctly using Proxmox!
First thing you you will want to do is actually download the Virtio drivers. I put a link earlier in the thread. Like I mentioned in previous episodes you can add these ISO files easily right within Promox and download them within the client itself by clicking on the "Download from URL" button and pasting the URL:
8e19322d-75cb-4448-8d8c-75857fd2af51-image.png
Now that the Virtio ISO is downloaded, let create a new VM by clicking the Create VM button in the top right corner of our Proxmox instance. We can mostly go through the same installation process as I mentioned before but I will mark any changes that may need to be made below.
The first difference is on the OS tab. In this tab there is a checkbox to add an additional drive for our Virtio ISO. Super handy! Click the checkbox and find the location where you Virtio ISO:
653ac66e-5054-4d35-9402-0e475cb659b9-image.png
Next on the System tab, make sure to hit the checkbox for the QEMU agent. This will make sure the agent will be enabled when we install the software:
585db138-e166-47ed-9587-7230b92cccb2-image.png
Next on Disk, select SCSI for your disk and select Write Back for the Cache option. Write back should help increase performance:
23732417-1f96-4a63-bb69-997d7c8c5fd1-image.png
And that was the last difference for the Create VM portion. All of these changes are the recommended settings that Proxmox dictates. Now, because we chose the option to add an addtional drive for Virtio drivers, we do not need to do anything else with our VM, we can now start it. Make sure that the virtual DVD drive with the Server 2022 ISO file is first in the boot order! Your IDE drive order should look like the image below. Notice that my Server 2022 drive is set to 0 and my Virtio drive is set to 1:
d95ef83d-bf06-4af3-b7d3-4f1c3f244fda-image.png
Please note, you might need to smash your "Any key" (mines spacebar) as soon as you boot your VM. If you don't you will miss the option to continue to boot to Windows and then your VM will move to the next device which will be your Virtio DVD drive.
Follow the steps to install Windows until you get to the disk selection screen. You will notice that there are no drives to select! This is where the Virtio ISO comes in. Select the Load Drive button in the bottom left side:
d64b783f-62df-4eb1-813c-ff932f63d278-image.png
On the load driver prompt select Browse and the go to the follow folder: Virtio ISO> viosci> 2k22> amd64
c329a725-315d-4b76-9b70-2d626f218f22-image.png
You should now see a Redhat VIRTIO SCSI pass-through controller driver. Click next to install the driver. After this driver is installed your hard drive will now be select-able in the Windows Installer! You can now complete your installation of Server 2022.
9c73fb3c-157b-47a9-bc42-b9bb5aa136f6-image.png
Once you're logged into your new Server 2022 installation, you will most likely notice some drivers missing if you open you Device Manager. Below is what my device manager looks like after a fresh install:
ad65efb3-73be-483f-b520-2d30838bec2f-image.png
You can see that I am missing an Ethernet Controller, PCI Device and a PCI Simple Communications Controller. We will be using the Virtio ISO disk to install these missing drivers. Simply right-click on the driver you want to install and click on Update Drive, Browse my Computer, and then Browse again and find your Virtio ISO drive. If you don't see it check the hardware settings of the VM in Proxmox. You should be able to select the Virtio drive (in my case my E drive) and Windows will search all subfolders as long as that checkbox is selected:
5121e83c-8ae0-4477-9604-b9f87dc99f26-image.png
Click next and within seconds your driver will be installed!
3509a8cc-fc48-4744-9a33-5be5a9b1a97b-image.png
Lastly, we will install the QEMU agent. This is also fairly simple to complete. Just follow the steps below:
Open File Explorer
Open the Virtio drive
Find the folder called "guest-agent".
Select the proper version to install. In my case I am selecting the 64-bit version.
And that's it! You have now successfully gone through the steps to install Server 2022 using Virtio drivers and a QEMU agent following the Proxmox recommendations.
For my next episode(s) I want to go through the Networking and Firewall settings within Proxmox. I want to do this to isolate my Homelab and do some networking tricks within my Homelabs own subnet. Make a server run NAT so all traffic goes through it etc etc. If you have any questions or comments on this last bonus episode please feel free to post a comment! I am hoping to make these updates more frequent as long as my work schedule and sickness in my home cooperate.
Thanks again for going on this adventure with me. Keep learning cool things nerdos!
Have a great weekend!