VCP4 VMWare Certified Professional Exam Cram: Managing vSphere Resources

Date: Apr 7, 2011

Return to the article

This chapter covers resource management, the single most important component of designing and maintaining your virtual infrastructure, in a VMware Infrastructure 3 environment.

Understanding resource management is the single most important component of designing and maintaining your virtual infrastructure. To properly identify how many virtual machines (VMs) you can load on your ESX/ESXi hosts, you must understand how resource management works. Furthermore, to plan for scalability and high availability, you must thoroughly understand resource management. This chapter covers resource management in a VMware Infrastructure 3 environment.

VM CPU and Memory Management

Understanding how virtual machines address their resources, particularly their CPU and memory resources, is extremely important. As Figure 8.1 illustrates, the three settings that control the VM's CPU and Memory resource management are as follows:

Figure 8.1 Virtual machine resource management.

A virtual machine's vCPUs are always scheduled at the same time. When you're assigning shares, keep in mind the number of vCPUs configured for any given VM. A reservation of 1,000 MHz might be adequate for a VM that has only one vCPU, but a VM of two vCPUs will have to divide these 1,000 MHz into 500 MHz per vCPU, and that might or might not be adequate depending on what this VM's function will be. Similarly, reservation of 1,000 MHz for a VM that has four vCPUs renders each vCPU with 250 MHz, which further diminishes the functionality of the VM.

The Available Memory setting, which is a fourth setting option enabled only for the memory configuration of a VM, is the initial memory that you configure for a VM during its creation. You can always modify this option, after the VM is created. With this in mind, if the Available Memory and Reservation values differ, the VMkernel compensates for this discrepancy by creating a swap file for the difference between the two values. An example of this would be if the Available Memory setting is configured for 2GB and the reservation is set to 1GB; then the VMkernel creates a swap file to compensate for the difference.

When assigning shares to a virtual machine, you have four options: High, Normal, Low, and Custom. Table 8.1 outlines how these settings translate in number of shares for CPU and memory. The values in Table 8.1 are currently valid for resource pools; as for VMs, the values should read High=2000, Normal=1000, and Low=500.

Table 8.1. CPU/Resource Pools CPU and Memory Share Value Calculations

Share Setting

Number of CPU Shares

Number of Memory Shares

High

2000 * # of vCPUs

20 * Available memory

Normal

1000 * # of vCPUs

10 * Available memory

Low

500 * # of vCPUs

5 * Available memory

Custom

Manually specified

Manually specified

Using Resource Pools to Govern CPU/Memory Resources

A resource pool enables you to group virtual machines and apply the same resource policy on them. Resource pools can be created for a single ESX/ESXi host or to a Distributed Resource Scheduler (DRS) cluster to govern the CPU and memory resources. Grouping virtual machines also makes it easier to implement security and delegate administration to other users and groups. You should also know that you can create child resource pools and further compartmentalize VMs.

Resource pools have the same settings as virtual machines; therefore, you can control a resource pool's CPU and memory shares, limits, and reservations. As Figure 8.2 illustrates, a resource pool has an additional expandable reservation option, which allows a child resource pool to tap into the parent resource pool and harness whatever resources are available to satisfy its own shortage. An expandable resource is used only when the resource pool cannot secure enough resources to satisfy its policy.

Figure 8.2 Resource pool properties.

You can view a resource pool's data using either of the following methods:

Cram Quiz

Answer these questions. The answers follow the last question. If you cannot answer these questions correctly, consider reading the section again.

  1. Which setting controls the maximum CPU time measured in MHz that a virtual machine is allowed to use?

    A.

    Limit

    B.

    Reservation

    C.

    Shares

    D.

    Affinity

  2. True or false: If a virtual machine's available memory and its reservation memory setting differ, the VMkernel generates a VM-specific swap file for the difference between the two settings.

    A.

    True

    B.

    False

  3. What is the name given to the topmost resource pool?

    A.

    Resource Pool

    B.

    Default Resource Pool

    C.

    Root Resource Pool

    D.

    Master Resource Pool

  4. True or false: Resource pools can be used with a standalone ESX/ESXi host or a DRS cluster.

    A.

    True

    B.

    False

Cram Quiz Answers

  1. A is correct. Limit is the setting that controls the maximum a CPU can use measured in MHz; therefore, answers B, C, and D are incorrect.

  2. A, True, is correct. When the Available Memory and the Memory Reservation settings differ, the VMkernel generates a swap file for the difference.

  3. C is correct. The Root Resource Pool is the name given to the topmost resource pool; therefore, answers A, B, and D are incorrect.

  4. A, True, is correct. Resource Pools can be created for a single ESX/ESXi host or for a DRS cluster.

