Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
MacOS X El Capitan with Vagrant - MacOS X VM on Windows/Linux
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

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