Chapter 5. Migrating from ESX

Migrating from VMware ESX and Virtual Center 2.5 or vCenter Server 4.0 to VMware ESXi and vCenter Server 4.1 requires careful planning and consideration of a number of factors. Your move to ESXi may open the opportunity to reimplement vCenter Server to meet changing business, management, or security requirements. You may consider redesigning your network configuration, implementing a different security model, or fine-tuning other factors that make starting with a fresh installation worthwhile. Or you may desire to keep your existing vCenter Server configuration and just upgrade the server directly to vCenter Server 4.1.

This chapter examines the following items:

  • Understanding the prerequisites for installing vCenter Server 4.1

  • Preparing for the upgrade to vCenter Server 4.1

  • Upgrading to vCenter Server 4.1

  • Migrating virtual machines to ESXi 4.1

  • Upgrading virtual machines

Prerequisites

Upgrading your datacenter to vSphere 4.1 is a multistep process involving all components of your deployment, including vCenter Server, ESXi hosts, and virtual machines. The upgrade requires a specific order to upgrade components, beginning with vCenter Server and ending with virtual machines. Upgrading to ESXi 4.1 before vCenter Server has been updated to version 4.1 will result in a loss of connectivity between vCenter Server and the ESXi hosts. For the most part, the upgrade process involves steps that are not reversible. Should you encounter a problem with vCenter Server after the upgrade, you can only revert to the prior version using a backup of the vCenter Server host and a vCenter Server database backup. With that in mind, it may be worthwhile to include stabilization periods among the major components of your upgrade to minimize the impact of a potential rollback. For example, if you are migrating from ESX 3.5 to ESXi 4.1, you can upgrade the virtual machine’s hardware version to 7 after it has been migrated to the ESXi 4.1 hosts. However, once you have upgraded the hardware version, you will no longer be able to migrate those virtual machines back to ESX 3.5 should you have to revert the upgrade process for any reason. Thus you would require prior backups of those virtual machines to reverse the hardware version change to be able to run the virtual machines on ESX 3.5 again.

With a migration to vSphere 4.1, one of the significant requirements is the need for a 64-bit host operating system (OS) for vCenter Server. If you are currently running vCenter Server on a 32-bit OS, you need to provide a new host running a 64-bit OS. Any database drivers that you install to support vCenter Server’s database connection need to be 64-bit as well. For a list of supported OSs for vCenter Server 4.1, you can consult the Compatibility Matrix at http://www.vmware.com/pdf/vsphere4/r40/vsp_compatibility_matrix.pdf. To aid with the migration of vCenter Server to a 64-bit host, VMware has developed the vCenter Server data migration tool to assist with copying of your vCenter Server configuration between hosts. This tool is discussed later in this chapter. vCenter Server no longer supports Microsoft SQL Server 2000 or Oracle 9i, so a database migration may be required prior to upgrading vCenter Server.

Another critical prerequisite is to verify compatibility of the various components that host your virtual infrastructure as well as interact with it. The hardware requirements for your ESXi host can be found in the Upgrade Guide, which you can download from http://www.vmware.com/pdf/vsphere4/r41/vsp_41_upgrade_guide.pdf. It is also worthwhile to check the Hardware Compatibility List (HCL) at http://www.vmware.com/go/hcl to ensure that the hardware you plan to use is compatible with ESXi. This is especially the case if you plan to reuse the hardware that is currently running ESX 3.5. You should also verify that all your input/output (I/O) devices and storage devices also appear on the HCL.

If you are employing any the following VMware products within your virtual infrastructure, you should ensure that they are compatible with vSphere 4.1:

  • VMware Lab Manager

  • VMware Site Recovery Manager

  • VMware View

It is often the case that the preceding products require a version update before they are supported with a new release such as vSphere 4.1. If you are using any third-party products for backup, management, monitoring, or other purposes, you should ensure that the version you have deployed supports vSphere 4.1 and especially that the products are able to operate properly with ESXi.

If your vCenter Server 4.1 instance will manage ESX 3.5 hosts, you need to install a license server to support those hosts. The vCenter Server data migration tool does not migrate the license configuration from the source vCenter Server. In such a case, you need to install the license server manually and then copy the license file from the source server when you perform the vCenter Server upgrade. After you have decommissioned all ESX 3.5 hosts, you can uninstall the license server, as licensing for ESXi 4.1 is configured and managed within vCenter Server using the vSphere client.

Throughout this book, a number of new vSphere features are discussed, and those features often have specific requirements. For example, some of the requirements for using Fault Tolerance include the following:

  • ESXi servers must be used with specific processor models.

  • Hardware Virtualization (HV) must be enabled in the Basic Input/Output System (BIOS) of the ESXi hosts.

  • Only certain guest operating systems are supported.

  • Host certificate checking must be enabled in vCenter Server.

  • Only single virtual CPU (vCPU) machines are supported.

VMware has compiled a prerequisites checklist that describes the requirements, optional requirements, and recommendations to migrate from VMware Infrastructure 3 to vSphere 4. That document is available at the following link: http://www.vmware.com/files/pdf/vsphere-migration-prerequisites-checklist.pdf.

Upgrading to vCenter Server 4.1

The first step to moving your environment to ESXi 4.1 is to upgrade to vCenter Server 4.1. The exact process to upgrade depends on your environment. As mentioned earlier, you may choose to reimplement vCenter Server, in which case you start with a fresh install of vCenter Server and add ESXi hosts as required.

One of the simpler scenarios may involve upgrading from vCenter Server 4.0. If the vCenter Server host is running a 64-bit OS and the database server is running a version compatible with vSphere 4.1, then you just have to run the installation wizard to upgrade vCenter Server. This process requires downtime for vCenter Server during the upgrade, but virtual machines can continue to operate without interruption. The upgrade process does not include a rollback process, so you should ensure that you have an adequate backup of both the vCenter Server host and database before proceeding.

