HCX OS-Assisted Migration (OSAM) overview
search cancel

HCX OS-Assisted Migration (OSAM) overview

book

Article ID: 438237

calendar_today

Updated On:

Products

VMware HCX

Issue/Introduction

OSAM operates by converting non-vSphere guest virtual machines into vSphere virtual machines. This conversion process involves halting OS services to quiesce the guest virtual machine, resulting in downtime that can vary from minutes to hours depending on the virtual machine's size and activity. To support these migrations, HCX deployments for OSAM assume the presence of at least a High Availability (HA)-enabled vSphere cluster, ensuring resilience and minimizing potential disruptions during the migration process.

With OSAM, you can migrate guest workloads that exist within vSphere Software-Defined Data Centers (SDDCs) or non-vSphere environments. The OSAM service operates in one of two modes: multi-site and single-site. Multi-site mode applies when migrating workloads between vSphere-based source and destination sites where HCX has been installed at both sites. Single-site mode applies when migrating workloads from a non-vSphere site to a vSphere site running HCX, which can be either HCX Connector or HCX Cloud Manager.

Environment

VMware HCX OS-Assisted Migration (OSAM) is an advanced migration solution designed to facilitate the seamless transition of workloads from non-vSphere environments—such as KVM, Hyper-V, or Nutanix AHV—to a vSphere-based data center. OSAM stands out from traditional migration methods by addressing the challenges associated with heterogeneous and legacy hypervisors, ensuring that organizations can efficiently modernize their infrastructure without disrupting existing operations.

 

Key Components

To facilitate OSAM migrations, several specialized components work in tandem within both the source and target environments. Below is a detailed description of each component:

HCX Connector and HCX Cloud

  • HCX Connector: Installed in the source site (where the non-vSphere workloads currently reside), the HCX Connector manages migration activities and coordinates with other HCX components.

  • HCX Cloud: Deployed in the target site (the vSphere-based data center), HCX Cloud oversees migration tasks, ensuring seamless integration with the destination environment.

Sentinel Agent

A lightweight software agent installed on each source VM running Linux or Windows.

  • Functions:
    • Discovers and collects VM storage and network configurations.
    • Assists in data replication processes.
    • Executes in-guest fix-up steps to adjust the operating system for compatibility with the VMware infrastructure.

Sentinel Gateway (SGW)

An appliance deployed within the VMWare environment.

  • Responsibilities:
    • Receives data and configuration information from Sentinel Agents.
    • Forwards replication traffic to the HCX-WAN-IX appliances.
    • If your going to a cloud side HCX manager
      • The SGW is responsible for accepting connections from sentinel agent and forwards it to the HCX-SDR deployed on the target datacenter using the on prem and cloud HCX-WAN-IX appliances

Sentinel Data Receiver (SDR)

An appliance situated in the target vSphere site.

  • Functions:
    • Accepts and manages replication data from the SGW.
    • Forwards informatin to the cloud side HCX manager in order for the final creation of destination VM disks to occur on the destination datastore.
    • Initiates fix-up processes to ensure the migrated VM is operational within the VMware environment.

HCX-WAN-IX Appliances

Facilitate secure and efficient data transmission between source and target environments.

  • Role:
    • Ensure replication traffic is forwarded appropriately, maintaining data integrity and security during migration.

HCX supported OS and Hypervisors

 

Cause

VMware HCX OS-Assisted Migration (OSAM) addresses specific limitations inherent in traditional migration methods. Traditional migration approaches often rely on vSphere-specific features, which can be restrictive when dealing with diverse or legacy hypervisors. The primary causes necessitating the use of OSAM include:

Heterogeneous Hypervisor Environments
Organizations may operate multiple hypervisors (e.g., KVM, Hyper-V) alongside vSphere. Migrating workloads between these different environments using traditional methods can be complex and error-prone. OSAM simplifies this process by providing a unified migration framework that supports various hypervisors, reducing the complexity and potential for errors during migration.

