Reader small image

You're reading from  VMware vSphere 6.x Datacenter Design Cookbook - Second Edition

Product typeBook
Published inJun 2016
PublisherPackt
ISBN-139781785283468
Edition2nd Edition
Tools
Right arrow
Authors (2):
Hersey Cartwright
Hersey Cartwright
author image
Hersey Cartwright

Hersey Cartwright has worked in the technology industry since 1996 in many roles, from help desk support to IT management. He first started working with VMware technologies in 2006. He is currently a Solutions Engineer for VMware, where he designs, sells, and supports VMware software-defined datacenter products in enterprise environments within the healthcare industry. He has experience working with a wide variety of server, storage, and network platforms.
Read more about Hersey Cartwright

kim bottu
kim bottu
author image
kim bottu

Since 2012 Kim Bottu has been the EMEA Virtualization Engineer for an international Biglaw firm where he focuses mainly on virtual datacenter performance optimization and virtual datacenter design. Kim holds the following certifications and honors: VCA-NV, VCP5-DCV, VCP6-DCV, VCAP5-DCD and has been named vExpert 2016. Kim can be reached at www.vMusketeers.com.
Read more about kim bottu

View More author details
Right arrow

Chapter 9. Virtual Machine Design

In this chapter, we will cover the following topics:

  • Right-sizing virtual machines

  • Enabling CPU Hot Add and Memory Hot Plug

  • Using paravirtualized VM hardware

  • Creating virtual machine templates

  • Upgrading and installing VMware Tools

  • Upgrading VM virtual hardware

  • Using vApps to organize virtualized applications

  • Using VM affinity and anti-affinity rules

  • Using a VM to host affinity and anti-affinity rules

  • Converting physical servers with vCenter Converter Standalone

Introduction


Virtual machine (VM) design is just as important as physical hardware design and should be part of the physical design process. Correctly designing and configuring virtual machines with proper resource allocation will help increase consolidation in the virtual environment and ensure that a virtual machine has access to the resources that it requires in order to run the workloads efficiently.

A few questions that should be answered as part of the virtual machine design are as follows:

  • What resources will be assigned to individual virtual machines?

  • What virtual hardware will be allocated to virtual machines?

  • How will new virtual machines be deployed?

  • How will multiple virtual machines supporting an application be grouped based on dependencies?

  • How will virtual machines be placed on host resources in order to ensure the efficient use of resources and availability?

  • How will physical servers be converted to virtual machines?

This chapter will cover right-sizing virtual machines to ensure...

Right-sizing virtual machines


Right-sizing a virtual machine means allocating the correct amount of CPU, memory, and storage resources required to support a virtual machine's workload. Optimal performance of the virtual machine and efficient use of the underlying hardware are both obtained through right-sizing virtual machine resources.

In a physical server environment, it is difficult to add resources. Because of this, physical servers are often configured with more resources than actually required in order to ensure that there are sufficient resources available if the need for resources increases. Typically, physical servers only use a small percentage of the resources available to them; this means that a great deal of resources are constantly kept idle or wasted. Adding resources to a physical server also typically requires the server to be powered off and, possibly, even removed from the rack, which takes even more time and impacts the production.

In a virtual environment, it becomes much...

Enabling CPU Hot Add and Memory Hot Plug


Adding CPU and memory resources to a virtual machine is a simple process. The process of adding resources to a virtual machine is to power down the virtual machine, increase the number of vCPUs or the amount of memory, and power on the virtual machine again.

In vSphere 4.0, two new features, CPU Hot Add and Memory Hot Plug, were introduced to allow virtual machine vCPUs and the virtual machine memory to be increased without requiring the virtual machine to be powered off. CPU Hot Add and Memory Hot Plug must first be enabled on the virtual machine, which requires it to be powered off. Once enabled, however, CPU and memory resources may be added dynamically; powering off the virtual machine is not necessary.