To upgrade from vCenter Server 4.0 to 4.1 on the same host, use the following procedure:

  1. Log in to the vCenter Server with an account that has administrative rights. If you are connecting to SQL Server with Windows NT Authentication, log in with the account that has been given database owner (DBO) rights to the database and that owns the vCenter Server tables within the database.

  2. Open the vCenter Server installation media and start autorun.exe.

  3. On the vCenter Server Installer page, choose vCenter Server. The vCenter Server installer begins, detects the existing installation, and informs you that an upgrade will be performed.

  4. Click Next on the license and patent agreement pages.

  5. Select the data source name (DSN) to use to connect to the vCenter Server database. This DSN must be 64-bit and should exist before you run the vCenter Server installer.

  6. On the Database Options screen, verify that the correct database is displayed. If you are not using Windows NT Authentication for the database connection, then enter the correct password that corresponds to the username that the installer displays.

  7. On the Database Upgrade Warning screen, check the options Upgrade Existing vCenter Server Database and I Have Taken a Backup of the Existing vCenter Server Database and SSL Certificates. Click Next to continue.

  8. The upgrade to vCenter Server 4.1 requires an upgrade of the vCenter Agent on all hosts. On the vCenter Agent Upgrade screen, shown in Figure 5.1, you can select between an Automatic or Manual upgrade. With an Automatic upgrade, the vCenter Agent is upgraded seamlessly on all hosts in the vCenter Server inventory. For a Manual upgrade, all hosts are disconnected when you connect to vCenter Server after the upgrade. To upgrade the vCenter Agent, you must reconnect to each host. If you select a manual upgrade, VMware High Availability and Fault Tolerance continue to work while the hosts are disconnected from the vCenter Server.

    The vCenter Server Agent Upgrade screen.

    Figure 5.1. The vCenter Server Agent Upgrade screen.

  9. Specify the service account to use for vCenter Server on the vCenter Server Service screen. You can select between using the SYSTEM account or entering a Windows login and password. If you are using Windows NT Authentication to connect to SQL Server, then you should specify the account setup for the database.

  10. On the Configure Ports screen, you can accept the default ports that vCenter Server is to use for communication or change the settings to match your environment. The installer displays any changes that were made for the previously installed vCenter Server installation.

  11. Choose the amount of memory to allocate to the vCenter Server Web service and click Next.

  12. Click Install on the Ready to Install the Program screen to proceed with the upgrade.

Once the upgrade has completed, you can connect to the vCenter Server to verify that the upgrade has completed successfully. If you have other vCenter components installed, such as Update Manager, you should upgrade those as well. You require version 4.1 of the vSphere client to connect to the upgraded vCenter server instance. You can install that version from the vCenter Server installation media or open a Web browser and connect to your vCenter Server host for a download link. After you have connected, you can add new ESXi hosts and prepare to migrate the virtual machines running on ESX 3.5 and 4.0 to ESXi.

If your upgrade scenario involves VirtualCenter Server 2.5, a 32-bit host OS, and a database server unsupported for vSphere 4.1, such as Microsoft SQL Server 2000, the upgrade process is more complicated. Such a scenario involves the following steps:

  1. Back up the VirtualCenter Server and database.

  2. Migrate the database to a supported database server.

  3. Prepare a new vCenter Server host running a 64-bit OS.

  4. Export configuration data from VirtualCenter with the data migration tool.

  5. Restore the data collected with the data migration tool.

  6. Install vCenter Server on the new host.

  7. Migrate the licensing server to the new host to support ESX 3.5 hosts.

As the upgrade process to vCenter Server 4.1 is a one-way process, you should ensure that you have adequate backups before proceeding with your upgrade. At a minimum, the following items should be included:

  • A full database backup of the VirtualCenter database.

  • A backup of the VirtualCenter SSL certificates. These are found either in %ALLUSERSPROFILE%Application DataVMwareVMware VirtualCenter or %ALLUSERSPROFILE%VMwareVMware VirtualCenter.

  • Notes on the existing VirtualCenter configuration. These notes should include information such as the Internet Protocol (IP) address, the database DSN, assigned ports, and the SQL login and password.

  • A backup of the VirtualCenter configuration file vpxd.cfg.

Migrating the VirtualCenter Database to a Supported Version

The first step to migrating to vCenter Server 4.1 in this scenario is to migrate the database to a database server supported by vSphere 4.1. In the following example, the database is migrated from SQL Server 2000 to SQL Server 2008:

  1. On the VirtualCenter host, stop the VirtualCenter Windows service.

  2. Open SQL Enterprise Manager and connect to the SQL Server 2000 database server. As an extra precaution, make a full database backup. Also make a note of the SQL login that is set up for this database.

  3. Right-click on the database and select Tasks > Detach.

  4. After detach is complete, copy the database files to the host running SQL Server 2008.

  5. Start SQL Management Studio and connect to the SQL Server 2008 instance.

  6. Create the same SQL login used to connect to the database on the source database server.

  7. Right-click on the Databases folder and select Attach.

  8. On the Attach Database screen, click Add, browse to the data file (.mdf) for the database, and then click OK. Click OK again to attach the database.

  9. Right-click on the database, choose Properties, and then select the Options page. Change the Compatibility Level to SQL Server 2008 (100).

  10. Ensure that the Recovery Model is set to an appropriate setting for your backup strategy. This setting is also found on the Options page.

  11. Click OK to close the Database Properties windows and exit SQL Management Studio.

Once you have migrated the database, you should verify connectivity to the database. If your new vCenter Server host has been set up, create a new DSN to the database. The DSN should use the SQL Server Native Client. This should also be a 64-bit DSN, which you can create by selecting Control Panel > Administrative Tools > Data Sources (ODBC). You should also ensure that the database has been added to a maintenance and backup plan appropriate for your data recovery requirements. Regular index rebuilds are required to maintain optimal performance, especially if you gather a large amount of performance data. If you want to migrate the database using a backup and restore method, or if you are hosting the database on Oracle, you can consult the vSphere 4.1 Upgrade Guide for the appropriate procedure. You are now ready to back up the VirtualCenter configuration with the data migration tool.

Tip

For vSphere 4.1, Update Manager remains a 32-bit product. If you are hosting this component on your vCenter Server host, then you need to create a 32-bit DSN for it.

Backing Up vCenter Server Configuration Data with the Data Migration Tool

The data migration tool is included with vCenter Server 4.1 to migrate your configuration from your 32-bit VirtualCenter or vCenter Server host to your new 64-bit vCenter Server host. The data migration tool backs up the following configuration items:

  • Port settings for HTTP, HTTPS, heartbeat, Web services, Lightweight Directory Access Protocol (LDAP), and LDAP Secure Sockets Layer (SSL).

  • SSL certificates.

  • LDAP data.

  • Licensing configuration.

  • If you are using SQL Server Express locally on the 32-bit host to store the database, the data migration tool backs this up as well.

The data migration tool also backs up and restores data for other vCenter products. The tool can back up vCenter Orchestrator data, but not the database if it is hosted on the source host. The tool can also migrate Update Manager settings and the database if you are using SQL Server Express. The data migration tool does not back up patch binaries.

To back up configuration data on your VirtualCenter 2.5 or vCenter Server 4.0 host, use the following procedure:

  1. Log in to the source host with an administrative account.

  2. Stop the VMware VirtualCenter Server service.

  3. Access the installation media for vCenter Server 4.1 and copy the file datamigration datamigration.zip to a temporary folder on the host.

  4. Extract the contents of datamigration.zip.

  5. Open a command prompt, change to the folder where you extracted the ZIP file, and execute backup.bat.

  6. If Update Manager does not exist on the host, the error shown in the following sample output is displayed. Enter y and press Enter to continue the backup process.

    [INFO] Starting vSphere configuration backup script...
    [INFO] Checking prerequisites...
    [INFO] Checking vCenter Server version...
    [INFO] vCenter Server installation version 2.5.0.64217
    [INFO] Checking for DB type
    [INFO] DB is not bundled
    [INFO] Checking for DSN
    [INFO] VMware vCenter Server DSN: SQL04
    [INFO] VMware vCenter DB Server name: None
    [ERROR] VMware vCenter DB Server name is not found
    [INFO] vCenter Server installation satisfies migration prerequisite
    [INFO] Checking VMware vCenter Update Manager version...
    [WARNING] VMware vCenter Update Manager is not installed or its version cannot
      be determined.
    [WARNING] VMware Update Manager does not satisfy migration prerequisite
      Do you want to continue backup...? y|n:
    
  7. Once the backup process has completed, check the file logackup.log for any errors. If there are any errors, correct the source of the problem and rerun backup.bat. A successful backup may contain warnings that can be ignored, as shown in this sample:

    [INFO] Successfully backed up vCenter Server installed data information
    [INFO] Backing up vCenter Server DB...
    [INFO] Checking vCenter Server DB configuration...
    [INFO] Only SQL Server Express is supported for DB backup
    [INFO] Skipping DB backup...
    [WARNING] Could not back up VMware vCenter Update Manager data.
    [WARNING] Could not back up vCO data.
    
    [INFO] vSphere configuration backup script completed successfully
    

Tip

If you need to run the data migration tool more than once, you should first rename or delete the data folder that is created by the data migration tool. If that folder exists when backup.bat is run, the process terminates with an error.

Restoring the vCenter Server Configuration Data and Installing vCenter Server 4.1

Once you have completed the backup process on the source host, you can copy the data migration tool folder to the destination host to start the restore process and to install vCenter Server 4.1. If your source host was hosting the vCenter Server database on SQL Server Express, then the restore process copies this database to the new host as well.

Tip

To ease the restore process and post restore configuration, it is worthwhile to configure the new host with the same network name and IP address as the source host.

Prior to beginning the restore process, you should ensure that the new vCenter Server host has access to all dependent hosts such as Active Directory domain controllers, the database server, and the license server. Use the following procedure to restore the configuration data and install vCenter Server 4.1:

  1. Copy the datamigration folder from the source host to the destination host. This may require a multicopy process if you plan to configure the destination host with the same network name and IP address.

  2. Ensure that the installation media for vCenter Server 4.1 is available on the destination host. You can insert the DVD into the host’s DVD-ROM drive or copy the contents of the installation media to a folder on the new host.

  3. Verify that a DSN has been created to connect to the vCenter Server database. This should be a 64-bit database client. For SQL Server, you must use the SQL Server Native Client.

  4. Open a command prompt, change to the datamigration folder, and execute the install.bat batch file.

  5. If the network name of the new host does not match the source host, press y to continue the restore process.

  6. Enter the path to the vCenter Server installation path as shown in the following example. The path you enter should point to the root of the installation media where autorun.exe is located.

    [INFO] Starting vSphere 4.1 migration installer script...
    [INFO] Checking prerequisites...
    [INFO]   Migration data directory: C:	mpdatadata
    [INFO] Checking vCenter Server migration data...
    [INFO] vCenter Server DB migration data not present: no inventory data will be
       migrated
    Enter path to vCenter Server 4.1 install media: C:	mpvc41
    [INFO] vCenter Server install media found
    [INFO]   vCenter Server migration data successfully verified
    
    [INFO] Checking VMware vCenter Update Manager migration data...
    [WARNING] VMware vCenter Update Manager migration configuration data is missing.
    [WARNING] VMware Update Manager backup data or system does not meet prerequisite
    
    [INFO] Checking vCenter Orchestrator prerequisites...
    [WARNING] vCenter Orchestrator migration data not present
    [WARNING] vCenter Orchestrator backup data or system does not meet prerequisite
    
    [INFO] Installing vCenter...
    [INFO] vCenter Server HTTP port: 80
    [INFO] vCenter Server HTTPS port: 443
    [INFO] vCenter Server heartbeat port: 902
    [INFO] vCenter Server Tomcat HTTP port: 8086
    [INFO] vCenter Server DB Server type: Custom
    [INFO] vCenter Server License path: 27000@localhost
    [INFO] vCenter Server License edition: vcExpress
    [INFO] Launching installer with backed up install data configuration
    
  7. The batch file restores configuration data such as the SSL certificates and then launches the installer for vCenter Server 4.1.

  8. Select an installation language and then click OK.

  9. Click Next on the initial Welcome and license agreement screens.

  10. If you backed up a vCenter Server database that was hosted with SQL Server Express, select the option Install a Microsoft SQL Server 2005 Express Instance and click Next. Otherwise, select Use an Existing Supported Database and then select the DSN that you created earlier. For this example, the database is hosted on another server, so the second option is chosen.

  11. On the Database Options screen, verify that the database username is correct and enter the database password. Click Next to continue.

  12. The Database Upgrade Warning screen is displayed next. Select the option Upgrade Existing vCenter Server Database and check the box to confirm that you have made a backup of the SSL certificates, as shown in Figure 5.2.

    The vCenter Server Database Upgrade Warning screen.

    Figure 5.2. The vCenter Server Database Upgrade Warning screen.

  13. On the vCenter Agent Upgrade screen, choose either an Automatic and Manual upgrade for the vCenter Agent running on the hosts in the vCenter Server’s inventory. These choices are shown in Figure 5.1 and an explanation of the options are described earlier in the section “Upgrading to vCenter Server 4.1.”

  14. Select an account to use for the vCenter Server service. This can be the SYSTEM account; however, if you are using Windows NT Authentication to connect to the database on SQL Server, it should be the account setup with access to the database.

  15. Select the installation folder and click Next.

    Tip

    The installation of vCenter Server 4.1 requires Microsoft Active Directory Application Mode (ADAM), which is an implementation of LDAP. ADAM is used primarily to support a new vSphere feature called Linked Mode, but it is also required for single instance installations of vCenter Server. Linked Mode allows a single instance of the vSphere client to access inventory and configuration information across multiple vCenter Servers. In Linked Mode, ADAM is used to store and synchronize data across multiple vCenter Server instances. The installation path you choose for vCenter Server should be compatible with ADAM; for example, the path cannot contain any periods or commas.

  16. On the Configure Ports screen, review the various ports that vCenter Server will use for communication. These settings have been imported from the configuration backup. Click Next to continue.

  17. Select the amount of memory to use for the vCenter Server Web service and click Next.

  18. Click Install to begin the installation of vCenter Server and the upgrade of the database. If the Microsoft .NET Framework is not installed, the vCenter Server installs that component. This may require a reboot of the host after the installation process has completed.

  19. When the installation has completed, click Finish to close the vCenter Server installation program.

  20. Review the file log estore.log in the datamigration for errors.

Caution

If you are upgrading vCenter Server and hosting the database on Microsoft SQL Server, you need to grant DBO rights to the MSDB database for the login that is used to connect to the vCenter Server database prior to starting the upgrade. Several scheduled jobs that manage performance data are created in the MSDB database. After the upgrade has been completed, you can remove the DBO role to the MSDB from the vCenter Server SQL login. If your organization’s security policies do not permit access to the MSDB database, the scheduled jobs can be created after the upgrade. Your database administrators can follow the procedure documented in the following Knowledge Base article to create the maintenance jobs manually: http://kb.vmware.com/kb/1004382.

If the data migration tool was used to back up Update Manager or vCenter Orchestrator data, then the installation wizards for those products are also started. Once the upgrade has completed, you can upgrade the vSphere client to version 4.1 and then connect to your vCenter Server host. If the network name for the new vCenter Server host did not match the old host’s network name, you may receive errors for any plug-ins that were registered with vCenter Server. To correct that, you can follow these steps:

  1. Each plug-in has an extension file stored within a subfolder of C:Program Files VMwareInfrastructureVirtualCenter Serverextensions. Open each instance of extensions.xml with a text editor.

  2. Edit the contents of the <url> tag to update the listed vCenter Server hostname.

  3. Save the file after you have updated the hostname.

  4. Reregister the extension with vCenter Server.

Once you have connected to vCenter Server 4.1, you can verify that the upgrade has completed successfully. If you chose to update the vCenter Agent on your ESX hosts manually, you may see tasks in progress related to that. If you chose to upgrade the vCenter Agent manually, then all your hosts will show a status of disconnected. Right-click on each host and select Connect to reconnect to those hosts and to upgrade the vCenter Agent.

Installing the License Service on the New vCenter Server Host

With vSphere, licensing for vCenter Server and your hosts is embedded within vCenter Server and you no longer have to use a separate licensing service for your vSphere hosts. However, if you plan to support ESX 3.5 hosts as part of your migration plan, you need to maintain a licensing service for those hosts. If the licensing server was installed on your vCenter Server host, then you’ll need to install the service on the new host. To configure the licensing service, you can follow these steps:

  1. Download the license service installation package from vmware.com. This download can be found in the Drivers and Tools section of the downloads for VMware Infrastructure 3.

  2. Start the installation program to install the license service.

  3. The program prompts you for the path to your VMware license file. Find the file and click Next to continue.

  4. After the installation has completed, you can verify that the license file has been imported correctly by running the VMware License Server Tools application and performing a status enquiry.

  5. If the hostname for the licensing server has changed since the upgrade, you should also update the licensing settings within vCenter Server. Connect to vCenter Server with the vSphere client and select Home > vCenter Server Settings. Then select the Licensing view and update the License Server configuration to match the new hostname and check the option Reconfigure ESX 3 Hosts Using License Server to Use This Server. Click OK to save your changes.

At this point in the upgrade process, your vCenter Server host is running version 4.1 and all your hosts should be connected. Your configuration of hosts and clusters should be the same as before the upgrade began, but it would be worthwhile to look around to ensure that no changes have been missed and that all your options and features are working as expected. Before discussing the migration of virtual machines to ESXi, it would be worthwhile to review the changes made in vSphere to permissions for datastores and networks.

Upgrading Datastore and Network Permissions

One of the new features with vSphere is the ability to assign role-based permissions to datastores and networks. With VirtualCenter Server, permissions for these objects were inherited from the datacenter object. After the upgrade to vCenter Server 4.1, users who did not have Administrator permissions on the datacenter object may be granted the role Datastore/Network Access (Upgrade), which has limited permissions for datastores and networks.

During the upgrade process, all existing permissions are upgraded without changes. For new managed objects in vCenter Server 4.1, users are initially granted the No Access role, which applies to datastores and networks. Without permission to a datastore, a user cannot perform a simple operation such as Browse Datastore. During the upgrade process, the Read-Only privilege on the data-center objects determines what permissions are assigned to any datastores or networks in that datacenter. If the Read-Only privilege is nonpropagating and thus the permission is not applied to child objects, the upgrade process does not assign permissions to any datastores or networks. Users with full administrative rights on a virtual machine cannot make datastore or network-related changes until they have been assigned the appropriate privileges. If the Read-Only privilege is propagating, then the upgrade process assigns the Datastore/Network Access (Upgrade) role to the user. The role includes the privilege Allocate Space for datastores and Assign Network for networks, which allows the user to perform basic administrative operations.

Tip

The new datastore and network privileges provide an extra layer of security in your vSphere environment; when properly set, these privileges can prevent security breaches due to accidental or deliberate misconfiguration of your virtual machines. It is important to note that these permissions are managed by vCenter Server and not applied directly to the datastore or network. A user accessing the ESXi host directly with the vSphere client would not be affected by any restrictions enabled for them in vCenter Server. You can consider enabling Lockdown Mode to ensure that all client connections are made through vCenter Server.

If a user needs to perform operations on a datastore, then you have to assign a role with appropriate permissions. The vCenter Server upgrade creates the role Datastore Consumer (Sample). Like the Datastore/Network Access (Upgrade) role, Datastore Consumer (Sample) includes the Allocate Space privilege, which enables a user to allocate space on a datastore for virtual machines, snapshots, or clones. If a user needs to perform additional datastore maintenance tasks such as deleting files or datastores, then you need to assign those privileges. Table 5.1 lists the datastore privileges that you can assign to a role.

Table 5.1. vSphere Datastore Privileges

Privilege Name

Actions Granted

Allocate Space

This allocates space on a datastore for virtual machine files, snapshots, or clones.

Browse Datastore

This privilege allows the user to browse files on the datastore. This is required when accessing files for a virtual machine’s virtual CD-ROM or floppy drive devices. The privilege also enables a user to add existing disks to a datastore.

Delete Datastore

This removes a datastore.

Delete Datastore File

With this privilege, a user can delete a file in the datastore.

File Management

This privilege enables a user to carry out file management tasks such as copying or moving files.

Move Datastore

This enables a user to move the datastore to another folder in the vCenter datastore inventory structure.

Rename Datastore

This enables the user to rename a datastore.

For network permissions, the vCenter Server upgrade process creates a sample role called Network Consumer (Sample). This role has the Assign Network privilege, which is required for a user to assign a virtual machine to a specific network. Should your users need additional privileges, you can create a role that contains the privileges shown in Table 5.2. Careful planning of network permissions can be helpful if your hosts are connected to numerous networks with different security sensitivities. An example is a host that is connected to both internal and demilitarized zone (DMZ) networks. Improper network configuration could result in sensitive networks being accessible from the Internet, which could put your infrastructure at risk. By restricting permissions to the DMZ virtual switch, you can ensure that a general virtual machine administrator does not mistakenly plan an internal virtual machine in the DMZ.

Table 5.2. vSphere Network Privileges

Privilege Name

Actions Granted

Assign Network

Set a virtual network interface card (NIC) to be connected to the network.

Configure Network

Make configuration changes to the network.

Delete Network

Remove a network.

Move Network

Move a network within the vCenter inventory folders for networks.

