This is a script that automates the process that allows your BootCamp to be run through VirtualBox on macOS. Note: This has only been tested for Windows 10 but it is coded to work for Windows 7, Vista, 8, 8.1, and 10.
There are a few things needed before using this script.
- BootCamp with Windows already set up
- VirtualBox installed onto your Mac (version 5.1.22 used with this script)
- Optional: Oracle VM VirtualBox Extension Pack may also need to be installed
- Optional: System Integrity Protection might need to be turned off while setting up (try using script before resorting to this)
- Start Mac in Recovery Mode
- Open Terminal under Utilities
- Enter
csrutil disable
- Use
csrutil enable
after set up is complete
- Use
- Restart Mac
vcamp - Connect your VirtualBox VM to your macOS Boot Camp
usage:
vcamp [commands] [ default | options ]
Commands:
create default | [-n, -d, -p, -e, -g, -b, -i] creates a VM for VirtualBox and connects your partition to it
remove default | [-n, -d, -p,] removes a VM for VirtualBox and destroys all subsequent files/folders made
restore [-p] restores any changes done to partition permissions
General Command Option:
default Use if your Boot Camp was made with the Boot Camp Assistant application on macOS
Specific Command Options:
DEFAULTS
--------
-n, --name MACHINE_NAME Select a name for the virtual machine you creating/removing VCamp
-d, --dest DESTINATION Select where you want the necessary files to be created/removed /path/to/VirtualCamp
-p, --part PARTITION_NAME Select the partition that holds Windows BOOTCAMP
-g, --guest Enable to download and attach compatible VBoxGuestAdditions Disabled
-e, --efi Enable if your partition was made with Boot Camp Assistant Disabled
-b, --bit32 Enable if your operating system is 32-bit 64-bit
-i, --icns filename.icns Select an ICNS that you want your app to display VirtualCamp/applet.icns
Examples:
vcamp create default
vcamp create --name Windows10 --part Untitled -e -g --dest ~/VirtualBox\ VMs/
vcamp remove default
vcamp remove -d ~\Desktop -n boot2
To set up your machine:
- Open your Terminal
- Clone the repository in desired location
cd VirtualCamp
/bin/bash ./vcamp.sh create default
The vcamp script can do this for you in one go:
- Open your Terminal
cd VirtualCamp
/bin/bash ./vcamp.sh remove
- Use
remove default
if you created your box using defaults - Select your VM's
path
orname
otherwise- e.g.
/bin/bash vcamp.sh remove -p ~\Desktop\machines -n boot2
- e.g.
You can always remove a box by:
- Going through the VirtualBox GUI
- Deleting the folder that has the machine's .vmdk
This script uses some default settings. Open your machines settings in VirtualBox to change to desired settings.
- Your VM's RAM will be 1/4th your actual machines
- Your VM's video ram will be set to 128
- Your VM's name will be
VirtualCamp
if--name
not used - The GuestAdditions for your version of VirtualBox will be added:
- If you use
create default
- If you use
create -g
- Install on Windows by going to D:/ through the Boot Camp VM
- If you use
Your VM's essential files can be found under a machines
folder in the VirtualCamp directory or your selected directory.
An application is built upon creating a BootCamp VM. It can be found under apps
folder. Its purpose is to directly open your BootCamp VM without the need of VirtualBox. The app can be dragged into your Applications.
- You can use keep the app in this folder for
vcamp remove
to handle it - You can update the icon to whatever you please by right clicking and selecting "Get Info"
There are tab completion features for vcamp.sh. To use go to Terminal and:
cd /path/to/VirtualCamp
chmod +x tab-complete.sh
source tab-complete.sh
If you get the UEFI Interactive Shell upon booting your VM, you must change toggle on/off your EFI. You can do this by:
- Opening VirtualBox.app
- Enter your VM's settings
- Go to System tab
- Under Motherboard, click "Enable EFI"
- Exit settings and reboot your VM
Here are some useful links that helped me create this script. If the script is not working for you or you just want to do the task manually, check these out!