I can not boot my VHDX which was created from physical drive
I suggest bootrec /fixboot
or bootrec /rebuildbcd
while booting the VM with the disk attached, but to write a bit more for my tip in your case, as I seen your C drive is actually the E drive, check bcdedit
please too;
Boot the virtual machine from the correct Microsoft Windows installation media (Correct architecture and version of the operating system).
Select the appropriate keyboard layout and language options and click Next.
Click Repair your computer.
Select the operating system to be repaired and click Next.
Click Start > Run, type cmd and click OK.
Type bcdedit
and press Enter.
Under the Windows Boot Manager title with the identifier set to {bootmgr}
, you may see that the device is set to boot. Similarly, under the Windows Boot Loader with the identifier set to {default}
, you may see that the device and osdevice are set to boot. These items should be set properly for your environment. Usually these appear as partition=C:
. In some cases the {default}
identifier may have them set to partition=E:
.
Run these commands to correct the configuration:
Note: bcdedit
is located in this path: c:\windows\system32
.
bcdedit /set {bootmgr} device partition=C:
bcdedit /set {default} device partition=C:
bcdedit /set {default} osdevice partition=C:
Type exit at the command prompt and select Shutdown. The reconfigure should now complete successfully. If it fails again, repeat Steps 1 to 7 and then run these commands to set the default device to partition=E:
bcdedit /set {bootmgr} device partition=C:
bcdedit /set {default} device partition=E:
bcdedit /set {default} osdevice partition=E:
Related videos on Youtube
Comments
-
SimonS over 1 year
I need to migrate my Server 2012 R2 Fileserver (physical) to another Server (virtual). That's why I need to create VHDX Files to run them later in Hyper-V
All my drives were no problem, except the C Drive.
Whenever I boot the created C Drive, I get this error:
If I simply open the VHDX on my filesystem, or on any server, I get the following error which says
you need to format the F: Drive before you can use it
:As you can see, the VHDX strangely contains 2 drives, and one of them (F:) is not formatted. that's why I can't use the VHDX file, because it does not recognize this drive I guess. I guess this is where EFI is located.
I tried to create the VHDX in 3 different ways. For the first two ways I tried Disk2VHD
like this (I tried it with the
\\?\volume
and without the\\?\volume
partition):The third way I tried is directly from Hyper-V where I could say I wanted to create a VHDX from a physical drive.
but all of them get the same end result, the corrupted VHDX.
I read somewhere that I need to
mountvol x: /s
first to make my EFI Partition visible for disk2vhd, butmountvol
does not seem to have a/s
anymore?How can I get a working VHDX? Thanks
-
yagmoth555 about 6 yearsA generic step, but can you boot on the install media to do a bootrec /fixboot ? or even bootrec /RebuildBcd
-
SimonS about 6 years@yagmoth555 you mean start the newly created machine with an WindowsServer.iso and the C-drive attached?
-
yagmoth555 about 6 yearsYes It's what I meant
-
SimonS about 6 years@yagmoth555 in diskpart, I see that the "onknown" volume is the C:\ drive, and the actual C drive is E. I guess if I could change them it should work. but diskpart does not save the changes.... trying to do a bootrec....
-
-
SimonS about 6 yearsI did it slightly different, with
DISKPART
i removed the letter from the C-driveremove letter=C
then assign letter=C to the E-drive, thenbootrec /RebuildBcD
and I had to change Generation 2 VM to Generation 1 for it to work