Hyper-V to Proxmox Migration

[+] Status: In Progress [+] Origin: Polk State College [+] Date: 2026.01
>> TECH_STACK:
[Windows Server][Hyper-V][Proxmox VE][Active Directory][PowerShell][QEMU][Linux]

Leading a critical infrastructure migration to transition production systems from Microsoft Hyper-V to Proxmox VE. This project encompasses Active Directory Domain Controllers and Linux-based network monitoring tools (LibreNMS, Netdisco), requiring different migration strategies based on workload type.

// Migration Scope & Strategy

Domain Controllers Leapfrog (New Build + Replication) Zero V2V
Linux VMs VHDX Transfer → QCOW2 Conversion Reconfiguration Required
File Servers New Linux VM + Samba AD + Robocopy Full Rebuild (Intentional)

// Critical Warning

⚠️ NEVER V2V Domain Controllers
Risk: USN Rollback
Result: Permanent AD database corruption and replication failure
Solution: Use the Leapfrog method (new VM + replication)

// Pre-Migration: Hyper-V Generation Check

Before creating the Proxmox VM shell, identify the source generation to match BIOS settings. Check via: Hyper-V Manager → VM → Summary Tab → "Generation"

Source Proxmox BIOS Machine Type
Gen 1 SeaBIOS i440fx
Gen 2 OVMF (UEFI) q35 (recommended)

// Active Directory: The "Leapfrog" Method

Migrate Domain Controllers without IP changes or downtime by building new DCs on Proxmox and using AD replication to transfer data safely.

1
Provision Create fresh Windows Server VM on Proxmox Name it NEW-DC1 or similar
2
Network Assign temporary IP (e.g., 10.2.50.15) Set DNS to existing active DC (not itself)
3
Promote Install AD DS role → Promote to Domain Controller Verify with: repadmin /showrepl
4
FSMO Transfer Move all roles from Old DC to New DC PowerShell: Move-ADDirectoryServerOperationMasterRole
5
Demote & Swap Demote OLD-DC1, shut it down Re-assign its static IP to NEW-DC1
PowerShell FSMO Role Transfer
Move-ADDirectoryServerOperationMasterRole -Identity "NEW-DC1" `
  -OperationMasterRole SchemaMaster, DomainNamingMaster, `
  PDCEmulator, RIDMaster, InfrastructureMaster

// Standard Linux VMs: V2V Process

For Linux VMs like Netdisco, Switchmap, and LibreNMS, use direct disk conversion.

Phase 1: Create the "Shell" (Proxmox GUI)

Create the VM chassis but do not create a hard drive.

OS Do not use media (Linux 5.x/6.x Kernel)
System Check QEMU Agent. Match BIOS to source generation
Disks DELETE the default 32GB scsi0 drive. List must be empty
CPU/RAM Right-size resources (e.g., 16 cores → 4 cores)
Network Bridge vmbr0, Model VirtIO

Phase 2: Disk Transfer (SCP)

Push the VHDX file from the Hyper-V host to Proxmox.

PowerShell Run on Windows Host
scp "C:\Path\To\Disk.vhdx" root@PROXMOX_IP:/var/lib/vz/dump/

Phase 3: Import & Attach (Proxmox Shell)

Convert the VHDX to QCOW2 and map it to the VM ID.

Bash Proxmox Host
# Syntax: qm importdisk <vmid> <source_path> <storage_id>
qm importdisk 102 /var/lib/vz/dump/Netdisco.vhdx local-lvm
1 Hardware → Double-click Unused Disk 0 → Add as SCSI
2 Options → Boot Order → Enable and prioritize scsi0

// Post-Migration Hiccups & Fixes

Loss of Network Connectivity
Symptom: VM boots but cannot ping gateway
Cause: Interface name change (eth0 → ens18)
Fix: Update /etc/netplan/*.yaml with new interface name, then run netplan apply
Missing QEMU Guest Agent
Symptom: Proxmox shows no IP; Shutdown button doesn't work
Cause: Agent not installed on migrated VM
Fix: apt install qemu-guest-agent && systemctl enable --now qemu-guest-agent

// Application-Specific Troubleshooting

LibreNMS UI 502 Bad Gateway or Poller Failures
Cause: Permissions broken during transfer
Fix: Run validator as librenms user: sudo su - librenms && ./validate.php
💡 Follow script output explicitly (pip3 install, lnms migrate, chown commands)
Netdisco Services fail to start; DB connection refused
Cause: Multiple configuration issues
Fixes:
  • DB Host: Edit ~/environments/deployment.yml, change IP to localhost
  • Cookie Crash: Add session_cookie_key: 'random_string_1234' to deployment.yml
  • Manual Start: sudo su - netdisco && ~/bin/netdisco-backend start && ~/bin/netdisco-web start

// File Server: Samba AD Migration

The legacy environment had multiple Windows 10 machines acting as file servers in a "split-brain" configuration: files scattered across machines with no centralized management, inconsistent permissions, and no proper backup strategy. I built an open-source automation toolkit to solve this.

// Current Status

Migration in progress
  • Pre-migration analysis complete
  • Proxmox cluster provisioned
  • Domain Controller leapfrog strategy documented
  • Linux VM conversion process validated
  • LibreNMS migrated and operational
  • Netdisco migrated and operational
  • Switchmap migrated and operational
  • File server: Samba AD toolkit created and deployed
  • File server: Data migrated via Robocopy
  • File server: DFS namespace updated for cutover
  • Domain Controller migration (scheduled)
  • Final cutover and decommissioning