Once you have completed your vCenter Server upgrade, you are ready to assign permissions to your datastores and networks. You may need to create custom roles to tailor the permissions to your environment. Use the following procedure to assign permissions to your datastores:

  1. Start the vSphere client and connect to vCenter Server.

  2. On the Home page, select Datastores to display the datastores on your vSphere hosts.

  3. Select a datastore or folder and click the Permission tab.

  4. Right-click on the Permissions tab and select Add Permission.

  5. In the Assigned Role pane, select an appropriate role that you want to grant to the user or group. If you grant the Read-Only role, a user will be able to browse a datastore but will not be able to perform any further functions. This can be useful if a user just needs to access CD or DVD ISO images stored on the datastore.

  6. If you are setting permission on a folder, check the option Propagate to Child Objects.

  7. In the Users and Groups pane, click Add and then select the users or groups that are to be assigned to the chosen role.

  8. Click OK to apply your change and to close the Assign Permissions window.

To change permissions for your virtual machine networks, you can follow the same process as you did with datastores, except that you need to select Networks from the Home screen. With both datastores and networks, you can create a folder structure that best matches your management needs. These folder structures are independent of the ones that exist for host and virtual machines. If you create a new network or datastore, it is located under the datacenter object, as is the case with the DMZ network object in Figure 5.4. You should ensure that the permissions set at the datacenter are appropriate for any new networks or datastores and that permissions are set to propagate to child objects. Otherwise, you should directly assign permissions to new datastores or networks or move those new objects to a folder where appropriate permissions are

When a new network is created, the object is located under the datacenter object.

Figure 5.4. When a new network is created, the object is located under the datacenter object.

set with propagation enabled.

Migrating ESX Hosts

Once you have vCenter Server 4.1 deployed, you are ready to begin installing ESXi 4.1. There is no installation upgrade path from ESX to ESXi, so moving to ESXi involves some sort of migration scenario. This means that you are not able to use Update Manager to upgrade your hosts from ESX to ESXi. You can use Update Manager to upgrade VMware Tools and the virtual machine hardware version for the virtual machines that you migrate to ESXi. That process is described later in this chapter. The exact path that you take depends on your infrastructure. The following section examines some of the options and shows you how you can use PowerCLI to automate the migration of virtual machines. Figure 5.6 shows the process flow for a typical migration from ESX to ESXi. By utilizing your current cluster and vMotion configuration, you can minimize the downtime for virtual machines during your migration process.

Process flow for migrating from ESX to ESXi.

Figure 5.6. Process flow for migrating from ESX to ESXi.

In the first scenario, the ESX hosts are part of a cluster. After the upgrade to vCenter Server 4.1, the hosts can be reconnected to vCenter Server either automatically or manually, as previously discussed, and your High Availability (HA) and Distributed Resource Scheduler (DRS) clusters are automatically reconfigured to function with vCenter Server 4.1.

After your cluster proves to be stable and free of upgrade issues, you can begin to introduce ESXi hosts into your cluster. ESXi 4.1 can operate with your ESX 3.5 and 4.0 hosts without any problem. Thus, there is no need to upgrade your current hosts to ESX 4.1 before migrating your virtual machines to your new ESXi hosts. Given the age of your existing hardware, you may be introducing new hardware that can support ESXi. Otherwise, you may choose to restage existing hardware with ESXi. In the case of reusing hardware, you need to migrate virtual machines from the host that is to be restaged before it can be shut down. If DRS is set to be fully automated, then you can place the host in maintenance mode and migrate your virtual machines using vMotion to other hosts. In the case of a partially automated DRS cluster, you must review the migration recommendations and accept them before the virtual machines can begin to be migrated.

As long as there are no DRS affinity rules or HA constraints that are violated by putting your host in maintenance mode, your virtual machines are migrated to other hosts in the cluster. You can then shut down the host and remove it from the cluster. After the host has been restaged with ESXi, it can be added to the cluster again, and the process is repeated until all hosts are running ESXi. You are then ready to proceed to the next section dealing with virtual machine upgrades.

One circumstance that can prevent migration of a virtual machine is to have a virtual CD-ROM device connected to a datastore ISO image or to the host’s physical CD-ROM device. The following PowerCLI script sets the CD-ROM of all virtual machines to a state of disconnected. If you’re migrating hundreds of virtual machines, such a small PowerCLI script can be quite a time-saver. You can encapsulate this within a general script that checks the connected status of virtual machine CD-ROM devices, migrates the virtual machines to another host, and then puts the host into maintenance mode.

Get-VMHost esx01.mishchenko.net | Get-VM | Get-CDDrive | Set-CDDrive -Connected
   $false -Confirm:$false

In the case of adding a new server running ESXi to your cluster, you may need to review the cluster settings for Enhanced vMotion Compatibility (EVC). EVC was introduced with ESX(i) 3.5 Update 2 to enable the migration of virtual machines between different generations of CPUs. This allows for the mixing of older and new servers within the same cluster. When EVC is enabled, all hosts in the cluster are configured to present the central processing unit (CPU) features of the user-selected CPU type to all virtual machines in the cluster. This allows vMotion to proceed even if the hosts’ CPUs are from different generations. Enabling EVC on a cluster may require that virtual machines be powered off, so you may need to plan an appropriate maintenance window if you require EVC as part of your migration to ESXi. If your migration to ESXi includes new hardware, you might consider raising the EVC mode after the older hosts running ESX have been removed from the host. You can use the Change EVC Mode dialog box to determine the EVC modes currently available to your cluster.

In the second migration scenario, your hosts are not part of a cluster. Rather, you have a number of hosts that are managed by vCenter Server that may be using some form of shared storage. As was the case with the prior scenario, you may be restaging your existing hosts with ESXi or including a hardware refresh as part of your migration to ESXi. If you plan to restage a host, the first step is to migrate the virtual machines to another host. The ideal mechanism to use is vMotion, as no downtime is required for the virtual machines. You can initiate vMotion for each virtual machine using the vSphere client, or you can automate the process with PowerCLI. PowerCLI includes the Move-VM cmdlet, which can be used to automate the migration of a virtual machine to another host. Move-VM can be used to change a virtual machine’s folder, cluster, host, resource pool, or datastore. With the following single line of code, you can migrate all virtual machines with vMotion from one host to another:

Get-VMHost esx01 | Get-VM | Move-VM -Destination (Get-VMHost esx02) -RunAsync

You can also use Move-VM to perform a storage vMotion migration. If you have to migrate the virtual machine to a shared datastore, you can use the following script to change the datastore before you vMotion the virtual machine to another host. With the RunAsync option, the cmdlet returns immediately to the command line rather than waiting for the task to complete, as shown in the following example:

Move-VM -VM windows01 -Datastore ISCSI2 -Destination esx01.mishchenko.net
      -RunAsync
