Version: OS X El Capitan 10.11.6
Build Version: 15G31
Provider: VirtualBox
- 4 GB of memory
- 2 CPUs
- 128 GB dynamically-allocated disk (12.21 GB using by operation system)
- Xcode Command Line Tools (version 2343)
user:vagrant
password:vagrant
- Install Oracle VM VirtualBox
- Install Oracle VM VirtualBox Extension Pack
- Install Vagrant
Note: Default download location of boxes: ~/.vagrant.d/boxes. You can change it via the VAGRANT_HOME
environment variable.
# Create a folder and go into it
$ mkdir macos-el-capitan && cd macos-el-capitan
# Download necessary Vagrant box
$ vagrant init jhcook/osx-elcapitan-10.11
- Save below code as
Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "jhcook/osx-elcapitan-10.11"
# Synced folder are not supported under Mac OS X
config.vm.synced_folder ".", "/vagrant", :disabled => true
# Temporary fix for annoying "Replace key" issue
config.ssh.insert_key = false
config.vm.provider "virtualbox" do |vb|
# Customize the amount of memory on the VM:
vb.memory = "4096"
#vb.customize ["modifyvm", :id, "--vram", "2048"]
# Display the VirtualBox GUI when booting the machine. You might want to turn 3D accelerating to speed-up VM GUI.
#vb.gui = true
# Fix "hfs mounted macintosh hd on device root_device" issue
vb.customize ["modifyvm", :id, "--cpuidset", "1","000206a7","02100800","1fbae3bf","bfebfbff"]
# Some more hacks for device recognition
vb.customize ["setextradata", :id, "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct", "MacBookPro11,3"]
vb.customize ["setextradata", :id, "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion", "1.0"]
vb.customize ["setextradata", :id, "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct", "Iloveapple"]
vb.customize ["setextradata", :id, "VBoxInternal/Devices/smc/0/Config/DeviceKey", "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"]
#vb.customize ["setextradata", :id, "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC", "1"]
# Set resolution on macOS, enable vb.gui first
# Values: 0 = 640x480, 1 = 800x600, 2 = 1024x768, 3 = 1280x1024, 4 = 1440x900, 5 = 1920x1200
#vb.customize ["setextradata", :id, "VBoxInternal2/EfiGopMode", "5"]
#vb.customize ["setextradata", :id, "CustomVideoMode1", "1920x1080x32"]
#vb.customize ["setextradata", :id, "GUI/CustomVideoMode1", "1920x1080x32"]
end
end
# Start machine
$ vagrant up
# Connect to machine
$ vagrant ssh
# Show Mac OS X operating system version
> sw_vers
# Stop machine
$ vagrant halt
- For troubleshooting refer to https://github.com/AndrewDryga/vagrant-box-osx
- Box used is : https://app.vagrantup.com/jhcook/boxes/osx-elcapitan-10.11/versions/10.11.6
- Tested on Windows 10 - VirtualBox 6.1.22