vMotion and Storage vMotion

vMotion is probably the most popular and most sought after feature in the VMware infrastructure suite. The vMotion feature allows a running virtual machine to be migrated without interruption from one host to another, provided that some prerequisites are met on the originating and destination hosts.

Storage vMotion, on the other hand, allows you to migrate a VM's data files from one storage location to another without interruption. The vMotion suite collectively allows you to control a VM's host placement and its data file placement at any time for performance or organization purposes without downtime.

vMotion

vMotion is an enterprise-level feature and thereby requires vCenter before it can be enabled. vMotion, as you see later in the section "Distributed Resource Scheduler," is used in conjunction with DRS to make sure VMs are always spread out on the most appropriate host, thereby balancing the resource availability of these hosts.

vMotion Host Prerequisites

With vMotion, for the VM to successfully port from one host to another, the following requirements must be satisfied on the source and destination hosts:

When you initiate a vMotion from one host to another, the wizard that starts the process warns you if there are errors that prevent the migration from completing successfully. The vMotion wizard also provides warnings that you take into account and possibly address after the migration is completed. Warnings do not prevent the vMotion process from completing successfully, whereas errors do. Table 8.2 outlines the different scenarios that might generate an error or a warning.

Table 8.2. vMotion Errors and Warnings

vMotion Errors

vMotion Warnings

A VM is connected to an internal vSwitch on the source host.

A VM is configured for an internal vSwitch but is not connected to it.

A VM has a removable disk such as a CD/DVD-ROM or floppy connected to it.

A VM is configured for a removable CD/DVD-ROM or floppy but is not connected to it.

A VM has CPU affinity assigned.

A VM has a snapshot.

A heartbeat cannot be detected from the VM to be migrated.

Enabling vMotion

To enable vMotion, you need to create a VMkernel port group with vMotion enabled on all ESX/ESXi hosts that will participate in the vMotion process, as shown in Figure 8.3. The virtual switch where this port group is created should bear the same label on all ESX/ESXi hosts. Typically, vMotion is configured on a dedicated virtual switch on all ESX/ESXi hosts.

Figure 8.3 Port group with vMotion enabled.

vMotion also requires that the physical NIC that you choose to service the virtual switch where vMotion is enabled should be a Gigabit or higher.

vMotion CPU Requirements

One of the main obstacles to a successful vMotion migration is the CPU; vMotion requires a strict CPU approach, so keep the following guidelines in mind:

CPU vendors Intel and AMD now offer a technology known as virtualization assist that aids virtualization. Intel has its VT technology, and AMD has its AMD-V technology, both of which are enabled in the BIOS of a computer.

In the presence of these technologies, you can enable the VMs whose operating system supports the virtualization assist technology to improve their performance. To do this, you can right-click the VM in question and click Edit Settings. Click the Options tab, find the Paravirtualization section, and enable it. Figure 8.5 illustrates this process clearly.

Figure 8.5 Enabling Paravirtualization.

The vMotion Stages

Because the virtual machine to be vMotioned resides on a datastore that is visible and accessible to both the source and the destination ESX/ESXi host, the only thing that vMotion needs to do is to copy the VM's memory from one host to another. Because the VM's memory resides on the physical memory of the source host, that memory is what needs to be copied. That being said, the two ways to initiate a vMotion are as follows:

When the vMotion process begins, the four stages that it goes through are as follows:

  1. Once vMotion is initiated, a memory bitmap is created to track the changes, and the process of copying the physical RAM from one host to another begins.
  2. Quiesce the VM and copy the contents of the memory bitmap. Quiesce can be defined in simpler terms as a cut-over. This is the only time at which the VM is unavailable. This is a short period of time that for the most part is transparent to the user.
  3. The virtual machine on the destination host starts and moves all connectivity to it from the source host to the destination host.
  4. The VM is removed from the source host.

During your monitoring of the vMotion process, you might notice that it pauses at 10% completion as part of the identification process.

Storage vMotion

Storage vMotion is the process of migrating all the VM's files from one storage to another while the VM is powered on and without any interruption. Traditional vMotion moves the logical representation of a VM from one ESX/ESXi host to another while it is powered on while keeping the files that constitute this VM in the same storage space. Storage vMotion complements this by allowing you to move the VM files as well thereby contributing to a complete VM migration from one location to another without an interruption in service.

