Configure Hosts for vMotion and Migrate
Powered-On Virtual Machines
This scenario demonstrates how to configure vCenter Server and
ESX/ESXi hosts so that you can migrate powered-on virtual machines without
downtime. vMotion is a prerequisite for advanced vSphere features such as
vSphere Distributed Resource Scheduler (DRS) and vSphere High Availability
(HA).
Prerequisites
Verify that you have at least two ESXi hosts that are
licensed for vMotion or are in evaluation mode.
|
|
■
|
Verify that you have running instances of vCenter Server
and the vSphere Web Client.
|
■
|
Verify that hosts have access to shared storage of a
supported type, such as Fibre Channel, iSCSI, or NAS.
|
■
|
Verify that the source and destination hosts have
compatible CPUs.
|
■
|
Verify that hosts have access to the same physical
networks.
|
■
|
Verify that you have at least one active Gigabit Ethernet
adapter on each host.
|
■
|
Virtual machine files must be on shared storage visible by
the hosts.
|
■
|
Virtual machines must run a supported operating system.
|
■
|
Virtual machines must not have a connection to a virtual
media device with a mounted local image.
|
■
|
Virtual machines must not have a connection to an internal
vSwitch that is not connected to a physical network.
|
■
|
Virtual machines must have access to the same subnets.
|
■
|
Virtual machines must not have CPU affinity configured.
|
Procedure
1
|
To begin with the vMotion example scenario, prepare an
EVC-enabled virtual environment for the hosts that you are configuring for
vMotion. vSphere environments are typically organized into datacenters and
clusters. Using vSphere EVC clusters reduces the risk of incompatible host
CPUs that might prevent vMotion migrations.
|
2
|
Add the hosts ESXi-A and ESXi-B to
your vSphere inventory. Place them in the cluster My EVC Cluster to
ensure CPU compatibility between hosts.
|
3
|
vMotion migrations use a dedicated network to transfer the
virtual machine state between the source and destination hosts. You must
configure such a network for each host that you will use for vMotion
migrations.
|
4
|
After you have set up an environment with two hosts and
configured vMotion networking, ensure that the virtual machines meet the
requirements for vMotion. Install VMware Tools to ensure better virtual
machine performance.
|
5
|
After you configure your vSphere environment for vMotion,
you can use the vSphere Web Client to migrate powered-on virtual machines
between the hosts ESXi-A and ESXi-B. In a
production environment, vMotion guarantees minimal downtime of critical tasks
that run in virtual machines.
|
Create a Datacenter and a Cluster
To begin with the vMotion example scenario, prepare an
EVC-enabled virtual environment for the hosts that you are configuring for
vMotion. vSphere environments are typically organized into datacenters and
clusters. Using vSphere EVC clusters reduces the risk of incompatible host CPUs
that might prevent vMotion migrations.
This
scenario instructs you to use a cluster for your vMotion environment. You can
configure vMotion on hosts that are not in a cluster. Add your hosts to a
cluster in order to use cluster-specific features such as vSphere EVC, vSphere
DRS, vSphere HA, and vSphere distributed switches.
Procedure
1
|
Connect
to the vCenter Server system My vCenter Server 5.1 by using
the vSphere Web Client.
|
2
|
Right-click
the vCenter Server object and select New Datacenter.
|
3
|
Type My vMotion Datacenter and click OK.
|
4
|
Navigate
to the My vMotion Datacenter object.
|
5
|
Right-click
the datacenter, and select New Cluster.
|
6
|
Type My EVC Cluster in the Name text box.
|
7
|
Keep
the Turn ON option deselected for both DRS and vSphere HA.
|
8
|
Enable
EVC for the cluster to maximize vMotion compatibility.
EVC
presents only the CPU instruction set of the least capable processor to guest
operating systems. You cannot enable EVC on clusters that contain both hosts
with AMD processors and hosts with Intel processors.
You
can create a cluster without a special license, but you must have a license
to enable a cluster for vSphere DRS or vSphere HA.
|
9
|
Click OK.
|
What to do next
Add Hosts to the EVC-Enabled Cluster
Add the hosts ESXi-A and ESXi-B to
your vSphere inventory. Place them in the cluster My EVC Cluster to
ensure CPU compatibility between hosts.
Procedure
1
|
Select My
EVC Cluster in the navigator.
|
2
|
Right-click
the cluster and select Add Host.
This
scenario demonstrates how to add the hosts to your vSphere inventory. If the
hosts are already managed by your vCenter Server system, you can move them to
the EVC-enabled cluster that you created. See the procedure for adding managed
hosts to a cluster in vSphere Resource Management.
|
3
|
Type
the host name or IP address of the host ESXi-A, and click Next.
The
example scenarios in the beginning of this publication demonstrate how to
configure your ESXi hosts with specific IP address, user name, and password.
|
4
|
Type
the user name and password for the host, and click Next.
|
5
|
View
the summary information and click Next.
|
6
|
Assign
a license, and click Next.
For
the example scenario, you can use Evaluation Mode, which lets you use all
vSphere features for a limited period of time.
|
7
|
Keep Enable
lockdown mode deselected, and click Next.
|
8
|
Click Finish.
|
9
|
Repeat
the procedure for the host ESXi-B.
|
You
have added your two hosts to the cluster My EVC Cluster.
What to do next
vMotion requires a dedicated network over which to migrate the
virtual machine data. Configure networking on your ESXi hosts.
Previous topic: Create a Datacenter and a Cluster
Related tasks
Configure vMotion Networking on the Source and
Destination Hosts
vMotion migrations use a dedicated network to transfer the
virtual machine state between the source and destination hosts. You must
configure such a network for each host that you will use for vMotion
migrations.
You
must perform the network configuration steps on both the source and the
destination host. The source host is running the virtual machine that you will
migrate to the destination host by using vMotion.
Procedure
1
|
Select
the host ESXi-A in the inventory.
|
2
|
Click
the Manage tab.
|
3
|
Click Networking and
click Virtual adapters.
|
4
|
Click
the Add host networking icon.
|
5
|
Click VMkernel
Network Adapter, and click Next.
The
VMkernel TCP/IP stack handles traffic for several ESXi services,
including vMotion.
|
6
|
Click New
standard switch, and click Next.
This
scenario instructs you to use vSphere standard switches for vMotion
networking. In a production environment, you can choose to configure vMotion
networking by using a vSphere distributed switch. See vSphere
Networking.
|
7
|
Click
the Add adapters icon (+) to assign an adapter to the Active
Adapters group and click Next.
|
8
|
In
the Network label text box, type vMotion Network.
|
9
|
Click vMotion
traffic to enable this port group to advertise itself to another
host as the network connection through which vMotion traffic should be sent,
and click Next.
Leave
the rest of the port settings to their default values.
|
10
|
Select Use
static IPv4 settings, type the port network settings, and click Next.
The
IP address settings might be in the same network or in a subnet. vMotion
migrations are also possible over DHCP networks.
In
a production environment, you should use a subnet for vMotion only, because
the migration generates intensive traffic. Assign unique IP addresses from
the same subnet to all VMkernel interfaces.
|
11
|
Review
your settings and click Finish.
|
12
|
Repeat
the procedure for the host ESXi-B and assign to the second vMotion
adapter a unique IP.
|
What to do next
The virtual machines in your environment can now be migrated
over the newly-created virtual network adapters.
Previous topic: Add Hosts to the EVC-Enabled Cluster
Next topic: Install VMware Tools
Related tasks
Install VMware Tools
After you have set up an environment with two hosts and
configured vMotion networking, ensure that the virtual machines meet the
requirements for vMotion. Install VMware Tools to ensure better virtual machine
performance.
Procedure
1
|
Select
a virtual machine on host ESXi-A.
|
2
|
Right-click
the virtual machine and select All Virtual Infrastructure Actions > Install/Ugrade
VMware Tools.
|
3
|
Click Automatic
Upgrade and click Yes.
|
4
|
Wait
for the task to finish.
|
5
|
Ensure
that VMware Tools is up-to-date on the virtual machine by reviewing the Summary tab.
|
What to do next
You have complete all configuration steps. You can migrate the
powered-on virtual machine to from host ESXi-A to host ESXi-B.
Previous topic: Configure vMotion Networking on the Source and
Destination Hosts
Migrate Powered-On Virtual Machines by Using
vMotion
After you configure your vSphere environment for vMotion, you
can use the vSphere Web Client to migrate powered-on virtual machines between
the hosts ESXi-Aand ESXi-B. In a production
environment, vMotion guarantees minimal downtime of critical tasks that run in
virtual machines.
Before
migration, you can open a console to the virtual machine and start a continuous
task, such as running the ping command in a
command-line window or playing streaming video from the Internet. During the vMotion
process, the machine is migrated to another host while the task continues with
only minimal interruption. This is a useful way to monitor the migration
process if you are migrating running virtual machines for the first time.
Procedure
1
|
In
the vSphere Web Client, select a powered-on virtual machine that is running
on host ESXi-A.
|
2
|
Right-click
the virtual machine and select Migrate from the pop-up menu.
If
you have compatibility problems with your vMotion environment, messages
appear in the Migrate wizard that describe the problems.
|
3
|
Click Change
host and click Next.
|
4
|
Select
the My EVC Cluster object that you created for your vMotion environment and
click Next.
|
5
|
Select ESXi-B as
the destination host to which to migrate the virtual machine and click Next.
|
6
|
Select Reserve
CPU for optimal vMotion performance and click Next.
vCenter
Server reserves resources on both the source and destination hosts to be
shared among all concurrent migration with vMotion. vCenter Server grants a
smaller share of host CPU resources to standard priority migrations than to
high priority migrations. Migrations proceed regardless of the resources that
have been reserved.
|
7
|
Review
your settings and click Finish.
|
vCenter
Server migrates the virtual machine to another host without service
interruption. You can track the progress of the migration in the Recent Tasks
panel.
What to do next
Subtopics
Previous topic: Install VMware Tools
No comments:
Post a Comment