Converting Physical Partition into VHDK error

Discussions related to using VirtualBox on Windows hosts.

Converting Physical Partition into VHDK error

Postby Phill » 5. Dec 2017, 20:37

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
Phill
 
Posts: 1
Joined: 5. Dec 2017, 18:58

Re: Converting Physical Partition into VHDK error

Postby pheitman » 13. Dec 2017, 22:26

My guess is that you did not run the Command Prompt as Administrator. Without doing that VBoxManage doesn't have permission to access PhysicalDisk0
pheitman
 
Posts: 1
Joined: 13. Dec 2017, 22:24

Re: Converting Physical Partition into VHDK error

Postby socratis » 13. Dec 2017, 22:50

Phill wrote:PhsicalDrive0

You're missing the letter "y", as in "PhysicalDrive0"
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 12774
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: Converting Physical Partition into VHDK error

Postby mpack » 14. Dec 2017, 11:25

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 45 times
mpack
Site Moderator
 
Posts: 25508
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

Postby socratis » 14. Dec 2017, 12:14

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... ;)
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 12774
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: Converting Physical Partition into VHDK error

Postby mpack » 14. Dec 2017, 13:06

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.
mpack
Site Moderator
 
Posts: 25508
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP


Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: nathanalex66 and 44 guests