Storage vMotion was introduced in Virtual Infrastructure 3.5 but only at the command-line level; with vSphere 4, you can now do Storage vMotion from a GUI. To initiate a Storage vMotion from the GUI you follow the same steps as you would for a normal vMotion, which is to right-click a VM and select Migrate. The difference is the screen shown in Figure 8.6 has been completely changed with the following options:

Figure 8.6 Migrate Wizard.

The next screen shown in Figure 8.7 prompts you to select the destination datastore where you want to move the files to. It is important to note that with vSphere 4 all protocols are now supported, which means, iSCSI, Fiber Channel, Fiber Channel over Ethernet (FCoE), NFS, and RDMs.

Figure 8.7 Datastore destination.

This brings us to the last step in the Storage vMotion wizard, which is the disk format. While Storage vMotion is primarily used to move VM files from one storage to another you might find this tool useful to change the disk format from Thin to Thick or vice versa. In Figure 8.8, note two options for disk type: Thin and Thick. The important thing to note here is that the reference to Thick is the Eagerzeroedthick, which means that the VMDK will be zeroed, thus thin provisioning will not be possible once this is converted to this type of Thick.

Figure 8.8 Disk format type.

Cram Quiz

Answer these questions. The answers follow the last question. If you cannot answer these questions correctly, consider reading the section again.

  1. Storage vMotion and vMotion can be run simultaneously while_______.

    A.

    The VM is powered on.

    B.

    The VM is powered off.

    C.

    The VM is powered on or off.

    D.

    They cannot be run simultaneously under any circumstance.

  2. Which virtual disk type writes zeros across all the capacity of the virtual disk?

    A.

    Eagerzeroed

    B.

    Eagerzeroedthick

    C.

    Zeroedthick

    D.

    Thick

Cram Quiz Answers

  1. B is correct. You cannot run Storage vMotion and vMotion simultaneously while the VM is powered on. You can run them while the VM is powered off, or you can schedule them to run consecutively.

  2. B is correct. Eagerzeroedthick is the virtual disk type that writes zeroes across the entire capacity of the disk and commits it all, thereby thin provisioning would not be possible. All other types are incorrect.

Distributed Resource Scheduler

Cram Saver

If you can correctly answer these questions before going through this section, save time by skimming the Exam Alerts in this section and then completing the Cram Quiz at the end of the section.

  1. What color is assigned to a DRS cluster that is overcommitted?

    A.

    Red

    B.

    Orange

    C.

    Blue

    D.

    Yellow

  2. How do you configure two VMs so that they are never present on the same host at the same time?

    A.

    Affinity

    B.

    Policy

    C.

    Permissions

    D.

    Anti-Affinity

Answers

  1. D is correct. A DRS cluster that is overcommitted is assigned the color yellow; therefore, answers A, B, and C are incorrect.

  2. D is correct. Configuring an Anti-Affinity rule would be the correct course of action and the correct answer to the question. Affinity rules force VMs to stay together on the same host. Choices B and C are incorrect.

VMware DRS is an enterprise-level feature that uses vMotion to load balance the CPU and memory resources of all ESX/ESXi hosts within a given DRS cluster. DRS is also used to enforce resource policies and respect placement constraints.

DRS functions efficiently using clusters. A cluster is the implicit collection of CPU and memory resources across ESX/ESXi hosts that are members of this cluster to allow for the creation of VMware DRS clusters and VMware High Availability (HA) clusters. A cluster is an object that appears in the vCenter inventory and, like all other objects, can be assigned permissions. It can have a maximum of 32 nodes, or 320 VMs per host, or 3000 VMs per cluster, whichever maximum is reached first.

In other words, you can have 32 hosts in the cluster, but you are then limited to only 93 VMs per host, or you can have 300 VMs on 10 hosts, or 20 hosts with 150 VMs, and so on.

After you add ESX/ESXi hosts as nodes in a DRS cluster, DRS then monitors these ESX/ESXi hosts. If DRS detects high CPU utilization or high memory utilization on a particular host, it uses vMotion to migrate some VMs off the host with resource constraints to a host that is not experiencing resource constraints. DRS constantly plays this role to ensure that all ESX/ESXi hosts never have resource constraints.

DRS Automation Process

The DRS automation process involves initial placement of the virtual machines when they are first powered on and later on dynamically load balancing VMs on the best-suited host that will render the best performance. As shown in Figure 8.9, the automation process options are as follows:

Figure 8.9 DRS cluster automation.

