Difference between revisions of "Windows 2012 guest best practices"

From Proxmox VE
Jump to: navigation, search
(update with latest install practices)
(Remove outdated information to make shutdown via GUI work)
 
Line 16: Line 16:
 
Latest ISO file with VirtIO drivers:
 
Latest ISO file with VirtIO drivers:
 
https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/
 
https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/
 
===Shutdown Guest From Web UI===
 
In order to be able to cleanly shutdown a windows server 2012 guest from console or with backup schedule, some changes have to be done in the registry.
 
* launch "regedit.exe" and set value of HKLM\Software\Microsoft\Windows NT\CurrentVersion\winlogon and change "ShutdownWithoutLogon" to 1
 
* go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\7516b95f-f776-4464-8c53-06167f40cc99\8EC4B3A5-6868-48c2-BE75-4F3044BE88A7 and set "Attributes" value to 2
 
* then go to "Control Panel" --> "System and Security" --> "Power Options" and then --> "Change plan settings" on choosed power plan --> "Change Advanced Power Settings" --> "Display" and set 'Console lock display off timeout' to 0 to disable it
 
  
 
==See also==
 
==See also==

Latest revision as of 16:31, 7 November 2019

Introduction

This is a set of best practices to follow when installing a Windows Server 2012(R2) guest on a Proxmox VE server 6.x.

Install

Prepare

To obtain a good level of performance, we will install the Windows VirtIO Drivers during the Windows installation.

  • Create a new VM, select "Microsoft Windows 8.x/2012/2012r2" as Guest OS and enable the "Qemu Agent" in the System tab. Continue and mount your Windows Server 2012 ISO in the CDROM drive
  • For your virtual hard disk select "SCSI" as bus with "VirtIO SCSI" as controller and "Write back" as cache option for best performance (the No cache default is safer, but slower)
  • Configure your memory settings as needed, continue and set "VirtIO (paravirtualized)" as network device, finish your VM creation.
  • For the VirtIO drivers, upload the driver ISO (use the stable VirtIO ISO, get it from here) to your storage, create a new CDROM drive (use "Add -> CD/DVD drive" in the hardware tab) with Bus "IDE" and number 3. Load the Virtio Drivers ISO in the new virtual CDROM drive.
  • Now your ready to start the VM, just follow the Windows installer.

Launch Windows install

  • After starting your VM launch the noVNC console
  • Follow the installer steps until you reach the installation type selection where you need to select "Custom (advanced)"
  • Now click "Load driver" to install the VirtIO drivers for hard disk and the network.
    • Hard disk: Browse to the CD drive where you mounted the VirtIO driver and select folder "vioscsi\2k12\amd64" and confirm. Select the "Red Hat VirtIO SCSI pass-through controller" and click next to install it. Now you should see your drive.
    • Network: Repeat the steps from above (click again "Load driver", etc.) and select the folder "NetKVM\2k12\amd64", confirm it and select "Redhat VirtIO Ethernet Adapter" and click next.
    • Memory Ballooning: Again, repeat the steps but this time select the "Balloon\2k12\amd64" folder, then the "VirtIO Balloon Driver" and install it by clicking next. With these three drivers you should be good covered to run a fast virtualized Windows 10 system.
  • Choose the drive and continue the Windows installer steps.

HINT: There is a video showing the process for a Windows Server 2016 installation which is the same as for Windows Server 2012.

Install Guest Agent and Services

Guest Agent

If you enabled the Qemu Agent option for the VM the mouse pointer will probably be off after the first boot.

To remedy this install the "Qemu Guest Agent". The installer is located on the driver CD under guest-agent\qemu-ga-x86_64.msi.

Drivers and Services

VirtIO guest tools installer

The easiest way to install missing drivers and services is to use the provided MSI installer. It is available on the driver CD since version "virtio-win-0.1.173-2".

Run the "virtio-win-gt-x64.msi" file located directly on the CD. If you do not plan to use SPICE you can deselect the "Qxl" and "Spice" features. Restart the VM after the installer is done.

After all this the RAM usage and IP configuration should be shown correctly in the summary page of the VM.

For more information and configuration about ballooning, see Dynamic Memory Management

Check for missing drivers

See also: Paravirtualized Block Drivers for Windows
Unknown device in device manager
Make sure to include subfolders

Go to the Device Manager to see if there are any drivers missing. For any unknown device:

  • Right click an select "Update driver".
  • Select "Browse my computer for driver software".
  • Select the Driver CD. Make sure that "Include subfolders" is checked.
  • Once a driver has been found you might be prompted with a security warning asking if you "Would like to install this device software". Click "Install".

Further Information

RAW vs QCOW2

The RAW file format provides slightly better performance WHILE qcow2 offers advanced features such as copy on write and Live_Snapshots independent of the backing storage. Since Proxmox VE version 2.3, qcow2 is the default format.

VirtIO Drivers

Make it really easy:Build your ISO with drivers already included: Windows guests - build ISOs including VirtIO drivers

Latest ISO file with VirtIO drivers: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/

See also

Windows 2003 guest best practices

Windows 2008 guest best practices