Legacy Systems
Older or unsupported hypervisors may lack the necessary features for seamless migration to vSphere-based environments. These legacy systems often pose significant challenges due to outdated technologies and incompatible configurations. OSAM overcomes these challenges by utilizing in-guest agents and specialized appliances that facilitate the migration of these legacy workloads without requiring extensive reconfiguration or upgrades.

Resolution

Step-by-Step OSAM Migration Workflow

  1. Deploy Components

    • HCX Connector and HCX Cloud
      • Deploy the HCX Connector in the source environment where the non-vSphere workloads reside.
      • Deploy the HCX Cloud in the target vSphere environment where workloads will be migrated.
    • HCX-WAN-IX Appliances
      • Deploy HCX-WAN-IX appliances to facilitate secure data transmission between source and target environments.
    • Sentinel Gateway (SGW) and Sentinel Data Receiver (SDR)
      • Deploy the SGW in the source datacenter.
      • Deploy the SDR in the target datacenter.
  2. Configure Network Profiles

    • Guest Network Configuration
      • Define and configure the Guest Network that VMs will use to connect to the SGW.
      • If using Network Extension (NE), ensure that the source network is extended to the cloud environment.
  3. Enable OSAM on Service Mesh

    • During the service mesh creation, enable OSAM appliances to be part of the migration process.
  4. Install Sentinel Agents

    • On Each Source VM
      • Download the Sentinel agent from the on-premises HCX Manager.
      • Install the Sentinel agent on each Linux or Windows source VM.
      • Ensure that the Sentinel agents successfully register with the SGW.
  5. Inventory Verification

    • HCX Manager
      • Verify that all Sentinel-registered VMs appear in the HCX Manager's inventory database.
  6. Trigger Migration

    • Initiate Migration
      • Use the HCX Manager to select the desired VMs for migration.
      • Trigger the migration process, which begins data replication from source to target.
  7. Data Replication

    • OSAM Replicates Data
      • OSAM replicates data from the source VM to the target environment.
      • Optional continuous replication can be enabled until the final cutover.
  8. Final Sync and Quiesce

    • Final Synchronization
      • Initiate the final incremental data sync to ensure data consistency.
      • Quiesce the source VM to prepare for switchover.
  9. Switchover and Fix-Up

    • Linux Fix-Up Process
      • Stage-1 Fixup (Out-of-Guest)
        • HCX Manager creates the new destination VM with the replicated disk attached.
        • Attach the OSAM fix-up disk and set the VM to boot from it.
        • The fix-up disk (Photon OS-based) performs necessary system modifications.
      • Stage-2 Fixup (In-Guest)
        • System boots in single-user mode.
        • Sentinel finalizes OS-level changes and uninstalls itself.
        • VM powers off upon completion.
      • Post Fix-Up
        • HCX Manager powers the VM back on.
        • HCX Manager is going to power off the source system on non-vSphere environment
        • Upgrade VMware Tools if needed.
        • Detach/delete the fix-up disk and connect network adapters.
    • Windows Fix-Up Process
      • Offline Fixup
        • During final sync, a VSS snapshot is taken.
        • Fix-up code modifies driver files and registry hives.
        • Sets the Sentinel service to fix-up mode.
      • Online Fixup (3 Stages)
        • Stage-1: Install VMware Tools and create a temporary local user (vmwuser).
          • If you cannot create a local admin user Fixup will fail
        • Stage-2: Reconfigure disks and NICs, restore shadow storage if needed.
        • Stage-3: Uninstall Sentinel, remove temporary user, and power off the VM.
      • Post Fix-Up
        • HCX Manager powers the VM back on.
        • Upgrade VMware Tools if needed.
        • Detach the VMware Tools ISO and connect network adapters.
  10. Validation

    • Post-Migration Checks
      • Confirm network connectivity and OS readiness.
      • Review logs to ensure all fix-up processes completed successfully.
      • Validate that the migrated VM operates as expected within the vSphere environment.
  11. Retirement of Source VM

    • Source VM Management
      • Power off the source VM in the non-vSphere environment.
      • Optionally retire or repurpose the source VM as needed.