Tuesday, May 25, 2010

Use VMware Converter to Import Windows XP VM

If you ever use VMware Converter to import a Windows XP machine from for example a VMware workstation image, you may find that when you boot it up, it sits there at a black screen with a cursor in the top left hand part of the screen. Left alone, the VM will start to use 100% CPU.

I ran into this issue yesterday and discovered that the problem was due to the original Windows XP machine having IDE disks. When importing a VM like this from VMware Workstation, change the disks to SCSI when you setup the converter job.

Wednesday, April 7, 2010

vSphere 4.0 Quick Start Guide

Just received the latest book I ordered, vSphere 4.0 Quick Start Guide. I was a little surprised when I received the package, I wasn't expecting such a small compact book ... but, good things come in small packages! I can tell just by thumbing through this book that it is packed full of juicy tidbits, can't wait to dive in!

Friday, March 19, 2010

Powershell - Get Snapshots for all VMs in a Resource Pool

Recently needed to find all the snapshots in a resource pool, so to do that, I needed to first get all the VMs in the resource pool like this:

Get-VM -Location (Get-ResourcePool mypoolname)

And get the snapshots, so pipe the output and voila:

$snaplist = Get-VM -Location (Get-ResourcePool mypoolname) | Get-Snapshot

Nice and easy!

Sunday, March 14, 2010

Script-O-Mania Entry

Just submitted my script to the Script-O-Mania contest put on by VMware. Here are some screenshots. Script will be posted after the contest ends.

The script gathers CPU Ready Time data for VMs and graphs them one a per-host basis and creates a chart and data tab for each host. This can help you identify hosts that are possibly over-saturated or running too many SMP VMs.





Thursday, October 22, 2009

VM NIC Won't Stay Connected

If you are having problems with a NIC staying connected, it could be due to the number of ports configured on the vSwitch. By default there are 24 ports configured, so if the number of virtual machines running exceeds that number they may start to become disconnected. Check /var/log/vmkernel for these messages:

Net: 1317: can't connect device: VM Network: Out of resources

If this is the case, then either move some VMs to a different vSwitch or increase the number of ports on the vSwitch. Increasing the ports will require a reboot.



Friday, October 2, 2009

Instance GUID is improperly specified

Recently I was trying to install vCenter when I received the error "Instance GUID is improperly specified". This was a brand new Windows 2008 Server and a fresh install of vCenter, but the problem was that the install had failed a few times already due to other issues and rolled back. It seems that the rollback process does not completely clean up the files it creates, because one such file called 'instance.cfg' is created in c:\Program Data\VMware\VMware VirtualCenter and in it there is a line with the GUID. So to resolve this, simply delete that file and it will be recreated upon installation.

Tuesday, September 29, 2009

ESX Host Loses Connectivity Briefly

I have seen this issue with ESX 3.5 Update 2 and Update 4, the host disconnects briefly from the console and there are no real error messages in VirtualCenter other than indicating the disconnection.

Some research revealed that this is due to a memory leak in hostd. To mitigate the issue, I increased the Service Console memory 800 MB and the modified the soft and hard memory limits in the config.xml file.

You can identify this issue from the following errors in /var/log/vmware/hostd.log:

[2009-09-29 01:25:54.857 'Memory checker' 19467184 warning] Current value 204800 exceeds soft limit 122880.
[2009-09-29 01:26:24.868 'Memory checker' 18668464 warning] Current value 204800 exceeds soft limit 122880.
[2009-09-29 01:26:54.879 'Memory checker' 3076465568 error] Current value 204852 exceeds hard limit 204800. Shutting down process.

To change the console memory configuration from the default of 272 MB with ESX 3.5 to the max of 800 MB, edit the memory settings from VirtualCenter under Configuration -> Memory -> Properties. This change requires a server reboot.

To change the hard/soft limits, add the following into the <config> section of /etc/vmware/hostd/config.xml
<hostdWarnMemInMB>300</hostdWarnMemInMB>
<hostdStopMemInMB>380</hostdStopMemInMB>

Do a restart on hostd process by:
service mgmt-vmware restart