Skip to content

System Virtualization

How to Set Up vMotion and High Availability (HA) in VMware vCenter

A step-by-step guide to ensuring enterprise virtualization reliability through live migration and automatic failover in a VMware vCenter environment.

Author: Lâm Trịnh Chí Tài (Gyn) | Updated: April 2026

01

Accessing the vCenter Server Environment

Open your browser and navigate to the vCenter Server IP address to begin managing your virtualization infrastructure.

Open a web browser and navigate to the server's IP address.

Note: Always select LAUNCH VSPHERE CLIENT (HTML5). The older Flash-based web client is deprecated and no longer supported.

vCenter Landing Page: Selecting Launch vSphere Client (HTML5)
vCenter landing page — select Launch vSphere Client (HTML5)

Login Credentials

  • Username: administrator@domain (e.g., administrator@gynlam328.com)
  • Password: Use the secure password defined during your initial setup
VMware vSphere Login Screen with username and password fields
VMware vSphere login screen

Pro Tip: For backend management, access the Appliance Management Interface (VAMI) via https://[vCenter-IP]:5480. Log in with the root account to monitor system logs, restart core services, and perform health checks on CPU, memory, and storage.

VAMI Interface showing System Health Status (CPU, Memory, Storage)
VAMI interface showing system health status
02

Building the Virtual Infrastructure

Create and configure the Datacenter, Cluster, and ESXi Hosts that form the foundation of your virtualization environment.

Step A: Create a vSphere Datacenter

The Datacenter is the top-level logical container used to centrally manage all your ESXi nodes. In a real-world business scenario, this typically represents a physical office location or branch (e.g., PROD-UK01, LAB-01).

  1. Right-click your main vCenter instance and select New Datacenter.
  2. Provide a descriptive name (e.g., LAB-01).
Creating a New Datacenter named LAB-01
Creating a new Datacenter named LAB-01
Creating a New Datacenter named LAB-01
Creating a new Datacenter named LAB-01

Step B: Create and Configure the ESXi Cluster

A Cluster allows you to pool the hardware resources of multiple physical hosts.

  1. Right-click your newly created Datacenter and select New Cluster.
  2. Provide a name for the cluster (e.g., LAB-01-Cluster).
  3. Important: Ensure you enable both vSphere DRS and vSphere HA at this stage to allow for automated load balancing and high availability.
New Cluster Setup: Enabling vSphere DRS and vSphere HA toggles
New cluster setup — enabling vSphere DRS and vSphere HA

Step C: Add ESXi Hosts to the Cluster

Bring physical compute power into your logical cluster.

  1. Right-click the Cluster and select Add Hosts.
  2. Enter the IP addresses of your target ESXi hosts (e.g., 192.168.231.161, 192.168.231.162).
  3. Check the box for "Use the same credentials for all hosts" if applicable, and enter your root credentials.
Add Hosts Wizard: Entering IP addresses and credentials
Add Hosts wizard — entering IP addresses and credentials
Add Hosts Wizard: Entering IP addresses and credentials
Add Hosts wizard — entering IP addresses and credentials
Host Summary Review showing ESXi versions and models
Host summary review — ESXi versions and hardware models
Review and Finish screen for adding hosts
Review and Finish screen for adding hosts

Prerequisite Check: After adding the servers, verify that the hosts are NOT in Maintenance Mode. If they are, right-click the host, select Maintenance Mode, and click Exit Maintenance Mode.

Context menu action: Exiting Maintenance Mode
Context menu — Exiting Maintenance Mode
03

Network Configuration: Enabling vMotion on VMkernel

Enable the vMotion service on VMkernel adapters across all hosts to allow live migration.

For VMware live migration to function properly, the vMotion service must be enabled on the VMkernel adapters across ALL hosts in the cluster.

  1. Select your ESXi host, navigate to Configure > Networking > VMkernel adapters.
  2. Select the appropriate adapter (typically vmk0) and click Edit.
  3. Check the box for vMotion under the Enabled services section.
  4. Repeat this critical step for all hosts within the cluster.
VMkernel Adapter Settings: Enabling the vMotion checkbox
VMkernel adapter settings — enabling the vMotion checkbox
VMkernel Adapter Settings: Enabling the vMotion checkbox
VMkernel adapter settings — enabling the vMotion checkbox
04

Storage and Virtual Machine Preparation

Place virtual machines on shared storage and upload the required OS ISO to enable live migration.

Requirement: To successfully migrate live workloads, your virtual machines must reside on Shared Storage (such as iSCSI, NFS, or SAN), not on local host disks.

Upload ISO & Create the Virtual Machine

  1. Navigate to the Datastores tab and select your configured Shared Storage (e.g., TrueNAS-iSCSI).
  2. Go to the Files tab and upload your desired OS ISO (e.g., Ubuntu Server).
  3. Create a new VM on your primary ESXi host. Crucial: Ensure you select the shared storage location (e.g., TrueNAS) for the VM's files.
