Section 9.5. Using VirtualCenter to Administer Your Virtual Infrastructure


9.5. Using VirtualCenter to Administer Your Virtual Infrastructure

VirtualCenter is the most versatile and essential administrative tool for managing a virtual infrastructure available today. A single VirtualCenter server deployment enables you to manage hundreds of managed hosts and thousands of virtual machines. Even in the largest deployments, you can easily scale VirtualCenter servers to meet all the administrative needs of your virtual infrastructure. This section outlines the most common administrative tasks you'll need to perform within VirtualCenter to maintain your virtual machines and manage new deployments of virtual machines from templates to cloned VMs. The installation and security of VirtualCenter have already been discussed. This section focuses on provisioning new servers (VMs), customizing templates, managing performance and alarms, and migrating virtual machines between hosts using cold migration and VMotion (hot migrations).

9.5.1. Creating Virtual Machine Groups

We'd like to quickly cover the creation of virtual machine groups. This task is very similar to creating the other organizational components in VirtualCenter. VM Groups can be created within farms or other VM groups. To create a new VM group, simply right-click on a farm or virtual machine group and select New Virtual Machine Group, as shown in Figure 9.48

Figure 9-48. A Popup Menu to Create New Virtual Machine Group


This will create a new virtual machine group that you can name based on the types of VMs it will contain or the function of the VMs in the group. Now would be a good time to set the appropriate permissions for the VM group.

9.5.2. Managing Virtual Machine Groups and Virtual Machines

Once you have created your organizational hierarchy of farm groups, farms, and virtual machine groups, you can now focus on deploying new VMs from templates and clones or building VMs from scratch. You also have the ability to migrate machines with VMotion or move them between physical hosts to satisfy performance needs or to perform maintenance on a managed host. This section covers creating new VMs, cloning VMs, and creating templates. First, let's cover the difference between the three. When creating a new VM, you'll need to specify all the virtual hardware devices and install a guest OS into the VM, unless you build a VM and attach to an existing virtual disk (which will be the example we use in this chapter). Cloning lets you copy an existing virtual machine and customize it. It does require the VM you are cloning to be powered down. Cloning is a great option if you have a standard VM build that meets your needs and you need to make a copy of it for a new VM. You can use the cloning option as long as you can afford your source VM to be powered off temporarily. When you create a template VM, you have the ability to store the template and build a repository of templates that you can use to provision standard server builds without impacting a running VM. This is the downside of cloning.

For example, let's say you just created a Web server VM that is now in production. You installed virus scanning, backup software, IIS, OS patches, and so on. You now decide to clone this virtual machine and use it to create your next Web server.

To clone the VM you will need to power it off. If you had a template of this server, you could create a new Web server without having to power off a production machine. Both options achieve the same goal, but do it in a different way. If you know you'll have to provision a standard Web server on an ongoing basis, it would make sense to create a template of the VM. If you just need to make a copy of a known good VM to create a new server, then cloning is a good option.

The next sections, will cover the following tasks in VirtualCenter:

  • Creating a new virtual machine

  • Cloning an existing virtual machine and customizing the configuration

  • Creating a template for deployment

  • Deploying a virtual machine from a template

9.5.2.1. Creating a New VM in VirtualCenter

The options for creating a new VM in VirtualCenter are very similar to the options you're given for creating a VM using the ESX Server MUI. This section will quickly address the steps of creating a new VM in VirtualCenter. Before creating a new VM with VirtualCenter, you'll need to know the following information:

  • Which ESX Server will host the VM

  • Which virtual machine group will you place the VM in

  • The OS type (it must be on the VMware list of supported VMs.)

  • The name (display name)

  • The number of virtual processors

  • The disk requirements (virtual disk)

  • The amount of memory

  • Which type of virtual NIC and which virtual switch will it use

  • Which type of virtual SCSI adapter will it useBuslogic or LSI Logic

  • Which mode will the disk operate in (persistent, undoable, nonpersistent, append)

