P2V from WS 2008 R2 fails with Corrupt VHD/VHDX?

VM image converter (VMDK, VHD, VHDX, IMG, RAW, QCOW and QCOW2), P2V migrator

Moderators: anton (staff), art (staff), Max (staff), Anatoly (staff)

Post Reply
TheWaterbug
Posts: 4
Joined: Tue Apr 11, 2023 9:23 pm

Tue Apr 11, 2023 9:50 pm

I'm attempting to virtualize a physical box running Windows Server 2008 R2. I installed and ran Starwind V2V 9.0.1.268 on the WS08R2 box, selected the Physical Disk containing the C: drive, and chose VHDX Growable, then copied the resulting 300GB VHDX file to a Windows 10 Pro box running HyperV. I compared file sizes before and after copying, and they're identical.

Here's what that physical disk looks like from the WS08R2 that's running on it:

Image

Now on the Win10 Host machine, I created a Gen 1 VM in HyperV, selected the existing VHDX file, and attempted to boot the VM, but I got the following error:

Image

If I attempt to Mount the VHDX from Windows Explorer on the Win10 Pro host box, I get the error:

Image

Here's what I see in Disk Management after that Mount operation fails:

Image

That partitioning looks nothing like what the original physical disk looked like.

I've tried converting to VHD, VHDX Growable, and VHDX Fixed size, and all fail in similar ways.

I've also tried volume-based conversion on both the original C: and E: volumes (where I believe E: is a recovery partition), and always get something similar to that first very-long error from HyperV when attempting to boot the VM.

Conversion takes 8-10 hours, so it's hard to run a lot of trials on this.

Am I doing something wrong? Or are there logs somewhere that can tell me more about how this is failing? Thanks!
TheWaterbug
Posts: 4
Joined: Tue Apr 11, 2023 9:23 pm

Tue Apr 11, 2023 9:51 pm

Here's the OCRed text from the error messages, so that it gets picked up by search engines:

Code: Select all

The application encountered an error while attempting to change the state of 'Softserve2'.
'Softserve2' failed to start.
Microsoft Emulated IDE Controller (Instance DI 83F8638B-8DCA-4152-9EDA-2CA8B33039B4): Failed to Power on with Error 'The process cannot access the file because it is being used by another process.'
Failed to open attachment 'F.:\Installers\SOFTSERVE2011_5ACF1E7B-0950-4B9F-9BAD-EFADA21FD6C3.avhdx'. Error: 'The
process cannot access the file because it si being used by another process.'
Failed to open attachment 'F.:\Installers\SOFTSERVE2011_5ACF1E7B-0950-4B9F-9BAD-EFADA21FD6C3.avhdx'. Error: 'The
process cannot access the file because it si being used by another process.'.
'Softserve2' failed to start. (Virtual machine DI 337C83AA-374D-4248-AB41-33133EEFEEA)
"Softserve2' Microsoft Emulated IDE Controller (Instance ID 83F8638B-8DCA-4152-9EDA-2CA8B33039B4): Failed to Power on with Error 'The process cannot
access the file because it is being used by another process.' (0x80070020). (Virtual machine DI 337C83AA-374D-4248-AB41-3E3133EEFEEA)
'Softserve2': Failed to open attachment 'F:lnstallers\SOFTSERVE2011_5ACF1E7B-0950-4B9F-9BAD-EFADA21FD6C3.avhdx'.Error:'The
process cannot access the file because it is being used by another process.' (Ox80070020). (Virtual machine DI 337C83AA-374D-4248-AB41-33133EEFEEA)
'Softserve2': Failed to open attachment
'F:\Installers\SOFTSERVE2011_5ACF1E7B-0950-4B9F-9BAD-EFADA21FD6C3.avhdx'. Error: 'The process cannot access the file because it is being used by another process.' (0x80070020). (Virtual machine DI 337C83AA-374D-4248-AB41-33133EEFEEA)

Code: Select all

