Skip to main content
NetApp virtualization solutions

Migrate VMs from VMware ESXi to Microsoft Hyper-V using the Shift Toolkit

Contributors kevin-hoke

Migrate VMs from VMware ESXi to Microsoft Hyper-V using the Shift Toolkit by preparing VMs, converting disk formats, and configuring the target environment.

The Shift Toolkit enables VM migration between virtualization platforms through disk format conversion and network reconfiguration on the destination environment.

Before you begin

Verify that the following prerequisites are met before starting the migration.

Hyper-V requirements
  • Hyper-V hosts configured as standalone hosts or failover cluster

  • Hyper-V user account with administrator privileges

  • Hyper-V hosts are network reachable with up-to-date DNS entries

  • Virtual switches configured with appropriate trunking

  • Virtual switch type "External" for network selection

  • NFS share (for VMs to be converted) and destination share (for converted VMs) on the same volume

  • SMB Constrained Delegation configured using Enable-SmbDelegation to avoid access denied errors

  • SMB 3.0 enabled (default)

  • Continuously available property enabled for SMB shares

  • Export policies for SMB disabled on the storage virtual machine (SVM)

    Note SCVMM is not a supported endpoint for migration in the current release.
  • The Hyper-V FCI and host discovery relies on DNS resolution. Ensure hostnames are resolvable from Shift Toolkit VM. If resolution fails, update the host file (C:\Windows\System32\drivers\etc\hosts) and retry the discovery operation.

VMware requirements
  • VM VMDKs are placed on NFSv3 volume (all VMDKs for a given VM should be part of the same volume)

  • VMware tools are running on guest VMs

  • VMs to be migrated are in a RUNNING state for preparation

  • VMs must be powered off before triggering migration

  • VMware tools removal happens on the destination hypervisor once VMs are powered on

Guest VM requirements
  • For Windows VMs: Use local administrator credentials (domain credentials can also be used, however ensure a user profile exists on the VM before conversion)

  • For Linux VMs: Use a user with permissions to execute sudo commands without password prompt (user should be part of the sudoers list or added to /etc/sudoers.d/ folder)

Step 1: Add the destination site (Hyper-V)

Add the destination Hyper-V environment to the Shift Toolkit.

Steps
  1. Click Add New Site and select Destination.

    Show example
    Add destination site
  2. Enter the destination site details:

    • Site Name: Provide a name for the site

    • Hypervisor: Select Hyper-V as the target

    • Site Location: Select the default option

    • Connector: Select the default selection

  3. Click Continue.

    Show example
    Destination site details
  4. Enter the destination Hyper-V details:

    • Hyper-V Standalone or failover cluster manager: IP address or FQDN

    • Username: Username to access (in UPN format: username@domain.com or domain\administrator)

    • Password: Password to access Hyper-V host or FCI instance for performing inventory of the resources

  5. Select Accept Self signed certificate and click Continue.

    Show example
    Hyper-V details
  6. Click Create Site.

    Show example
    Create Site
    Note The source and destination storage system should be the same as the disk format conversion happens at the volume level and within the same volume.

Step 2: Create resource groups

Organize VMs into resource groups to preserve boot order and boot delay configurations.

Before you begin
  • Ensure qtrees are provisioned as specified in the prerequisites

  • Move VMs to a designated datastore on a newly created ONTAP SVM before conversion to isolate production NFS datastores from the staging area

Steps
  1. Navigate to Resource Groups and click Create New Resource Group.

    Show example
    Create New Resource Group
  2. Select the Source site from the dropdown and click Create.

  3. Provide resource group details and select the workflow:

    • Clone based Migration: Performs end-to-end migration from source to destination hypervisor

    • Clone based Conversion: Converts disk format to the selected hypervisor type

      Show example
      Resource group details
  4. Click Continue.

  5. Select VMs using the search option (default filter is "Datastore").

    Note The datastore dropdown only shows NFSv3 datastores. NFSv4 datastores are not displayed.
    Show example
    VM selection
    Show example
    Datastore filter
  6. Update migration details:

    • Select Destination Site

    • Select Destination Hyper-V entry

    • Configure Datastore to Qtree mapping

      Show example
      Migration details
      Show example
      Qtree mapping
      Note Ensure the destination path (where the converted VMs are stored) is set to a qtree when converting VMs from ESXi to Hyper-V. Multiple qtrees can be created and used for storing converted VM disks.
  7. Configure boot order and boot delay for all selected VMs:

    • 1: First VM to power on

    • 3: Default

    • 5: Last VM to power on

      Show example
      Boot order configuration
  8. Click Create Resource Group.

    Show example
    Create Resource Group
Result

The resource group is created and ready for blueprint configuration.

Step 3: Create a migration blueprint

Create a blueprint to define the migration plan, including platform mappings, network configuration, and VM settings.

