Sun VirtualBox Command Line Management Interface Version 3.1.6
(C) 2005-2010 Sun Microsystems, Inc.
All rights reserved.
Usage: VBoxManage internalcommands <command> [command arguments]
Commands:
createrawvmdk -filename <filename> -rawdisk <diskname>
[-partitions <list of partition numbers> [-mbr <filename>] ]
[-register] [-relative]
Creates a new VMDK image which gives access to an entite host disk (if
the parameter -partitions is not specified) or some partitions of a
host disk. If access to individual partitions is granted, then the
parameter -mbr can be used to specify an alternative MBR to be used
(the partitioning information in the MBR file is ignored).
The diskname is on Linux e.g. /dev/sda, and on Windows e.g.
\\.\PhysicalDrive0).
On Linux host the parameter -relative causes a VMDK file to be created
which refers to individual partitions instead to the entire disk.
Optionally the created image can be immediately registered.
The necessary partition numbers can be queried with
VBoxManage internalcommands listpartitions
WARNING: This is a development tool and shall only be used to analyse
problems. It is completely unsupported and will change in
incompatible ways without warning.
Syntax error: Invalid parameter '\\.\PhysicalDrive2'
Press any key to continue . . .
has anyone every encountered this problem? or does anyone see something wrong with my setup?
I have not gotten that particular error. How you tried with the double quotes removed? And is there a space between the minus sign and register? There should not be.
I have gotten this to work with two different USB HDs. So the technique is correct.
The problem I have run into is the good-old Windows 7 security model. Using my normal UAC authority (my ID is in the administrator group) I could not create the VMDK - access to the USB drive is denied. To access the physical drive to create the USB VMDKs I had to run the CMD window as administrator. But then VirtualBox Media Manager could not access the VMDKs.......... So I have to run VirtualBox as administrator when I want to test a USB boot.
i have already tried using double quotes and single quotes around \\.\PhysicalDrive2 but it gave the same error. also, there are no spaces in the command parameter switches (i.e. -register not - register)
there are 2 possibilities i can think of that could be causing the "invalid parameter" error:
i was not running the command window with admin rights (even though i have UAC completely turned off).
my USB drive is not showing up as "Removable" in disk management.
other than that i have no clue why it wouldn't be working. i will try again later making sure that the command is running with admin rights and report back.
well i managed to get the raw disk created. i simply opened a command window in admin mode inside the Virtualbox installation directory and the command ran successfully. i was also able to use the disk in a VM and see its contents.
however, any changes to the disk made inside the VM were not saved on the physical disk itself. i also tried using the writethrough switch at the command line but still no luck. does anyone know why that could be?
The most likely reason is that security measures introduced in Vista (inherited by Win7) are blocking you.
I'm curious why you are doing this the hard way. Why not just create a shared folder on the removable drive? Why do you need raw access to the whole drive?
the reason is i'm trying to access the physical itself drive outside the guest OS using bootable software. therefore, shared folders wont help me.
i am currently running with UAC off. i have even tried running Virtualbox in admin mode but still no changes are made to the drive. is there another way to bypass the windows 7 security?
Dili wrote:i am currently running with UAC off. i have even tried running Virtualbox in admin mode but still no changes are made to the drive.
If it's the problem I'm thinking of, neither of those things would help. The only entity allowed to do sector level writes to a drive under Windows (Vista and later) is a kernel mode device driver. However I may have been a bit quick to suspect this particular issue: if that was the problem then I would have expected something like a sharing violation when VBox requested read/write access, not simply "writes that do nothing". The latter sounds more like a drive configured for immutable operation.
mpack wrote:The latter sounds more like a drive configured for immutable operation.
would you know how to setup a mutable rawdisk drive? as i stated before i've already tried using the writethrough switch at the VBoxManage command line but still no success.