Compartilhar via


Creating and Managing Highly Available Virtual Machines in VMM

Aplica-se a: Virtual Machine Manager 2008, Virtual Machine Manager 2008 R2, Virtual Machine Manager 2008 R2 SP1

Highly available virtual machines, also known as HAVMs, can easily be migrated to a different virtual machine host in a failover cluster to provide continuing service when their current host needs maintenance. If their current host fails, the HAVMs automatically migrate to a different host in the cluster through a process known as failover.

System Center Virtual Machine Manager (VMM) 2008 supports HAVMs deployed on Windows Server 2008 failover clusters. System Center Virtual Machine Manager 2008 R2 supports HAVMs deployed on Windows Server 2008 failover clusters or Windows Server 2008 R2 failover clusters. This topic explains how to create, configure, migrate, and remove the HAVMs in VMM. For information about configuring and managing the host clusters on which they are deployed, see Configuring Host Clusters in VMM to Support Highly Available Virtual Machines.

Dica

The focus of this topic is highly available Hyper-V virtual machines. For information about highly available virtual machines deployed on VMware ESX Server hosts that VMM is managing, see Managing a VMware Infrastructure in VMM.

Configure a Highly Available Virtual Machine

If you configure a virtual machine as a highly available virtual machine, VMM places the virtual machine on the most suitable host in a host cluster. To configure a virtual machine as highly available, in the advanced settings on the Configure Hardware page of the New Virtual Machine Wizard, display Availability settings, and select Make this virtual machine highly available.

You also can make a virtual machine highly available during placement. If you do not configure a virtual machine as highly available, all suitable hosts—including clustered hosts—will be available during placement. If you choose a clustered host for the virtual machine, you will be asked whether you want to make the virtual machine highly available. If you click Yes, the virtual machine is deployed on a clustered host and becomes highly available.

Virtual Machine Manager places highly available virtual machines only on clustered hosts, and it places virtual machines that are not highly available only on stand-alone hosts. Although it is possible to create non-HAVMs on clustered hosts, VMM does not allow that. If such virtual machines are created outside VMM, they are imported and treated as non-HAVMs, just like virtual machines on stand-alone hosts.

Dica