Figure 9.49 shows how to initiate creating a new VM in VirtualCenter. There are several ways to start this process. In the example in Figure 9.49, we right-click on the ESX Server named esx-srv01 and select New Virtual Machine from the popup menu.

Figure 9-49. Creating a new VM


On the screen in Figure 9.50 click Next to proceed.

Figure 9-50. The VM Wizard


We'll select custom, as shown in Figure 9.51, and then click Next.

Figure 9-51. Virtual Machine Configuration


When you get to the screen in Figure 9.52, specify the virtual machine group to place the new VM into and click Next.

Figure 9-52. Select the VM Group for the New VM


On the screen in Figure 9.53, select the operating system you'll be installing and click Next.

Figure 9-53. Select the Guest OS for the VM


On the screen in Figure 9.54, specify a name for the new virtual machine and the datastore. We'll be using an existing virtual disk in this example. This will be demonstrated in a few more steps. Click Next.

Figure 9-54. Specify the Name and Datastore for the VM


You must now specify the number of processors. In our example shown in Figure 9.55, we'll select two virtual processors. Click Next to proceed.


Note: You must have the VMware SMP license installed in order to use more than one Virtual CPU in a VM.

Figure 9-55. Processor Configuration


When you get to the screen in Figure 9.56, specify the amount of memory your virtual machine will require.

Figure 9-56. Specify the Memory for the New VM


In Figure 9.57 you have the option to select the default virtual switch and virtual NIC type. In our example we'll select the virtual switch name Network01 and the adapter type vmxnet. We'll also select Connect At Power On. Once you've specified the information, click Next.

Figure 9-57. The Network Configuration


On the screen in Figure 9.58, select the type of virtual SCSI adapter you want to use. The adapter type you choose will depend on the operating system you chose to install. Windows 2003 defaults to LSI Logic, so we'll keep this selection. LSI Logic offers better performance than the Buslogic virtual adapter. Click Next to proceed.

Figure 9-58. Select I/O Adapter Type


In our example, we'll be choosing an existing virtual disk (see Figure 9.59).

Figure 9-59. VM Disk Options


In Figure 9.60, click the Browse button and select the existing virtual disk file to use with our new VM. Click Next.

Figure 9-60. Select an Existing Virtual Disk


The reason we chose this option is because the virtual disk was imported from a GSX server, and we needed to create an ESX Server VM to attach to the virtual disk.

You may also choose to use an existing virtual disk when a template .vmdk file was copied to the VMFS volume, and you need a VM created to power the template VM on to perform updates to the image. On the screen in Figure 9.61, specify the SCSI node and disk mode. We'll use Persistent in our example. Click Next to proceed.

Figure 9-61. Specifying Virtual Device Node and Mode


When you get to the screen in Figure 9.62, click Finish to complete your new VM.

Figure 9-62. Ready to Submit Task


Figure 9.63 shows the status screen our newly created virtual machine.

Figure 9-63. The Newly Created Virtual Machine


In our example, we connected to an existing virtual disk that already contained the Windows 2003 operating system. If you had truly created a VM from scratch, you'd still need to install the guest operating system. If you have an ISO library containing all your installation media, you could change the virtual CD-ROM of the VM to point to the ISO image and install your new OS. Click Edit Properties on the Summary page of the VM, and you'll get the screen shown in Figure 9.64 If you had created a new VM with a blank virtual disk, this would be the option you'd want to choose to install the operating system into the VM. You can install from the physical media, but, trust me, ISO images are much quicker and don't require putting a physical CD-ROM in the ESX Server.

Figure 9-64. Edit the Virtual Hardware for VM


9.5.2.2. Cloning an Existing VM

