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.
- Go to the Windows Server Download page from Microsoft. Right-click on the hyperlink representing the ISO you want and choose Copy Link
- In Proxmox, head over to the local (pve1)
- Click on ISO images and paste the URL you copied in step 1.
- Click the QueryURL This should resolve to the Win2K22 ISO.
- Click Download. The download should commence. Close the Download window.
- Head over to the VirtIO driver page from Fedora.
- 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/).
- Right click on the ISO file and copy the URL.
- Repeat steps 2 – 5 for this ISO.
- Wait until both ISOs have downloaded.
Creating the Win2K22 VM in Proxmox
- Click on the Create VM
- Under the tab General, choose a name for your VM. Click Next.
- Under the OS tab, set the Storage to local, and select the Windows Server ISO you had previously downloaded.
- For Guest OS choose Microsoft Windows and for Version choose 11/2022/2025.
- Check the “Add additional drive for VirtIO drivers Set Storage to local and choose the VirtIO ISO image you had downloaded.
- Click Next.
- Under the System tab, uncheck the Add TPM checkbox. Leave all other options as default. Click Next.
- Keep defaults for the Disks Click Next.
- Under tab CPU, increase Cores to 2. Click Next.
- Under the Memory tab, adjust Memory to 8192 (8G). Click Next.
- Keep defaults on the Network
- Click the Finish button on the Confirm
Windows Installation
- Follow the instructions on the screen.
- 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.
- 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.
- 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.
- Open file manager and select the CD Drive that has the VirtIO ISO on it.
- Double click the virtio-win-guest-tools executable and accept defaults.
- 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.
- 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.
- Update Windows (optional).
- Shutdown Windows VM.
Windows VM hardware cleanup / Enable QEMU Guest Agent
- With the VM in a shutdown state, click on the VM and from the sub-menu choose Hardware.
- (Optional) Remove the 2nd CD Drive and set the media to None on the remaining one.
- Click on Options
- If you would like the VM to start automatically when Proxmox starts, click on Start at boot and check this option.
- 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.
Comments
Post a Comment