Created
August 19, 2021 00:26
-
-
Save ScriptAutomate/a276fda99aa316038651eabac3f73ae3 to your computer and use it in GitHub Desktop.
Setup macinbox / MacOS Virtualbox VM via Vagrant on MacOS 10.14.x Mojave Host
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
# ==Prereq== | |
# Download from app store: | |
# https://apps.apple.com/us/app/macos-mojave/id1398502828?mt=12 | |
# Output file: | |
# /Applications/Install\ macOS\ Mojave.app | |
# On a Mac host, install macinbox | |
# This is if using VirtualBox for virtualization | |
# https://github.com/bacongravy/macinbox | |
sudo gem install macinbox | |
sudo macinbox \ | |
--name macos-1014-mojave \ | |
--box-format virtualbox \ | |
--installer /Applications/Install\ macOS\ Mojave.app \ | |
-m 4096 \ | |
-c 2 \ | |
--no-fullscreen \ | |
--no-gui \ | |
--verbose | |
# After macinbox is setup, time to create instance via vagrant | |
mkdir -p ~/vagrants/macinbox-mojave | |
cd ~/vagrants/macinbox-mojave | |
vagrant init mojave-pkg && vagrant up | |
vagrant ssh | |
# Install homebrew, which installs xcode | |
# REQUIRES INTERACTIVE USE | |
## Need to research whether can be fully automated approach? | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
# Confirm xcode installed correctly | |
# Should output path: | |
# /Library/Developer/CommandLineTools | |
xcode-select -p | |
# Update xcode tools to latest, along with other misc updates | |
softwareupdate --all --install --force | |
exit | |
# Reboot, and ssh | |
vagrant halt && vagrant up | |
sleep 2400 # Wait 10 minutes for upgrades to complete | |
vagrant ssh | |
# Confirm brew installed correctly | |
brew doctor | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment