Last active
July 13, 2019 15:55
-
-
Save WayneBuckhanan/15de1bb8b3fb3bd4f7af to your computer and use it in GitHub Desktop.
OSX Vagrantfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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"] | |
# vb.customize ["setextradata", :id, "VBoxInternal2/EfiGraphicsResolution", "1920x1080"] | |
end | |
end |
Glad it helped, @vmarkovtsev. It took a while to find all the pieces to get it working properly!
I also just updated it to include working NFS mounting to get /vagrant within the box working like other OSes that have VB guest extensions.
awesome, i got the gui : D thanks !
Hmm, needs updated to reflect the EFI graphics modes now available in Virtualbox.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks man!