Boot from USB

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Docfxit
Posts: 129
Joined: 23. May 2014, 12:35
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: XP Pro, Win7, Win10

Boot from USB

Post by Docfxit »

I have a Windows 10 Host and a Windows 10 Guest.
The Windows 10 Guest was ver. 21h2. I ran Windows10MediaCreationTool to update it to 22h2.
Now I'm getting BSOD "Your PC/Device needs to be repaired"
Error code: 0xc000000f
VBoxRecovery (.jpg
I'm trying to boot from a USB Windows 10 repair.

I tried mounting the USB drive:
In Disk Management the USB is drive 1
I ran this:

Code: Select all

C:\Programs\VirtualBox>C:\Programs\VirtualBox\VBoxManage createmedium disk --filename C:\Programs\VirtualBox\BootUSB.vmdk --variant=RawDisk --format=VMDK --property RawDrive=\\.\PhysicalDrive1
0%...VBOX_E_FILE_ERROR
VBoxManage.exe: error: Failed to create medium
VBoxManage.exe: error: Could not create the medium storage unit 'C:\Programs\VirtualBox\BootUSB.vmdk'.
VBoxManage.exe: error: VMDK: Image path: 'C:\Programs\VirtualBox\BootUSB.vmdk'. Failed to open the raw drive '\\.\PhysicalDrive1' for reading (VERR_ACCESS_DENIED) (VERR_ACCESS_DENIED).
VBoxManage.exe: error: VMDK: could not create raw descriptor for 'C:\Programs\VirtualBox\BootUSB.vmdk' (VERR_ACCESS_DENIED)
VBoxManage.exe: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium
VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleCreateMedium(struct HandlerArg *)" at line 634 of file VBoxManageDisk.cpp
I gave Administrator and my user name to:
C:\Programs\VirtualBox
And the USB drive F:

I don't understand why it shows Access Denied.

I also tried adding a Windows 10 .iso file to storage to see if i could get it to boot from there to repair the startup.
VBoxWin10 (.jpg
I don't know how to get it to boot from Windows 10 .iso so i can repair the boot up.
VBox.zip
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Boot from USB

Post by scottgus1 »

It will be a lot easier to use the ISO.

Your VM is booting using Legacy BIOS, so the boot order in the second screenshot is used and is correct: boot from the optical drive then the hard disk.

I'd try taking the Guest Additions ISO out and putting the Windows ISO in the SATA Port 1 Optical Drive.

If the ISO doesn't then boot and give you the opportunity to "Press any key to boot from DVD..." (which you should press a key btw) then there is something wrong with the ISO that is not letting it be bootable. It should be.

Re booting from the USB stick, Virtualbox only supports booting from USB when on EFI BIOS, and I don't think you can switch from Legacy to EFI with success.

You're using Raw Disk Access as a known workaround to boot a Legacy BIOS VM from USB. On Windows hosts, everything done regarding Raw Disk Access: vboxmanage command lines, Virtualbox main window, etc, must be done via Run As Administrator. And the disk being Raw Accessed must be Offline in Windows Disk Management. (Windows might not let USB drives be offlined, so this path may not work for you.)
Docfxit
Posts: 129
Joined: 23. May 2014, 12:35
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: XP Pro, Win7, Win10

Re: Boot from USB

Post by Docfxit »

I followed your instructions to use the ISO.
I did get the "Press any key to boot from DVD..."
That worked great...
I tried to use "Start up repair". With a shutdown three times.
It didn't repair it.
I tried using the Command prompt and using:
bootrec /fixmbr
This was successful.
bootrec /fixboot
Access Denined
bootrec /rebuildbcd
Total identified windows instalations: 0

I know Windows 10 is now on Drive E:

I don't know how to fix it when it's inside a VBox
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Boot from USB

Post by scottgus1 »

I'd suggest pretending it was a real PC instead of a VM and using Microsoft methods to try to troubleshoot it now. It seems that the Virtualbox 'hardware' is still working, if all that happened was a Windows Update, albeit a major one.
Post Reply