I created a vhdx file from the c: drive from a lenovo P1G3 a while back and thought I had a working VM from it, but apparently not. Now when I try to boot the VM I get the "The boot loader did not load an operating system". The host is a win10 using the Hyper-V manager, and the VM is set to gen2 with the secure boot disabled. The vhdx file does not look to be corrupt, as I can attach and browse the files without any errors. I've tried the basic windows install iso --> "Startup Repair" but no luck. I've gone around in circles trying to use the bootrec, bcdboot, diskpart, etc... utilities per various superuser and similar forums, but I cannot figure out what is needed, and I'm pretty spun around wondering if I'm even starting in the right place.
Edit: adding more detail about the drive. I only captured the C: volume of the drive, but have 2 unallocated volumes/partitions. Here is what the drive looks like when the vhdx is mounted.
updated 2/24: now 7.11GB of free space per multiple shrink commands


C:(see section "How do I configure system partitions on a new drive for applying an image?" at the end of this answer) – JW0914 Feb 21 '22 at 21:52C:was captured for the VHD, create two more partitions on the virtual drive (shrinktheC:partition) - EFI and WinRE - with theDiskPartcommands required being in the last section of the linked-to answer (technically a WinRE partition isn't needed in a virtual environment, but is recommended for convenience of use). If you captured both theC:partition and the EFI boot partition, boot WinPE/WinRE (WinPE is the install ISO) and issue:BootRec /FixMBR && BootRec /RebuildBCD– JW0914 Feb 23 '22 at 14:20C:partition first or enlarge the VHD by 1GB [1025MB RAW] if creating a WinRE partition, else only 128MB [132MB RAW] for the EFI boot partition. If shrinking, select theC:partition inDiskPart[lis vol→sel vol #], thenshrink desired=1025 minimum=1025[with WinRE] orshrink desired=132 minimum=132[EFI partition only]. I can't recall if theC:partition can be shrunk while booted to Windows, so if not, you'll need to boot WinPE (once the Windows installer's GUI loads, pressShift+F10to open a terminal) – JW0914 Feb 24 '22 at 15:51help cre par priand if you issuehelpby itself, it'll walk you through the correct help command to issue. – JW0914 Feb 24 '22 at 23:32DiskPartman page – JW0914 Feb 25 '22 at 03:10