Use the VI Client to bulk upgrade VM tools

Posted on April 29th, 2008 in esx3.5, how to, vmtools by Rich

The last steps of the VI3 upgrade process involve the virtual machines. Upgrading the VM hardware and the installed VM tools complete the virtual infrastructure migration, but can be a daunting task if you have numerous ESX hosts and guests. Fortunately, there are a couple of ways you can simultaneously update multiple VMs. One method uses the VI client and the other involves entering a console command on the VirtualCenter server.

Bulk Upgrading VMtools from the VI Client

Use the steps in the current VMware Upgrade Guide:

  1. Launch the VI Client and log in to the VirtualCenter Server.
  2. Click Inventory in the navigation bar and expand the inventory.
  3. In the inventory list, select the host on which virtual machines you want to upgrade reside.
  4. Click the Virtual Machines tab.
  5. Select the virtual machines you want to upgrade with the new version of VMware Tools.
  6. Right?click the virtual machines and choose Install/Upgrade Tools.

VirtualCenter provides two options to upgrade VMware tools:

  • Interactive tools upgrade - Requires some user interaction and requires you to reboot the guest operating system manually.
  • Auto tools upgrade - Upgrades tools without user interaction and reboots the guest operating system, if required. Auto tools upgrade is supported for tools version ESX 3.0.0 and above on Windows and Linux guest operating systems.
  • Note: the field for Advanced Options can use any of the command line options described in the next section

Upgrading from the VirtualCenter Command line

Since this feature is now accessed from the VI Client in ESX 3.5, the current Upgrade Guide no longer describes the command line method. However, it is still an option to bulk upgrade VMtools in multiple VMs. The following instructions are cut and pasted from VMware’s previous online documentation Upgrading Hardware and VMware Tools in Multiple Virtual Machines.

You can upgrade VMware Tools and virtual hardware for one or more virtual machines from earlier releases. Using an ESX Server version 3 host, VMware Tools and virtual hardware can be upgraded for multiple virtual machines simultaneously without needing to interact with each virtual machine from the console. The user performing the upgrade must have appropriate permissions.

Requirements

  Only virtual machines managed by VirtualCenter 2 can be upgraded.
  Mass upgrades are available only for Linux and Microsoft Windows 2000 and higher.
  Windows NT, Novell NetWare, and FreeBSD are not supported.
  The virtual disk must be on a VMFS-3 volume.
  Virtual machines must be powered off. (Linux virtual machines must be shut down, rather than powered off.)
  The mass upgrade command-line tool is installed as part of the VirtualCenter version 2 installation, on Microsoft Windows.

To upgrade VMware Tools and virtual hardware on multiple virtual machines

1 Open the Windows command prompt.
2 Change to the directory where the VirtualCenter Server is installed.
3 Type the command with your desired options.

Use the following command syntax:

vmware-vmupgrade.exe -u user [-p password] [-n vmname] [-h host]
[-m maxpowerons] [-o port] [-t maxpowerontime] [-s] [-q]

Table 10-1 describes the available options.

Table 10-1. Options for vmware-vmupgrade.exe

Option Description
-u user Specifies a user with sufficient privileges on the target virtual machine, including VirtualMachine.Config.*, VirtualMachine.Interact.*, and VirtualMachine.Provisioning.*
-p password Specifies a password on the command line. If this is omitted, the tool immediately prompts for a password.
-n vmname Specified the name of the virtual machine to upgrade. This name corresponds to the display name of a virtual machine. Specify multiple virtual machines using multiple -n parameters. The -n option is ignored if -h is specified.See Specifying Host or Virtual Machine Names for more information on this parameter.
-h host Attempts to upgrade all the virtual machines on a particular host. Fails if the specified host is not version ESX Server 3.0 or greater.See Specifying Host or Virtual Machine Names for more information on this parameter.
-m maxpowerons On a particular host, powers on only this number of virtual machines at a time.
-o port Specifies the VirtualCenter Server port, if a port other than the default port 902 has been configured.
-t maxpowerontime Allows a user to set the maximum amount of time for a virtual machine to be powered on in case the guest is unable to power off the machine itself.After the tools upgrade is scheduled on a virtual machine, the virtual machine is powered on and allowed to run through the tools installation process. In most cases, the guest powers down the machine automatically when the process completes.
-s Skips the tools and does only the virtual hardware upgrade.
-q Works quietly. Doesn’t produce status or completion messages on stdout.

Specifying Host or Virtual Machine Names

To specify a host or a virtual machine name for the vmware-vmupgrade.exe command, you must specify a path to the host or virtual machine. The path corresponds to the location of the host or virtual machine displayed in the VI Client inventory. To determine host paths, display the Hosts and Clusters view in the inventory panel. To determine virtual machine paths, display the Virtual Machines and Templates view in the inventory panel.

For the case illustrated in Figure 10-1, the path for the host testserver3.eng.vmware.com is /Datacenter1/Folder1/testserver3.eng.vmware.com.

upgrading vmtools host view

Figure 10-1. Example Hosts and Clusters Inventory View, Showing the Path for a Host

For the case illustrated in Figure 10-2, the path for the virtual machine vm1 is /Datacenter1/MyVMs/vm1.

upgrading vmtools single vm

Figure 10-2. Example Virtual Machines and Templates Inventory View, Showing the Path for a Virtual Machine

Usage Examples

The following are some usage examples for the vmware-vmupgrade command:

  To upgrade a single virtual machine named myvm, in datacenter DC, in the root virtual machine folder:

vmware-vmupgrade -u user -n /DC/myvm

  To upgrade a single virtual machine named vm1 in the folder My VMs, in datacenter DC, in the folder dcFolder:

vmware-vmupgrade -u user -n /dcFolder/DC/MyVMs/vm1

  To upgrade two virtual machines, vm1 and vm2, both in datacenter DC, and to force all virtual machines to power off after 5 five minutes. One virtual machine is a Linux virtual machine that does not have Advanced Power Management configured, so that when the guest is shutdown, the virtual machine doesn’t power off.

vmware-vmupgrade -u user -n /DC/vm1 -n /DC/vm2 -t 5

  To upgrade all (powered-off) virtual machines on host myhost.vmware.com in the root host folder of datacenter DC, while powering-on at most two virtual machines at a time on the host:

vmware-vmupgrade -u user -h /DC/myhost.vmware.com -m 2

  To upgrade powered-off virtual machines on host host1.vmware.com in cluster myCluster in the datacenter folder /DC/folder1:

vmware-vmupgrade -u user -h /DC/folder1/myCluster/host1.vmware.com

Related Posts

One Response to 'Use the VI Client to bulk upgrade VM tools'

Subscribe to comments with RSS or TrackBack to 'Use the VI Client to bulk upgrade VM tools'.


  1. on April 29th, 2008 at 9:54 pm

    […] over at VM /ETC has published some information on using the VI Client to upgrade VMware Tools. The particularly helpful portion of this article is the information on using the CLI from the […]

Post a comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word