For general information about creating virtual machines, see Creating New Virtual Machines (https://go.microsoft.com/fwlink/?LinkID=162793).

Configure Disks

You must configure, add, or remove the clustered disks that are used for HAVMs outside VMM. After you make external changes to the disks, refresh the host cluster in VMM to update the disk configurations.

VMM 2008 R2 supports the cluster shared volumes (CSV) feature of Windows Server 2008 R2. CSV enables multiple highly available virtual machines to share the same LUN but still migrate independently without affecting other HAVMs that are sharing the same LUN. Because the HAVM can access the disk from a separate node, CSV also expedites migration of virtual machines within the cluster because there is no need to unmount and then mount the disk.

Unlike VMM 2008 R2, VMM 2008 does not support CSV. VMM 2008 supports only one highly available virtual machine per LUN. This is required in order to ensure that HAVMs can be migrated to different hosts without affecting the availability of other HAVMs.

Customers who are migrating to VMM 2008 R2 and want to consolidate their existing virtual machines in a CSV LUN can use the new quick storage migration feature to migrate storage of a running virtual machine to a different host or a different location on the same host with minimal downtime and no loss of state. In Virtual Machines view of the VMM Administrator Console, use the Migrate storage action. For more information, see How to Migrate Storage of Virtual Machine Files. Within a managed VMware infrastructure, VMM will use VMware Storage VMotion if it is available.

VMM supports cluster disks with or without drive letters. For an 8-node or 16-node cluster, it is easy to run out of drive letters (in the range of A–Z) assigned to disks used by HAVMs. VMM solves this problem by supporting the use of disks that use a volume GUID path (in the format \\?\GUID\<VMname>) instead of a drive letter. For more information about creating these volumes on a Hyper-V host, see Configuring Storage Using Volume GUIDs in Hyper-V (https://go.microsoft.com/fwlink/?LinkId=182591).

Any HAVMs that share a non-CSV LUN are imported into VMM with Unsupported Cluster Configuration status. To resolve this issue, use Failover Cluster Manager to reconfigure the virtual machines to have their own LUNs. Then, in the VMM Administrator Console, use the Repair action with the Ignore option to refresh each virtual machine’s status in VMM.

In VMM 2008 R2, when you migrate a virtual machine into a cluster from a stand-alone host by using a SAN transfer, VMM checks all nodes in the cluster to ensure that each node can see the LUN and automatically creates a cluster disk resource for the LUN. Even though VMM automatically configures the cluster disk resource, it does not validate it. You must use the Validate a Configuration Wizard in Failover Cluster Management to validate the newly created cluster disk resource. To migrate a virtual machine out of a cluster to a stand-alone host, the virtual machine must be on a dedicated LUN that is not using CSV.

Troubleshoot “Unsupported Cluster Configuration” Status for a Highly Available Virtual Machine

To view the reason that a HAVM is in an Unsupported Cluster Configuration state, display the Hardware Configuration tab of the Virtual Machine Properties dialog box. Then, in the Advanced settings, click Availability. If the virtual machine is in an Unsupported Cluster Configuration state, the Details area displays the error that placed the virtual machine in that state.

The following situations can cause Unsupported Cluster Configuration status:

  • The virtual machine is on a non-CSV LUN that contains more than one virtual machine.

    If you have configured highly available virtual machines in Hyper-V to share the same LUN, and the LUN is not on a clustered file system (CSV) volume, you must update the virtual machine configurations in Failover Cluster Management and Hyper-V so that each resides on its own unshared LUN.

  • The virtual machine is using non-clustered storage.

    If the HAVM is stored on system drive C: or any disk that is not clustered, the virtual machine is placed in Unsupported Cluster Configuration state. To resolve this issue, ensure that all files and pass-through disks belonging to the virtual machine reside on clustered disks.

  • One or more virtual network adapters on the virtual machine are not connected to a common virtual network.

    If the virtual networks on all hosts in the host cluster do not have identical settings, a highly available virtual machine connected to such virtual network might lose connectivity when it is migrated or fails over to another cluster node. Virtual networks that have identical settings are referred to as common virtual networks. To find the common virtual networks for a host cluster, in the VMM Administrator Console, view the Networks tab in the host cluster properties. To configure virtual networks on the hosts, use the Networking tab in host properties. For more information about configuring virtual networks, see How to Add or Modify Virtual Networks on a Host (https://go.microsoft.com/fwlink/?LinkID=163453).

    For a virtual network to be considered common by VMM and available to highly available virtual machines on a host cluster, each virtual network in the host cluster must meet the following requirements:

    • The virtual network name must be identical on each host in the cluster. In VMM 2008, virtual networks are recognized as common virtual networks only if the cases of all letters in the network names match. This restriction was removed in VMV 2008 R2. When it identifies common virtual networks, VMM 2008 R2 does not evaluate the case of the letters in the network names.

    • The host network adapters to which the virtual network is attached on each host in the cluster must have the same location.

    • The virtual network must have the same tag on each host in the cluster.

    After you update the virtual network configurations on all nodes, refresh the cluster to ensure that each virtual network is detected as common. Then check the Networks tab in the host cluster properties to verify that the networks have been added to it.

  • In VMM 2008, the resource group for a Hyper-V virtual machine in a Windows Server 2008 failover cluster contains resources in addition to the Virtual Machine, Virtual Machine Configuration, and Physical Disk resources.

    These additional resources typically are third-party resources that provide functionality such as replicating storage within a multi-site cluster. For Hyper-V virtual machines managed by VMM, the virtual machine resource group in a Windows Server 2008 failover cluster can only contain Virtual Machine, Virtual Machine Configuration, and Physical Disk resources.

    To resolve this issue, install the System Center Virtual Machine Manager 2008 Update (KB961983) (https://go.microsoft.com/fwlink/?LinkId=182647). For a description of the updates, see KB article 961983, Description of the hotfix rollup package for System Center Virtual Machine Manager 2008: April 14th, 2009 (https://go.microsoft.com/fwlink/?LinkId=182648).

  • In VMM 2008, an ISO image is attached to highly available virtual machines. This issue was resolved in VMM 2008 R2.

    Often, the ISO image will be c:\windows\system32\vmguest.iso. To resolve the issue, remove the ISO image by using Hyper-V Manager. Then, in VMM, refresh the virtual machine by using the Repair action. Right-click the virtual machine, click Repair, and then click Ignore.

  • A VMware HAVM is connected to a port group that does not exist on all nodes of the host cluster.

    On host clusters that VMM is managing, each port group must be configured on all ESX Server hosts in the cluster. If a virtual machine is configured with a port group that is not common to all hosts, the virtual machine has Unsupported Cluster Configuration status.

Manage Storage for a Highly Available Virtual Machine

All files and pass-through disks for virtual machines must reside on clustered disks. For information about setting up storage for a Hyper-V failover cluster, see Add Storage to a Failover Cluster (https://go.microsoft.com/fwlink/?LinkId=128068).

In VMM 2008 R2, when you use a SAN transfer to migrate an HAVM to a host cluster from a stand-alone host, VMM checks all nodes in the cluster to ensure that each node can see the LUN and automatically creates a cluster disk resource for the LUN. Even though VMM automatically configures the cluster disk resource, it does not validate it. You must use the Validate a Configuration Wizard in Failover Cluster Management to validate the newly created cluster disk resource.

Customers who are migrating VMM 2008 R2 and want to consolidate their existing virtual machines in a single cluster shared volume (CSV) LUN can use the new quick storage migration feature to migrate storage of a running virtual machine to a different host or a different location on the same host with minimal downtime and no loss of state. In Virtual Machines view of the VMM Administrator Console, use the Migrate storage action. For more information, see How to Migrate Storage of Virtual Machine Files. Within a managed VMware infrastructure, VMM will use VMware Storage VMotion if it is available.

In VMM 2008 R2, virtual machines with SAN-attached pass-through disks can be migrated to a stand-alone host or stored in the library by using SAN migration if the SAN pass-through disk can be accessed by the destination host or library server. However, you must convert pass-through disks to virtual hard disks (.vhd files) if the pass-through disks are local or they cannot be accessed by the destination host or library server. In VMM 2008, you must convert all pass-through disks before you move an HAVM to a library server or to a stand-alone host. To convert a pass-through disk to a virtual hard disk, update the disk configuration on the Hardware Configuration tab of the virtual machine properties.

For additional information about storage options for Hyper-V host clusters managed by VMM 2008 R2, see Configuring Host Clusters in VMM to Support Highly Available Virtual Machines. For information about specific SAN configuration requirements for VMM, see Configuring a SAN Environment for VMM. For general information about storage requirements for failover clusters in Windows Server 2008, see Add Storage to a Failover Cluster (https://go.microsoft.com/fwlink/?LinkId=128068).

Migrate Highly Available Virtual Machines

This section discusses how VMM processes placements and performs migrations on highly available virtual machines.

Live Migration versus Quick Migration

VMM 2008 R2 supports live migration of virtual machines in host clusters created in Windows Server 2008 R2 and quick migration of virtual machines in host clusters created in Windows Server 2008 or Windows Server 2008 R2. With Hyper-V live migration, you can move running virtual machines from one Hyper-V clustered host to another, without any disruption or perceived loss of service. With Hyper-V quick migration, there is a brief loss of service, with no loss of state, when a running virtual machine is migrated from one Hyper-V clustered host to another. VMM 2008 supports quick migration of virtual machines in Windows Server 2008 failover clusters.

Dica

If you want to perform a quick migration of a virtual machine in a Windows Server 2008 R2 host cluster, even if live migration is available, use the Move-VM cmdlet with the –UseCluster parameter in the Windows PowerShell – Virtual Machine Manager command shell.

VMM 2008 supports quick migration of virtual machines in Windows Server 2008 failover clusters.

If you are using VMM 2008 or VMM 2008 R2 to manage a VMware Infrastructure 3 (VI3) environment in which VMware VMotion is implemented, live migration is supported for migrating virtual machines among ESX Server host clusters within the same datacenter.

To avoid failed migrations, during a virtual machine placement that targets a Windows Server 2008 R2 failover cluster, VMM 2008 R2 performs a host compatibility check before migrating the virtual machine to ensure that the destination host has compatible hardware (such as CPU models) with the source host. VMM uses the Hyper-V compatibility check API in Windows Server 2008 R2 to perform the compatibility check. Using an API from VMware, VMM 2008 R2 also performs a host compatibility check when migrating a VMware virtual machine to a VMware host cluster.

HAVM Placement and “Over-committed” Status

When placing a highly available virtual machine, the placement process in VMM calculates whether adding a new virtual machine to a host cluster will over-commit the cluster based on the cluster reserve configured for the host cluster in VMM. The cluster reserve specifies the number of node failures a cluster must be able to sustain while still supporting all virtual machines that are currently deployed on the clustered hosts. If a host cluster cannot withstand the specified number of node failures and still keep all of the virtual machines running, the cluster is placed in an Over-committed state, and the hosts are not available for placement. An administrator can override this and place an HAVM on a host in an over-committed cluster during manual placement. Cluster reserves are a unique feature of VMM.

For example, if you specify a node failure reserve of 2 for an 8-node cluster, the rule is applied in the following ways:

  • If all 8 nodes of the cluster are functioning, the host cluster is marked Overcommitted if any combination of 6 nodes (8-2) in the cluster lacks the capacity to accommodate existing virtual machines.

  • If only 5 nodes in the cluster are functioning, the cluster is marked Overcommitted if any combination of 3 (5-2) nodes in the cluster lacks the capacity to accommodate existing virtual machines.

VMM’s cluster refresher updates the host cluster’s Over-committed status after each of the following events:

  • A change in the cluster reserve value

  • The failure or removal of nodes from the host cluster

  • The addition of nodes to the host cluster

  • The discovery of new virtual machines on nodes in the host cluster

The cluster reserve is set on the General tab of the host cluster properties. For a procedure, see How to View and Modify the Properties of a Host Cluster (https://go.microsoft.com/fwlink/?LinkID=162986).

Planned versus Unplanned Downtime

The circumstances under which a highly available virtual machine is migrated determine the effect on service availability on the virtual machine. VMM can manage planned downtime by performing quick migrations or live migrations of HAVMs. For unplanned downtime, the Cluster Service takes over.

  • Planned downtime—When you migrate an HAVM to perform planned maintenance such as patching on the host in a Windows Server 2008 R2 failover cluster, live migration is performed. With Hyper-V live migration, you can move running VMs from one Hyper-V clustered host to another without any disruption or perceived loss of service. Because the virtual machine does not experience any downtime, the move is completely transparent to the users who are connected to the virtual machine.

    When you migrate a virtual machine in a Windows Server 2008 host cluster, VMM performs a quick migration during which there is a brief service interruption while the LUN on which the virtual machine is stored is unmasked to a different node of the host cluster. The state of the virtual machine (for example, the unsaved contents of Notepad) is not lost during a quick migration.

  • Unplanned downtime—When a virtual machine fails over to a different cluster node due to an unexpected event, such as a host failure due to a hardware failure or operating system failure, the effect is comparable to turning off the virtual machine. Virtual machine state is lost as the virtual machine is turned off and the Cluster Service starts the virtual machine on a new node in the cluster.

Placing a Clustered Host in Maintenance Mode in VMM 2008 R2

In VMM 2008 R2, you can place a host in maintenance mode, which can either live migrate virtual machines to a different host or place all virtual machines on the host in a saved state, before performing planned maintenance.

When you start maintenance mode on a clustered host, you can specify one of the following options:

  • If all virtual machines in a Windows Server 2008 R2 host cluster are highly available, use live migration to evacuate all virtual machines to other hosts on the same cluster. If the migration fails for any virtual machine on the host, maintenance mode is not started on that host and VMM does not migrate back the virtual machines that have already migrated.

  • On a Windows Server 2008 host cluster or a Windows Server 2008 R2 cluster that contains non-highly available virtual machines, place all virtual machines on the host into a saved state.

When you start maintenance mode on a host, VMM does the following:

  • Blocks all types of virtual machine creation operations on the host.

  • Excludes the host from the host ratings during virtual machine placement, and prevents deployment and migration of virtual machines to the host.

  • Displays a host status of In Maintenance Mode in Hosts view of the VMM Administrator Console.

When you stop maintenance mode on a host, VMM allows virtual machine creation operations on the host to resume, includes the host in host ratings during placement, and displays a host status of OK in Hosts view of the VMM Administrator Console. However, VMM does not do the following:

  • Automatically perform a live migration to move HAVMs that were evacuated from a host in a Windows Server 2008 R2 host cluster back to the original host.

  • Restart virtual machines that were placed in a saved state on the host when maintenance mode started.

To start or stop maintenance mode, in Hosts view, right-click a host, and then click the appropriate command.

Migrating an HAVM Out of a Host Cluster

In VMM 2008 R2, you can use SAN transfers to migrate HAVMs out of a host cluster to a stand-alone host if the HAVM does not share a LUN with other virtual machines. VMM 2008 does not support SAN transfers out of a host cluster, even if the virtual machine is on a CSV LUN that is not shared by any other virtual machines.

In VMM 2008 R2, you can migrate or store a virtual machine that has pass-through disks by using SAN migration if the pass-through disks are SAN-attached and can be accessed by the destination host or library server. If the pass-through disks are local disks, or if SAN-attached disks cannot be accessed by the destination host or library server, the pass-through disks must be converted to virtual hard disks, and the files must be transferred over a LAN. In VMM 2008, you must convert all pass-through disks before you move an HAVM to a library server or to a stand-alone host.

Delete a Virtual Machine from VMM

When you delete a highly available virtual machine from VMM, VMM deletes the configuration files and cleans up the cluster resources that were attached to the virtual machine.

Consulte Também

Conceitos

Configuring Host Clusters in VMM to Support Highly Available Virtual Machines
Managing a VMware Infrastructure in VMM

Outros Recursos

Planning for High Availability
Creating Virtual Machines in VMM