Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
vagrant-box-osx
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# https://github.com/AndrewDryga/vagrant-box-osx
config.vm.box = "osx-yosemite"
# Use NFS for the shared folder
config.vm.synced_folder ".", "/vagrant",
id: "core",
:nfs => true,
:mount_options => ['nolock,vers=3,udp,noatime,actimeo=1,resvport'],
:export_options => ['async,insecure,no_subtree_check,no_acl,no_root_squash']
# NFS needs host-only network
config.vm.network :private_network, ip: "10.0.0.100"
config.vm.box_check_update = false
config.ssh.forward_agent = true
config.ssh.insert_key = false
config.vm.provider "virtualbox" do |vb|
# Do/don't boot with headless mode
vb.gui = true
# Use VBoxManage to customize the VM. For example to change memory:
vb.customize ["modifyvm", :id, "--memory", "4096"]
### OSX guest specific settings
# vb.customize ["modifyvm", :id, "--cpuidset", "00000001","000206a7","02100800","1fbae3bf","bfebfbff"] # get OSX to boot past "hfs ..." message
vb.customize ["modifyvm", :id, "--cpuidset", "00000001","000306a9","00020800","80000201","178bfbff"] # boot past "Missing Bluetooth Controller Transport" error
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 OSX:
# 0,1,2,3,4,5 :: 640x480, 800x600, 1024x768, 1280x1024, 1440x900, 1920x1200
vb.customize ["setextradata", :id, "VBoxInternal2/EfiGopMode", "5"]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.