Id                    :
IsCancelable          : False
Result                :
Name                  : RelocateVM_Task
Description           : Relocate virtual machine
State                 : Running
PercentComplete       : 0
StartTime             : 8/5/2010 12:57:16 AM
FinishTime            :
ObjectId              :
Uid                   : /Local=/ClientSideTask=3b19de69-0d9f-497c-b756827bc47/
NonTerminatingErrorList : {}
TerminatingError       :

To determine the status of the task, you can run the Get-Task cmdlet as shown in the following example:

Get-Task
Name                         State        % Complete     Start Time      Finish Time
----                         -----        ----------     ----------      -----------
RemoveAllSnapshots_Task      Success         100         12:50:02 AM     12:54:00 AM
RelocateVM_Task              Running          23         12:57:16 AM

After your virtual machines have been migrated, you can remove the host from vCenter Server and restage it with ESXi. You can then manually migrate the virtual machines back to the ESXi host or use PowerCLI to automate the move to the new ESXi host.

The third upgrade scenario that you may encounter involves a standalone host that may not be managed by vCenter Server. Such a server might be located at a branch office, and there may not be any form of shared storage that would allow for the easy migration of virtual machines, as was the case in the first two scenarios. If the migration involves a hardware refresh, then you can simply stage the new ESXi alongside the ESX host and then use a tool such as VMware Converter to migrate the virtual machines from the ESX host to ESXi.

If you have to restage the standalone with ESXi, then you have a few options. If the host has a single storage array, then the ESXi installer will wipe out all data on the partition, resulting in the loss of your virtual machines. You must first back up any virtual machines on the ESX host, then install ESXi, and lastly restore the virtual machines. Optionally, you could add a flash device or another boot device and install ESXi on it. The old ESX datastore would be visible to the ESXi host and you could reregister the virtual machines on it.

Lastly, you may choose to perform a new installation of vCenter Server and add ESXi hosts to it. In that case, you could join the ESX hosts to the new vCenter Server and then migrate the virtual machines to ESXi as was described earlier. Otherwise, you could just remove the shared storage from the ESX hosts and present the logical unit numbers (LUNs) to the ESXi hosts. The hosts would recognize the existing datastores and be able to mount them without formatting them. Then you would just need to register the virtual machines by browsing the datastores and registering the vmx files.

With any of these scenarios, you may find that you need to upgrade the configuration of your virtual machines or other components. PowerCLI may provide the tools necessary to make the updates quickly. An example would be the need to change the virtual machine port group after a migration, which normally would involve manually editing each virtual machine. With the following script, any number of virtual machines can be quickly updated, saving time and reducing the risk of making errors. The following example changes the virtual machine port group from DMZ1 to DMZ2 for all virtual machines running on the specified host:

Get-VMHost esx01 | Get-VM | Get-NetworkAdapter |
   Where {$_.NetworkName -eq "DMZ1" } | Set-NetworkAdapter -NetworkName "DMZ2"
   -Confirm:$false

Upgrading Virtual Machines

The last steps in the process of migrating from VMware ESX 3.5 or 4.0 to ESXi 4.1 are to upgrade VMware Tools and upgrade the virtual machine hardware. If any of your virtual machines do not have VMware Tools installed, you can use the upgrade procedure described in this section to install them. These steps can be performed using the vSphere client, vCenter Update Manager (VUM), or PowerCLI. With the vSphere client, you typically upgrade a virtual machine one step at a time. With VUM, you can automate the process of updating VMware Tools and the virtual machine hardware. PowerCLI includes cmdlets that allow for the scripting of the processes that you would follow both in the vSphere client and with VUM.

VMware Tools is a suite of utilities that enhances the performance and manageability of the guest OS running within your virtual machines. While it is not a requirement to run VMware Tools, you lose convenience and potentially decrease performance. Without VMware Tools, you can only power off a virtual machine, which results in an abrupt stop of the guest OS. With VMware Tools, ESXi can issue a command directly to the guest OS to shut it down properly.

VMware Tools includes a number of drivers that optimize the network, disk, and video performance within your virtual machines. VMware Tools also includes the memory balloon driver (vmmemctl), which the ESXi host can use to force the guest OS to swap unused memory in the virtual machine to the guest OS page file if the host needs to reclaim memory from virtual machines.

VMware Tools is provided in ISO images for Linux, Windows, Solaris, and NetWare; these images are stored on an ESXi system partition. When the process to install VMware Tools is initiated, the ISO image for the appropriate guest OS is mounted to the virtual CD-ROM in the virtual machine and the installation process proceeds. The contents of the ISO images can be extracted should you wish to employ another software deployment tool to manage your VMware Tools installations. When upgrading VMware Tools, the installation process uninstalls the prior version and then installs the new versions. This may result in a momentary network disruption for the guest OS, but connectivity is restored by the end of the upgrade process.

The virtual machine hardware version dictates the capabilities of the virtual hardware that the guest OS can recognize and use. This includes the maximum number of virtual CPUs and Peripheral Component Interconnect (PCI) slots and amount of memory. The native hardware version for VMware ESX(i) 3.5 is version 4. This hardware version has the limits shown in Table 5.3. VMware ESXi 4.x supports hardware version 7. As shown in the table, there are a number of improvements in the capabilities of the virtual hardware for version 7.

Table 5.3. Comparing Hardware Version 4 and 7 Configuration Maximums

Resource

Hardware Version 4

Hardware Version 7

CPUs

4

8

Memory

64GB

256GB

SCSI Adapters

4

4

Virtual SCSI Disks

60

60

Virtual IDE Disks

0

4

Virtual NICs

4

10

Virtual PCI Devices (Video Card, NICs, SCSI Controllers)

6

14

VMDirectPath Devices

0

2

Remote Console Connections

10

40

The change in hardware version with VMware vSphere also introduces new virtual machine capabilities. A number of these new capabilities are summarized in the following list:

  • Virtual Machine Hot Add Support. With hardware version 7, it is possible to increase CPU and memory resources in virtual machines running a supported guest OS.

  • New Storage Virtual Devices. Virtual machines can be created with serial attached SCSI (SAS) controllers, which support Windows Server 2008 failover clusters. Also supported are IDE virtual disks, which enable the virtualization of older OSs that may not have small computer systems interface (SCSI) adapters that work within a VMware virtual machine.

  • VMXNET Generation 3. The third-generation paravirtualized NIC device from VMware includes a number of performance enhancements.

  • VMware Paravirtualized SCSI (PVSCSI). This new virtual storage adapter lowers CPU load and increases disk I/O throughput for virtual machines.

  • VMDirectPath. VMDirectPath I/O enables a virtual machine to access a PCI device directly, decreasing CPU load and improving performance. A number of network and storage adapters are supported, but other hardware may function properly, allowing for the virtualization of servers that were previously excluded due to special hardware requirements.

  • Virtual Machine Communication Interface (VMCI). The VMCI is an application programming interface (API) that enables high-speed communication between a virtual machine and its host or other virtual machines. This communication is not dependent on the networking capabilities of the guest OS. The VMCI is used by VMsafe, which is a vSphere feature designed to protect virtual machines.