When set to Manual or Partially Automated, DRS recommends VMs that need to be migrated to improve performance and maintain proper load balancing in the cluster. To view these recommendations, you can select the DRS cluster in the vCenter inventory and click the DRS Recommendations tab, as shown in Figure 8.10.

Figure 8.10 DRS recommendations.

If you choose a fully automated load-balancing schedule, you can also control the frequency at which migrations occur. DRS analyzes the VMs and rates them on a five-star basis, with five stars meaning the VM must move from one host to another and one star meaning the VM does not necessarily need to move or, if moved, the change is not significant. Your options are as follows:

DRS automation levels can also be managed on the virtual machine level, where you manually assign the automation level for each VM in the cluster. To configure the automation level based on the VM, right-click the cluster where the VM is a member and go to Edit Settings. On the left pane, select Virtual Machine Options. You then are presented with a list of VMs that are members of this cluster on the right. You can change the automation level manually. Figure 8.11 shows an example.

Figure 8.11 VM level automation.

DRS Cluster Validity

Monitoring a DRS cluster to ensure that there are no errors is critical. A resource pool can be in one of three states: valid, overcommitted, or invalid. A DRS cluster is considered to be valid, functioning, and healthy when the resource availability satisfies all the reservations and supports all running VMs. In the event that a DRS cluster is not considered valid, resource pools notify you that there is a problem by changing the color of the resource pool in the vSphere client as follows:

DRS Rules

DRS enables you to set rules that govern whether VMs can exist on the same ESX/ESXi host at the same time or if they should always be separated and never exist on the same host at the same time. This capability can be useful if you are trying to avoid a single point of failure for a particular VM and want to make sure that the DRS algorithm never places VMs assigned in the rules on the same host. That being said, you can choose to have the VMs on the same host at all times, so if one VM is migrated, the other follows as well. These rules are known as VM-VM Affinity rules and have two options:

The release of vSphere 4.1 introduced a new Affinity rule known as VM-Host Affinity Rules. These rules determine whether groups of VMs can or cannot exist on groups of ESX/ESXi hosts. With these rules, you can build groups of specific VMs and groups of specific ESX/ESXi hosts and then implement Affinity or Anti-Affinity rules. VM-Host affinity rules have the following options:

You can access these rules by right-clicking your cluster and pointing to Edit Settings. You then see the Rules section on the left. Select it and click Add. Figure 8.12 shows an example of how you can set a rule to never allow two VMs to be on the same host at the same time.

Figure 8.12 DRS rules.

VMware EVC

As we have been discussing in this chapter, vMotion has certain CPU requirements that need to be met before a successful live migration of VMs can take place between hosts. Considering OEM server manufacturers constantly upgrade the CPUs that ship with their server models, it can become challenging when you purchase servers at different intervals. At some point, you are bound to have hardware of different CPU families.

VMware Enhanced vMotion Compatibility is similar in function to the NX/XD feature, except it is configured on a cluster basis and affects the hosts in the cluster while the NX/XD feature is implemented on a VM level. When creating an EVC cluster, you are instructing vSphere to find the lowest common denominator between all the hosts' CPUs thereby allowing the highest level of vMotion compatibility.

As you can see in Figure 8.13, creating a VMware EVC cluster is easy. Choose Edit Settings on your existing DRS cluster and select VMware EVC from the left pane. You can then configure the options appropriately.

Figure 8.13 VMware EVC enabled cluster.

Cram Quiz

Answer these questions. The answers follow the last question. If you cannot answer these questions correctly, consider reading the section again.

  1. Which setting is an invalid level when Fully Automated DRS cluster load balancing is selected?

    A.

    Conservative

    B.

    Aggressive

    C.

    Default

    D.

    Low

  2. Which of the following is not a DRS cluster automation level? (Select all that apply.)

    A.

    Manual

    B.

    Semi Manual

    C.

    Fully Automated

    D.

    Semi Automated

  3. How many cluster nodes are supported for each DRS cluster?

    A.

    16

    B.

    24

    C.

    32

    D.

    36

Cram Quiz Answers

  1. D is correct. Low is not a valid frequency level when Fully Automated is selected; therefore, answers A, B, and C are incorrect.

  2. B and D are correct. Semi Manual and Semi Automated are invalid and do not exist. The three levels of automation are Manual, Partially Automated, and Fully Automated; therefore, answers A and C are incorrect.

  3. C is correct. VMware DRS clusters support up to 32 ESX/ESXi hosts or nodes per cluster; therefore, answers A, B, and D are incorrect.

800 East 96th Street, Indianapolis, Indiana 46240

sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |