[Solved] Trouble Disk2VHD P2V Windows Server 2016 Essentials

Discussions about using Windows guests in VirtualBox.
Post Reply
Jarvar
Posts: 5
Joined: 22. Aug 2019, 14:21

[Solved] Trouble Disk2VHD P2V Windows Server 2016 Essentials

Post by Jarvar »

Hello,
I am new here and to posting.
I have been trying to convert a physical Windows Server 2016 Essentials machine into a VM on Virtualbox. I have tried several options, unchecking VHDX and unchecking both VHDX and Shadow Copies and have not been able to get it to work in Virtualbox Version 6.0.10 r132072 (Qt5.6.2).

I have tried with the system motherboard enabling EFI and it still does not work. If I don't check it off Enable EFI in the system motherboard I get a Fatal: No bootable medium found! System halted.
When EFI is checked off I get some errors. that results in defaulting to startup.nsh

The one way which I have got it working is if I use vmware vCenter to convert the physical machine into a vmdk. I opened it up in vmware workstation 15 and then I used VBoxManage.exe clonehd --format vdi of the vmdk file and then it seems to work.
I would love to skip this extra step and I am not sure if something is getting lost in between.
Any help would be much appreciated.
Thank you.
Last edited by socratis on 23. Aug 2019, 18:47, edited 1 time in total.
Reason: Marked as [Solved].
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Trouble Disk2VHD P2V Windows Server 2016 Essentials

Post by scottgus1 »

I haven't done a P2V myself (gotta try it one day). I have read a few attempts on the forum. Most folks take only the C drive, not the whole disk, and their guest won't boot. Did you make sure in Disk2VHD to take the whole drive?

If you did take the whole drive, please relay the exact error messages you get, and if the error shows in a Virtualbox popup or are within the guest OS window as a guest OS error message. If you can't figure out which is the source of the error, take a PNG screenshot, crop & resize to get the pertinent parts under the forum's 128kB size limit, & post using the forum's Upload Attachment tab.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Trouble Disk2VHD P2V Windows Server 2016 Essentials

Post by mpack »

It's not a good idea to try randomly checking and unchacking dialog checkboxes: if you don't know what an option does then you should leave the defaults selected.

VirtualBox has no official support for VHDX, so you should not select that container format. The shadow copy option in Disk2VHD makes little difference to the final result. It's a minor but useful safety measure intended to allow you to continue using the original PC while imaging. I'm sure this will be checked by default, so I'd leave it that way.

If the drive is formatted with GPT partitions then you must use the EFI option in VirtualBox. The legacy (MBR) BIOS does not understand GPT, so all it will see is an empty drive. If you can't get it to boot in EFI then you must solve that specific problem.
Jarvar
Posts: 5
Joined: 22. Aug 2019, 14:21

Re: Trouble Disk2VHD P2V Windows Server 2016 Essentials

Post by Jarvar »

I did not check these things randomly. There are different tutorials online and some say to check and some don't so I created new VHDs with different parameters and tried to load them without success.
So the latest try resulted in a startsh.nsh

It is a GPT formatted drive and I did use the EFI option in Virtualbox
here is a screenshot of the latest attempt.
Attachments
VirtualBox_22_08_2019_17_16_01.png
VirtualBox_22_08_2019_17_16_01.png (17.52 KiB) Viewed 8341 times
Last edited by socratis on 23. Aug 2019, 00:37, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Trouble Disk2VHD P2V Windows Server 2016 Essentials

Post by socratis »

That is the EFI shell when no bootable medium is found. Are you sure you selected all the partitions when you did the Disk2VHD, and not only the data (C:\) partition? Because if you didn't include the original EFI partition there's no way that it will be able to boot...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Jarvar
Posts: 5
Joined: 22. Aug 2019, 14:21

Re: Trouble Disk2VHD P2V Windows Server 2016 Essentials

Post by Jarvar »

I selected all the partitions. The only partition which I unselected was the external USB drive which I was savings the file to, I also unselected a USB drive that is completely used by Windows Server Backup which is another external USB drive. I don't have the USB drive which I was saving to attached at the moment though when taking this screen shot.
Attachments
Disk2.JPG
Disk2.JPG (49.83 KiB) Viewed 8312 times
Jarvar
Posts: 5
Joined: 22. Aug 2019, 14:21

Re: Trouble Disk2VHD P2V Windows Server 2016 Essentials

Post by Jarvar »

It's odd. I think I get it. It seems to be something witht he Dis2VHD for this particular Windows Server 2016 Essentials as I see a few more partitions when I use the Windows Disk management tool.
I don't see any other options to show these other partitions though. I did contrast this to Disk2vhd on a workstation and it does show the smaller EFI partitions and windows recovery environment.
Attachments
Disk3_copy.jpg
Disk3_copy.jpg (102.66 KiB) Viewed 8311 times
Jarvar
Posts: 5
Joined: 22. Aug 2019, 14:21

Re: Trouble Disk2VHD P2V Windows Server 2016 Essentials

Post by Jarvar »

Looks like I got it working. Found a site that talked about making the EFI partition available to Disk2vhd using mountvol drive: /S in CMD as administrator.
https://superuser.com/questions/1070984 ... t-bootable
However, after doing that there was a persistent error showing Snapshotting so another site recommended unchecking it. As of right now the Windows Server 2016 Essentials version is running fine in VirtualBox 6.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Trouble Disk2VHD P2V Windows Server 2016 Essentials

Post by socratis »

Jarvar wrote:As of right now the Windows Server 2016 Essentials version is running fine in VirtualBox 6.
Great! Thanks for the linked article and the explanation. Marking as [Solved].
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: [Solved] Trouble Disk2VHD P2V Windows Server 2016 Essentials

Post by mpack »

That article IS interesting, e.g. I didn't know about the new Hyper-v disk imaging feature.

However, that is very odd behaviour from Disk2VHD, frankly it seems like poor programming to me. It can't see partitions unless they're mounted in Windows? In that case how can it copy the partition map? It doesn't know not to apply the volume snapshot feature to filesystems that don't support it? (like the FAT filesystem on an EFI System partition).
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: [Solved] Trouble Disk2VHD P2V Windows Server 2016 Essentials

Post by fth0 »

My educated guess from the given information:

The Disk Management shows some (but not all) of the not mounted partitions as 100% free and doesn't know their File System. And if Disk2vhd offers only partitions which it deems not to be empty ... ;) Additionally, Disk2vhd would have to mount those partitions which could have a major impact on the running OS, so the user is left responsible for the mounting. Of course, this should be documented ...
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: [Solved] Trouble Disk2VHD P2V Windows Server 2016 Essentials

Post by mpack »

All I can tell you is that my own CloneVDI tool is able to copy the entire host drive at a sector level without mounting partitions, so there's no technical reason for this weakness IMHO.

My own best guess is that if the volume snapshot feature is enabled then it makes a list of volumes which can be snapshotted - and it can't cope with a mix of supported/unsupported filesystems.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: [Solved] Trouble Disk2VHD P2V Windows Server 2016 Essentials

Post by fth0 »

mpack wrote:My own best guess is that if the volume snapshot feature is enabled then it makes a list of volumes which can be snapshotted - and it can't cope with a mix of supported/unsupported filesystems.
Yes, a few minutes ago I thought your best guess fits the bill, because I remembered reading that volume snapshots are only possible on NTFS volumes, and an EFI partition is a FAT32 volume. But then I tested Disk2vhd on a brand new notebook and it seems to defeat all of our theories:

Disk Management on Window 10 1903 shows 5 partitions (GPT with EFI, Recovery, C: NTFS, D: exFAT, RAW (empty, intended for ext4)), and the not mounted EFI partition as 100% free. Disk2vhd v2.01 shows all partitions, including the EFI partition as partly filled, independantly of the Use Volume Shadow Copy checkbox.

Additionally, I just noted a difference to the OP's system (besides the OS): There is a 100 MB partition, which I associate with BitLocker encryption on older Windows OS versions. At the moment I'm puzzled.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: [Solved] Trouble Disk2VHD P2V Windows Server 2016 Essentials

Post by mpack »

My own Win10 host has that same 100MB partition, it seems to be standard in Win10 installs. The Windows 10 Disk Manager normally hides it from the list, CloneVDI lists it however. It is labelled as "Microsoft System reserved" (in the GPT register of partition types if I recall) and it doesn't use a standard filesystem. I'll run CloneVDI right now to see if my newly reinstalled Win10 1903 install still has it...
Capture.PNG
Capture.PNG (21.24 KiB) Viewed 8257 times
Yup, still there, and I've never used BitLocker. I assume Microsoft uses it to hide stuff away, just like it used to with the now obsolete "Windows Dynamic Disk" upper sectors.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: [Solved] Trouble Disk2VHD P2V Windows Server 2016 Essentials

Post by fth0 »

You were right: The Microsoft Reserved Partition (MSR) is only 16 MB on my Windows 10 1903, and shown in Diskpart, but not in Disk Management or Disk2vhd.

In the past, when the MSR was introduced (independently of the ESP (EFI system partition)), one of its largest uses was assisting Windows Updates needing restarts: The updates were put in the MSR while shutting down, and installed from the MSR while starting up. On UEFI systems, I think the ESP is used for that, so the MSR can be as small as 16 MB now.

Regarding BitLocker, my brain seems to be mistaken: Current documentation mandates an unencrypted partition with at least 1,5 GB, and neither the MSR nor the ESP are that large.

After reading https://en.wikipedia.org/wiki/Microsoft ... _Partition (disputed for accuracy), it seems to be dependent on several different factors (e.g. GPT/MBR, BIOS/UEFI, SSD/HDD), and to have a lot of uses.
Post Reply