Use the VI Client to bulk upgrade VM tools
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:
- Launch the VI Client and log in to the VirtualCenter Server.
- Click Inventory in the navigation bar and expand the inventory.
- In the inventory list, select the host on which virtual machines you want to upgrade reside.
- Click the Virtual Machines tab.
- Select the virtual machines you want to upgrade with the new version of VMware Tools.
- 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. |
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.
| 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.
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.
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
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
Tags: esx, how to, linux, microsoft, upgrade, vi client, virtualcenter, virtualmachine, vmware, vmware tools, windows