When you create virtual machines on ESXi 4.1, the default hardware version is version 7. A virtual machine created with this version cannot be run on ESX 3.5. A virtual machine can be migrated from ESX 3.5 to ESXi 4.1 and back again if required. However, the virtual machine must remain at version 4, which is the default for new ESX 3.5 virtual machines. After a virtual machine is upgraded to version 7, it cannot run on an ESX 3.5 host. If you take a snapshot of the virtual machine before upgrading the hardware version, the change can be reversed. Or you can make a copy of the virtual machine with a tool such as VMware Converter to create a virtual machine that could be run on ESX 3.5 should you need to reverse the hardware version change.

Note

As you examine the new features available with hardware version 7, it is important to understand the dependencies and interactions of these features with other components of vSphere. If you enable VMDirectPath for a virtual machine, you disable the machine from using vMotion to move to another host. Configuring a virtual machine for Fault Tolerance disables VMCI for that virtual machine and disables it from being accessed through the VMsafe API.

As you’ve seen in the prior sections of this chapter, it is possible to upgrade your environment to ESXi 4.1 without imposing downtime on your virtual machines. vMotion and Storage vMotion can be used to migrate virtual machines to your ESXi host, preventing a service outage. However, the upgrade of VMware Tools and virtual hardware requires some downtime. Regardless of the guest OS, you must shut down the virtual machine to upgrade the virtual hardware. With a Windows guest, at least one restart of the virtual machine is required during an upgrade, and for any guest OS, there may be a temporary network outage while the VMware Tools installation package upgrades the virtual machine.

Performing an Interactive Upgrade of VMware Tools with the vSphere Client

Using the vSphere client, you can upgrade VMware Tools for a single virtual machine. As the process of upgrading VMware Tools does represent a significant change to the virtual machine, you should ensure that a backup or snapshot has been taken prior to performing the change. Use the following process to upgrade VMware Tools for a Windows guest OS:

  1. Start the vSphere client and connect to vCenter Server or directly to the ESXi host.

  2. Ensure that the Windows virtual machine is powered on and then select the Summary tab for the virtual machine. The VMware Tools label indicates whether VMware Tools is installed and current, installed and not current, or not installed.

  3. Right-click on the Windows virtual machine and select Guest > Install/Upgrade VMware Tools.

  4. Select Interactive Tools Upgrade as shown in Figure 5.7 and click OK. The host will mount the VMware Tools ISO for Windows.

    Enabling the interactive install option for VMware Tools.

    Figure 5.7. Enabling the interactive install option for VMware Tools.

  5. Access the console for the virtual machine and log in if necessary.

  6. If Autorun is enabled, click OK to confirm that you wish to run setup.exe to install VMware Tools. Otherwise, open the virtual CD-ROM device and start setup.exe.

  7. Follow the installation wizard through the install process. A typical installation of VMware Tools is the best choice for virtual machines hosted on ESXi.

  8. Reboot the virtual machine if prompted to do so at the end of the installation process.

After the installation process has completed, the VMware Tools label on the Summary tab for the virtual machine should display a status of OK. The process to update VMware Tools on a Linux virtual machine is similar to the preceding process. You can follow these steps to upgrade a Linux guest with the RPM Package Manager (RPM) installer.

  1. Start the vSphere client and connect to vCenter Server or directly to the ESXi host.

  2. Ensure that the Linux virtual machine is powered on and then select the Summary tab for the virtual machine. The VMware Tools label indicates whether VMware Tools is installed and current, installed and not current, or not installed.

  3. Right-click on the Windows virtual machine and select Guest > Install/Upgrade VMware Tools.

  4. Select Interactive Tools Upgrade as shown in Figure 5.7 and click OK. The host will mount the VMware Tools ISO for the appropriate OS.

  5. At the console of the virtual machine, log in with the root account.

  6. If the folder /mnt/cdrom does not exist, create it with the command mkdir /mnt/cdrom.

  7. If your Linux distribution doesn’t automatically mount CD-ROMs, you can run the mount command with a similar format: /dev/cdrom /mnt/cdrom.

  8. Change to a working directory with the command cd/tmp.

  9. Extract the RPM installer with a command such as rpm –Uhv /mount/cdrom/VMwareTools-4.0.0-<xxxxxx>.i386.rpm. <xxxxxx>. This command’s syntax reflects the build number for the VMware Tools package.

  10. Double-click on the RPM installation file to begin the upgrade.

  11. When the installation is complete, run the command ./usr/bin/vmware-config-tools.pl to configure VMware Tools.

  12. After the configuration of VMware Tools is complete, run the following commands to restore the network:

    /etc/init.d/network stop
    rmmod vmxnet
    modprode vmxnet
    /etc/init.d/network start
    
  13. Unmount the CD-ROM image with the command umount /dev/cdrom.

  14. Log out of the virtual machine and close the console session.

You can now verify that the VMware Tools label on the Summary tab has a status of OK. You can also manually install VMware Tools in an X Terminal session or by using the TAR installer. Those procedures can be found in the vSphere Upgrade Guide along with the procedures for upgrading Solaris and NetWare virtual machines.

Automating the Upgrade of VMware Tools with the vSphere Client

When selecting to perform an option to upgrade VMware Tools, you can select an Automatic Upgrade. Such an upgrade does not require you to perform any actions within the guest OS. The automated process uninstalls and then installs the latest version that is available on the ESXi running the virtual machine. If the process requires a reboot of the guest OS, this is performed automatically. The Automatic Upgrade option is not available for NetWare or Solaris virtual machines.

Prior to running an automated upgrade, you must first enable the virtual machine option Check and Upgrade Tools during Power Cycles. As this option’s name implies, an attempt is made to update the guest to the latest VMware Tools revision each time a power cycle operation is performed on the virtual machine. Without this option enabled, the Automatic Tools Upgrade option is disabled, as shown in Figure 5.7. To enable this option, take the following steps:

  1. Start the vSphere client and connect to vCenter Server.

  2. Right-click on the virtual machine and select Edit Settings.

  3. Select the Option tab and then the VMware Tools settings.

  4. Enable the option Check and Upgrade Tools during Power Cycling as shown in Figure 5.8.

    Enabling automated upgrade of VMware Tools during a virtual machine’s power cycles.

    Figure 5.8. Enabling automated upgrade of VMware Tools during a virtual machine’s power cycles.

  5. Click OK to save your change.

  6. Restart the virtual machine to enable the new setting.

After the option has been enabled, the host checks the version of VMware Tools installed when the virtual machine guest OS is started and attempts an upgrade if a newer version exists on the ESXi host. If you enable this option, you should be aware of how a VMware Tools upgrade may behave on your virtual machines. The sample upgrade shown in Figure 5.9 has paused midway through the upgrade due to a dialog box that required a response and which is visible only in the console of the virtual machine. You should also be aware that a reboot might be required after the automatic upgrade of VMware Tools, which occurs immediately after the process has completed.

