In the 'individual partitions' section of Raw Disk Access, the command for adding partitions is shown thus:
Code: Select all
VBoxManage internalcommands createrawvmdk -filename \
path-to-file.vmdk -rawdisk /dev/sda -partitions 1,5
The final backslash on the first line is a 'line continuation' character, meaning the command can be:
Code: Select all
VBoxManage internalcommands createrawvmdk -filename path-to-file.vmdk -rawdisk /dev/sda -partitions 1,5
For Windows hosts this would theoretically be:
Code: Select all
VBoxManage internalcommands createrawvmdk -filename path-to-file.vmdk -rawdisk \\.\PhysicalDrive0 -partitions 1,5
Substitute the correct numbers for your desired partitions.
Raw Disk Access on Windows Hosts requires these things:
- All things in the Raw Disk Access setup related to Virtualbox must be Run As Administrator, even if you already have admin privileges.
- The disk being Raw-Disk-Accessed must be "Offline" in the Disk Management console.
Point 2 prevents the boot disk or partitions thereof from being Raw-Disk-Accessed on a Windows host, because the boot disk cannot be taken off-line. So if "Disk 1 Part 3" above is the boot disk, this won't work on a Windows host. Also note that one day Disk 1 could point to a different disk than it does today, and Raw Disk Access could mess up good data.
Windows prevents Point 2 from working on a USB-attached drive: Windows won't let USB drives go Offline in Disk Management.