Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've set up virtual box for being able to boot use the a partition I created on the hard drive. This isn't a virtual drive. Now before I install Linux Mint into this partition I want to configure it in such a way that it wont affect my windows boot. By that I mean that I don't want to see a boot option screen or slow my booting process in any way. But it is important to install Linux to an actual partition. This will allow for easier capture and moving of the VM to hard disc Later on and it will also make my encryption software work better. Is there any way to do this?

If the way that I've set up the boot from partition matters for this this is the method I used.

2) Create the vmdk file:
2.1) Find the partitions that are used by your linux installation: start cmd as admin and cd into the directory you installed virtualbox and run:

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe internalcommands listpartitions -rawdisk \\.\PhysicalDrive0
Oracle VM VirtualBox Command Line Management Interface Version 3.2.8
(C) 2005-2010 Oracle Corporation
All rights reserved.

Number Type StartCHS EndCHS Size (MiB) Start (Sect)
1 0x06 0 /1 /1 25 /254/63 203 63
2 0x07 26 /1 /40 1023/254/63 23999 417792
3 0x83 1023/254/63 1023/254/63 161242 49567744
5 0x07 1023/254/63 1023/254/63 42343 379792728
6 0x82 1023/254/63 1023/254/63 8635 466513920

PhysicalDrive0 indicates the first hard disk. Sort of like /dev/sda, /dev/sdb etc. Partition types 0×83 and 0×82 are the swap and ext3 partitions here.

From the listing identify all the partitions that are required by linux ( rootfs, swap, boot…)
Dont consider NTFS/VFAT partitions that you want to share between linux and windows.

2.2) Create the vmdk file with the partitions you just identified

VBoxManage.exe internalcommands createrawvmdk -filename C:\path\ubuntu.vmdk -rawdisk \\.\PhysicalDrive0 -partitions 3,6 -register

3) Start virtualbox. You have to start it as administrator, otherwise it wont be able to access the rawdisk.

4) Create a new VM using the vmdk you just created. This is a straightforward process. You would want to enable IO-APIC and if your box has muscle, allow more cores, 2d/3d acceleration etc.

5) And now, you’re all set. Start the VM. You should see the familiar grub boot screen. Select your ubuntu installation and it should come up without any issues.
share|improve this question

I thought vmdk is for vmware (though in most cases virtualbox can use it, but not always). Virtualbox does support raw disk:

However, it may not be what you are looking for. IN my experience it is not worth the trouble as the performance gain is minimal. For linux, it is far easier just to dd the disk later for v2p or v2v, as long as the disk partition at the destination is at least the size of your vm. you always need to deal with hw differences later.

Another thing to consider is simply to use a usb external disk/stick if you want to experiment with raw disk.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .