Optimizing Windows 2008 Server for Virtualization

Submitted by jbredehoeft on Thu, 12/29/2011 - 21:58

I've written about optimizing Windows 7 and XP for VDI. Recently, I've been getting some questions about optimizing Windows Server. Since Windows 2008 R2 is the most current OS, this is what I'm going to focus on. Alot of the optimizations from Windows 7 can be used with 2008, these are more specific to the "server" OS.

First, for Windows 2008 I give the system 1GB RAM, and a 20GB disk. The way I build systems is to add an additional disk, D:\, to add other software or or use the system beyond a basic build, this has given me the greatest flexibility. I also make sure that the "Enable logging" is unchecked in the Edit Settings Options tab.
At this point I also don't have a network adapter installed.
Next, I'll boot the container (this is just a VM without an OS installed) to the VMware BIOS by checking the box "force boot into bios on next boot" and disable the serial and parallel ports. This is just unnecessary hardware.
I now will either boot the System from a Linux boot disk and disk align the vmdk, or I will mount the disk in another VM and disk align in that way. This isn't necessary with Windows 2008, but I find it a good practice, and all of my disks have the same alignment.
Reboot again and install the OS.
VMware Tools
Then install VMware tools. The typical VMware tools install won't install the shared folders component, but I'm paranoid, so I select custom and don't allow this to install. I also remove any drivers I know I won't be using from the VMware Tools install. Set the HW acceleration to full (I have a VBscript that sets this). This gives me the VMXNET 3 driver.
Power off the VM, and add the a Network Adapter and select the VMXNET 3 adapter.
When the OS powers up it will recognize new HW and automatically add the VMXNET 3 adapter driver.
I remove the QoS packet scheduler. All of my QoS happens either in my physical switches or in VMware so this is unwanted.
And I remove LLTD (Link Layer Topology Discovery). I'm not concerned with my VM doing any network discover or QoS so this is also removed.
I'm not using IPv6 so I uncheck this as well.
I disable the firewall. Don't turn off the firewall service or you won't connect to anything.
I enable Remote Desktop.
Set the ScreenSaver to blank and remove SCRNSAVE.EXE, this is the screensaver that runs if no one is logged in.
Optimize the system of Performance and not look, and don't let windows choose. This is a server after all.
Disable IE Security.
Set the IE cache to zero.
Disable the first run customization of IE.
Disable the wallpapers.
Set a max size on the Eventlog and a retention time for both System and Security
I disable the following services.

  • Certifcate Propagation
  • Diagnostic Policy Service
  • Diagnostic Service Host
  • Diagnostic System Host
  • IP Helper
  • Print Spooler
  • Problem Reports and Solutions Control Panel Support
  • RPC Locator
  • Remote Registry
  • Smart Card
  • Smart Card Removal Policy
  • TPM Base Services
  • Windows Audio
  • Windows Audio Endpoint Builder
  • Wndows Color System
  • Wndows Error Reporting Service
  • Windows Font Cache Service

    You can develop automated tools to do a lot of this and there are registry entries for some of this. I'm developing a tool to do all of this and set and read configuration information from an XML file. This is the bulk of it. If you do this you should have an optimized Windows 2008 Server VM.