Bootable VHD crashes when moved to a VM

Discussion in 'Windows 7' started by adric, Dec 3, 2025.

Tags:
  1. adric

    adric MDL Expert

    Jul 30, 2009
    1,525
    1,720
    60
    I have an W7 VHD that I boot locally and I now want to use it in a VM (VBox). The problem is, when I use the VHD in a VM, it starts to boot, but BSODs with 7b. When I try safe mode, it also abends with the same error. The last entry I see on the console before the BSOD is classpnp.sys which is a storage class driver. So I assume I have a disk or controller driver installed in the VHD that doesn't work in Vbox, which may be causing the crash. Not sure how to find out what's causing this.

    If anyone has any sugestions or a fix to resolve this issue, please let me know.
     
  2. CaptainKirk1966

    CaptainKirk1966 One of the Green Guys
    Staff Member

    Oct 31, 2009
    2,924
    1,940
    90
    Maybe you can't easily have it both ways. Boot vhd locally, run sysprep /generalize /shutdown, then try to boot the vhd on vbox.
     
  3. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream
    Staff Member

    Dec 21, 2012
    8,044
    10,273
    270
    0x7b = Inaccessible boot device

    You must match the controller type in the VM settings with the one the VHD originally booted under. So, if it was IDE, IDE controller. If it was SATA, SATA controller etc. Also note that VBox cannot boot Windows 7 in UEFI natively (it has a class 3 UEFI without CSM).
    Then, check what Boot Manager it used originally. It could very well have been using one from a different partition.

    Try the procedure from the post above mine, too.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. adric

    adric MDL Expert

    Jul 30, 2009
    1,525
    1,720
    60
    I wanted to try that as a last resort. Since generalize will make changes in the vhd I would need to save the original right?
     
  5. CaptainKirk1966

    CaptainKirk1966 One of the Green Guys
    Staff Member

    Oct 31, 2009
    2,924
    1,940
    90
    Yes. you'd best make a copy of the original. It's awkward, for sure.
     
  6. adric

    adric MDL Expert

    Jul 30, 2009
    1,525
    1,720
    60
    @Carlos Detweiller I booted the vhd and DevMgr under controllers shows Intel 6th gen SATA AHCI which matches the VM setting.
    I tried SATA ich6, but same problem. The VHD is mbr. Bootmgr appears ok when in the VM. The BCD I use for booting in the VM is different than the one for native boot.
    W7BCD.png NativeVHD .png Bootmgr.png
     
  7. adric

    adric MDL Expert

    Jul 30, 2009
    1,525
    1,720
    60
    #7 adric, Dec 3, 2025
    Last edited: Dec 3, 2025
    (OP)
    Well that did not work out to well. :oops: Sysprep seemed like it was doing the job for a while until it ended with sysprep fatal error(slc.dll?). The Win7 is x32 with the last ESU updates when it went EOL. I tried it anyway and got INT18 failure this time.

    Edit: the strange thing is, the native vhd still boots and starts installing all the drivers that sysprep generalized before the fatal error. l still don't know why I can't boot in the VM. Went from 7b to int18: boot failure :dunno:
    Drivers.png
     

    Attached Files:

  8. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream
    Staff Member

    Dec 21, 2012
    8,044
    10,273
    270
    I have no experience with VHDs, unfortunately. o_O

    Windows 7 now requires setting the VM acceleration type to Legacy in order to boot on some machines, but I do not think this applies to your case...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. NewEraCracker

    NewEraCracker MDL Senior Member

    Apr 19, 2011
    331
    544
    10
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. adric

    adric MDL Expert

    Jul 30, 2009
    1,525
    1,720
    60
    #10 adric, Dec 5, 2025
    Last edited: Dec 5, 2025
    (OP)
    The sysprep fatal error was because I forgot to check the SkipRearm reg entry before doing Generalize. It was zero and I had to change it to 1. Stuff I found out years ago, which my brain no longer remembers and. slc.dll should have been an indication of this to me. :confused:
    Even with a successful sysprep, that did not change much and I still need to follow up on a new 0e error.

    @NewEraCracker
    the VM is a standard creation and only HD is checked to boot and the int18 was caused because
    the boot partition was not marked active which turned into an 0e error after activating the partition.
     
  11. BigReds

    BigReds MDL Novice

    Apr 24, 2015
    32
    18
    0
    Make sure the EFI special os only box is not checked, MBR will not boot in virtualbox if checked.
    it will look for efi only bootloader in partition.
     
  12. adric

    adric MDL Expert

    Jul 30, 2009
    1,525
    1,720
    60
    #12 adric, Dec 5, 2025
    Last edited: Dec 5, 2025
    (OP)
    It isn't. Standard creation dosen't set this in VBOX on Win7. The 0e error was caused because -generalize did something with the mount point and I had to use Winntsetup to correct it. After that, the VHD now boots, but Generalize changed more that what I needed and treats the system somewhat like a new install. Too bad you can't just Generalize drivers and leave the rest as is.

    I still don't know what driver if at all, is causing the 7b BSOD in the VM.

    Anyone else booting Win7 in a native VHD from a local drive?
     
  13. adric

    adric MDL Expert

    Jul 30, 2009
    1,525
    1,720
    60
    #13 adric, Dec 17, 2025
    Last edited: Dec 17, 2025
    (OP)
    Sometimes it's best to give things a rest when you are getting nowhere. :confused: Today, I decided to give this issue another look. It turns out that the Vbox client will BSOD with a 7B when Intel's Rapid Storage Technology driver is installed on it. I had to add the Standard SATA AHCI Controller driver (mshdc.inf) to the VHD and then do a safe boot to remove the Intel Controller driver. After that, I was able to use the VHD in Vbox.