The Disk2vhd Disaster — and How StarWind’s V2V Brought Redemption! --About Windows Server 2012 STD P2V

Our company has been operating a Windows Server 2012 STD host installed on a physical 2U rack server for years. As services on the machine are nearing decommission and hardware failure risks are increasing, we've decided to virtualize the system to streamline operations.

Summary(Suggestion)

  1. Use StarWind’s V2V Converter / P2V Converter directly — it saves valuable time. If you have sufficient privileges, the converted system can be mounted directly to another Hyper-V host.
  2. If the server has multiple partitions, choose to clone the entire physical machine. Avoid converting individual disks separately to prevent unexpected complications.

Background

ChatGPT and Microsoft’s commonly recommended P2V conversion tool is Disk2vhd. It allows conversion without shutting down Windows. Most articles from ~10 years ago suggest this tool. I initially tried splitting the system: storing the recovery and C drive in one VHD, and the database D drive in another, to reduce file size.

Symptom

Conversion seemed smooth — Windows Server 2012 was quickly turned into a VHD and mounted to a Hyper-V Gen1 VM. However, the system booted to a black screen with a blinking cursor. It wouldn’t start.

Lab1: Disk2vhd Troubleshooting

I consulted Copilot (Microsoft’s ChatGPT). It suggested booting using the Windows Server ISO, entering repair mode, and manually formatting a hidden ~99MB partition to FAT32 using diskpart to rebuild the boot partition. After hours of failed attempts and frustration, diskpart listed multiple duplicate partitions, and drives were missing from the directory. Something clearly wasn’t right.

Disk2vhd is better suited for legacy systems like XP, Win7, or Server 2008. It’s not smart at identifying boot partitions — whereas Windows Server 2012 uses UEFI/GPT partitioning. Knowing this, I switched tactics and tried StarWind’s V2V Converter / P2V Converter.

Lab12: Using V2V Converter / P2V Converter

This tool is extremely convenient but doesn’t offer saving to a local disk — it mounts directly onto Hyper-V. CPU, memory, and other settings are transferred automatically. The process takes longer than Disk2vhd and requires higher system privileges, but the result is flawless. Highly recommended for a complete and accurate conversion. (Remember to disable the virtual switch and update network settings first to avoid IP conflicts.)

It converts to a Gen2 VM by default, debunking online claims that Disk2vhd conversions work better as Gen1 VMs. StarWind’s tool is clearly the true lifesaver for aging servers.

Mistake I Made

During the migration, I chose to convert only the C drive and system partition — ignoring the D drive. Then I manually mounted the previously Disk2vhd-converted D drive to the new VM. Although the VM booted, disk management showed “ghost” partitions — both VHDs had separate recovery and system partitions, and the D drive received a strange drive letter.

Example:

  • VDisk1: 300MB |Recovery 99MB UFI |  C: 128GB         | Unused 1TB
  • VDisk2: 300MB |Recovery 99MB UFI | Unused 128GB |D: 128GB

This led to every DBA’s nightmare: “XXX database recovery pending.” SQL Server couldn’t load the MDF and LDF files — disaster. 

After renaming the drives and rebooting, SQL recovered (sort of), but Event Viewer was flooded with NTFS errors: “Delayed Write Failed – Data was lost.” These were symptoms of partition conflicts. While SQL could technically operate, the partition layout was a mess.

Lab 3: Partition Disaster

As an engineer, messy partitions are intolerable. So I tried reorganizing:

  • Format unused space on Disk1 as H:
  • Move D’s data to H:
  • Remove D’s drive letter and remove Disk2

After rebooting, SQL Server couldn’t load the databases — back to “XXX database recovery pending.”

And that was the end of that tragic chapter.

Lab 4: Successful Re-conversion

Finally, I used V2V Converter / P2V Converter again, this time selecting the entire machine. Though it took longer and the first boot searched for devices for a while, the machine ran smoothly and painlessly in its new virtual environment.

The Reason for the Ghost Drives

Disk2vhd’s documentation warns:

If you plan to boot from a VHD, do not attach it to the same system that created it. Doing so assigns a new disk signature to avoid conflicts. Windows uses disk signatures in the Boot Configuration Database (BCD), so the VM can’t find the boot disk when launched.

Although I didn’t mount the copied D drive back to the original machine, Disk2vhd embedded the partition table and boot sector into the VHD. Combining that with V2V Converter’s C drive VHD caused conflicts between partitions.

Final Thought

When converting machines with sensitive partitioning setups — don’t mix and match VHDs. You’re asking for trouble.

留言

這個網誌中的熱門文章

Redis 在 C#的應用

如何刪除Trello的卡片資訊 (deleting Trello cards)