Cloning enables you to copy an existing virtual machine and customize it. You also can clone a template (50 different ways to achieve the same goal). We'll cover the steps required to clone an existing VM and create a new image that can be deployed immediately. We'll also be using the Guest Customization Wizard to customize an existing Microsoft VM. You'll need to be prepared to answer the following questions during the Clone Wizard:

  • Which ESX Server will host the VM?

  • What is the name of the destination virtual machine group?

  • What is the virtual machine name (display name)?

  • What is the location of the VM's files (VMFSvolume)?

  • What virtual switch will the VM use?

  • How much memory and what resource priority (low, normal, high) should be selected?

  • What is the registration information?

  • What is the name of the computer (Windows computer name)

  • What is the admin password?

  • What is the time zone of the VM?

  • What run-once commands are needed (will any additional commands be needed to run on first logon)?

  • What are the network settings (specify settings or use DHCP)?

  • Will you join a workgroup or domain?

  • What are the OS options (generate a new SID)?

To start the Clone VM Wizard, right-click on an existing VM that is powered off and select Clone, as shown in Figure 9.65


Note: You can copy the cloned VM to any managed host that is part of the same farm. Also, ESX does not support cloning IDE virtual Disk.

Figure 9-65. Selecting Clone from the VM Menu Options


Click Next on the screen shown in Figure 9.66

Figure 9-66. The Clone VM Wizard


Select the destination host of the cloned VM and Click Next (see Figure 9.67).

Figure 9-67. Selecting Host for Cloned Image


Select the Virtual Machine Destination, as shown in Figure 9.68, and click Next.

Figure 9-68. Select Destination Group for cloned VM


On the screen shown in Figure 9.69, specify the name of the cloned server and click Next.

Figure 9-69. Specify the Display Name of a New VM


On the screen shown in Figure 9.70, specify the storage location of the destination host. This may be local storage or a SAN-based VMFS volume. If you'd like the VM to automatically power after it's created, click Automatically Power On then click Next.

Figure 9-70. Selecting the Location of Cloned VM


When you get the screen in Figure 9.71 specify which virtual switch to assign the VM virtual NIC to and click Next.

Figure 9-71. Assign Virtual Switch to Virtual NIC


Figure 9.72 gives you the ability to assign more memory and set the resource priority for the cloned VM. Select your options and click Next.

Figure 9-72. The Assign Resources Screen


If you wish to run the guest customization wizard, select the Start The Guest Customization Wizard button. If you've previously saved the settings from a guest customization wizard, you can also select the Import Customization From An XML File button. We'll run the guest customization wizard, as shown in Figure 9.73

Figure 9-73. The Guest Customization Wizard Screen


When you reach the screen shown in Figure 9.74, click Next.

Figure 9-74. The Guest Customization Wizard Welcome Screen


Designing & Planning…
Using the Guest Customization Wizard

If you plan on using the Guest Customization Wizard when cloning or creating templates for VMs, you'll need to download sysprep 1.1 from the Microsoft Web site and uncompress the file to the following path: c:\program files\vmware\virtual center\resources\windows\sysprep\1.1 (C: meaning the path to your VirtualCenter installation directory).

If you don't download sysprep 1.1, you must download and install the VMware Open Source Components to customize Red Hat Enterprise Linux AS 3.0, Red Hat Advanced Server 2.1, or SUSE LINUX Enterprise Server 8.


On the screen shown in Figure 9.75, specify the name and the organization name that your company uses and click Next.

Figure 9-75. Specify Registration Information for Customization Wizard


When you get to the screen shown in Figure 9.76, type the name of the computer then click Next.

Figure 9-76. Specify the New Name for the Computer You Are Cloning


When you get the screen shown in Figure 9.77, you'll need to specify licensing information or leave it blank if your media does not require a license code. Select the licensing mode then click Next.

Figure 9-77. Windows License information


On the screen shown in Figure 9.78, type the name of the local administrator account for the VM and click Next.

Figure 9-78. The Administrator Password Screen


The screen in Figure 9.79 gives you the option to specify the time zone. In our example we'll select the Pacific time zone. Click Next to proceed.

Figure 9-79. The Time Zone Screen


You also have the option to run additional commands during the first login. We won't specify any additional commands, as shown in Figure 9.80 Click Next to proceed.

Figure 9-80. The Run Once Screen


The screen shown in Figure 9.81 gives you the option to customize network settings. We'll choose the Typical setting for our example. Click Next.