Steps
  1. Navigate to Blueprints and click Create New Blueprint.

    Show example
    Create New Blueprint
  2. Provide a name for the blueprint and configure host mappings:

    • Select Source Site and associated vCenter

    • Select Destination Site and associated Hyper-V target

    • Configure cluster and host mapping

      Show example
      Host mappings
  3. Select resource group details and click Continue.

    Show example
    Resource Group Details
  4. Set execution order for resource groups if multiple groups exist.

  5. Configure network mapping to appropriate virtual switches.

    Note Virtual switches should already be provisioned within Hyper-V. On Hyper-V side, the virtual switch type "External" is the only supported option for network selection. For test migration, select "Do not configure Network" to avoid production network conflicts; manually assign network settings after conversion.
    Show example
    Network mapping
    Show example
    Network configuration options
  6. Review storage mappings (automatically selected based on VM selection).

    Note Ensure the qtree is provisioned beforehand and necessary permissions are assigned so the virtual machine can be created and powered on from SMB share.
  7. Configure the prepareVM override option if needed. This option is useful when you need to skip VM preparation by the Shift Toolkit and instead perform those tasks using custom scripts. It also enables customization of the IP address to meet specific environment requirements.

    Show example
    PrepareVM override
  8. Under VM details, select configuration details and provide service account credentials for each OS type:

    • Windows: Use a user with local administrator privileges (domain credentials can also be used, however ensure a user profile exists on the VM before conversion)

    • Linux: Use a user that can execute sudo commands without password prompt (user should be part of the sudoers list or added to /etc/sudoers.d/ folder)

      Show example
      VM credentials
  9. Configure IP settings:

    • Do not configure: Default option

    • Retain IP: Keep same IPs from source system

    • DHCP: Assign DHCP on target VMs

      Ensure VMs are powered on during prepareVM phase, VMware Tools are installed, and preparation scripts run with proper privileges.

  10. Configure VM settings:

    • Resize CPU/RAM parameters (optional)

    • Modify boot order and boot delay

    • Power ON: Select to power on VMs after migration (default: ON)

    • Remove VMware tools: Remove VMware Tools after conversion (default: selected)

    • VM Firmware: Gen1 > BIOS and Gen2 > EFI (automatic)

    • Retain MAC: Keep MAC addresses for licensing requirements

    • Service Account override: Specify separate service account if needed

    • VLAN override: Select correct tagged VLAN name when target hypervisor uses different vLAN name

      Show example
      VM configuration
  11. Click Continue.

  12. Schedule the migration by selecting a date and time.

    Note Schedule migrations at least 30 minutes ahead to allow time for VM preparation.
    Show example
    Schedule migration
  13. Click Create Blueprint.

Result

The Shift Toolkit initiates a prepareVM job that runs scripts on source VMs to prepare them for migration.

Show example
PrepareVM job

The preparation process:

  • Injects scripts to add drivers (RHEL/CentOS, Alma Linux), remove VMware tools, and backup IP/route/DNS information

  • Uses invoke-VMScript to connect to guest VMs and execute preparation tasks

  • For Windows VMs: Stores scripts in C:\NetApp

  • For Linux VMs: Stores scripts in /NetApp and /opt

Show example
Windows preparation scripts
Show example
Linux preparation scripts
Note For Linux source VMs running CentOS or Red Hat, Shift Toolkit automatically installs necessary Hyper-V drivers before disk conversion to ensure successful boot after conversion. For detailed information, refer to System stuck in dracut after the migration of a RHEL VM to hyper-v.

When prepareVM completes successfully, the blueprint status updates to "Active." Migration will now happen at the scheduled time or can be started manually by clicking the Migrate option.

Show example
PrepareVM complete
Show example
Active blueprint

Step 4: Execute the migration

Trigger the migration workflow to convert VMs from VMware ESXi to Microsoft Hyper-V.

Before you begin
  • All VMs are gracefully powered off according to the planned maintenance schedule

  • Ensure the Shift VM is part of the domain

  • Ensure CIFS share is configured with appropriate permissions

  • The qtree used for migration or conversion has the right security style

  • As a quick test, try creating a VM using Hyper-V Manager from any Hyper-V host within the cluster and place the VHDX on the CIFS share

Steps
  1. On the blueprint, click Migrate.

    Show example
    Migrate option
  2. If VMs are not powered off, the Shift Toolkit will prompt for a graceful shutdown before proceeding.

    Show example
    Shutdown prompt
  3. The Shift Toolkit takes the following actions:

    • Deletes existing snapshots for all VMs in the blueprint

    • Triggers VM snapshots at the source

    • Triggers volume snapshot before disk conversion

    • Converts VMDK to VHDx format for all VMs

      The conversion happens in seconds, making this the fastest migration approach and reducing VM downtime.

      Show example
      Migration in progress
      Show example
      Conversion progress
    • Powers on VMs at the target

    • Registers networks on each VM

    • Removes VMware tools and assigns IP addresses using trigger scripts or cron jobs

Result

When the job completes, the blueprint status changes to "Migration Complete."

Show example
Migration complete
Show example
VMs in Hyper-V Manager
Show example
VM details in Hyper-V
Note No more than ten conversions should be triggered in parallel from the same ESXi source to the same Hyper-V destination.
Note After migration when Windows VMs are powered on, Shift Toolkit uses PowerShell Direct to connect to Windows-based guest VMs regardless of network configuration or remote management settings.
Note After conversion, all VM disks on Windows OS except the OS disk will be offline because the NewDiskPolicy parameter is set to offlineALL on VMware VMs by default. Run this PowerShell command to fix: Set-StorageSetting -NewDiskPolicy OnlineAll
Note Shift Toolkit uses cron jobs that execute on boot for Linux-based distributions. No SSH connections are created for Linux-based VMs once they are brought on Hyper-V hosts.

Video demonstration

The following video demonstrates the process outlined in this solution.

Migrate VMs from ESXi to Hyper-V using Shift Toolkit