Can't attach VMDK to Virtual Machine (Thumb Drive mounted as Raw Disk)?

I'm trying to boot from a thumb drive in VirtualBox on Windows. The thumb drive has a copy of Windows 7, and its bootable.

I created a VMDK using vboxmanage according to Boot your USB Drive in VirtualBox. The VMDK is backed by the thumb drive. I'm at the point I am trying to attach the virtual disk to the virtual machine. When I do, the operation results in VERR_ACCESS_DENIED:

enter image description here

And:

Result Code: VBOX_E_FILE_ERROR (0x80BB0004)
Component: Medium
Interface: IMedium {05f2bbb6-a3a6-4fb9-9b49-6d0dda7142ac}
Callee: IVirtualBox {fafa4e17-1ee2-4905-a10e-fe7c18bf5554}
Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)

Since I am getting an Access Denied error, I added EVERYONE, Full Control to usb.vmdk. But that has not helped.

Why am I getting an Access Denied error, even though EVERYONE has Full Control?

How does one attach the VMDK to the system?


Solution 1:

This happens if you forget to run things as Administrator.

When you're doing the vboxmanage.exe bit, you must make sure you run the Command Prompt as Administrator.

Then, when you actually go to launch VirtualBox, you also need to make sure you run it as Administrator. That's because RAW access to the USB device itself requires Admin rights (permissions on your usb.vmdk file is not the problem - the error message is a bit misleading in that respect).

NOTE: Under Windows 8/8.1, even if you log in as Administrator, and even if you have disabled UAC, you must still explicitly grant admin rights to an application by right clicking the relevant shortcut then clicking the Run as administrator menu item. That's Windows 8 for you.

NOTE 2: If you're still stuck after trying the above, follow the advice of Korkman on the VirtualBox forums: https://forums.virtualbox.org/viewtopic.php?f=6&t=38914#p175089

Good luck, let us know how you go :-)