I am attempting to create a VMDK of my Windows Partition (Win 10 x64 Pro - insider preview) on disk /dev/sda, where my Windows partition is /dev/sda1.
Virtual Box has the option of creating a vmdk from a partition via the
From the doc page found here:
To create a special image for raw partition support (which will contain a small amount of data, as already mentioned), on a Linux host, use the command
VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk -rawdisk /dev/sda -partitions 1,5
As you can see, the command is identical to the one for "full hard disk" access, except for the additional -partitions parameter. This example would create the image /path/to/file.vmdk (which, again, must be absolute), and partitions 1 and 5 of /dev/sda would be made accessible to the guest.
please note: to allow for per user creation and editing of disks, I used
sudo usermod -a -G disk cx
where my user is
Thus, applying the above commands by:
VBoxManage internalcommands createrawvmdk -filename win_hdd_raw.vmdk -rawdisk /dev/sda -partitions 1
RAW host disk access VMDK file win_hdd_raw.vmdk created successfully.
2 files created when running the
# ls -la win_hdd_raw* -rw------- 1 cx cx 161280 Nov 23 00:37 win_hdd_raw-pt.vmdk -rw------- 1 cx cx 929 Nov 23 00:37 win_hdd_raw.vmdk
Loading into VBox, using file
win_hdd_raw.vmdk I see:
then firing it up, keeping all settings as default I get the following error:
This error was diagnosed be someone from the comment section of another question I posted.
In the comment section: @Seth resolved it was that the entire hard drive was being used, thus VBox attempted to load grub (my bootloader), this was causing the error I specified above.
VBoxManage internalcommands listpartitions -rawdisk /dev/sda
Number Type StartCHS EndCHS Size (MiB) Start (Sect) 1 0x07 0 /32 /33 1023/254/63 235520 2048 2 0x83 1023/254/63 1023/254/63 1024 482347008 5 0x83 1023/254/63 1023/254/63 173595 484446208 6 0x83 1023/254/63 1023/254/63 32580 839970816 7 0x83 1023/254/63 1023/254/63 14760 906696704 8 0x83 1023/254/63 1023/254/63 15360 936927232 4 0x82 1023/254/63 1023/254/63 4096 968384512
fdisk -l Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 482347007 482344960 230G 7 HPFS/NTFS/exFAT /dev/sda2 482347008 484444159 2097152 1G 83 Linux /dev/sda3 484444160 968384511 483940352 230.8G 5 Extended /dev/sda4 968384512 976773119 8388608 4G 82 Linux swap / Solaris /dev/sda5 484446208 839968767 355522560 169.5G 83 Linux /dev/sda6 839970816 906694655 66723840 31.8G 83 Linux /dev/sda7 906696704 936925183 30228480 14.4G 83 Linux /dev/sda8 936927232 968384511 31457280 15G 83 Linux
from the above info, one can see that partition "1" refers to a 230Gb partition of type NTFS, which is my Windows Partition.
I do not see if and where I made a mistake,
Enable EFI (Special OSes) - enabled
Running the VM, I get:
WHich is the same/similar issue I had in the question linked to the post on which @Seth commented