How to do it…

Perform the following steps to enable vCPU Hot Add and Memory Hot Plug for virtual machines:

  1. Check the VMware Guest OS Compatibility Guide, which can be found at http://partnerweb.vmware.com/comp_guide2/pdf/VMware_GOS_Compatibility_Guide...

Using paravirtualized VM hardware


Paravirtualization provides a direct communication path between the guest OS within the virtual machine and the ESXi hypervisor. Paravirtualized virtual hardware and the corresponding drivers installed with VMware Tools are optimized to provide improved performance and efficiency. This hardware includes the VMXNET network adapter and the PVSCSI storage adapter.

How to do it…

Adding paravirtualized hardware adapters to a virtual machine is done using the following steps:

  1. Access the Guest OS compatibility section of the VMware HCL at http://www.vmware.com/go/hcl in order to determine the guest OS support for paravirtual adapters. A screenshot of the Guest OS compatibility HCL with the Networking and Storage adapters in highlighted red boxes is shown in the following screenshot:

  2. Install VMware Tools in the virtual machine.

  3. To install the paravirtualized network adapter, edit the virtual machines' Virtual Hardware, add New Network adapter, and select VMXNET3 for...

Creating virtual machine templates


Virtual machines can be deployed quickly from prebuilt templates. Virtual machine templates are configured with minimum CPU, memory, and storage resources. The guest operating system and any prerequisite applications are installed in the template. Instead of taking hours (or even days in some cases) to install the operating system and prepare the server, once a template has been created, a new virtual machine can be deployed within minutes. Virtual machine templates not only allow for quick deployment, but they also help maintain consistency across virtual machines deployed in the environment.

How to do it…

The following steps are required in order to create a virtual machine template:

  1. Create a virtual machine; configure the vCPU, memory, and storage resources; install the guest operating system; install the required applications; and apply any application or operating system updates or patches.

  2. The virtual machine can be cloned to a template using the Clone...

Upgrading and installing VMware Tools


VMware Tools enhances performance and improves the management of virtual machines by loading optimized drivers for virtual hardware and installing utilities to access virtual machine configurations and metrics. VMware Tools is not required, but for optimal virtual machine performance, it should be installed on all virtual machines in the environment. The status of VMware Tools is displayed on the virtual machines Summary page, as shown in the following screenshot:

The drivers for the optimized paravirtual hardware, such as the VMXNET3 adapter and the PVSCSI adapter, are included in VMware Tools, and VMware Tools must be installed before the hardware is available for use with in the guest. VMware Tools should be installed and kept up to date on every guest operating system.

How to do it…

There are multiple options available for the upgrading of VMware Tools:

  1. If VMware Tools is out of date, a warning is displayed in the vSphere Client, and VMware Tools can...

Upgrading VM virtual hardware


The virtual machine hardware version or virtual machine compatibility specifies the version of virtual machine hardware presented to the virtual machines and the ESXi versions that the virtual machine is then compatible to run on. Updating the virtual machine hardware exposes new features available to virtual machines—for example, the ability to provision vmdks up to 62 TB—and ensures that the virtual hardware is optimized to the version of ESXi.

How to do it…

To upgrade the virtual hardware of a virtual machine, perform the following steps:

  1. Install or update VMware Tools in the virtual machine.

  2. Edit the settings of a virtual machine and access the Virtual Hardware tab.

  3. If a virtual hardware upgrade is available, the Upgrade option will be available. Select Schedule VM Compatibility Upgrade, as shown in the following screenshot:

  4. Set the compatibility level the virtual hardware should be upgraded to, as shown here:

  5. Shut down and power on the virtual machine to upgrade...

Using vApps to organize virtualized applications


vApps can be used to group individual virtual machines with interdependencies into a single application. A common use case for this would be a multitier web application that requires a web server frontend, an application server, and a supporting database server. The application can then be managed as a single inventory object.

How to do it…

