Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hielfx/ae2177ea253ed81bfd5706f141984312 to your computer and use it in GitHub Desktop.
Save hielfx/ae2177ea253ed81bfd5706f141984312 to your computer and use it in GitHub Desktop.
MacOS X El Capitan with Vagrant - MacOS X VM on Windows/Linux
* Install Virtual Box (https://www.virtualbox.org)
* Install Oracle VM VirtualBox Extension Pack (https://www.virtualbox.org)
* Install Vagrant
mkdir osxvm
cd osxvm
vagrant init jhcook/osx-elcapitan-10.11
* Edit 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|
vb.memory = "4096"
#vb.customize ["modifyvm", :id, "--vram", "2048"]
# 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"]
end
end
* Init
vagrant up
vagrant halt
* To use your VM your can launch it with Virtual Box or use vagrant
* user:vagrant password:vagrant
* For troubleshooting refer tp https://github.com/AndrewDryga/vagrant-box-osx
* Box used is : https://atlas.hashicorp.com/jhcook/boxes/osx-elcapitan-10.11
Tested on Windows 7 - VirtualBox 5.0.20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment