osx - Run Windows in VirtualBox from Mac with rEFIt
2013-08
I have a MacBook with OS X Lion, installed Windows 7 via Boot Camp, added Linux (Backtrack) using rEFIt.
I now access OS X, Windows and BackTrack via rEFIt's boot menu. When I choose Backtrack or Windows I am routed to GRUB boot loader, Windows 7 being one of GRUB's options. If I choose Windows, it boots Windows properly.
Output of fdisk /dev/disk0
:
Disk: /dev/disk0 geometry: 60801/255/63 [976773168 sectors]
Signature: 0xAA55
Starting Ending
id cyl hd sec - cyl hd sec [ start - size]
1: EE 1023 254 63 - 1023 254 63 [ 1 - 409639] <Unknown ID>
2: AF 1023 254 63 - 1023 254 63 [ 409640 - 741694744] HFS+
*3: 07 1023 254 63 - 1023 254 63 [ 819032064 - 157741056] HPFS/QNX/AUX
4: 82 1023 254 63 - 1023 254 63 [ 742105088 - 1951744] Linux swap
Output of diskutil list
:
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.1 GB disk0
1: EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 379.7 GB disk0s2
3: Microsoft Basic Data BOOTCAMP 80.8 GB disk0s3
4: Linux Swap 999.3 MB disk0s4
5: Microsoft Basic Data 38.4 GB disk0s5
I installed VirtualBox, created a virtual machine with the existing Backtrack install by doing the following:
- Click "new" in VirtualBox
- Input name and click Continue
- Choose RAM size and click Continue
- Change Backtrack partition permissions to 777
sudo VBoxManage internalcommands createrawvmdk -filename backtrack* -rawdisk /dev/disk0s5
sudo chown <username> backtrack*
- Select "use existing file" in VirtualBox, select
backtrack.vmdk
and click Continue - Finish
The Backtrack VM works.
I tried the same for Windows 7, using partition number 3 and 5 (for the vboxmanage
command above). Does not work. The VM is created but I can't start it. When creating the VM with partition 3 it just hangs when I launch it.
To try to speed up my Windows VirtualBox in a MacBook Pro running Mac OS X I intend to create a hard disk partition, same as for Boot Camp, and create a partition for Windows there. Would that speed up I/O? Is that something VirtualBox can handle?
Unfortunately VirtualBox has no support for partitions, and inasfar as I know VirtualBox does not allow you to use an actual hard disk partition - it only supports VirtualBox's own VDI format so far.
I'm running 3.0.8r53138, the latest version now, and I've been hunting for awhile now for exactly what you have asked for, to no avail.
In theory, it should speed up I/O operations, though the performance gains will be I suspect marginal (given my experience with VMWare Fusion + Bootcamp). Also, you might lose the ability to do snapshots, which is something I'd rather be able to do, then have marginally better performance.
P.S VMWare Fusion 3 is out now - i'm running it, and it's smooth like butter. You might to check it out.