I recently ran into an issue when installing my first Windows Server 2008 R2 virtual machine. The VM would hang/freeze randomly when used through the VMware vCenter Client’s console. It turns out this is a known issue (see this VMware KB Article) with the SVGA driver that is installed as part of the default installation of VMware Tools. While the article does not explain why you should disable the SVGA driver, it’s advice is correct if you want to avoid problems in your guest VM. To correct my problem, I removed the SVGA driver from the Windows Device Manager and rebooted. If you are having problems removing the SVGA driver before the VM hangs, use Remote Desktop to access the guest machine to perform the driver uninstall. I have not observed hanging/freezing in the VM since removing the SVGA driver from my Windows 2008 R2 guest. Note that this same issue is present in Windows 7.
VMtoday’s One Year Anniversary
Today marks the one year anniversary of my first post on VMtoday.com, and an exciting year it has been in many ways. First, some stats:
- VMtoday.com has been visited more than 10,000 times in the past year. While the number of site visits is far below some of my fellow virtualization bloggers, it is still exciting for me to see that I am making an impact on the community (despite my meager post count). There are some of you who read my posts through Planet V12n and RSS, which is cool by me.
- Yesterday was the busiest day for the site. No coincidence that it comes after adding some new content…. I’ll try to be more faithful in publishing regular, relevant content!
- My most popular post to date has been: IBM DS3300 iSCSI Write Performance Solved. I’m glad this has been useful for so many, but I hope that you don’t just apply the workarounds I wrote about. I would rather have you build a “bet the business” iSCSI environment by adding that second controller to your MD3000i or DS3300.
- My least popular post to date has been: VMworld Here I Come. I will try not to be so boring in the future.
- The first link back to my site was from Scott Lowe’s blog. Thanks for the link, Scott. Scott wrote a darn fine book: Mastering VMware vSphere 4. Buy it.
- The site theme, like my Twitter page, is very blue. I am working on a new theme in all of the spare time that a busy professional and father of two boys can muster.
Along with this site, I have made a concerted effort engage the virtualization community in several ways:
- Twitter keeps me plugged in to the latest news and discussions, and has been a source of help to me (and I would like to think that I have helped some of you as well). Follow me at https://twitter.com/joshuatownsend.
- I have stepped up into a leadership role with the Washington DC VMware User Group (VMUG). It has been awesome to meet with and learn from my local colleagues. I will continue to work with the DC VMUG leadership team to deliver exciting and relevant content and activities (and also some more seating space). I welcome your feedback and ideas for ways to improve the VMUG.
- VMworld 2009 was a great way to meet many of you while learning some of the hottest new technology on the planet. My wife came along and enjoyed spending time with some of the other vSpouses (or vWidows?).
- I took a new job early in the year with a VMware Partner in the DC area. This new job has been both challenging and rewarding, affording me opportunities to more effectively engage customers and spend more time working on virtualization-specific solutions.
I look forward to contributing to the virtualization community as a blogger, VMUG leader, and practitioner. If you want to learn a bit more about me, check out the About page on this site. I welcome your feedback and appreciate your reading my work!
– Josh
Upgrading Virtual Hardware in a VMware Virtual Machine May Cause Disks to go Offline
I recently posted an article on how specific actions during the upgrade of a VMware Virtual Machine’s hardware from v4 to v7 can cause problems with certain services, including DNS, DHCP, and WINS. In that case, the problem was related to Microsoft Windows leaving non-present devices with networking configurations and the failure of the VMware Upgrade Helper service to copy WINS settings when updating the NIC. As my fellow blogger and VMUG leader, Jason Boche, responded on Twitter: “Same gotchas, different version.” And right he is – anyone with experience in P2V or V2V, or who has been working with VMware long enough to have done a 2.5 to 3.0 upgrade experienced the same gotchas.
There are other issues with VMware virtual hardware upgrades, however, that you may not have experienced. One such issue that I have experienced is highlighted in VMware Knowledge Base article 1013109: “Upgrading virtual hardware in ESX 4 may cause Windows 2008 disks to go offline“. The problems described in the article are unique to Windows 2008 Enterprise and Datacenter editions only. The problem is pretty well described in the title of the article – Upgrading virtual hardware in ESX 4 may cause Windows 2008 disks to go offline. In this case, like with the ghost NIC’s I described last week, is more of a Microsoft issue, but it will rear its head when a VMware Administrator least desires it. With this particular problem, the Windows Virtual Disk Service (part of the native Storage Management suite) is set to not auto-mount newly discovered disks that do reside on a shared bus. Microsoft has a MSDN article on the VDS SANS policy here. Upgrading the virtual hardware version causes the disks to be re-discovered and not auto-mounted. This can potentially impact all non-system disks on a VM.
You may also experience similar issues when upgrading the vSCSI adapter in a VM from a standard LSI Logic Parallel SCSI adapter to a (new in vSphere 4.0) paravirtualized SCSI (pvSCSI) adapter, move virtual disks to new vSCSI adapters to increase the number of concurrent disk IO operations, or when you change the SCSI node ID of a virtual disk. These may all trigger a re-discovery of the disks by the Windows Virtual Disk Service, leaving data disks offline on Windows 2008 Enterprise and Datacenter Edition guests.
In my opinion, these issues are not reasons to forgo upgrading your virtual hardware version. However, when your upgrade/migration plans call for upgrading the virtual hardware version of your guests you should be prepared to resolve any issues caused by ‘ghost hardware’, offline disks, and the like. Both the MSDN and VMware articles I cited above offer workarounds for the offline disk issue. Here are the links again:
vSphere Upgrade Breaks Active Directory
I recently completed a VMware VI 3.5 to vSphere upgrade in a small environment (5 hosts, 80 VM’s). Being a small environment, the upgrade was planned for one big overnight blitz. Unfortunately, the size of the environment did not afford a test environment to uncover potential issues before the upgrade. The upgrade to vSphere itself went swimmingly (the vCenter server had been upgraded a couple weeks earlier). However, some things in the environment started to go wonky once the upgrade was complete. Specifically, name resolution (DNS), DHCP, WINS, Group Policy, and really anything Microsoft Active Directory related just did not work.
Let me explain a bit about the environment so you can better understand what the problem was and how it was corrected. The environment was an all Microsoft shop, except for VMware of course. The company follows a virtualize-first policy and is about 90% virtualized, including the Active Directory Domain Controllers. The DC’s are Windows 2008 and serve up DHCP, DNS, and WINS in addition to their Directory Services roles.
The problems really began after I upgraded the virtual hardware version from v4 to v7 (check out page 97 of the vSphere Upgrade Guide for the upgrade procedure). When a Windows server is upgrade from VMware Hardware Version 4 to 7, the VMware Upgrade Helper Service handles the reconfiguration of network adapters on the upgraded virtual machine. The VMware Upgrade Helper Service is installed with VMware Tools and is one of the reasons, along with getting drivers installed for the new hardware, for upgrading VMware Tools before upgrading the hardware version. If you review the Event Viewer Application log on an upgraded machine you will see several entries from VMUpgradeHelper (Source) with several different Event ID’s (26, 280, 272, 108, & 105). An examination of these events will show that the VMware Upgrade Helper service 1.) Backed up the network configuration at OS shutdown, 2.) Started Automatically with the OS, 3.) Checks the device ID for the network adapter, 4.) If the device ID has changed (as a result of a hardware upgrade), the backed up configuration is restored and Event ID 269 is logged.
This behavior should be transparent for most configurations, with the exception of a slightly longer boot time following the upgrade. However, I did notice a few problems with the NIC settings being restored under certain conditions. First, on servers with a statically configured IPv4 stack, IP addresses and DNS server addresses were restored, but the WINS server addresses were not restored. I suspect this is an oversight in the VMware Upgrade Helper service, but is probably not a major issue for many servers/environments as WINS is infrequently used. However, for a WINS server itself to lose its configuration to use itself as a WINS server, bad things happen. There are several ways to correct this – scripts, DHCP Options, etc. In the end, this wasn’t really a show stopper for me in this small environment.
The second, and bigger issue for me, was that after the virtual hardware was upgraded and the VMware Upgrade Helper Service did it’s job my Active Directory and related services were not available. DNS was not functioning, DHCP was not handing out addresses, and I couldn’t connect to AD using ADUC, GPMC or LDAP. It took me a few minutes to figure out what was going on. This seems to be what happened: the virtual hardware upgrade caused a new virtual network adapter to be installed in the VM and all of the settings, including the MAC, address to be restored. The HW v4 NIC was removed from the machine, but Windows held onto the device as a ‘ghost NIC’ in Device Manager. The core AD services, including DNS and DHCP, were still attempting to bind to the ghost NIC. This behavior persisted through service restarts and reboots of the guest. It wasn’t until I examined the IP configuration on the new NIC and clicked Apply (instead of canceling out) that I was prompted with a message indicating that there was more than one network interface configured with the same IP address, queuing me into the solution.
The error message should be familiar to anyone who has performed a Physical-to-Virtual migration (P2V) and is easily corrected by removing the old device through Windows Device Manager. The device is hidden so you first have to expose it before deleting it. Check https://support.microsoft.com/kb/315539 for details or simply follow my instructions below. To expose the non-present NIC, open a command prompt and enter:
set devmgr_show_nonpresent_devices=1
You can then open Device Manager (enter devmgmt.msc at the command prompt to save some time). In Device Manager, click View | Show Hidden Devices. Expand Network Adapters and find the grayed-out entry for the old NIC as pictured below.
Select the ghost NIC and right-click | Uninstall to remove it.
The final gotcha for me on this is that the set devmgr_show_nonpresent_devices=1 command does not work on Windows 2008 (or Vista, Windows 7, or Windows 2008 R2). To see and remove ghost NICs from Windows 2008, and environmental variable must be defined. To set the variable, open Server Manager from the Windows Start Menu. Highlight ‘Server Manager (%SERVERNAME%)’ in the left-side tree-view pane. Click ‘Change System Properties’ in the right-hand pane. Switch to the Advanced tab and click ‘Environment Variables. Create a new System variable by clicking the New button. The Variable name should be ‘devmgr_show_nonpresent_devices’ and the value should be ‘1’ as pictured below.
Click OK to close out of any open Windows. A reboot is not necessary for the variable to take effect, although you may have to close out of all open Device Manager Windows and then reopen devmgmt.msc. Click View | Show Hidden Devices and remove the ghost NIC as described above. A quick reboot after I removed the ghost NIC from the domain controllers and all Active Directory, DNS, DHCP, and WINS services immediately began operating normally. This second issue is more of a Microsoft problem in my opinion, and has been around for some time.
Before you start getting all upset and the FUD starts flying (“this is Microsoft/VMware’s latest attempt to break VMware/Microsoft?”), it wasn’t really vSphere that broke Active Directory; It was me. A little better planning and not rushing through the last wee hours of the upgrade Window could have saved some trouble. If you are planning a similar upgrade, it would be best to upgrade your domain controllers/DNS servers one at a time and remediate the issues I have described before upgrading the next. This will ensure continued availability of your Active Directory and other critical services during your upgrade.
The Skinny on ESXTOP
A reader named Mark contacted me today and asked if there was a way to reduce the size of the batch output from an ESXTOP run. And he asks for good reason: Depending on the number of VM’s on your host, the delay between ESXTOP samplings and the number of samples you collect, using the All Stats option (-a) can yield a massive file in a short period of time. If written to a partition on your ESX Service Console you run the risk of filling the partition, and forget about actually being able to analyze the data in PERFMON or Excel. For example, on an ESX host running ~15 VM’s I produced 100MB worth of CSV using the -a switch, sampling every 15 seconds, for just under 2 hours. ESXTOP uses 10-second intervals by default; I used -d 15 to change the sampling delay. Had I went with the default my output would have been bigger.
To reduce the size of your output, you can change your sampling delay to something larger, say 30-seconds. I suppose you could also capture statistics when the host is not busy so you get fewer characters in the results, but that’s just being goofy. 😉
A better way to reduce your ESXTOP output size is to selectively include only the statistics you are interested in, and is really what Mark was asking. After all, all statistics from ESXTOP can be too many statistics, and chances are you already know what stats you are interested in. Here’s how you can narrow down the collected stats for easier analysis and smaller output:
- Enter ESXTOP in interactive mode on the Service Console by simply typing esxtop at the # prompt
- Switch to a component you are NOT interested in capturing statistics on by pressing the corresponding menu option (c: ESX cpu, m: ESX memory, d: ESX disk adapter, u: ESX disk device, v: ESX disk VM).
- Press f when viewing the component you do not want to capture. A list of fields will be displayed. You can toggle the fields on and off by pressing the letter corresponding to each field. An * indicates that the field is on. You want to turn off all of the fields you don’t want to collect.
- Repeat steps 2 & 3 for the remaining components, leaving only what you want to capture.
- Switch to the component you want to capture in batch mode and repeat step #3, except you will now enable what you want to capture.
- Press W (capital W – case sensitive) to write out the ESXTOP configuration file. You can accept the default or create new configuration files. You may want to create a CPU-only config file, memory-only, and so forth.
- Press CTRL+C to stop ESXTOP.
- Now, invoke ESXTOP in batch mode, calling your updated or new configuration file you created in step #6 using the -c switch. Here’s an example:# esxtop -b -d 30 -n 480 -c .esxtopcpustats > /tmp/esxtop_cpu_stats.csv where .esxtopcpustats is an ESXTOP config file with only CPU stats. -d sets your capture interval to 30 seconds, and -n sets the number of samples to 480 (or 4 hours with a delay of 30 seconds).
Once your capture is complete you can replay the sampling in ESXTOP using replay mode (-R), or you can copy the .csv to a Windows system and use PERFMON or Excel to analyze the stats. If using PERFMON or Excel you will notice that the system summary information displayed at the top of an interactive ESXTOP session is included in the output (console memory, console cpu, etc.). As far as I know, there is no way to disable this, nor would you want to as it includes the time stamp necessary to interpret your data.
It is possible to use the vSphere CLI or the vSphere Management Assistant (vMA) to run RESXTOP, a version of ESXTOP designed for remote administration of ESXi or ESX. You may note, however, RESXTOP from the vSphere CLI only works from a Linux client. Using either of these tools will help you to automate ESXTOP statistics collection from multiple hosts using customized configuration files.