A dialog box preventing an automatic upgrade of VMware Tools at the console of a Windows virtual machine.

Figure 5.9. A dialog box preventing an automatic upgrade of VMware Tools at the console of a Windows virtual machine.

To perform an automatic upgrade of VMware Tools, you can follow these steps:

  1. Start the vSphere client and connect to vCenter Server or directly to the ESXi host.

  2. Ensure that the virtual machine is powered on.

  3. Right-click on the virtual machine and select Guest > Install/Upgrade VMware Tools.

  4. Select the Automatic Tools Upgrade option on the Install/Upgrade Tools dialog box.

  5. For a Windows guest, you can specify installation switches in the Advanced Options field. Entering the options /s /v /"qn" /l <filename.log> performs a silent upgrade of VMware Tools and creates a log file for the process.

  6. Click OK to start the upgrade process.

  7. For a Linux virtual machine, run the following commands to restore networking:

    /etc/init.d/network stop
    rmmod vmxnet
    modprobe vmxnet
    /etc/init.d/network start
    
  8. After the upgrade has completed, the VMware Tools label on the Summary tab should display a status of OK.

The preceding methods have focused on upgrading a single virtual machine at a time. With the vSphere client, it is also possible to upgrade many virtual machines at the same time. After you have selected a host or cluster, choose the virtual machines to upgrade on the Virtual Machines tab. Right-click on your selection list and select Guest > Install/Upgrade VMware Tools.

Upgrading Virtual Hardware

Once you have migrated your virtual machines to ESXi 4.1 and have no plans to migrate them back to ESX 3.5, you are ready to upgrade the virtual hardware version. Prior to upgrading the hardware version, you should ensure that a backup or snapshot exists for the virtual machine. You should also upgrade VMware Tools prior to this operation, as Windows virtual machines in particular can lose network settings if you upgrade the virtual hardware version before upgrading VMware Tools.

To upgrade a single virtual machine, you can follow this procedure:

  1. Start the vSphere client and connect to your vCenter Server or ESXi host.

  2. Power down the virtual machine.

  3. Select an inventory view that shows the virtual machine. Right-click on the virtual machine and select Upgrade Virtual Hardware. This option is not available if the hardware version is already upgraded.

  4. Power on the virtual machine.

  5. For a Windows guest, log in and confirm that all new devices have been configured automatically. You may be prompted to restart the OS.

The Summary tab for the virtual machine should now show that the hardware version is 7. You can also upgrade the hardware version for multiple virtual machines concurrently. Select a host or cluster to update, and then click the Virtual Machines tab for that object. Follow the preceding steps that were used to update a single virtual machine, this time selecting any number of virtual machines.

Using PowerCLI to Upgrade VMware Tools and the Hardware Version

PowerCLI includes a number of cmdlets that you can use to automate the upgrading of VMware Tools and the hardware version for a virtual machine. In the following example, the ISO image for VMware Tools is first mounted to a virtual machine called SQL01. The upgrade of VMware Tools is started with the cmdlet Update-Tools. After the upgrade has completed, VMware Tools is removed. Lastly, the virtual machine hardware version is updated.

Mount-Tools SQL01
Update-Tools SQL01
Dismount-Tools SQL01
Get-VM SQL01 | Get-View | % { $_.UpgradeVM($null) }

Using vCenter Update Manager to Upgrade VMware Tools and the Hardware Version

The last option for upgrading VMware Tools and the hardware version of your virtual machines is to use vCenter Update Manager. Installation and configuration of Update Manager is discussed further in Chapter 10, “Patching and Updating ESXi.” The following section demonstrates the steps required to use Update Manager to perform these two tasks. As is the case with the other methods, updating the hardware version for a virtual machine requires that you briefly power off and on the virtual machine.

  1. Start the vSphere client and connect to your vCenter Server host.

  2. On the Home screen, select the Update Manager icon.

  3. Select the Baselines and Groups tab and then click the link to View Baselines for VMs/VAs. You should see the predefined baselines VMware Tools Upgrade to Match Host and VM Hardware Upgrade to Match Host.

  4. In the Baselines Groups view, click Create to start the New Baseline Group wizard.

  5. On the Name and Type screen, enter a name for the baseline group and click Next.

  6. On the Upgrades screen, check the baselines VMware Tools Upgrade to Match Host and VM Hardware Upgrade to Match Host. Click Next to proceed.

  7. Click Next on the Patches screen without selecting any defined baselines.

  8. Click Finish on the Ready to Complete screen to finish creating the new baseline group.

  9. Return to the Home screen, and then select VMs and Templates.

  10. Select the vCenter Server object to which you want to apply the new baseline group. This may a datacenter, resource pool, or virtual machine folder.

  11. Select the Update Manager tab and click Attach.

  12. Check the baseline group that you created and click Attach.

  13. Click Scan, and on the Confirm Scan dialog box, check only the VM Hardware Upgrades and VMware Tools Upgrades options. Click Scan on the dialog box to begin the process.

  14. After the scan has completed, the Update Manager tab updates to display the compliance status for the baseline group.

  15. To update virtual machines that are not compliant, click Remediate.

  16. When the Remediate wizard begins, select the baseline group that you created and click Next.

  17. On the Schedule screen, enter a task name. You can update all virtual machines immediately, or you can schedule a suitable time for virtual machines that are powered on, powered off, and suspended, as shown in Figure 5.10. Click Next to continue.

    Scheduling the VMware Tools and virtual hardware upgrade with Update Manager.

    Figure 5.10. Scheduling the VMware Tools and virtual hardware upgrade with Update Manager.

  18. On the Rollback Options screen, configure the snapshot options for the upgrade. Taking a snapshot enables you to roll back the change should a problem arise from the upgrade. Click Next to continue.

  19. Click Finish to complete the wizard and start the upgrade tasks.

    When the tasks begin, any virtual machines that are powered off or suspended are powered on for the process. Any tasks that you schedule to happen in the future will appear in the scheduled tasks list for your vCenter Server host. Once the tasks have completed, you can click Scan on the Update Manager tab again to check the virtual machines for compliance, as described in step 13.

Conclusion

vSphere 4.1 represents a significant step forward, with many new features that enable easier management of your virtual infrastructure. Because ESXi and ESX share feature equality, you can easily incorporate ESXi hosts into your datacenter without making significant changes.

In this chapter, you have seen that the first step to migrating to ESXi 4.1 involves upgrading vCenter Server. Once that step is complete, you can begin to plan how you can migrate your virtual machines from ESX to ESXi. With vMotion, you can migrate to ESXi without imposing downtime on your virtual machines. After you have migrated to ESXi 4.1, you can upgrade your virtual machines to take advantage of the new features in vSphere such as Fault Tolerance and VMDirectPath. As you have seen, PowerCLI can be leveraged to automate a number of tasks that will be a part of your migration to ESXi.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.29.148