0

Some time ago I got a request of making a fairly old (Windows 7 64bit) machine into a virtual machine. I was given a hdd clone of the machine in question however when this drive is used in VirtualBox it does not boot. Stops right at the beginning with error stating there is no bootable media. I have tried every possible configuration of VirtualBox machine to no avail. I then tried to boot that drive from a physical machine and to my surprise it did the same thing. Need to mention that whenever I attached this disk as just a storage disk and not a primary boot disk it works - I can access all the files etc, just cannot boot from it. I was entirely sure there must be something wrong with the disk but then I attached it to a little older Lenovo M710s pc and... IT DID BOOT. I was also told it succesfully booted back at the company who sent it to me on the machine it was cloned from.

Since I was tasked with making it into a VM I installed Virtual Box on said Lenovo that disk managed to boot on, made a VHD of that running machine and... same story. VirtualBox stops saying there is no bootable media and no configuration changes anything.

I am somehow convinced this is a hardware issue since on some physical machines it boots and on some it does not.

Another disclaimer - I did try to fix boot from Windows 7 USB, tried chkdsk, tried bootrec.exe in cmd. Nothing changes anything, it just does not boot.

Looking for any possible reasons and resolutions as to how to make the VM work or just assurance that it won't.

radzik
  • 9
  • 1
  • 1
    What method did you use to make a VHD of the disk? I have a feeling the solution to your problem might be described here https://superuser.com/questions/1070984/disktovhd-generated-vhd-is-not-bootable – Silbee Mar 22 '24 at 11:30
  • Did you try this: https://forums.virtualbox.org/viewtopic.php?t=26604#:~:text=VMLite%20have%20a%20P2V%20(Physical,PC%20to%20a%20virtual%20machine.&text=VMLite%20MyOldPCs%20is%20a%20physical,a%20virtual%20machine%20(VM). You need to convert the disk to virtual, not just try to run it. – John Mar 22 '24 at 12:04
  • @John I may not have specified it but I did of course make it into a VHD to be able to attach it to a VM, sorry for not being clear – radzik Mar 22 '24 at 13:13
  • If you properly converted the Windows 7 disk into a VHD, there may be an issue with the original Windows 7. You can try making a new Windows 7 machine and see if it runs satisfactorily . Windows 7 can no longer be updated. – John Mar 22 '24 at 13:15
  • @Silbee I used disk2vhd and specifically doublechecked that all partitions are included. I followed the instructions from the thread you've suggested but unfortunately to no avail. – radzik Mar 22 '24 at 13:29
  • @John I'm drawn to that conclusion as well. The source machine is used in production and since it's quite dated they're worried it might give up on itself soon. – radzik Mar 22 '24 at 13:36
  • Most (not all) windows 7 machines will run Windows 10. (Still in support). You might see if software they need runs in Windows 10. If so they could get a new machine. – John Mar 22 '24 at 13:43
  • 1
    From WinPE/WinRE: BootRec /FixMBR && BootRec /FixBoot && BootRec /RebuildBCD then reboot once command completes (UEFI: remove && BootRec /FixBoot). If that doesn't resolve it and it's a non-EFI VM, ensure the boot partition is marked active in DiskPart – JW0914 Mar 22 '24 at 14:25
  • Can you mount the virtual drive and see if the correct partition is flagged as bootable ? – Silbee Mar 25 '24 at 10:31
  • @JW0914 this route I have tried on both physical machines which didn't manage to boot from the HDD as well as on the VHD created from that HDD. no luck – radzik Mar 25 '24 at 11:08
  • @radzik Is it EFI boot? If so, follow Step #5 at the bottom of this answer. Do the VM settings match the machine settings it came from, specifically BIOS or UEFI? Please edit your question with the output of BcdEdit /store "Z:\path\to\OS\BCD" /enum all (path will either be the Boot or the EFI partitions) and what occurs when you issue the BootRec commands in my prior comment. The booting process of Windows is simple and those three BootRec commands, or the two plus the linked to BcdBoot command, will fix all boot issues. – JW0914 Mar 25 '24 at 11:32

0 Answers0