Uploading ISO file to TrueNAS Shared Datastore
Uploading ISO file to TrueNAS shared datastore
Uploading ISO file to TrueNAS Shared Datastore
Uploading ISO file to TrueNAS shared datastore
Uploading ISO file to TrueNAS Shared Datastore
Uploading ISO file to TrueNAS shared datastore
New VM Wizard: Selecting Shared Storage (TrueNAS-iSCSI)
New VM wizard — selecting shared storage (TrueNAS-iSCSI)
New VM Wizard: Selecting Shared Storage (TrueNAS-iSCSI)
New VM wizard — selecting shared storage (TrueNAS-iSCSI)
New VM Wizard: Selecting Shared Storage (TrueNAS-iSCSI)
New VM wizard — selecting shared storage (TrueNAS-iSCSI)
New VM Wizard: Selecting Shared Storage (TrueNAS-iSCSI)
New VM wizard — selecting shared storage (TrueNAS-iSCSI)
New VM Wizard: Selecting Shared Storage (TrueNAS-iSCSI)
New VM wizard — selecting shared storage (TrueNAS-iSCSI)
VM Creation Summary: Ubuntu 1 created on Shared Storage
VM creation summary — Ubuntu VM created on shared storage
VM Creation Summary: Ubuntu 1 created on Shared Storage
VM creation summary — Ubuntu VM created on shared storage
VM Creation Summary: Ubuntu 1 created on Shared Storage
VM creation summary — Ubuntu VM created on shared storage
05

Scenario 1: Testing vMotion (Live Migration)

Seamlessly move a running virtual machine between hosts with zero application downtime.

Goal: Seamlessly move a running virtual machine from Host A to Host B with zero application downtime.

  1. Power on the Ubuntu VM, install the operating system, and log in.
  2. Open a terminal (or CMD on your local PC) and initiate a continuous ping to monitor connectivity: ping [VM-IP] -t.
  3. In vCenter, right-click the target VM and select Migrate.
  4. Select Change compute resource only (since the underlying storage is already shared).
  5. Select the Destination Host (your secondary ESXi host).
  6. Finish the wizard and observe the continuous ping results.
vMotion Migration Wizard: Selecting destination host
vMotion migration wizard — selecting the destination host
vMotion Migration Wizard: Selecting destination host
vMotion migration wizard — selecting the destination host

Result Analysis

During the live migration, you should experience almost no packet loss (typically 0 or 1 dropped packet). The end-user experience remains completely uninterrupted.

Ping Test Result: Only 1 Request Timed Out during migration
Ping test result — only 1 request timed out during migration
Ping Test Result: Only 1 Request Timed Out during migration
Ping test result — only 1 request timed out during migration
Verification: VM is now running on the 2nd Host
Verification — VM is now running on the second host
06

Scenario 2: High Availability (HA) Failover Testing

Simulate a catastrophic server failure and observe how vCenter automatically restores VMs on surviving hosts.

Goal: Simulate a catastrophic physical server failure and observe how vCenter automatically restarts the affected VM on a surviving host.

  1. Ensure the virtual machine is actively running on Host 2.
  2. Simulate Failure: Perform a hard power-off on Host 2 (via physical power button or baseboard management controller).
  3. Observe the vCenter console: Host 2 will eventually show a red alert stating Not Responding.
  4. The continuous ping will time out significantly. This is expected, as the VM has effectively crashed alongside the host.
Host Failure: ESXi Host showing 'Not Responding' red alert
Host failure — ESXi host showing “Not Responding” red alert
Host Failure: ESXi Host showing 'Not Responding' red alert
Host failure — ESXi host showing “Not Responding” red alert
Ping Timeout: Destination host unreachable
Ping timeout — destination host unreachable

The HA Recovery Process

Within a few minutes, vSphere HA will detect the host failure. You can monitor the automated recovery in Monitor > Tasks and Events. Look for the system log: "vSphere HA restarted virtual machine..."

vCenter Events Log: vSphere HA restarted virtual machine event
vCenter events log — vSphere HA restarted virtual machine
vCenter Events Log: vSphere HA restarted virtual machine event
vCenter events log — vSphere HA restarted virtual machine

Note regarding the vCenter Server VM: If your vCenter Appliance was hosted on the crashed server, you might temporarily lose access to the web portal (showing a 503 Service Unavailable error). Be patient for 10-30 minutes while vSphere HA restarts the vCenter VM on a healthy host. You can monitor the boot status via VAMI (Port 5480).

VAMI Services: Checking vCenter Server service health
VAMI services — checking vCenter Server service health

Conclusion: Once the HA process completes, both your application VM and vCenter will automatically be running securely on Host 1, preserving overall business continuity.

Final State: All VMs successfully restarted on the surviving host
Final state — all VMs successfully restarted on the surviving host
07

Get In Touch

Complex infrastructure challenges deserve elegant solutions. Let's realize it together.

Email

gynlam328@gmail.com

Send email

Phone

+84-83314-1685

Call now

Location

Ban Co Ward - Previously known as District 3, HCMC

Connect with me

© 2025 - 2026 Lâm Trịnh Chí Tài (Gyn)

All rights reserved