Figure 9-81. The Network Interface Setting Screen


Figure 9.82 shows that you have the option to join a workgroup or domain from the customization wizard. Choose the option that works for you during your deployment. We'll join a workgroup in our example. Finish by clicking Next.

Figure 9-82. The Workgroup or Domain Screen


Figure 9.83 shows that we have the option to generate a new SID (security ID) for the operating system we're cloning. Choose this option unless you plan on running another SID creation utility. Click Next.

Figure 9-83. The Operating Systems Options Screen


When you get to the screen shown in Figure 9.84, you can choose whether to save the customization settings. This setting will allow you to use the options you specified again without having to redo everything. We'll save the settings and click Next.

Figure 9-84. Save the Customization Settings


We've now completed the Guest Customization Wizard. On the screen shown in Figure 9.85, click Finish.

Figure 9-85. Complete the Guest Customization Wizard


Now that the Guest Customization Wizard is complete, we can now complete the Clone Wizard by also clicking Finish (see Figure 9.86).

Figure 9-86. Completing the Clone Wizard


Figure 9.87 shows the progress of the clone task we initiated in our example. You can monitor the progress from the Tasks panel of the machine that you're cloning.

Figure 9-87. The Cloning Process Status


Figure 9.88 shows the completed cloned VM, which now resides in the Templates virtual machine group. The VM we cloned is now available for production use, or we can create a template from it.

Figure 9-88. Cloned Image Completed


9.5.2.3. Creating a Template

This section covers the process of creating a template in VirtualCenter. To create a template you'll need a base image to create a template from. The VM that we'll use for template creation will need to be powered off during the process. In this example, we'll create a template from a recently cloned VM. You'll need to be prepared to answer the prompts shown in Table 9.4 while running the Template Creation Wizard.

Table 9-4. New Template Wizard Prompts

New Template Wizard Prompts

Possible Values

Source Virtual Machine

A VM in the VC inventory or a VM stored on the local file system of the VC server.

Virtual Machine

Specify which VM to create the template from.

Template Name

Specify a name for the template. Make sure you've created a naming standard for your VC objects.

Location of Template Files

You can choose the VC server (upload directory) or a datastore. If you select datastore, you'll be prompted for the location to place the files.

Template's Location

If you select datastore as the location for the template you'll need to specify which datastore to use.



Note: If you plan to use an upload directory make sure you've specified this in the VMware VirtualCenter Settings shown in Figure 9.89 This option is accessible from the File Menu in the VirtualCenter client.

Figure 9-89. Specify the Templates Upload Directory in VirtualCenter Settings Box


To create a new template, click Templates on the navigation bar in the VC Client, as shown in Figure 9.90

Figure 9-90. The Templates Navigation Button


In the information panel, right-click and choose New Template (see Figure 9.91).

Figure 9-91. Right-Click to Create New Template


You'll need to click Next on the screen shown in Figure 9.92

Figure 9-92. The New Template Wizard Welcome Screen


We'll be creating a template from a VM in the VirtualCenter Inventory, so we must select the option shown in Figure 9.93

Figure 9-93. Specify the Source of the VM for the Template to Use


On the screen shown in Figure 9.94, select the VM that you'll create the template from and click Next.

Figure 9-94. Select the Base Image to Create the Template From


On the screen shown in Figure 9.95, specify a name for the new template and click Next.

Figure 9-95. Specify the Name of the Template


On the screen shown in Figure 9.96, select where you want to store your template. For example, we'll select On A Datastore. Then click Next.

Figure 9-96. Specifying Where to Store the Template


On the screen shown in Figure 9.97, select the datastore location to store the template, then click Next.

Figure 9-97. Specify the Template Location


On the screen shown in Figure 9.98, click Finish to complete the New Template Wizard.

Figure 9-98. The Template Wizard Is Complete


Figure 9.99 shows that the template is unavailable while it's being created.

Figure 9-99. Template Is Unavailable y


Figure 9.100 shows the progress of the template creations process.

