How does vbox directly access physical disk partitions?

Source: Internet
Author: User

One problem with using win7 as a virtual machine is that the disk space is insufficient. A common approach is to use shared folders,
I encountered two major problems using this method:
1. Files cannot be created.
2. After ing to a drive letter, you cannot execute the executable files in it (it can be directly in \ VBOXSRV, but cmd cannot be switched over)

Today, I suddenly thought, could I directly use the disk partition for vbox?
"Vbox direct access disk partition"
It is indeed possible:

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 add the disk/mnt/sda5.vmdk in the Storage/SATA Controller.

Note:
1. Among them, 3 and 5 correspond to the D and E disks under my original win7 (I installed the f disk as ubuntu ).
2. The purpose of adding relative is not to grant/dev/sda permissions to me.
3. chown, chmod is used to solve the problem of VBOX_E_OBJECT_NOT_FOUND when adding a disk.

After Windows 7 is started, explorer has two more Raw disks. If you go to format, it will be broken because it is used in linux.
View the layout using the Disks tool as follows:

Sda:
Sda1 | sda2 | sda3 | sda4 |

Sda4:
Sda5 | sda6 | sda7 | sda8 |

Corresponding to win7,
Sda1 is the system reserved partition of 105 MB.
Sda2 is a C drive 107 GB
Sda3 is d disk 137 GB
Sda4 is an extended partition, including:
Sda5 is an e-drive of 137 GB. The original F-drive is divided
The sda6 boot partition is 128 MB, The sda7 swap partition is 1.8 GB, And the sda8 root partition is 116 GB.

To avoid misoperations, go to Computer Management disk management and remove the allocated drive letter.

Reference
Http://www.virtualbox.org/manual/ch09.html#rawdisk
Http://blog.laaz.org/tech/2012/04/24/installing-windows-7-on-macbook-pro-without-superdrive/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.