Configuration (Virtual Machine): Difference between revisions
(Export from original Virtual Machine page) |
m (moved Virtual Machine Configuration to Configuration (Virtual Machine): Name doesn't work well on Virtual Machine category page) |
(No difference)
|
Revision as of 11:55, 25 October 2011
Performance Settings
Additionally, see the following resources
- http://www.vmguru.nl/wordpress/2010/07/how-to-optimize-guests-for-vmware-view/
- http://www.vmware.com/Files/pdf/VMware-View-OptimizationGuideWindows7-EN.pdf
Windows 2003
In order to be able to squeeze the most of a virtual infrastructure its imperative that VM's are configured for best performance.
- System Performance - Set the OS for best performance
- Go to to System Properties | Advanced
- Visual Effects - Disable/Adjust for best performance
- Advanced - Tailor for the application/service the server is running
- Virtual memory/page file - Should be set to a fixed size, and ideally as small as possible so as to conserve disk space usage. You need to know what you're doing when you set this. Do you expect your systems to be starved of memory and need to page? Personally for a VM with 4GB RAM assigned, I'd keep the page file down to 1GB in size.
- Go to to System Properties | Advanced
Windows XP
The following changes are performance based, intended to ensure XP isn't unnecessarily wasteful
- Display simplifications
- Right-click over the desktop and got to Properties
- Switch to Classic theme
- Disable screen-saver
- Disable monitor power save
- Right-click over the desktop and got to Properties
- Disable Indexing Services
- Go to Control Panel | Add or Remove Programs | Add/Remove Windows Components and uncheck Index services
- Disable paging of the executive
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
setDisablePagingExecutive
to1
- Set for best performance
- My Computer | Properties go to Advanced Tab, Performance Settings, and Adjust for best performance
- Disable all sounds
- Defragment prefetch
defrag c: -b
- Turn off disk perf counters
diskperf -n
Windows 7
- Set for best performance
- Go to Control Panel\All Control Panel Items\Performance Information and Tools, then Adjust visual effects, and select Adjust for best performance
- Disable IPv6 on NIC
- Disable sounds
- Change power plan to High Performance and change Turn off the display to Never
- Disable the following services
- BitLocker Drive Encryption Service
- Block Level Backup Engine Service
- Desktop Window Manager Session Manager
- Diagnostic Policy Service
- HomeGroup Listener
- HomeGroup Provider
- IP Helper
- Microsoft iSCSI Initiator Service
- Microsoft Software Shadow Copy Provider
- Secure Socket Tunneling Protocol Service
- Security Center
- SSDP Discovery
- Superfetch
- Tablet PC Input Service
- Themes
- UPnP Device Host
- Volume Shadow Copy
- Windows Backup
- Windows Firewall
- Windows Media Center Receiver Service
- Windows Media Center Scheduler Service
- Windows Search
- WLAN AutoConfig
Disable Shutdown Event Tracker
If the ESX servers are running as a HA cluster then they MUST be able to fully startup automatically after a re-boot. The Windows OS Shutdown tracker asks why you're shutting down or rebooting a system, or following an unexpected shutdown, halts the starting of a system pending information from the user. Not a problem for servers where all applications run as a service, but would impede VMware HA operating effectively where (GUI) applications need to start by stopping systems being restarted fully.
To disable...
- Start Group Policy Object Editor (Start | Run | gpedit.msc)
- Go to Computer Configuration\Administrative Templates\System
- Set Display Shutdown Event Tracker to Disabled
Set Low Risk File Types
If mapped drives are being used, .bat and .exe files need to be declared as low risk file types to stop Open file - Security Warning prompts being displayed when trying to run from mapped drives. This is particularly a problem if software is set to auto-start by placing shortcuts in the StartUp directory, as the software won't auto start.
To disable...
- Start Group Policy Object Editor (Start | Run | gpedit.msc)
- Go to User Configuration\Administrative Templates\Windows Components\Attachment Manager
- Set the "Default risk level for file types" to Enabled
- Specify the low extensions as
.bat;.exe
Console Clipboard Integration
In the good old days this was always enabled by default, so you could copy and paste between your desktop and VM's console. Since ESX 4.1, its been disabled by default. There are two routes in order to be able to use again
- Enable for VM - Permanent, requires VM downtime
- Shutdown the VM
- Go to Edit Settings, Options tab, then Advanced / General and hit Configuration Parameters
- Use Add Row to add the following new config items
- Set
isolation.tools.copy.disable
tofalse
- Set
isolation.tools.paste.disable
tofalse
- Set
- Restart the VM
- Enable for VM's on an ESX - Temporary (won't survive ESX software upgrade), VM's can be vMotioned on to allow clipboard integration funkiness
- SSH to the ESX and then edit the
/etc/vmware/config
file, appending the following...isolation.tools.copy.disable="FALSE"
isolation.tools.paste.disable="FALSE"
- SSH to the ESX and then edit the
Disable Balloon Driver
You should not disable the balloon driver - there are generally other ways to achieve whatever it is you're trying to achieve
Certain applications (such as MS SQL and Java) can lock the amount of 'physical' memory they want, and stop the OS being able to page it out to disk, in order tyo protect that applications performance. However, if a virtual environment becomes memory constrained, VMTools may attempt to force the OS to page memory to disk, but the OS will be unable to do so, and so will page itself out to disk, impacting the entire machines performance.
By using memory reservations its possible to ring-fence physical RAM for a machine, meaning that if contention for memory occurs, the ESX will prioritise on other virtual machines 1st in order to reduce overall physical memory usage. Ideally, some dynamic memory should still be left, eg allocate a VM with 4 GB of RAM with 3 GB reserved, 3GB being enough to allow the OS and memory locking application to stay in RAM, with an additional 1GB available to be used should there be available capacity.
To disable the balloon driver
- Shutdown the VM
- Go to Edit Settings, Options tab, then Advanced / General and hit Configuration Parameters
- Use Add Row to add a new config item
- Set
sched.mem.maxmemct
to0
- Restart the VM
sched.mem.maxmemct
configures the amount of memory (in MB) that balloon driver can expand to in order to conserve ESX RAM usage.
Creating MSCS Machines
There are various different configuration options for creating MS clusters. For production standard clusters you must use RDM, otherwise you're forced to host both your VM's on the same ESX (and you can't vMotion them!).
- You can't snapshot disks that are configured to use SCSI Bus Sharing.
Disk Type | SCSI Bus Sharing | Cluster in a Box 2 VM's / 1 fixed ESX |
Cluster Across Boxes 2 VM's / multi ESX |
Virtual/Physical Hybrid 1 VM + 1 Physical |
---|---|---|---|---|
Normal VMDK | Virtual | Yes | No | No |
RDM | Virtual | Yes | Yes - Win2k3 only | No |
RDM | Physical | No | Yes | Yes |
- Window 2003 servers must use LSI Logic Parallel SCSI controller for shared disks
- Window 2008 servers must use LSI Logic SAS SCSI controller for shared disks
See the following for further info
- VMware KB 1004617 - Microsoft Cluster Service (MSCS) support on ESX - Links to PDF docs for each flavour of ESX
- VMware KB 1037959 - Microsoft Clustering on VMware vSphere: Guidelines for Supported Configurations - Supported infrastructure config matrices
Cluster in a Box
Procedure assumes you're creating a VM cluster using 2 VM's on the same server sharing standard VMDK disks (not RDM's)
- Create a new private vSwitch on the ESX to host the VM's called "MSCS Heartbeat"
- Create two VM's...
- Don't create the shared disks yet
- With 2 NIC's, 1st attached to normal (externally accessible) network, 2nd attached to private "MSCS Heartbeat" network
- Boot up and ensure they're working as expected (not as a cluster yet), then shutdown
- On the 1st VM...
- Create the required shared disks on a new SCSI Bus ID
- Tick Support clustering features such as Fault Tolerance, which ensures the disks are created in eagerzeroedthick format
- Select a new SCSI Bus ID in the Virtual Device Node drop-down box, which creates the disks on a new SCSI Controller
- Change the new SCSI Controller's config...
- SCSI Controller Type should be set to LSI Logic SAS (Win2k8) or LSI Logic Parallel (Win2k3)
- SCSI Bus Sharing should be set to Virtual
- Create the required shared disks on a new SCSI Bus ID
- On the 2nd VM...
- Create the required shared disks on a new SCSI Bus ID, selecting Use an existing virtual disk (you'll need to locate the shared disks already created)
- Change the SCSI Bus Sharing mode of the new SCSI Controller to Virtual
- Boot the VM's up, disks should be visible from Disk Management from both VM's
- Only format from one machine, NTFS doesn't support access from more than one host, MSCS needs to manage volume access/ownership