I am trying to run a VirtualBox machine from a physical disk.
I read that I have to run
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" internalcommands createrawvmdk -filename C:\PhysicalDrive2.vmdk -rawdisk \\.\PHYSICALDRIVE2
This worked once, but then I had to change disk (e.g. \\.\PhysicalDrive1), but after running the above command (changing PhysicalDrive2 to PhysicalDrive1) this is what I get:
The 'createrawvdk' subcommand is deprecated. The equivalent functionality is
available using the 'VBoxManage createmedium' command and should be used
instead. See 'VBoxManage help createmedium' for details.
0%...VBOX_E_FILE_ERROR
VBoxManage.exe: error: Failed to create medium
VBoxManage.exe: error: Could not create the medium storage unit 'C:\PhysicalDrive1.vmdk'.
VBoxManage.exe: error: VMDK: Image path: 'C:\PhysicalDrive1.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:\PhysicalDrive1.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
About that "subcommand deprecated" thing: I tried to use the createmedium
command, but I haven't found a way to make it work with physical drives.
Note 1: after I got that error using PhysicalDrive1, I tried to create another medium using PhysicalDrive2 (thinking that I could switch the disk number somehow, maybe plugging the devices in different orders) but now it won't work either.
Note 2: I have already tried running commands in Admin cmd.exe
.
Edit 1: I found something (it seems to be a more updated version on VirtualBox Manuals), but there is no reference to "accessing a physical disk"...
Edit 2: I belive this could be related to Windows Insiders. I had other problems related to virtualization when using a non-stable Windows release.