Now my VMWare Fusion Testing-Period is over. What a pity. Well, I was thinking about buying it, because its an excellent piece of software, especially because it supports BootCamp-Windows on-the-fly. But with a price of $80 (or $35 for an older version for students) it is not really cheap. I thought it has a good support for 3d-graphics, DirectX, etc., but it only supports a few games – as VirtualBox and Parallels does. It seems to heavily depend on the used solution and how it is implemented. Of course, Parallels and VMWare Fusion are supporting a lot more games, but on the other hand, well, I am not sure if thats worth it.
Since I wanted to reorganize my whole system setup in the next days, I risked losing data and tried to virtualize my BootCamp-Windows with VirtualBox. And so far, it seems to work perfectly – I tried it with Windows 7.
The first problem I had was to determine which Partition Windows actually is.
was telling that /dev/disk0s3 was mounted on /Volumes/BOOTCAMP, i.e., this is my device. So first,
$ sudo umount /Volumes/BOOTCAMP
unmounted the device. Then well, the device belongs to root – so
$ sudo su - # VBoxManage internalcommands createrawvmdk \ -filename win7bootcamp.vmdk -rawdisk /dev/disk0 -partitions 3
This command creates two files win7bootcamp.vmdk and win7bootcamp-pt.vmdk. Copying them into my home-folder and chowning them to my user-account makes these files readable (and writable) for VirtualBox in the user-mode. But, of course, it doesnt make the Device itself accessible. Therefore, I had to do
# chown username /dev/disk0s3
before starting VirtualBox. This – of course – is highly dangerous, since any usermode-process can access that Partition now. Now I started VirtualBox, and created a new VM with the Boot-Disk set to this win7bootcamp.vmdk. Then I started it and waited until it boots. As soon as VirtualBox has opened the device /dev/disk0s3, I changed it back to
# chown root /dev/disk0s3
From this time on, no other usermode-process should be able to access it again, but VirtualBox – since it has to keep it open – wont lose the ability to access it.
Ok, so far thats the procedure to actually get VirtualBox using the BootCamp-Partition. It booted – slowly. Actually, during the boot period, it seemed like VirtualBox would freeze, but it was only frozen for a few seconds. But after that, it really worked well. Windows Quickly recognized the new Hardware and installed Drivers for all it could find. I waited for this, but didnt restart, but installed the VirtualBox Guest Extensions. Then I restarted. W00t4ge – it worked perfectly (except that I couldnt restart – because VirtualBox seemed to close /dev/disk0s3 while rebooting, which means that I had to chown it again – i.e., restarting doesnt work, you have to shut down, and then boot it again).
Ok, but now, with all that new drivers and stuff, it works under VirtualBox, but does it also work when booted natively? – Yes. It does. It works perfectly so far, for me. To boot it under Mac OS X, I always have to do the procedure of
$ sudo chown username /dev/disk0s3
starting VirtualBox and Booting Windows, and then
$ sudo chown root /dev/disk0s3
again. Well, its less convenient that Parallels and VMWare. But its enough for me, and its better that paying 80$ for features I wont use. I wonder why VirtualBox doesnt support this per GUI. I mean – its comparably easy, it shouldnt be too hard to implement a GUI for that.
Just a Disclaimer: I was just trying this, because I couldnt find any tutorial or website describing how to do this or whether its possible at all. I didnt use it for a long time, and I cant say anything about a possible data loss. So if you are trying the same thing, well, you are doing it at your own risk.