Figure 9-100. The Task Pane of the Source VM During Template Creation


9.5.2.4. Deploying the New VM from the Template

Once you've have created your standard VM templates, you can now provision new servers within several hours instead of days and weeks. This section covers the steps of creating a new VM from a template. To deploy a new VM from template, click on the Templates button on the navigation bar and then select the template you wish to deploy the new VM from. Right-click it, as shown in Figure 9.101

Figure 9-101. Deploying a VM from a Template


On the screen shown in Figure 9.102 click Next to continue.

Figure 9-102. The VirtualCenter Deployment Template Wizard


Specify the name of the new VM you'll deploy. In our example shown in Figure 9.103, the VM name is server-08. Click Next.

Figure 9-103. Specify the Name of the VM


On the screen shown in Figure 9.104, specify the destination virtual machine group and click Next.

Figure 9-104. Specify the Destination of the VM


On the screen shown in Figure 9.105, select the destination host for the new VM, then click Next.

Figure 9-105. Select the Destination Host for the New VM


On the screen shown in Figure 9.106, specify the location for the new VM's virtual disk files and check Automatically Power On after it's created. Afterward, click Next.

Figure 9-106. Specify the Destination VMFS Volume of the VM


On the screen shown in Figure 9.107, select the virtual switch you want your new VM to use and then click Next.

Figure 9-107. Assign a Virtual NIC to a Virtual Switch


On the screen shown in Figure 9.108, assign the required resources and click Next.

Figure 9-108. The Assign Resources Screen


On the screen shown in Figure 9.109, we'll import customizations from an XML file. When finished, click Next.

Figure 9-109. Import Customizations from an XML File


On the screen shown in Figure 9.110, click Finish to complete the Deployment Wizard.

Figure 9-110. Import Customizations from an XML File


Figure 9.111 shows the progress of the new VM deployment.

Figure 9-111. The Progress of the VM Deployment from a Template


9.5.3. Migrating Virtual Machines

VirtualCenter enables you to move VMs from one host to another. You can perform a cold migration (VM is powered down) or you can perform a hot migration with VMotion (VM is powered on). If you choose to migrate a VM that is powered down, a cold migration is performed automatically. If the VM is powered on and you have enabled VMotion on both hosts, you'll be able to migrate the VM while it is still powered on by using VMotion technology. You'll also need to ensure that you meet the requirements to perform a VMotion migration and have installed the necessary licenses.

9.5.3.1. Hot migration (VMotion)

This section covers the requirements for VMotion and the steps you must perform in order to migrate with VMotion. Figure 9.112 diagrams the requirements.

Figure 9-112. A Diagram of VMotion Requirements


The following requirements must be met in order for VMotion to succeed:

  • The VMotion module must be activated.

  • VMs can be migrated to only managed hosts within the same farm.

  • The managed hosts must be configured to use the same SAN infrastructure.

  • The source and target managed host must be configured for a single VMFS volume.

  • The virtual disk of the virtual machine must be accessible by both source and target hosts.

  • The configuration files for the VM must not reside on a shared VMFS datastore.

  • The shared VMFS volume access mode setting should be set to public.

  • Both the source and target managed hosts must have the same CPU types.

  • VMotion requires a private gigabit backbone for VMotion migrations between all participating managed hosts.

  • VMotion does not currently support clustered applications, raw disks, or undoable disks.

  • The virtual switch names must be named identically for migrated VMs.

  • The managed hosts should all use VMFS volume names, and the VMs should use these volume names to specify the path to the virtual disk.

  • To start the migration of a running VM, right-click the VM and select Migrate (see Figure 9.113).

Figure 9-113. Start the Migration of a Running VM


After you click Migrate click Next on the screen presented in Figure 9.114

Figure 9-114. The VM Migration Screen


In Figure 9.115 select the destination host for the virtual machine. If you have more than one available host that meets the VMotion requirements, they should all show up in this screen.

Figure 9-115. Select the Destination Host for the Migration


