virtual grind thoughts from the virtual world

17Mar/121

Forcing VMware Tools To Cancel

I have run in to a few occasions recently where a customer will initiate a VMware Tools install via vCD and not complete the installer. If this virtual machine needs to be moved in vCenter due to something like HA, DRS, etc., vCenter will report that the machine cannot migrate because the .iso that is mounted to the virtual machine cannot unmount.

Fortunately, there is an easy way to cancel the install using vim-cmd:

First, you can get the list of all VM's on your host with the following command:

vim-cmd vmsvc/getallvms

You will see that each VM is identified with a number, which is the VM ID. To cancel the tools install, simply use vim-cmd again with the vm number you found above:

vim-cmd vmsvc/tools.cancelinstall (number from above)

or

vim-cmd vmsvc/tools.cancelinstall 777

Tagged as: , , 1 Comment
13Nov/102

Automating VMware Tools Installation in Ubuntu

I have been asked numerous times about automating the VMware tools installation in Linux based operating systems.  I have seen people commonly use RPM's and even compile the tools from source, but the feedback I usually get is that admins would like to automate the installation, like they do in Windows.

Fortunately for us, VMware has been gracious enough to include packages for not only Ubuntu; but also Redhat, CentOS, and SLES.  When I tell people this, the response I usually get is that they never knew these options were available.

For the purpose of this post, I will go over the installation of VMware Tools in Ubuntu 10.04 LTS.  I will also include a link to VMware's official installation guide that covers these steps in detail for more operating systems.

The first step is to add VMware's repo to /etc/apt/sources.list and install VMware's GPG key.  Note that when you are adding the repo, you are adding the "4.1latest" repo.

$ apt-add-repository 'deb http://packages.vmware.com/tools/esx/4.1latest/ubuntu lucid main restricted'
$ wget http://packages.vmware.com/tools/VMWARE-PACKAGING-GPG-KEY.pub -q -O- | apt-key add -

The following five commands update your local package lists, installs VMware packages, and builds/installs the kernel modules:

$ apt-get update
$ apt-get install vmware-open-vm-tools-kmod-source
$ module-assistant prepare
$ module-assistant build vmware-open-vm-tools-kmod-source
$ module-assistant install vmware-open-vm-tools-kmod

Finally, now that everything is built, you simply need to install the packages. The final two commands depend on your installation. If you are not running a graphical interface on your system you will choose the first option that ends in "-nox". If you are using a graphical interface, use the latter command. Remember you only use on or the other, not both.

$ apt-get install vmware-open-vm-tools-nox 

OR
$ apt-get install vmware-open-vm-tools

The official VMware guide can be found here.