TUTORIAL WARNING!
I just installed Harvester v1.1.0 on my home server and it is great. I have been jumping back and forth between proxmox and harvester for the last few months. Yesterday I decided to switch back to harvester so here we are.
After I got a rancher cluster up and running, I decided to try and run a Windows 11 VM. I had some trouble and I anticipate that others might as well, so here’s the tutorial.
First, you have to download two ISO files and upload them to harvester.
Download Latest virtio-win ISO
Upload to harvester under “Images > Create”
Next, let’s create our VM. In harvester, navigate to “Virtual Machines > Create”. You will be greeted by the following screen:
Notice that I have named the instance “windows-11”. I have checked the “Use VM Template” box and have selected the “windows-iso-image-base-template” template. I have also allocated 1 CPU core and 2 GB of RAM. Feel free to allocate more CPU or RAM resources. We will need to have three disks attached. Under the “Basics” tab, you will see a “Volumes” tab. Click that and add/remove the following volumes:
First is our installation media. choose the windows 11 ISO that you previously uploaded.
Next is our boot drive. Make sure to choose the correct storage class and add more than 32GB of storage. Here I chose 75 GB.
You’ll notice that since we chose to use the VM template, it automatically added a virtio container disk. This is SUSE’s solution to virtio drivers. I don’t want to use it since it only supports windows 10. Simply remove this volume by clicking the red x in the top right. Click “Add VM Image” and create the following:
This is our virtio drivers volume. That takes care of the volumes. We now have to move onto the “Networks” tab under “Volumes” on the left side menu.
I have created a network called “DHCP” which let’s my VMs retrieve an IP address from the DHCP server without me having to assign it to them. I went over how to do this in my previous harvester post. After I assign it to my DHCP network, it’s time to start this bad boy.
You’re probably thinking, “That was too easy!” Well, now comes the more technical part. We need to bypass TPM, SecureBoot, and RAM Check because Windows 11 is annoying. Start your machine and open the console. Run through the Windows install process as usual and you will get the following error:
Don’t panic! Simply hit “Shift + F10” to pull up a cmd prompt. Now type “regedit” and press enter. Yeah baby! Let’s edit that registry!
When the Registry Editor opens, navigate to “HKEY_LOCAL_MACHINE\SYSTEM\Setup”. Right-click on the Setup key and create a new key named “LabConfig”. Now right-click on the LabConfig key create 3 new DWORDs (32-bit) named BypassTPMCheck, BypassRAMCheck, and BypassSecureBootCheck values and set their data to 1. You should get something that looks like this:
Now all you have to do is close the registry editor, type “exit” and press enter on the cmd prompt, and click the back arrow on the error prompt page.
You will now be back at the screen prompting you to select the version of Windows 11 to install. You can now continue with the setup, and the hardware requirements will be bypassed!
Voila! We can move to the next step.
As you know, we didn’t load our virtio drivers for nothing. When we get past the “Custom Install” windows screen, we will see that there is no boot drive found. Simple fix here, click “Load Driver”:
Click “Browse” on the window that pops up. This will open your file explorer. Navigate to the virtio cdrom:
Navigate to “<your virtio cd rom> -> amd64 -> w11” and hit ok.
You should see something like this:
This is our virtio scsi controller. Click “Next” and wait for the driver to be installed. After it is installed, we can now see the boot drive and can run through the installation as normal. That’s it!
If you ever virtualized Windows on proxmox, you know that you usually have to install the netkvm redhat network adapter as well. There is no need in harvester.
Make sure to get RDP going!
Cheers,
Joe
Since Harvester is built on Kubevirt, you can actually add a virtual TPM device by editing the VM template file as described here: https://kubevirt.io/2022/KubeVirt-installing_Microsoft_Windows_11_from_an_iso.html