The following steps can to be performed to use vApps to organize virtual machine workloads:

  1. Create a new vApp by launching the New vApp wizard, as shown in the following screenshot:

  2. The method to create the vApp (either creating a new vApp or cloning an existing vApp), the vApp name, the folder location, and the resource allocation settings are configured in the New vApp wizard, as shown in the following screenshot:

  3. Once the vApp has been created, you can add virtual machines to the new vApp by dragging them into the vApp. The following screenshot shows a vApp containing the Prod1 and Prod2 virtual machines...

Using VM affinity and anti-affinity rules


When virtual machines are powered on in a DRS cluster, vCenter determines where the virtual machines should be placed in order to balance resource usage across the cluster. The DRS scheduler runs periodically to migrate virtual machines using vMotion in order to maintain a balance of resource usage across the cluster. Affinity or anti-affinity rules can be used to control where VMs are placed within a cluster. Affinity rules keep VMs on the same physical host, reducing the load on the physical network by keeping traffic between them from leaving the host. Anti-affinity rules keep VMs separated on different physical hosts, ensuring higher availability.

One case of an affinity rule would be to keep all of the virtual machines supporting an application on the same host. This would ensure that network communications between the virtual machines supporting the application do not traverse the physical network.

An example use case of an anti-affinity rule...

Using a VM to host affinity and anti-affinity rules


Virtual Machine to Hosts rules can be created to keep virtual machines on or off specific hosts or groups of hosts. These types of DRS rules are useful in order to keep management virtual machines, such as vCenter Server, on specific hosts to make these virtual machines easier to locate in the event of a failure. This also allows virtual machines to be separated across different hosts in a rack or blade chassis in order to ensure that the loss of a rack or chassis does not impact all virtual machines, for example, to split members of a Microsoft SQL always on availability group across chassis.

How to do it…

The following process is used to create Virtual Machine to Hosts affinity or anti-affinity rules:

  1. From the cluster Settings page, access the VM/Host Groups section to manage virtual machine and host groups, as shown in the following screenshot:

  2. Select Add to create a new host group and select hosts to add to the group, as shown in the following...

Converting physical servers with vCenter Converter Standalone


There are two methods to virtualize workloads running on physical servers. The workloads can be migrated into the virtual environment by creating new virtual machines, loading a guest operating system, installing applications, and migrating the application data to the new virtual machines; or, physical servers can directly be converted to virtual machines using VMware vCenter Converter Standalone.

How to do it…

The following steps are required to use VMware vCenter Converter Standalone:

  1. Download VMware Converter from http://www.vmware.com/web/vmware/downloads.

    VMware Converter can be installed either as a local installation or as a client-server installation. More information on installing VMware Converter is available in the VMware vCenter Converter Standalone guide, which can be found at http://www.vmware.com/support/pubs/converter_pubs.html.

    Note

    The local installation is used to convert the physical machine that the converter is...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
VMware vSphere 6.x Datacenter Design Cookbook - Second Edition
Published in: Jun 2016Publisher: PacktISBN-13: 9781785283468
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Hersey Cartwright

Hersey Cartwright has worked in the technology industry since 1996 in many roles, from help desk support to IT management. He first started working with VMware technologies in 2006. He is currently a Solutions Engineer for VMware, where he designs, sells, and supports VMware software-defined datacenter products in enterprise environments within the healthcare industry. He has experience working with a wide variety of server, storage, and network platforms.
Read more about Hersey Cartwright

author image
kim bottu

Since 2012 Kim Bottu has been the EMEA Virtualization Engineer for an international Biglaw firm where he focuses mainly on virtual datacenter performance optimization and virtual datacenter design. Kim holds the following certifications and honors: VCA-NV, VCP5-DCV, VCP6-DCV, VCAP5-DCD and has been named vExpert 2016. Kim can be reached at www.vMusketeers.com.
Read more about kim bottu