Virtualization

10-step checklist for tuning up your virtual environment

There's no getting around it: Sometimes you need to perform a few maintenance tasks to ensure that your virtual environment is in top shape. This list will help you cover the bases.

'Tis the season to fix your virtual environment and there's no better way to start that process than with a checklist. And you know you need one. So here's your list of tasks to tackle as the dog days of summer arrive. You won't solve all 10 of these items in a day or in a week. It's an ongoing process. But you need to get started on fixing what's broken and put yourself in a better strategic position to expand and grow.

Note: This article is based on an entry in ZDNet's Virtually Speaking blog. It's also available as a PDF download.

1: Update virtual host systems

You need to update your virtual host systems on a regular basis. What's regular? Check quarterly on the high side and monthly on the normal side. Remember that with Distributed Resource Scheduling, when you put a virtual host system in Maintenance mode, its VMs scatter like rats on a sinking ship, so you can perform these updates during normal business hours.

2: Update firmware

Yes, you need to keep firmware up to date on physical servers, blades, and enclosures. Some of these are critical so don't slack on them. Quarterly to twice yearly should be sufficient to keep new hardware features and fixes coming your way. The easiest way to maintain these updates is to place yourself on vendor mailing lists for them. Every vendor worth its salt has a list you can join to stay abreast of critical updates.

3: Stay on top of operating system updates

Yes, the dreaded OS patching rears its ugly head again. This necessary evil can drive you to the brink of homicide. There are new patches, security updates, service packs, and updates of some kind landing in my email on an almost daily basis. In larger environments, it's advisable to have a separate team to manage patching. Depending on the severity level of the patch, this could be a weekly exercise. Monthly is probably the correct frequency for most patching needs.

4: Update VMware tools

Do you see that exclamation mark in the system tray on top of your VMware Tools icon? That means you need to update the tools package. It requires a reboot on Windows operating systems, so plan accordingly. The update takes a few minutes per system to perform, but it's worth it for the enhanced drivers and new hardware. This update needs to be performed when updates become available.

5: Update virtual machine hardware

This one is a pain but necessary for better performance. When you update from an earlier version of VMware to vSphere, you'll have to do this. There's no easy way to do it, either. It's a lengthy process that requires multiple reboots and network reconfiguration on your VMs. If you're running vSphere 4.x, check your virtual machine's hardware by selecting a VM in VCenter and look at the Hardware version on the Summary tab. If it's 4, you need to update. If it's 7, you're cool.

6: Remove orphaned VMDKs

This is one of those pesky housekeeping items that you absolutely must do. Disk files sometimes stay behind, when you delete VMs from inventory. And, once you've deleted a system from inventory, there's no reason to keep any of its associated files around just burning up valuable space. Checking for orphaned VMs on a quarterly basis is sufficient to keep your LUNs clutter free.

How do you check for orphaned disk files, you ask? I use a PowerShell script I found somewhere and modified to fit my environment. The script scans your environment for orphaned VMDK files and provides you with a report on its scan. No files are deleted during the scan. You have to do that manually, and it's recommended that you double-check the findings and remove the orphans after you've made that verification.

7: Adjust vCPUs

As I discussed in The Late Great Virtual CPU Debate, you should inventory your VMs for multiple vCPU usage and do some serious pruning. Generally speaking, you should configure VMs with single vCPUs. Multiple vCPUs are for special cases and specific workloads.

8: Adjust virtual memory

Take an inventory of your VMs, determine how much memory you've allocated to each one, and adjust accordingly. You won't necessarily adjust them downward, but you probably will adjust a lot of them in the downward direction. Memory overcommitment is a big problem in virtual environments, but it's also a popular thing to do. A wiser solution is to use performance data to determine what your VM's memory needs are and adjust to best performance that doesn't waste resources. Why allocate 4GB of memory for a test Web server, when one or two is plenty?

9: Change operating systems

This recommendation won't make a lot of people happy, but it's a good practice. If you run a lot of Windows servers in your environment, you're also burning a lot of resources (memory, for one) that could be used for other workloads.

For example, Windows 2008 R2 requires a minimum of 512MB RAM (okay, try running on that), but realistically needs at least 2GB of RAM out of the box for just the OS. Add another 2 to 4 GB for each standard workload. Add more for more intense workloads.

If you switch your workloads to Linux, you'll find that you'll use from one-eighth to one-half the memory per VM. Plus, if you use Ubuntu Linux, you won't have to deal with the extreme licensing fees from Microsoft. Better performance, fewer consumed resources, and no licensing fees. No brainer?

10: Add capacity

If you're growing your virtual infrastructure, add capacity. Don't wait until you're experiencing outages, the DRS dance, or growth stoppage. Add capacity now and expand into it. You have to stay at least one step ahead of your growth expectations by adding capacity before you need it. Add memory to your hosts, add CPUs, or upgrade your CPUs and add disk space to resolve performance bottlenecks or growth slowdowns. "We're out of capacity," is an unacceptable excuse.

Kenneth "Ken" Hess is a full-time Windows and Linux system administrator with more than 15 years of experience with Mac, Linux, UNIX, and Windows systems in large multi-data center environments.

4 comments
whocares88
whocares88

We run several 2008 r2 file servers with 1GB of memory. They run fine.

yawningdogge
yawningdogge

I've actually been looking for an easy way to do this. Can someone provide a link to the script mentioned here?

rajesh
rajesh

The 10 steps listed here are very useful ans surely will give a good performance!! Rajesh

khess
khess

I will post the script I use when I am back home to do it. I am currently out of town and don't have access to the script. Or, you can search for "orphaned vmdk" on Google and see what you can come up with. It will be a few days until I return. Please send me an email ken (at) kenhess (dot) com. to remind me. ;-).