Archive for February 2013

Use Host Profiles to manage Answer Files

h2p

What is an Answer File?

For hosts provisioned with Auto Deploy, the answer file contains the user input policies for a host profile. The file is created when the profile is initially applied to a particular host.
To apply a host profile to a host, the host must be placed into maintenance mode. During this process, the user is prompted to type answers for policies that are specified during host profile creation.
Placing the host into maintenance mode each time you apply a profile to the host can be costly and time consuming. A host provisioned with Auto Deploy can be rebooted while the host profile is attached to the host. After rebooting values stored in the answer file help the host provisioned with Auto Deploy to apply the profile. An answer file is created that contains a series of key value pairs for the user input options.

Check Answer File Status

The answer file status indicates the state of the answer file. The status of an answer file can be

  • Complete
  • Incomplete
  • Missing
  • Unknown

Prerequisites
The answer file status can only be checked when the host profile is attached to a host.

Procedure

  • In the host profiles view, click Check Answer File.

AnswerFileStatus

The Answer File Status for the host profile is updated. The status indicates one of the following states:

  • Incomplete The answer file is missing some of the required user input answers.
  • Complete The answer file has all of the user input answers needed.
  • Unknown The host and associated profile exist but the status

AnswerFile

Update Answer File

  • Right click on a host or cluster and select Update Answer File

UpdateAnswerFile2

  • Adjust the Answer File

Use Host Profiles to deploy vDS and vStorage Policies

h2p

vDS Setup using Host Profiles

Host Profiles is the recommended method for deploying a vDS over a large population of similarly configured hosts.

vds

Considerations for using Host Profiles for Deploying vDS

  • Target hosts must be in Maintenance Mode. This means all VMs must be powered off or migrated to other hosts.
  • An ESX Host Profile can be applied to ESX and ESXi hosts. An ESXi Host Profile can only be applied to an ESXi Host. If you have a mix of ESX and ESXi hosts, then create the Host Profile from an ESX host. The Host Profile feature in vCenter Server is able to translate and apply the ESX Service Console definition to an ESXi VMkernel port for management access.

Process Overview

  • Create vDS (without any associated hosts)
  • Create Distributed Virtual Port Groups on vDS to match existing or required environment
  • Add host to vDS and migrate vmnics to dvUplinks and Virtual Ports to DV Port Groups
  • Delete Standard Switch from host
  • Create Host Profile of Reference Host
  • Place candidate host to have the profile applied in Maintenance Mode
  • Attach and apply host profile to candidate hosts
  • Migrate VM networking for VMs and take hosts out of Maintenance Mode.

Detailed Overview

For a more detailed description of the above steps read pages 24 to 28 of the document below from VMware

VMware vNetwork Distributed Switch: Migration and Configuration

http://www.vmware.com/files/pdf/techpaper/VMW-Host-Profiles-Tech-Overview.pdf

Summary of Migration Methods

The table below summarizes the deployment situations and suggested methods for deployment of the vNetwork Distributed Switch:

vds2

Use Host Profiles to deploy vStorage Policies

You can configure storage options, including

  • Native Multi-Pathing (NMP)
  • Pluggable Storage Architecture (PSA)
  • FCoE adapters
  • iSCSI adapters
  • NFS storage

Capture

Caveats

  • Use the vSphere CLI to configure or modify the NMP and PSA policies on a reference host first, and then extract the host profile from that host. If you use the Profile Editor to edit the policies, to avoid compliance failures, make sure that you thoroughly understand interrelationships between the NMP and PSA policies and the consequences of changing individual policies. For information on the NMP and PSA, see the vSphere Storage documentation.
  • Setting values for the Initiator IPv6 Address and Initiator IPv6 Prefix options in a host profile with independent hardware iSCSI adapters has no effect on the HBA because no independent iSCSi HBAs have IPv6 support.

Implement and Maintain Host Profiles

h2p

What are Host Profiles?

The host profiles feature creates a profile that encapsulates the host configuration and helps to manage the host configuration, especially in environments where an administrator manages more than one host or cluster in vCenter Server.
Host profiles eliminates per-host, manual, or UI-based host configuration and maintains configuration consistency and correctness across the datacenter by using host profile policies. These policies capture the blueprint of a known, validated reference host configuration and use this to configure networking, storage, security, and other settings on multiple hosts or clusters. You can then check a host or cluster against a profile’s configuration for any deviations.

Workflow
You perform host profiles tasks in a certain workflow order. You must have an existing vSphere installation with at least one properly configured host.

  • Set up and configure the host that will be used as the reference host. A reference host is the host from which the profile is created.
  • Create a profile using the designated reference host.
  • Attach a host or cluster to the profile.
  • Check the host’s compliance to the reference host’s profile. If all hosts are compliant with the reference host, they are correctly configured.
  • Apply the host profile of the reference host to other hosts or clusters of hosts.

Instructions for creating Host Profiles

  • Go to the Home Page in vClient and click on Host Profiles
  • Click Create a New Profile

Profile1

  • Create a new Profile or import a Profile

Profile2

  • Put a name and description in

Profile3

  • Click Next and Review the Summary > Finish

Profile4

  •  Once it has created the profile click Edit to edit the profile

Profile5

Attach a profile to one or more Hosts/Cluster

  • Click Attach Host/Cluster
  • Select Hosts or Cluster

attachhost

Check Compliance

When you have first added a host or cluster to your profile, it will look like this

ComplianceHost

  • Highlight a host or your cluster and click Check Compliance
  • I have made a deliberate error so it shows Non Compliant as per below

ComplianceFailure1

  • The Compliance Failure shows as per below screenprint

ComplianceFailure

  • After rectifying the DNS errors and turning off SSH in the Security Profile on my reference host, I now need to right click on my Host Profile and select Update Profile
  • Then Enter Maintenance Mode on my Non-Compliant Host
  • And re-apply the host profile
  • Check Compliance (Hurrah!)

Compliant2

  • Exit Maintenance Mode
  • it should now look like the below

Compliant4

Create Sub-Profiles

On the left side of the Profile Editor, you can expand the host profile. Each host profile is composed of several Sub-Profiles that are designated by functional group to represent configuration instances. Sub-Profiles are for e.g.

  • Storage configuration
  • Networking configuration
  • Date and time configuration
  • Firewall configuration
  • Security Configuration

Each Sub-Profile contains many policies and compliance checks that describe the configuration that is relevant to the profile. Each policy consists of one or more options that contains one or more parameters

  • Open the Profile Editor for the profile you wish to edit (as outlined above)
  • On the left side of the Profile Editor, expand a sub-profile until you reach the policy you want to edit (noted with a “folder” icon)
  • Right click the policy and select “Add Profile

HP

  • A new profile will be created under the given target
  • Highlight the new profile and expand the policy until you see Configuration details

HP3

  • Configure the policy options you want
  • Click OK and Save

Great Youtube Video

http://www.youtube.com/watch?v=tDDK97MR-HU&feature=channel_page

Test FT failover, secondary restart and app fault tolerance in a FT VM

Fault Tolerance failure scenarios

Fault Tolerance failures are only triggered when there is no communication between the primary and secondary VMs.

vmware_fault_tolerance

Three scenarios may occur

Deterministic

This is where you can predict how a failover will occur

  • An ESXi host fails which causes complete host failover
  • The Primary VM process fails or becomes unresponsive on the ESXi host
  • A Fault Tolerance test is initiated from vCenter Server

Reactionary

This is where a failover may occur but you don’t know the expected outcome ahead of time. These events are not predicable as there is a race between the Primary and Secondary VMs to see which one should be the live one. The race prevents a split brain scenario that can cause data corruption

  • The Fault Tolerant NIC is interrupted or fails
  • The Fault Tolerant NIC communication is very slow

No action taken

This is where no failure can occur because Fault Tolerance does not monitor for this type of event

  • Management network interruption or failure
  • VM network interruption or failure
  • HBA Failures that do not affect the entire host
  • Any combination of the above

Testing Fault Tolerance

VMware provides a Test Failover function from the VM which is the best option for testing

3 Tests

  • Select the Test Failover Function from the Fault Tolerance menu on the Primary VM

This tests the Fault Tolerance functionality in a fully supported and non invasive way. In this scenario, the Virtual Machine fails over from Host A to Host B and a secondary VM is started back up again. VMware HA failure does not occur in this case

  • Host Failure

This can be accomplished by pulling the power cord of the host, rebooting the host or powering off the host from a remote KVM such as ILO, DRAC, IMM and RSA etc. The secondary VM on Host B takes over immediately and continues to process information for the VM. VMware HA occurs

  • Virtual Machine process on Host A fails

The scenario can be accomplished by terminating the active process for the VM by logging into Host A. The secondary VM takes over and no VMware HA failure occurs. VMware do not recommend testing in this way