Proxmox-NUT Homelab HOWTO - Step 3: Install Windows Server 2022 and Configure Shutdown from Proxmox/QEMU Guest Agent

Step 3: Install Windows Server 2022 and Configure Shutdown from Proxmox/QEMU Guest Agent

We will install Windows Server 2022 and configure it to shut down from Proxmox without human intervention.

Downloading the ISOs

You will need the Windows Server ISO from Microsoft and the VirtIO from Fedora.

  1. Go to the Windows Server Download page from Microsoft. Right-click on the hyperlink representing the ISO you want and choose Copy Link
  2. In Proxmox, head over to the local (pve1)
  1. Click on ISO images and paste the URL you copied in step 1.
  2. Click the QueryURL This should resolve to the Win2K22 ISO.
  3. Click Download. The download should commence. Close the Download window.
  4. Head over to the VirtIO driver page from Fedora.
  5. Click on the latest driver (this HowTo uses driver version 0.1.248 -- https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.248-1/).
  6. Right click on the ISO file and copy the URL.
  7. Repeat steps 2 – 5 for this ISO.
  8. Wait until both ISOs have downloaded.

Creating the Win2K22 VM in Proxmox

 

  1. Click on the Create VM
  2. Under the tab General, choose a name for your VM. Click Next.
  3. Under the OS tab, set the Storage to local, and select the Windows Server ISO you had previously downloaded.
  4. For Guest OS choose Microsoft Windows and for Version choose 11/2022/2025.
  5. Check the “Add additional drive for VirtIO drivers Set Storage to local and choose the VirtIO ISO image you had downloaded.
  6. Click Next.
  7. Under the System tab, uncheck the Add TPM checkbox. Leave all other options as default. Click Next.
  8. Keep defaults for the Disks Click Next.
  9. Under tab CPU, increase Cores to 2. Click Next.
  10. Under the Memory tab, adjust Memory to 8192 (8G). Click Next.
  11. Keep defaults on the Network
  12. Click the Finish button on the Confirm

Windows Installation

  1. Follow the instructions on the screen.
  2. When you get to the dialog box titled Microsoft Server Operating System Setup: Where do you want to install the operating system? Click on Load driver.



  3. This brings up another dialog box titled Microsoft Server Operating System Setup: Select driver to install. Choose the driver for the OS for Windows Server 2022. This would be the one with 2k22 in the path.


  4. Proceed with the standard windows installation. The password for this VM is 1234..qwertY. You should not use the same password throughout in production / lab environments.

Installing Virtio Guest tools (including QEMU guest) 

Not all devices are correctly set up because drivers are missing. Further more the QEMU guest agent that provides additional functionality is also not installed. This is necessary to be able to properly shut down Windows from Proxmox.

  1. Open file manager and select the CD Drive that has the VirtIO ISO on it.
  2. Double click the virtio-win-guest-tools executable and accept defaults.

  3. Reboot and verify using Windows Device manager that the network is operational and that there aren’t any devices with an exclamation mark next to them.
  4. Enable Remote Desktop in the Windows VM if you prefer to use this utility. With RD, you can copy between the remote computer and the computer you connect to.
  5. Update Windows (optional).
  6. Shutdown Windows VM.

Windows VM hardware cleanup / Enable QEMU Guest Agent


  1. With the VM in a shutdown state, click on the VM and from the sub-menu choose Hardware.
  2. (Optional) Remove the 2nd CD Drive and set the media to None on the remaining one.
  3. Click on Options

  4. If you would like the VM to start automatically when Proxmox starts, click on Start at boot and check this option.

  5. Click on QEMU Guest Agent and check Use QEMU Guest Agent.

Test

Restart or shutdown Proxmox while the Windows VM is running. The VM should shut down gracefully as part of this process. The next step of this guide will verify this behaviour. Check the Proxmox log at the bottom of the screen for a VM shutdown entry. Additionally, log in to Windows to confirm no unexpected shutdown alerts appear.

 


Video


Links

(Microsoft) Please select your Windows Server 2022 download
    https://www.microsoft.com/en-us/evalcenter/download-windows-server-2022
Windows VirtIO Drivers
    https://pve.proxmox.com/wiki/Windows_VirtIO_Drivers
Fedora (VirtIO drivers)
    https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/?C=M;O=D
Qemu/KVM Virtual Machines
    https://pve.proxmox.com/wiki/Qemu/KVM_Virtual_Machines
How to handle ACPI events on Linux
    https://linuxconfig.org/how-to-handle-acpi-events-on-linux



Follow This, That and (Maybe), the Other:


Comments

Popular posts from this blog

20150628 Giarratana Circular

HOWTO setup OpenVPN server and client configuration files using EasyRSA

Proxmox-NUT Homelab HOWTO : Step 0 : The Proxmox-NUT HomeLab HowTo: Introduction