On the screen shown in Figure 9.116, you need to choose which priority you want for the migration. High priority will not succeed if there are not enough available resources. This won't affect the running VM; it just won't be migrated at that time. High priority ensures that there's no drop in connectivity during the migration. With the low-priority option you may experience a brief loss of connectivity during the migration.

Figure 9-116. Specify the Migration Priority


Once you've selected the destination host and migration priority, click Finish on the screen shown in Figure 9.117

Figure 9-117. The Final Screen of the VM Migration Wizard


Figure 9.118 shows the progress of the VMotion migration for the VM named server-05.

Figure 9-118. The Progress of VMotion


9.5.3.2. Cold Migration (Migrating Powered Down VMs without VMotion)

If you need to move a virtual machine from one host to another for maintenance or to alleviate resource contention, you can perform a cold migration as long as the VM is powered off. This section shows you the quick steps for performing a cold migration with VirtualCenter. You also have the option to migrate a VM using the Scheduled Tasks option of VirtualCenter. This will be discussed later in the chapter. To manually migrate a VM, right-click the VM from the inventory view and select Migrate. Then click Next on the screen shown in Figure 9.119

Figure 9-119. The VM Migration Wizard (Cold Migration)


Specify the destination host for your VM and click Next (see Figure 9.120).


Note: The destination host must be part of the same farm.

Figure 9-120. Specify the Destination of the Migrated VM


When you get to the screen shown in Figure 9.121, specify the target location on the destination host and click Next.

Figure 9-121. Specify the Target Location on the Destination Host


On the screen shown in Figure 9.122, click Finish to end the wizard and start the migration process.

Figure 9-122. The Final Screen of the Migration Wizard


9.5.3.3. Working with the VM Console in VirtualCenter

VirtualCenter enables you to view the VM console just as if you were standing at a physical server with a keyboard video and mouse attached. Figure 9.123 is the console screen you get when you click on the Console tab of a VM in VirtualCenter.

Figure 9-123. VirtualCenter Console Screen on Console Tab


You can also right-click a VM object and select Open Console, and you'll get a screen like the one shown in Figure 9.124

Figure 9-124. VirtualCenter Console Stand-Alone


If you click on the Edit menu and select properties, you'll see the menu shown in Figure 9.125 From the properties screen you can connect and disconnect the network interface, change the virtual switch and connect or disconnect the virtual floppy or CD-ROM. When the VM is powered off you can also add new virtual hardware, change memory settings, change the number of CPU's (if VMware SMP is installed), modify the disk mode, modify SCSI bus sharing, modify resource settings and change power options for the VM.

Figure 9-125. VM Console Properties


9.5.4. Monitoring Resources and Managing Performance through VirtualCenter

VirtualCenter enables you to monitor resources at all levels within the VirtualCenter Hierarchy. Figure 9.126 shows the default alarms that are set at the Server Farms level in the hierarchy.

Figure 9-126. The Default Alarms at the Server Farms Level of the Hierarchy


9.5.4.1. Host Alarms

You can create custom alarms for host and VMs. Table 9.5 shows the alarms you can create for hosts and which resources you can monitor. You can create alarms only for managed hosts at the Farm Group, Farm, or host levels in the hierarchy.

Table 9-5. Host Alarm Options in VirtualCenter

Host Alarm Trigger

Condition Type

Options for Yellow or Red Status

Host CPU Usage

Is above or below a target percentage

Options are presented from 5 percent to 100 percent. You can also type in your own percentage to monitor for.

Host Memory Usage

Is above or below a target percentage

Options are presented from 5 percent to 100 percent. You can also type in your own percentage to monitor for.

Host State

Is or is not

The following state conditions can be monitored: Connecting Disconnecting Reconnecting Removing Shutting down… Connected Disconnected


9.5.4.2. Host Alarm Actions

You can configure actions to occur when the status of an alarm changes from green to yellow or from yellow to red. You also have the ability to perform actions when an alarm returns to a less critical condition such as red to yellow or yellow to green. When an alarm is triggered on a host, you can perform the following actions:

  • Send a notification e-mail

  • Send a notification trap

  • Run a script

