Convert a Server to a VM and host it on Hyper-V

IT Consultancy & Repairs, located in Crewe, servicing Cheshire and surrounding areas.

Convert a Server to a VM and host it on Hyper-V

Virtualization is a fundamental pillar of modern infrastructure management. Transitioning legacy hardware footprint over to a hypervisor simplifies backups, enhances resource utilization, and uncouples software from aging silicon.

In this step-by-step technical guide, we will walk through the entire lifecycle of a host deployment and migration: installing the Hyper-V role on a bare-metal server, performing a Physical-to-Virtual (P2V) conversion of a legacy server, completing a virtual machine configuration upgrade, and executing an in-place guest OS upgrade from Server 2016 to Server 2022 or Server 2025.

Phase 1: Installing the Hyper-V Role on Windows Server

Before installing the hypervisor layer, log into your server’s BIOS/UEFI setup firmware and confirm that Intel VT-x or AMD-V (Hardware-assisted virtualization) along with DEP (Data Execution Prevention) are enabled in the CPU configuration settings.

Method A: Deployment Via PowerShell (Recommended)

Open an elevated PowerShell console on your target host and execute the following deployment command:

Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -Restart

Note: The server will automatically perform a sequence of reboots to configure the underlying microkernel hypervisor layer.

Method B: Deployment Via Server Manager GUI

  1. Launch Server Manager, choose Add roles and features, and select Role-based or feature-based installation.
  2. Under the Server Roles manifest, check Hyper-V.
  3. Follow the configuration wizard to selectively bind physical network adapters to your initial Virtual Switch architectures.
  4. Proceed to the confirmation dialog and select Install.

Phase 2: Executing a Physical-to-Virtual (P2V) Conversion

Because legacy enterprise middleware tools like MVMC 3.0 are deprecated, the standard, lightweight approach for standard environments involves utilizing Microsoft’s native Disk2vhd utility.

Step 1: Capture the Volumes with Disk2vhd

  1. Download the official utility package directly from Microsoft Sysinternals Disk2vhd.
  2. Extract and launch disk2vhd.exe as a local Administrator on the physical server you want to convert.
  3. Crucial: Check the box for Use vhdx to enable the modern, resilient virtual disk format. If your physical machine uses UEFI firmware, also verify that Prepare for use in Virtual PC is unchecked.
  4. Select a destination network share or external storage drive. Do not save the output VHDX image onto the same physical drive array you are currently capturing.
  5. Select all boot, system, and critical data volumes (e.g., C:\ and System Reserved partitions) and click Create.

Step 2: Provision the Virtual Machine in Hyper-V

Transfer the newly generated .vhdx storage file over to your freshly built Hyper-V parent storage pool, then build the target node configuration container:

  1. Open the Hyper-V Manager console.
  2. Right-click your host node, then choose New > Virtual Machine.
  3. In the Specify Generation menu, select Generation 2 if the source physical server utilized a modern UEFI boot framework, or Generation 1 if it depended on legacy BIOS.
  4. Allocate compute blocks (RAM and Virtual CPUs) matching or scaling reasonably with your workloads.
  5. On the Connect Virtual Hard Disk window, toggle the radio select button to Use an existing virtual hard disk.
  6. Browse to your newly migrated .vhdx file asset and complete the creation process.

Boot your new VM. On first launch, the operating system kernel will load synthetic drivers. You can clean up old configurations by opening an administrative command line interface and purging stale physical device mappings:

set devmgr_show_nonpresent_devices=1
start devmgmt.msc

Inside Device Manager, toggle “Show hidden devices” under the View menu, then uninstall grayed-out physical hardware adapters to prevent persistent IP routing anomalies.


Phase 3: Upgrading the Hyper-V Virtual Machine Version

When hosting older migrated machines on a modern hypervisor host, the virtual environment configuration version needs to be manually advanced to unlock newer features (such as hot-adding memory or enhanced secure boot execution).

Step 1: Check Current Configurations

To audit configuration metadata baselines across your local infrastructure, run this tracking script inside PowerShell:

Get-VM * | Format-Table Name, Version, State

Step 2: Apply the Configuration Upgrade

Warning: Upgrading the VM configuration version is a permanent operations path. Once applied, the virtual machine will no longer run on older hypervisor versions that do not support the new configuration version.

  1. Gracefully Shut Down the guest operating system inside the virtual environment.
  2. Execute the following targeted update sequence using PowerShell:
Update-VMVersion -Name "Your_Converted_VM_Name"
  1. Alternatively, using the GUI: Open Hyper-V Manager, right-click the stopped machine instance, and select Upgrade Configuration Version from the actions pane.

Start the virtual machine again. Your virtualized workload is now optimized for your new Hyper-V virtualization host.


Phase 4: Executing the In-Place Guest OS Upgrade

Once your physical server is safely encapsulated inside a stable Hyper-V container, you can update its underlying operating system. Windows Server 2025 supports N-4 media upgrade paths, allowing a direct in-place upgrade from Windows Server 2016 straight to Windows Server 2025 or Windows Server 2022 without intermediate milestones.

Crucial Exception: If the converted server is an Active Directory Domain Controller (DC), Microsoft explicitly recommends against an in-place upgrade. Instead, spin up a fresh target OS instance, promote it to a new DC, replicate Active Directory objects, and safely demote the 2016 unit.

Step 1: Take a Pre-Upgrade Safety Checkpoint

Tags: , , ,

Follow by Email
FbMessenger