Using a physical hard drive (raw vmdk)

Discussions related to using VirtualBox on Windows hosts.
Post Reply
abalter
Posts: 17
Joined: 16. Aug 2007, 16:09

Using a physical hard drive (raw vmdk)

Post by abalter »

I'm trying to follow this guide.

http://www.serverwatch.com/server-tutor ... ox-vm.html

to use an external 55GB SSD. Here is how I found my disk numbers:

Code: Select all

C:\Program Files\Oracle\VirtualBox>C:\Windows\System32\diskpart

Microsoft DiskPart version 10.0.10240

Copyright (C) 1999-2013 Microsoft Corporation.
On computer: NEWBOX

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          931 GB      0 B        *
  Disk 1    Online           55 GB      0 B

DISKPART>
So I entered the command:

Code: Select all

C:\Program Files\Oracle\VirtualBox>VBoxManage internalcommands createrawvmdk -filename "C:\Users\abalter\VirtualBox VMs\traveller\traveller.vmdk" -rawdisk \\.\PhysicalDrive1
RAW host disk access VMDK file C:\Users\abalter\VirtualBox VMs\traveller\traveller.vmdk created successfully.
In virtualbox, I try to add the vmdk to an existing vritual machine, and I get the error shown in the image below.
failed to open disk image file c.PNG
failed to open disk image file c.PNG (58.02 KiB) Viewed 6483 times
VB full error.PNG
VB full error.PNG (18.04 KiB) Viewed 6479 times
Why is it looking for image file "C"? diskpart clearly said the physical drive was #1.

Also, if I try to create the vmdk without being in an elevated prompt, the operation fails.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Using a physical hard drive (raw vmdk)

Post by scottgus1 »

It's looking in C: because your command told Virtualbox to make the pointer file on the C: drive ("C:\Users\abalter\VirtualBox VMs\traveller\traveller.vmdk") Best as I understand from reading the forum(I have not done raw disk access) later Windows OSs need Run-as-Admin for raw disk access to work.

Someone else will have to help with the Access Denied error. Try googling "raw disk access denied site:forums.virtualbox.org"
Post Reply