VCP 5 Objective 4.4 – Administer Virtual Machines and vApps

 

Objective 4.4 – Administer Virtual Machines and vApps

For this objective I used the following resources

  • vSphere Virtual Machine Administration guide
  • vSphere Security guide
  • vSphere Security Hardening Guide, ver 4.1
  • VMware KB Article KB1007266

 

Knowledge

Identify files used by virtual machines

File Usage Description
.vmx vmname.vmx Virtual machine configuration file
.vmxf vmname.vmxf Additional virtual machine configuration files
.vmdk vmname.vmdk Virtual disk characteristics
-flat.vmdk vmname-flat.vmdk Prealocated virtual disk
.nvram vmname.nvram or nvram Virtual machine BIOS or EFI configuration
.vmsd File Usage
.vmsn vmname.vmsn Virtual machine snapshot data file
.vswp vmname.vswp Virtual machine swap file
.vmss vmname.vmss Virtual machine suspend file
.log vmware.log Current virtual machine log file
-#.log vmwware-#.log (where # is a number starting with 1) Old virtual machine log entries

Identify locations for virtual machine configuration files and virtual disks

The default location for VM configuration files to be stored is a named folder (usually that of the VM) on the datastore that the VM was created(referred to as the “working directory”).  There are two exceptions however. If adding an additional hard disk to a VM (VMDK or RDM) you have the ability to place these files on a different datastore. Also, you can relocate a VM’s swap file to a different location. This can be controlled at the cluster, host, or VM level.

Identify common practices for securing virtual machines

  • Install Antivirus Software
  • Disable copy and paste operations to the clipboard
  • Remove unnecessary hardware device
These are just a few examples taken from pages 87 thru 89 of the vSphere Security documentation. For a more detailed security approach review the vSphere Security Hardening Guide, currently version 4.1

 

Hot Extend a virtual disk

Hot extending a virtual disk allows for increasing the size of an assigned VMDK file while the system is running. This is a two part process with the first step taking place via the vSphere Client and the other taking place in the guest VM which differs between guest OS’es.

From vSphere Client

    1. Select the virtual machine you would like to extend
    2. Right click the VM and select Edit Settings
    3. On the Hardware tab select the Hard Disk you wish to extend
    4. In the right hand pane increase the hard disk to the new size
    5. Click OK

For the second step on a Windows based VM you will either need to use DiskPart (Win2K3, Win2K, or XP) or the Disk Manager GUI (Win2K8 and up, Vista and up). Refer to VMware KB article KB1007266 for full details.

Configure virtual machine options

Virtual machine options allow for the configuration and setting of advanced features of a virtual machine. They are accessed via the Options tab after selecting a VM and selecting Edit Settings.

Virtual Machine Options

Options Description
General Options Display name and type of guest operating system. Location of the virtual machine and its configuration file
vApp Options Options for functionality, product infromation, properties, and OVF settings specific to virtual appliances
VMware Tools Power Controls behavior, VMware Tools scripts, and automatic updates
Power Management Virtual machine Suspend behavior

Advanced Virtual Machine Options

Options Description
General Acceleration, logging, debugging and statistics
CPUID Mask NX flag and advanced identifciation mask options
Memory/CPU Hotplug Hot add enablement for individual virtual machines
Boot Options Virtual machine boot options. Add a delay before booting or force entry into the BIOS or EFI setup screen
Fibre Channel NPIV Virtual node and port World Wide Names (WWNs)
CPU/MMU Virtualization Settings for enabling Hardware Page Tabe Virtualization. In some new processors, controls the use of hardware support for virtual MMUs
Swapfile Location Swapfile location
SDRS Rules Set affinity rules for virtual disks within a datastore cluster

Chart from page 80 of the vSphere Virtual Machine Administration docuement

Configure virtual machine power settings

  1. In the vSphere Client inventory, right-click the virtual machine and select Edit Settings
  2. Click the Options tab and select Power Management
  3. In the Guest Power Managementpanel, select a power option
    • Suspend the virtual machine
    • Put the guest operating system in standby mode and leave the virtual machine powered on
  4. (Optional) Select Wake on LAN for virtual machine traffic on and select the virtual NICs to trigger this action.
  5. Click OK to saver your changes and close the dialog box
See pages 170 thru 171 of the vSphere Virtual Machine Administration documentation for further details

 

Configure virtual machine boot options

  1. In the vSphere Client inventory, right-click the virtual machine and select Edit Settings
  2. Click the Options tab and under Advanced select Boot Options
  3. In the Power on Boot Delay panel, select the time in millieseconds to delay the boot operation
  4. (Optional) Select whether to force entry into the BIOS or EFI setup screen the next time the virtual machine boots
  5. (Optional) Select whether to try to reboot after a boot failure
  6. Click OK to save your changes and close the dialog box
See pages 173 thru 174 of the vSphere Virtual Machine Administration documentation for further details

 

Configure virtual machine troubleshooting options

Enable Virtual Machine Logging

  1. In the vSphere Client inventory, right-click the virtual machine and select Edit Settings
  2. Click the Options tab and select Advanced -> General
  3. In the Settings pane, select Enable logging

Configure Debugging and Statistics

    1. In the vSphere Client inventory, right-click the virtual machine and select Edit Settings
    2. To enable debugging mode, select an option from the Debugging and Statistics section
Option Description
Run Normally Collects debugging information
Record debugging information Collects debugging and performance information

See pages 174 and 176 of the vSphere Virtual Machine Administration documentation for further details

Assign a Storage Policy to a virtual machine

Verify Storage Policy compliance for virtual machines

  1. Open the Profiles tab of a virtual machine
    • Right-click a virtual machine and select Edit Settings, select the Profiles tab
    • Right-click a virtual machine and select VM Storage Profile -> Manage Profiles
  2. Associate the virtual machine home files with a virtual machine storage profile from the Home VM Storage Profile drop-down menu
  3. (Optional) Click Propagate to disks to associate all virtual disks with the same virtual machine storage profile
  4. Under VM storage profiles for virtual disks, associate each virtual disk with a different virtual machine storage profile from the VM Storage Profile drop-down menu
  5. Click OK
See pages 131 and 132 of the vSphere Virtual Machine Administration documentation for further details

 

Determine when an advanced virtual machine parameter is required

Advanced settings can be added to a virtual machines .vmx file manually. The VM in question needs to be powered off to do so. However, most of the advanced options/features that are needed (NPIV, Swapfile location, etc) are configured via the Options tab and radial buttons. To add options manually select the Options tab, Advanced, General and click Configuration Parameters. This will open the Configuration Parameters  window allowing you to add additional configurations to the .vmx file.

Adjust virtual machine resources (shares, limits and reservations) based on virtual machine workloads

  1. In the vSphere Client inventory, right-click the virtual machine and select Edit Settings
  2. Click the Resources tab
  3. From the Resources tab you can set Shares, Reservations and Limits for CPU, Memory, Disk as well as Hyperthreaded Core Sharing
See pages 88, 100, and 121 of the vSphere Virtual Machine Administration documentation for further details

Tools

  • vSphere Virtual Machine Administation guide