This page was exported from phaq [ http://phaq.phunsites.net ] Export date:Tue Apr 23 11:10:20 2024 / +0000 GMT ___________________________________________________ Title: Refining application shortcut for shared BootCamp / VirtualBox Windows VM --------------------------------------------------- Here's a follow-up to my previous posts on sharing Windows 7 in BootCamp and VirtualBox and launching a VirtualBox VM directly through an icon shortcut. Concerning this topic I was asked if it's possible to have the BootCamp partition only umounted upon startup of the Windows VM. My original post referred to creating the file /etc/rc.local (or just editing it, if it already existed) and adding these commands in there: # grant VirtualBox permissions to Boot Camp partition # sudo chmod 777 /dev/disk0s3 diskutil umount /Volumes/BOOTCAMP The method described basically causes the system to grant permissions for raw partition access and permanently umount the BootCamp partition during bootup. If you however want the BootCamp partition only umounted upon startup of the Windows VM then please proceed as outlined below. First of all, edit your /etc/rc.local to just include these lines: # grant VirtualBox permissions to Boot Camp partition # sudo chmod 777 /dev/disk0s3 This will cause the permission to be properly set upon boot of OS X, which is still required. The partition however will not be umounted and thus appear on your Finder as usual. Now, assuming that you implemented the application shortcut method, you need to change the application launcher like this from your Terminal: cd "VirtualBox VMs/Win7onMBP" cat > "Windows 7.app/Contents/MacOS/startvm" << EOF #!/bin/sh diskutil umount /Volumes/BOOTCAMP [ ! -d /Volumes/Bootcamp ] && /usr/bin/VBoxManage startvm Win7onMBP EOF This will try to umount the BootCamp partition automatically when you click the icon. However, I've added an additional safety switch in there: I'm checking if the BootCamp partition is still mounted at /Volumes/BOOTCAMP. VirtualBox will only start if the BootCamp partition is not mounted. This will help in preventing ugly issues with partition access. --------------------------------------------------- Images: --------------------------------------------------- --------------------------------------------------- Post date: 2011-05-24 21:38:05 Post date GMT: 2011-05-24 20:38:05 Post modified date: 2011-05-24 21:42:25 Post modified date GMT: 2011-05-24 20:42:25 ____________________________________________________________________________________________ Export of Post and Page as text file has been powered by [ Universal Post Manager ] plugin from www.gconverters.com