Category Archives: VMware

Manually deleting linked clones or stale virtual desktop entries from VMware View Manager 3.x, 4.x and 5.x

Here is the issue I was having when trying to remove a host from View:

Desktop Composer Fault: "Virtual Machine with Input Specification already exists"

 

VMware has a great write-up on the article here on how to remove a VM that cannot be removed through the View Adam panel:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1008658

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.

Updating the View Composer SSL certificate

To update the certificate for the View Composer server, complete the following steps:

  1. Login to the View Composer Server.
  2. Stop the VMware View Composer service
  3. Open up command prompt as an administrator
  4. Navigate to c:\Program Files (x86)\VMware\VMware view Composer
    1. Exclude the (x86) if on a 32-bit machine
  5. Execute the following command:
    1. sviconfig -operation=ReplaceCertificate -delete=false
      1. The -delete command will either delete the certificate from windows or leave it.  False leaves it, true deletes it.
  6. Start the VMware View Composer service

 

Additional information on the sviconfig tool can be found here: http://pubs.vmware.com/view-50/index.jsp?topic=/com.vmware.view.upgrade.doc/GUID-C22EAD48-88BA-4DE8-A70F-202A954DF047.html

Original support article can be found here: http://pubs.vmware.com/view-51/index.jsp?topic=%2Fcom.vmware.view.installation.doc%2FGUID-5ED2A8AB-0D5F-495F-B2F7-D7C64C7A021E.html

 

Method Invocation Result: vpx.fault.SecurityConfigFault when replacing vmware ssl certificates

Symptom: When replacing my VMWare certificates with signed certificates, I was receiving the following error when running the Invoke Certificates command:

Method Invocation Result: vpx.fault.SecurityConfigFault

Solution: Unfortunately, the only way I could figure out how to fix this issue was to reboot the vCenter server and try again. The error went away upon reboot.

VMware A general system error occurred: Timed waiting for vpxa to start

If you receive the error below while adding a host to your vCenter server:
A general system error occurred:Timed waiting for vpxa to start

All you need to do is update your vCenter instance. For example, if you are running vCenter Server 5.0, you cannot add an ESXi v5.1 host to your vCenter instance.

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!

How To Install VMWare Tools v4 on Ubuntu 12.04 LTS Server

Today I was faced the challenge of installing VMware Tools on a Ubuntu server via command line.  I stumbled accross a step-by-step tutorial on the exact steps to accomplish this task.  I am reposting for archival purposes, but all credit goes to @justinschier from http://ghosttx.com/2012/03/how-to-install-vmware-tools-v4-on-ubuntu-11-10-server/

Written: March 13, 2012
Last Updated: April 27, 2012
Tested With: Ubuntu 12.04 LTS Server, Ubuntu 11.10 Server

All the guides I found on the Internet, including VMWare’s website were outdated in some way, so I decided to write a guide of my own. I just went through these steps from start to finish on a fresh server and had no problems.

  1. Use Install VMWare Tools option in VMWare Client/Console to attach media
  2. Update the server
    sudo apt-get update
    sudo apt-get upgrade
  3. Create the mount point
    sudo mkdir -p /media/cdrom
  4. Mount the ISO
    sudo mount /dev/cdrom /media/cdrom

    You should see the message: mount: block device /dev/sr0 is write-protected, mounting read-only

  5. Change Directory
    cd /media/cdrom
  6. Copy the tar file to your /tmp directory
    sudo cp VM*.tar.gz /tmp
  7. Install Build tools if necessary
    sudo apt-get install linux-headers-server build-essential
  8. Change Directory
    cd /tmp
  9. Unmount the ISO
    sudo umount /media/cdrom
  10. Expand the tar
    sudo tar xzvf VM*.tar.gz
  11. Change Directory
    cd vmware-tools-distrib
  12. To prevent a potential error in the install script on Ubuntu 11.10, create a special directory
    Unable to create symlink “/usr/lib64/libvmcf.so” pointing to file ”/usr/lib/vmware-tools/lib64/libvmcf.so/libvmcf.so”.

    sudo mkdir /usr/lib64
  13. Run the Install Script. The -d flag automatically answers the default to all questions. To customize it, just omit the -d.
    sudo ./vmware-install.pl -d
  14. Reboot
    sudo reboot

Let me know if this worked for you!

Also, please follow me on Twitter: @justinschier

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.

VMWare Lockdown Mode

Here is how to enable it:

To enable Lockdown mode via console:
Log in directly to the ESXi host.
Open DCUI on the host.
Press F2 for Initial Setup.
Toggle the Configure Lockdown Mode setting.

To enable Lockdown mode via vSphere:
Log in to vSphere
Click on the Home->Inventory->Hosts and Clusters
Click on the host you want to manage
Click on the Configuration manager
Click on "Security Profile" on the left side
Click the Edit... link next to Lockdown Mode
Enable it!