Tag Archives: esxi

How to replace SSL certificate on VMware Update Manager vCenter 5.1

Here is how to replace the SSL certificates on VMware Update Manager running under vCenter 5.1.  I found the text from the following document, just reposting for future reference/ease of access: http://www.vmware.com/files/pdf/techpaper/vsp_51_vcserver_esxi_certificates.pdf

  1. Back up the existing Update Manager certificates.
  2. Copy the newly created certificate files (rui.crt, rui.key, and rui.pfx) to the Update Manager SSL directory on the system where Update Manager is installed.
    1. Typically, the directory is C:\Program Files\VMware\Infrastructure\Update Manager\SSL.
  3. Stop the VMware vSphere Update Manager service.
  4. Change to the Update Manager installation directory.
    1. Typically, the directory is C:\Program Files\VMware\Infrastructure\Update Manager\.
  5. Run the file VMwareUpdateManagerUtility.exe.
    1. Note, this might take a couple of seconds to startup, there was a delay for me.
  6. In the Options pane, click SSL Certificate.
  7. In the Configuration pane, select Followed and verified the steps and click Apply.
    1. You should receive the following text when it is done: "Successfully applied the configuration."
  8. After the operation completes, start the VMware vSphere Update Manager service.

VMware - Host sensor data is not updated. The Query Service is not available or was restarted, please retry.

Host sensor data is not updated. The Query Service is not available or was restarted, please retry.

I have run across this issue a couple of times now when shutting down a few of our hosts (including vCenter) and them booting them all back up at the same time in the lab.  Due to the way that the VMs were booting back up, some of the VMware services were not starting properly and would result with the inability to view the Hardware status tab in vSphere.

To resolve this issue, simply go through and restart the services on your vcenter box and you should be back in business.  Restarting the VMware VirtualCenter service specifically should take care of things (it might ask to restart VMware VirtualCenter Management Webservices as well... that's fine).

As a side note, I did try going through ADSI and changing some values, however I feel this is more of an issue due to the way your VMs come alive and associated dependencies (SQL backend, DCs, etc.)

Hope this helps!

Powering off an unresponsive VM in ESXi

Today I had an issue with a VM not wanting to power off. I found an excellent article from http://markvansintfiet.wordpress.com/2010/07/28/forcefully-kill-a-virtual-machine-in-esxi/ that I am reposting in case the website ever goes down.

One day you’ll run into a  not responding virtual machine that won’t power off in the vSphere client. If you don’t want to reboot your ESXi host, here is how to forcefully kill the bastard leaving all other virtual machines peacefully running.

Method 1: Use the vmware-cmd command in the vSphere command-line interface (CLI)

  1. Download and install vSphere command-line interface(http://www.vmware.com/download/download.do?downloadGroup=VCLI40)
  2. CD to C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>
  3. List Virtual Machines
    vmware-cmd.pl -H <ESXi host name> -l
  4. Get state:
    vmware-cmd.pl -H <ESXi hostname> “<vmx file path>” getstate
  5. Kill Virtual Machine:
  6. vmware-cmd.pl -H <ESXi hostname> ”<vmx file path>” stop hard

When method 1 fails move to method 2.

Method 2: Find the VM’s process identifier and forcibly terminate it (or use SSH if you are lazy and don't mind opening security holes)

  1. List active virtual machines: vm-support -x
  2. On the ESXi console, press Alt-F1.
  3. Type the word unsupported and press ENTER
  4. Type root password and press ENTER
  5. Look up the VM process pgid: ps –g | grep
    (The number you are looking for is the one that is right before and after mks: and vcpu)
  6. Kill the process: kill -9 <pgid, the number you just found>
  7. Wait a minute and check if the machine is not running anymore: vm-support -x

How to power off a hanging VM in ESXi

So to do this in ESXi, see this tutorial: http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=1014165

I found out that the commands from ESX are completely different, so if you are receiving the "vmware-cmd" not recognized, you are probably running ESXi and need to use the commands from the KB article above.