One of the problems with Win7 as a virtual machine is that there is not enough disk space, and a common way is to use shared folders, and I've encountered two big problems with this approach:
1. You cannot create a file.
2. After mapping to the letter, can not execute the inside executable file (directly in the vboxsrv inside is OK, but CMD can not cut the past)
It suddenly occurred to me today that I could use a disk partition directly to vbox, and I searched "vbox Direct Access disk partition" indeed:
sudo vboxmanage internalcommands createrawvmdk-filename/mnt/sda5.vmdk
-rawdisk/dev/sda-partitions 3,5-relative
sudo chown $USER/mnt/sda5*
sudo chmod 777/dev/sda3
sudo chmod 777/dev/sda5
Then the new disk/MNT/SDA5.VMDK in Storage/sata Controller is OK.
Description
1. of which 3, 5 corresponds to my original Win7 the following D and E disk, (f I installed as Ubuntu).
2. The purpose of relative is not to give/DEV/SDA permission to me.
3. Chown,chmod is designed to solve the problem of vbox_e_object_not_found when new disks are created.
After the virtual machine win7 up, explorer two more raw Disk, if you go to format is bad, because it is used for Linux.
Look at the layout with the Disks tool:
Sda:
sda1 | Sda2 | Sda3 | sda4|
SDA4:
Sda5 | Sda6 | Sda7 | sda8|
corresponding to the Win7 below,
SDA1 is the system reserved Partition 105MB
Sda2 is a C-disk 107GB.
Sda3 is the D-plate 137GB.
SDA4 are extended partitions, including:
SDA5 is e disk 137GB, the original F disk in the installation of Linux is divided into
SDA6 boot partition 128MB,SDA7 swap partition 1.8GB, SDA8 root partition 116GB.
To avoid misoperation, go to the Computer Management Disk Management to remove the assigned letter.