Windows 2008 guest best practices: Difference between revisions

From Proxmox VE
Jump to navigation Jump to search
(→‎Power settings: add another workaroud from forum.proxmox.com)
 
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Power settings  ==
==Introduction==


* In order to make '''Windows 2008 R2''' guest shutdown cleanly on the event of a shutdown (power button) on the Proxmox VE host you need follow on of the ways:
This is a set of best practices to follow when installing a Windows Server 2008 R2 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===
* ​After clicking "Create VM" enter a Name: for your vm, select your Resource Pool (if you have one) and click Next
* Select Microsoft Windows 7/2008 in the OS tab and click Next.
* Select an ISO Image: for Windows Server 2008 in the CD/DVD tab and click Next.
* Select Bus/Device: IDE, 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.
* To add a temporary disk for installing VirtIO block driver go to the Hardware tab of your newly created VM again and click Add -> Hard Disk
* Select Bus/Device: VIRTIO, Storage: "your preferred storage" and Cache: Write back and click Add
 
===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"
* Wait until Windows is installed and select a Password for the local Administrator account and login to Windows.
 
===Install additional VirtIO drivers===
* Start Explorer, Go to CDROM, copy folder WIN7\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 Ballon Driver.
* open a powershell window, cd to "C:\Program Files\VirtIO" and enter: blnsvr.exe -i.
The BallonService that can help free up memory is installed. The BallonService is also responsible for displaying the correct amount of memory in the Proxmox console.
 
==further info==
 
===raw vs qcow2===
Raw file format provides better performance while qcow2 offers advanced features such as copy on write and snapshots. As of Qemu 1.4 / PVE 2.3 qcow2 is expected to provide superior performance.
 
===virtio drivers===
Use virtio dirvers for best performance. More info:
[[Paravirtualized Block Drivers for Windows]]
 
latest iso with virtio drivers :
https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/
 
=== Power settings  ===
 
* In Windows Server 2008, you need to disable the 'Shutdown Event Tracker'. This setting in Group Policy. If the server is part of a domain, you need to edit the group policy for the organizational unit with the server. If you're not using a domain, you can edit the local group policy. This can be accessed by doing the following:
** Start -> Run -> gpedit.msc -> ok -> open "Computer Configuration" then "Policy" then "Administrative Templates" then "System". In the right pane, double click on 'Display Shutdown Event Tracker' and select 'disable' and OK. To make sure the new group policy is applied. Go to Start -> run -> cmd -> ok and type in 'gpupdate /force' without the quotes. Now when you select shutdown, you won't be promoted with the box asking why you are shutting down the server.
 
 
* In order to make '''Windows 2008 R2''' guest shutdown cleanly on the event of a shutdown (power button) on the Proxmox VE host you need make the following changes:
** Control Panel -> System and Security -> Power Options -> Edit Plan Settings -> Turn off the display: '''Never'''
** Control Panel -> System and Security -> Power Options -> Edit Plan Settings -> Turn off the display: '''Never'''
** Or another workaround is:
 
*** gpedit.msc > Local Computer Policy -> Computer Configuration -> Administrative Templates -> System -> Display Shutdown Event Tracker: Disalbe
==See also==
*** Source: http://forum.proxmox.com/threads/10012-VM-s-on-proxmox-won-t-shutdown?p=56906#post56906
 
[[Windows 2003 guest best practices]]
 
[[Windows 2012 guest best practices]]


[[Category: HOWTO]]
[[Category: HOWTO]]
[[Category: Qemu/KVM]]

Latest revision as of 14:14, 6 October 2016

Introduction

This is a set of best practices to follow when installing a Windows Server 2008 R2 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

  • ​After clicking "Create VM" enter a Name: for your vm, select your Resource Pool (if you have one) and click Next
  • Select Microsoft Windows 7/2008 in the OS tab and click Next.
  • Select an ISO Image: for Windows Server 2008 in the CD/DVD tab and click Next.
  • Select Bus/Device: IDE, 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.
  • To add a temporary disk for installing VirtIO block driver go to the Hardware tab of your newly created VM again and click Add -> Hard Disk
  • Select Bus/Device: VIRTIO, Storage: "your preferred storage" and Cache: Write back and click Add

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"
  • Wait until Windows is installed and select a Password for the local Administrator account and login to Windows.

Install additional VirtIO drivers

  • Start Explorer, Go to CDROM, copy folder WIN7\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 Ballon Driver.
  • open a powershell window, cd to "C:\Program Files\VirtIO" and enter: blnsvr.exe -i.

The BallonService that can help free up memory is installed. The BallonService is also responsible for displaying the correct amount of memory in the Proxmox console.

further info

raw vs qcow2

Raw file format provides better performance while qcow2 offers advanced features such as copy on write and snapshots. As of Qemu 1.4 / PVE 2.3 qcow2 is expected to provide superior performance.

virtio drivers

Use virtio dirvers for best performance. More info: Paravirtualized Block Drivers for Windows

latest iso with virtio drivers : https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/

Power settings

  • In Windows Server 2008, you need to disable the 'Shutdown Event Tracker'. This setting in Group Policy. If the server is part of a domain, you need to edit the group policy for the organizational unit with the server. If you're not using a domain, you can edit the local group policy. This can be accessed by doing the following:
    • Start -> Run -> gpedit.msc -> ok -> open "Computer Configuration" then "Policy" then "Administrative Templates" then "System". In the right pane, double click on 'Display Shutdown Event Tracker' and select 'disable' and OK. To make sure the new group policy is applied. Go to Start -> run -> cmd -> ok and type in 'gpupdate /force' without the quotes. Now when you select shutdown, you won't be promoted with the box asking why you are shutting down the server.


  • In order to make Windows 2008 R2 guest shutdown cleanly on the event of a shutdown (power button) on the Proxmox VE host you need make the following changes:
    • Control Panel -> System and Security -> Power Options -> Edit Plan Settings -> Turn off the display: Never

See also

Windows 2003 guest best practices

Windows 2012 guest best practices