VCP 4 Prep Objective 5.2 – Manage Virtual Machines

Objective 5.2 – Manage Virtual Machines

Configure / Modify Virtual Machines

Adding or hot adding VM hardware

Certain devices can be changed whilst a virtual machine is powered on e.g. you can insert CDROMS, floppies and change network connectivity i.e. the switch port, VLAN etc.

Other devices such as hard disks can be hot added; this is supported by most operating systems.

CPU and RAM can be hot added if te virtual machine operating system is Windows Server 2003 enterprise or datacenter, Windows Server 2008 (all editions). One other requirement is the Virtual Machine hardware must be version 7.

Growing VM disks

Growing a virtual disk is an online operation; Windows Server 2008 supports growing system disks NOTE: you cannot shrink virtual hard disks in this way.

Determine appropriate disk format

Disk formats can be thin, thick (eager zerod and lazy zerod). Thin provisioned disks are subject to fragmentation; the only way to defragment these disk formats is to stroage  vMotion the vmdk to another VMFS.  If you’re considering fault tolerance or clustering for a virtual machine then the disk format must be thick (eagerzerod).

Connecting VMs to devices

Parallel or serial devices will anchor a virtual machine to a specific host; this will negate DRS and vMotion functionality. It is possible for mounted CDROMs and floppies to have the same affect unless they’re mounted from a shared volume.

Configuring VM options

General options

The general options allows for name changes i.e. the virtual machine label not the guest operating system host name and virtual machine guest operating system changes i.e. the actual operating system of the virtual machine. NOTE: the virtual machine will need to be powered off to perform the latter.

Advanced options

Virtual machine configuration parameters can be added e.g. you may wish to specify a maximum amount of RAM the balloon driver can reclaim (sched.mem.maxmemctl).

CPUID mask: This allows you to configure what processor instructions are exposed or hidden from the guest operating system; this is useful when configuring vMotion between dissimilar processors.

Boot options: This configuration allows you to specify how long a virtual machine should wait before booting; this is useful if you have other virtual machines which are a dependency of the said virtual machine e.g. you require the virtual machines which are dependancies to be ready to serve requests before your depend server finishes booting.

Force BIOS: This option forces (funnily enough) the virtual machine to enter the BIOS at next boot / restart; helpful of you continually miss F2 because the console window doesn’t respond quick enough.

Paravirtualisation: In this scenario the guest operating system is aware it is running on a virtual platform; this can have performance benefits.

Fibre Channel NPIV: This allows virtual WWPNs to be assigned to a guest which uses RDMs.

Swapfile location: By default this lives with the virtual machine files on the VMFS but you can configure swap files to live on dedicated storage.

Power management options

This allows you to configure how the virtual machine will respond when the guest goes into standby; guests which go into standby can be configured to suspend the virtual machine or go into standby leaving the virtual machine powered on. If the latter is chosen you should tick the Wake on LAN option for the virtual machines network adapter.

VMware tools options

If VMware Tools is installed the power options for a virtual machine are altered; the power off button will gracefully shutdown the guest operating system.

Configure the appropriate virtual machine resource settings

The CPU and memory resources can be configured with shares, reservations and limits.

Shares: Shares come into play when resources are contended. By default shares are assigned as low, normal or high; a virtual machine assigned a high number of shares would be entitled to four times as many cpu cycles or memory pages as a virtual machine assigned a low number of shares.

Reservations: CPU reservations guarantee x cpu cycles per second e.g. a 256Mhz reservation guarantees 256 million cpu cycles per second. NOTE: reserving twenty four virtual machines 256Mhz each would reserve 6Ghz of CPU, so if your vSphere host has 6Ghz of CPU then you’ve effectively consumed 100% CPU without actually using that amount of CPU. Memory resevations guarantee x number of memory pages to exist in real RAM.

Limits: CPU limits define the number of cpu cycles per second that an virtual machine can use e.g. a 500Mhz limit would effectively entitle that virtual machine to 500 million clock cycles per second. Memory limits define the maximum no. of memory pages which can exist in real RAM; RAM allocation above the memory limit is served by the virtual swap file.

Disk shares can only be configured when the virtual machine is powered down and only apply to VMDKs on the same datastore.

The advanced CPU option allows you to pin virtual machine to specific physical CPU sockets or cores; this is known as affinity (affinity will break vMotion) or enable Hyper Threading; this allows each core to work as two execution contexts.  The Hyper Threading options are:

  • Any – vCPUs from any virtual machine can share the physical CPU resources (default)
  • None – no core sharing allowed i.e. one vCPU per physical core
  • Internal – virtual machine with more than one vCPU can use the same physical core, the virtual machine will not share a physical CPU core with other virtual machines. If the virtual machine has more than two vCPUs then the effective setting is the same as none.

The advanced memory option allows you to pin the virtual machine to a specific NUMA node; these are the memory banks dedicated to each physical processor.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.