Difference between revisions of "Windows 2012 guest best practices"

From Proxmox VE
Jump to navigation Jump to search
(Replace broken external link with working internal link)
Line 6: Line 6:
  
 
===Prepare===
 
===Prepare===
* First, download VIRTIO drivers from here: http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/
+
* First, download the [[Windows VirtIO Drivers]] iso image
 
* ​After clicking "Create VM" enter a Name: for your vm, select your Resource Pool (if you have one) and click Next
 
* ​After clicking "Create VM" enter a Name: for your vm, select your Resource Pool (if you have one) and click Next
 
* Select Microsoft Windows 8/2012 in the OS tab and click Next.
 
* Select Microsoft Windows 8/2012 in the OS tab and click Next.

Revision as of 09:14, 5 August 2015

Introduction

This is a set of best practices to follow when installing a Windows Server 2012 guest on a Proxmox VE server 2.x (2.3 at time of writing). Right now it's a work in progress but hopefully soon it will be a comprehensive and reliable document. Please feel free to add to it, even if just to pose a potential best practice.

Install

Prepare

  • First, download the Windows VirtIO Drivers iso image
  • ​After clicking "Create VM" enter a Name: for your vm, select your Resource Pool (if you have one) and click Next
  • Select Microsoft Windows 8/2012 in the OS tab and click Next.
  • Select an ISO Image: for Windows Server 2012 in the CD/DVD tab and click Next.
  • Select Bus/Device: VIRTIO, Storage: "your preferred storage" and Cache: Write back in the Hard Disk tab and click Next.
  • Select number of Sockets and cores (the default of 1 is mostly sufficient) in the CPU tab and click Next.
  • Select Automatically allocate memory and set the Maximum memory to a number you may require in the memory tab and click Next.
  • Select Model: VirtIO (paravirtualized) in the Network tab and click Next
  • Click finish and go to the Hardware tab of your newly created VM and click Add -> CD/DVD drive
  • Select Storage:local and ISO image: virtio-win-x.x.iso and click create.

Launch Windows install

  • Start your newly created virtual machine using the "Start" link in the upper right.
  • wait until the vm icon has turned white before you login using the "Console" link in the upper right. (NOTE: Sometimes the java console does not start at the first attempt. Please click refresh/reload in this case)​​
  • Start the server install with "Install Now" and select the Operating System Flavor you like and click next and select "Custom: Install Windows only"
  • If you do not see "Drive 0 / Unallocated Space" click Load driver, browse to CD named CDROM and select folder WIN8\AMD64 and confirm. Select all three offered drivers (by pressing the CTRL button) "Red Hat VirtIO SCSI controller, Redhat VirtIO NIC and Red Hat Balloon driver" and click next
  • install Windows to "Drive 0 / Unallocated Space"
  • Wait until Windows is installed and select a Password for the local Administrator account and login to Windows.

Install addtional VirtIO drivers

If you don´t got all virtio drivers selected on install, you can install them also later.

  • Start Explorer, Go to CDROM, copy folder WIN8\AMD64 to C:\Program Files\ and rename AMD64 to C:\Program Files\VirtIO
  • open Device Manager and right click on Other Devices -> Ethernet Controller and select update driver software
  • select "Browse my computer" select folder "C:\Program Files\VirtIO" and click "Install" for Red Hat VirtIO Ethernet Adapter.
  • again in Device Manager right click on Other Devices -> PCI Device and select update driver software
  • again "Browse my computer" select folder "C:\Program Files\VirtIO" and click "Install" for VirtIO Balloon Driver.

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

further info

raw vs qcow2

Raw file format provides slightly better performance while qcow2 offers advanced features such as copy on write and Live_Snapshots. Since V2.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 with virtio drivers : http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/

shutdown guest from web gui

In order to be able to 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

Windows 2003 guest best practices

Windows 2008 guest best practices