vCenter cannot add domain account users – fixed
Recently I had to reinstall vCenter 4.1 and came across a problem with adding domain users via the permissions tab. The problem was when I selected the domain; the list of users from the global address list was coming up blank. As shown here:
I logged into the vCenter server, then into the vSphere client with the domain administrator account and the same problem occurred. I carried out a few troubleshooting steps to see if anything was obviously at fault. First of all I used telnet to log into one of the domain controllers on the LDAP port (389) and received a successful response. I checked the event logs on the domain controllers and didn't see any issues so I began some more tests.
It was only when I stopped the VirtualCenter Server service and checked the logon account that I noticed it was using the local administrator's account. When I changed the logon account to the domain administrator, restarted the services, it came up with the full global address list first time. Sometimes a simple fix is the best kind.
I haven't managed to find any VMware Knowledge Base articles about this problem yet but I’m sure other people have come across this issue. I hope this post helps anyone suffering from the same problem.
Using vSphere PowerCLI to find unused snapshots
A simple and effective way of finding all your unused virtual machine snapshots by using vSphere PowerCLI.
Open vSphere PowerCLI and connect to your vCenter Server:
Connect-VIServer -Server 192.168.2.2
When prompted enter your username and password.
Then:
Get-VM * | Get-Snapshot
This will output the name, description, and powerstate of all virtual machines snapshots.
You need to disconnect when you have finished:
Disconnect-VIServer 192.168.2.2
This is just one example of vSphere PowerCLI but this shows how effective and time saving it can be.
What is the hypervisor in VMware?
The hypervisor in VMware is the virtualization layer that sits between the physical hardware and the software on an ESXi or ESX host. This is a Type 1, bare metal, hypervisor which controls the VMs access to the physical hardware. VMware call this layer the VMkernel. This is a proprietary kernel (or even microkernel) developed by VMware and contrary to popular belief it's not based on Linux. A Type 2 hypervisor runs within an operating system and an example of this is VMware Player.
VM in an idle loop
I had an issue with a Centos server's VCPU spiking and this is how I fixed it.
The VM's VCPU had performance problems which I noticed when running top. There was over 90% CPU usage when the VM was idle. An alert was also generated in vCenter.
To fix this problem you need to set the value the VM spends spinning whilst idle. First, power down the VM and edit the vmx file to include the following entry: monitor.idleLoopSpinUS = "n" (where "n" is a number between 100 and 4000). A lower value (100) means that the VM is halted quickly and a higher value (4000) means that the VM is allowed to spin longer before being halted. I set mine to 100 and now the issue has disappeared.
Afterwards, I asked VMware about changing the value and they said, "...the value you are setting is the amount of time (microseconds) spent spinning in the idle loop, so the difference between 100 and 4000 is just the amount of time it will spend in this loop. Prior to this the machine was spending too much time in the idle spin loop, this can happen in cases where there is not sufficient work to keep the processors busy and when the workload has a low rate of external interrupts. For some workloads, the delay caused by halting and then resuming the VCPUs causes a measurable slowdown as the number of VCPUs is increased."