9.5.4.3. VM Alarms

VirtualCenter enables you to monitor VMs from all levels in the VC hierarchy. You can create alarms for VMs at the Farm Group, Farm, Virtual Machine Group and VM levels in the hierarchy. Table 9.6 shows you the conditions you can monitor at the VM level. The only difference between the VM alarms and host alarms is the addition of the VM Heartbeat alarm and the actions you can perform on VMs. Each time you create a new virtual machine group, three default alarms are created with default triggers and actions. They can't be removed, but you can create custom alarms with their own triggers and actions.

Table 9-6. VM Alarm Options in VirtualCenter

VM Alarm Trigger

Condition Type

Options for Yellow or Red Status

VM CPU Usage

Is above or below a target percentage

Options presented are from 5 percent to 100 percent. You can also type in your own percentage to monitor for.

VM Memory Usag

Is above or below a target percentage

Options presented are from 5 percent to 100 percent. You can also type in your own percentage to monitor for.

VM Heartbeat

Is above or below a target percentage

Options presented are from 5 percent to 100 percent. You can also type in your own percentage to monitor for. The heartbeat monitor is opposite what you would look for with CPU or memory. When the heartbeat falls below a certain percentage, the alarm is triggered.

VM State

Is or is not

The following state conditions can be monitored: Connecting Disconnecting Reconnecting Removing Shutting down… Connected Disconnected


9.5.4.4. VM Alarm Actions

You can configure actions to occur when the status of an alarm changes from green to yellow or from yellow to red. You also have the ability to perform actions when alarms return to less critical conditions such as red to yellow or yellow to green. When an alarm is triggered on a VM, you can perform the following actions:

  • Send a notification e-mail

  • Send a notification trap

  • Run a script

  • Suspend the virtual machine

  • Power off the virtual machine

  • Reset the virtual machine

Figure 9.127 shows the configuration screen for Alarm properties and the actions you can perform on VMs.

Figure 9-127. Alarm Properties


9.5.4.5. Creating a New Host Alarm

This is an example that shows how to create a host alarm and specify triggers and actions. There are several ways to create a new alarm; we chose to right-click on the Farm object, as shown in Figure 9.128

Figure 9-128. The New Host Alarm


You must specify a name for the alarm shown in Figure 9.129

Figure 9-129. Specify a Name for the Alarm


On the Triggers tab, we'll specify the alarm triggers for the alarm shown in Figure 9.130 Click on the Add button to add additional triggers to the Alarm.

Figure 9-130. The Host Alarm Triggers


And finally we want to specify an action for the alarm shown in Figure 9.131 The action we chose was to send a notification e-mail. We also selected this action to be taken when the alarm changes from green to yellow and yellow to red.

Figure 9-131. The Host Alarm Actions


9.5.4.6. Reviewing Events

Whenever an alarm is triggered for a managed object, the icon of the group or managed object where the alarm occurred will change to show that an alarm has just been triggered. An example is shown in Figure 9.132 This is the trail of bits and bites that lead to the offending managed object.

Figure 9-132. Alarm Occurred in the Hierarchy


Click on the Alarms tab to view which alarm was triggered on the object, as shown in Figure 9.133

Figure 9-133. The Alarms Tab for a VM


For more detailed information, click on the Events tab in the information panel (see Figure 9.134).

Figure 9-134. The VM Events Tab


You can also view global events for all managed objects that are part of VirtualCenter by clicking on the Events button on the navigation bar show in Figure 9.135 You have the option to filter events and also sort by column to format the event data. If you want to export the data, click on the Export Events button. You can filter on the "Type" of event that can be info, error, or warning. You can also filter on the Target of the specific event.

Figure 9-135. Global Events in the Virtual Center


9.5.4.7. Viewing Performance Data and Configuring Resource Allocations