The disk image isn't initialized, contains partitions that aren't recognizable, or contains volumes that haven't been assigned drive letters. Please use the Disk Management snap-in to make sure that the disk, partitions, and volumes are in a usable state.
yaroslav (staff)
Staff
Posts: 2345
Joined: Mon Nov 18, 2019 11:11 am

Wed Apr 12, 2023 9:23 pm

Make sure to have the VM shut down and have no snapshots associated with it.
Try converting individual disks and recreating the VM.
Could you please elaborate on what is that process that holding the VM?
TheWaterbug
Posts: 4
Joined: Tue Apr 11, 2023 9:23 pm

Thu Apr 13, 2023 10:38 pm

yaroslav (staff) wrote:Make sure to have the VM shut down and have no snapshots associated with it.
Try converting individual disks and recreating the VM.
Could you please elaborate on what is that process that holding the VM?
Hi Yaroslav,

Thanks for looking into this. I've tried this now with two different physical servers running Server 2008 R2 ("Pulserver" and "Softserve2011)), and both fail, but in different ways.

I can't shut them down, because they're in production, but P2V is doing the conversion from a snapshot/shadow copy, right?

So there is no VM for the original, because they're physical servers.

I am attempting to use the created VHDX files in new VMs created in HyperV on a Windows 10 Pro box named HyperVTest.

I just tried converting a different physical Windows 10 box (Prod5) to a VHDX, and when I moved that VHDX over to HyperVTest and created a new VM with that VHDX, and it worked flawlessly.

But the same procedure is not working when attempting P2V on DC1 and DC2.

When attempting to convert DC2 to a VHDX, the resulting VHDX cannot be mounted on HyperVTest, and attempting to use it in a VM on HyperVTest results in the errors that I screen capped in my first post.

When attempting to convert DC1 to a VHDX, the resulting VHDX _can_ be mounted on HyperVTest, but when I attempt to boot a new VM on HyperVTest using it, it fails to boot. If I boot this same VM from a Win10 recovery flash drive and enter the Windows Recovery Environment with a command prompt, I can see the drive, containing a \Windows directory, but I can't get it to boot. I even tried running bcdboot.exe C:\Windows, which reported success, but it still won't boot.

I've tried to P2V on Disk0, on Volume C: (the original Windows volume), and on C: and E: (the original System Reserved) volume, but no method allows me to boot.
TheWaterbug
Posts: 4
Joined: Tue Apr 11, 2023 9:23 pm

Fri Apr 14, 2023 2:36 am

Hmmm. I ran Disk2VHD, and it worked the first time.

Maybe there's something in Server 20008 R2 that's not being handled properly by StarWind P2V.
yaroslav (staff)
Staff
Posts: 2345
Joined: Mon Nov 18, 2019 11:11 am

Fri Apr 14, 2023 8:01 am

but P2V is doing the conversion from a snapshot/shadow copy, right?
No, you need to have snapshots merged.
Do you have any checkpoints for this VM?
zetisonu
Posts: 1
Joined: Wed Sep 13, 2023 4:26 am

Wed Sep 13, 2023 4:30 am

TheWaterbug wrote:Hmmm. I ran Disk2VHD, and it worked the first time.

Maybe there's something in Server 20008 R2 that's not being handled properly by StarWind P2V.
When it comes to migrating physical servers to virtual machines (P2V), one of the common hurdles that administrators may encounter is the failure of the process due to corrupt VHD/VHDX files. This issue can be particularly frustrating and time-consuming to resolve, but it's essential to tackle it systematically.

First and foremost, understanding the reasons behind corrupt VHD/VHDX files is crucial. Corruption can occur due to various factors, such as hardware issues, file system errors, or even improper shutdowns of the source server.
yaroslav (staff)
Staff
Posts: 2345
Joined: Mon Nov 18, 2019 11:11 am

Wed Sep 13, 2023 7:24 am

StarWind V2V Converter/P2V Migrator does not corrupt files as what it does is copy data to new mapping. If that VHD(X) was corrupted before, it will result in the same corrupted image.
In other words, corrupted VHD(X) is corrupted before conversion.
Post Reply