Converting Physical Partition into VHDK error

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Phill
Posts: 1
Joined: 5. Dec 2017, 18:58

Converting Physical Partition into VHDK error

Post by Phill »

Hi, I have windows 7 installed on a partition on my windows 10 computer and I'm trying to convert that to a VMDK file so I can run it off my Virtual Box but I keep getting the error:

VBoxManage.exe: error: Cannot open the raw disk '\\.\PhsicalDrive0': VERR_FILE_NOT_FOUND
VBoxManage.exe: error: The raw disk vmdk file was not created

Command used:
vboxmanage internalcommands createrawvmdk -filename "C:\Users\User\VirtualBox VMs\Win.vmdk" -rawdisk \\.\PhsicalDrive0 -partitions 4

Things attempted.
-Using command in admin cmd
-reinstalling virtual box
-creating virtual box machine without disk added and using that folder

Thanks any help is appreciated :D
pheitman
Posts: 1
Joined: 13. Dec 2017, 22:24

Re: Converting Physical Partition into VHDK error

Post by pheitman »

My guess is that you did not run the Command Prompt as Administrator. Without doing that VBoxManage doesn't have permission to access PhysicalDisk0
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Converting Physical Partition into VHDK error

Post by socratis »

Phill wrote:PhsicalDrive0
You're missing the letter "y", as in "PhysicalDrive0"
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Converting Physical Partition into VHDK error

Post by mpack »

Besides which, "\\.\PhysicalDrive0" is the system drive. If you are intent on destroying all data on the host system drive surely there are faster, more direct ways to do it?
Attachments
warning.png
warning.png (7.21 KiB) Viewed 1093 times
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Converting Physical Partition into VHDK error

Post by socratis »

But mpack, the OP is going for "-partition 4". I don't know if this is the boot partition or not, but even then, something tells me that the whole thing might be wrong. Wouldn't you have to include the boot partition as well, not simply the Win7 partition? Which is itself the door to doom?

I don't know too much about rawdisk. I've used it many times, but only on stand-alone, external HDs, for which I couldn't care less if I lost the whole thing. Just the wording, on that warning you included, is more than enough for me, to keep me away from messing with the whole thing... ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Converting Physical Partition into VHDK error

Post by mpack »

AFAIK you have to offline the entire drive to get raw access. Sector level access means IOCTLs directly to the device driver, bypassing the filesystem stuff - which is where partitions are at. Obviously you can't offline the system drive.
Post Reply