Migrate Virtual Machines to Hyper-V
Part 1: FAQ – Migrating VMs to Hyper-V
Q1. What is Hyper-V?
Hyper-V is Microsoft’s native hypervisor that lets you run and manage multiple virtual machines (VMs) on Windows Server or Windows 10/11 Pro/Enterprise.
Q2. Why migrate to Hyper-V?
- Built into Windows Server (no extra licensing).
- Integration with Microsoft ecosystem (Active Directory, Azure, System Center).
- High availability (Failover Clustering, Replica).
- Cost-effective compared to VMware.
Q3. What migration methods exist?
- P2V (Physical → Virtual).
- V2V (VMware/VirtualBox → Hyper-V).
- Backup/restore migration.
- Export/import if the VM uses VHD/VHDX.
Q4. What tools can I use?
- StarWind V2V Converter (free).
- Disk2VHD (P2V).
- System Center Virtual Machine Manager (SCVMM) (enterprise).
- Azure Migrate/ASR (to the cloud).
Q5. What formats does Hyper-V support?
- VHD and VHDX (preferred).
- VMware’s VMDK must be converted.
Q6. Key considerations?
- Remove VMware snapshots before migration.
- Windows licensing may require reactivation.
- Networking must be reconfigured (VMware vSwitch ≠ Hyper-V vSwitch).
Part 2: Step-by-Step Guide – VMware → Hyper-V
Step 1: Prepare the Source VM
- Shut down the VM in VMware.
- Remove snapshots.
- Record CPU, memory, and NIC settings.
- Copy the VM’s .vmdk file.
Step 2: Convert the Disk
- Use StarWind V2V Converter.
- Input:
.vmdk
- Output:
.vhdx
- Save to the Hyper-V host.
Step 3: Create the VM in Hyper-V
Hyper-V Manager → New VM → Name → CPU/Memory → Virtual Switch → Use Existing VHDX
Step 4: First Boot
- Start the VM in Hyper-V.
- Windows may re-detect hardware.
- Linux may need Hyper-V integration components.
Step 5: Install Hyper-V Integration Services
- Windows Server 2012 R2 and earlier: Insert services ISO.
- Windows 10/11 and Server 2016+: Built-in.
Step 6: Validate
- Test boot, drivers, networking, apps.
- Check Event Viewer for errors.
Step 7: Cleanup
- Uninstall VMware Tools.
- Apply Windows/Linux updates.
- Configure backups (Windows Server Backup, Veeam, etc.).
Part 3: PowerShell Cheat Sheet – Hyper-V Migration
Check Hyper-V
Get-WindowsFeature -Name Hyper-V
Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -Restart
Create VM
New-VM -Name "MyMigratedVM" -MemoryStartupBytes 4GB -Generation 2 -SwitchName "ExternalSwitch"
Attach Converted Disk
Set-VMHardDiskDrive -VMName "MyMigratedVM" -Path "D:\VMs\MyMigratedVM\Disk1.vhdx"
CPU & Memory
Set-VMProcessor -VMName "MyMigratedVM" -Count 4
Set-VMMemory -VMName "MyMigratedVM" -DynamicMemoryEnabled $true -StartupBytes 4GB -MinimumBytes 2GB -MaximumBytes 8GB
Networking
Get-VMSwitch
Connect-VMNetworkAdapter -VMName "MyMigratedVM" -SwitchName "ExternalSwitch"
Start/Stop
Start-VM -Name "MyMigratedVM"
Stop-VM -Name "MyMigratedVM"
Export/Import
Export-VM -Name "MyMigratedVM" -Path "E:\VMBackups"
Import-VM -Path "E:\VMBackups\MyMigratedVM"
Convert VHD → VHDX
Convert-VHD -Path "C:\VMs\vm-disk.vhd" -DestinationPath "C:\VMs\vm-disk.vhdx" -VHDType Dynamic
Check Resources
Get-VM
Get-VM -Name "MyMigratedVM" | Get-VMNetworkAdapter
Get-VMHardDiskDrive -VMName "MyMigratedVM"
Enable Integration Services
Enable-VMIntegrationService -VMName "MyMigratedVM" -Name "Guest Service Interface"
✅ With this guide, you now have:
- An FAQ for common questions.
- A practical step-by-step migration procedure.
- PowerShell automation commands.