If you are consistently receiving alarms because of high CPU or memory utilization or you need to adjust your resource allocations to ensure adequate performance of your VMs, you can adjust the CPU, DISK I/O, and memory shares as well as enable network packet shaping by right clicking on the managed host in VirtualCenter and selecting Edit Virtual Machine Resources from the popup menu. You'll end up with the screen in Figure 9.136 From here you can adjust the Shares Value, set Min%, and Max% settings and enable packet shaping to guarantee bandwidth is distributed appropriately for your VMs. This will allow you to fine-tune your virtual machines and ensure that resources are allocated as needed. Shares and Min%/Max% on resources will be covered in greater detail toward the end of the chapter.

Figure 9-136. The Virtual Machine Resource Allocations Screen


9.5.4.7.1. Viewing Performance Data for Hosts and VMs

You can use the VirtualCenter Client to view host and VM performance statistics for the following resources:

  • CPU

  • Memory

  • Disk I/O

  • Network I/O

VirtualCenter Collects performance statistics that are sampled and averaged over specified intervals. The defaults are shown in Figure 9.137 The statistics are sampled and averaged for the day, week, month, and year. Having a historical record of performance will allow you to see trends in resource requirements and help you to plan for the future needs of the virtual infrastructure.

Figure 9-137. The Default Data Collection Intervals in VirtualCenter


Figure 9.138 shows the performance tab of the Center-01 farm in VirtualCenter. It provides a high level overview of the current performance statistics for each managed host that belongs to the farm.

Figure 9-138. The Performance Tab from the Center-01 Farm Showing Managed Host Performance Statistics


When we click on a the esx-srv01 host from Figure 9.138, we get a screen like the one shown in Figure 9.139, which shows a more granular view of the performance statistics. From this screen we can view the charts for CPU, memory, disk I/O, and network I/O. We can also specify the range we would like to see results for: a day, week, month, or year. The example in Figure 9.139 shows the network I/O statistics for the past week. The network I/O is broken down by reads, writes, and total average bandwidth for the week. You can also see Event indicators at the bottom of the screen. This allows you to tell if some specific event occurred around the same time there was a peak in network traffic. This same concept applies to CPU, memory, and Disk I/O. If there is a peak in resource utilization, you can check to see if there was an event that occurred at the same time or if resources were being consumed by VMs during normal operations.

Figure 9-139. The Network I/O Performance View


Figure 9.140 shows the Disk I/O performance statistics for the week. To evaluate if there is a bottleneck with Disk I/O, you must know the peak performance capabilities of the hardware that makes up your disk subsystem. For example, a QLogic QLA2342 Fibre channel HBA installed in a 64-bit 133-MHz PCI-X bus in full-duplex mode can achieve up to 400MBps. As long as your Disk I/O is not consistently utilizing more that 90% of the available bandwidth, then Disk I/O is not the issue.

Figure 9-140. Disk I/O Performance Screen


9.5.5. Scheduled Tasks in VirtualCenter

Within VirtualCenter you have the ability to automate tasks through the Scheduled Tasks option shown in Figure 9.141 VirtualCenter also enables you to create scheduled tasks from the tasks listed in Table 9.8.

Figure 9-141. The Scheduled Tasks Button


Table 9-8. Tasks That Can Be Scheduled

Scheduled Task

Deploy a virtual machine from a template

Clone an existing virtual machine

Change the power status of a virtual machine

Migrate a virtual machine

Migrate a virtual machine with VMotion

Change the resource settings of a virtual machine


These tasks can be set to happen immediately or scheduled to occur at a specific time. This is an excellent option for scheduling and automating change in the virtual infrastructure. For example, let's assume you've noticed performance degradation on one of your ESX Servers and have identified several VMs that could be VMotioned to another managed host in the same farm. You could schedule the Migrate a virtual machine with VMotion task to occur in the evening. You could schedule the task to occur at different times to allow adequate time for each VMotion to occur. It's similar to failing over a cluster, but better.




Virtualization With VMware ESX Server
Configuring VMware ESX Server 2.5 (Vol 1)
ISBN: 1597490199
EAN: 2147483647
Year: 2005
Pages: 173

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net