Curated by Megabyte Labs
An automated macOS Monterey Desktop Packer project that builds boxes using the latest Monterey sources
This project is home to the configurations necessary to build VM images for macOS Monterey Desktop. Building images for macOS is tricky so consider this project experimental. Most of our other Packer projects support a wide variety of virtualization platforms. However, for this project, we only aim to support VirtualBox and VMWare.
This project:
- Currently builds a minimal macOS 11.0.0 (Monterey) VM image by default
- May contain multiple templates which will all end in
template.json
and be present in the root of the project - Automates the process of keeping our macOS 11.0.0 (Monterey) VM images up-to-date with the latest upstream source by (1) using the
vagrant-cloud
post-processor to automatically upload the box after it is built and (2) running the build with a cronjob - In some cases, LatestOS is used to automatically update the link to the base image / checksums to the latest release
This project supports creating boxes for the following virtualization platforms:
- At least one of the above virtualization platforms installed (VirtualBox is a good starting point if you do not already have one of the platforms installed)
- Packer
- Vagrant
If you have VirtualBox and Vagrant installed, you can quickly spin up the finished product of this repository by running the following code in the root directory of this repository:
vagrant up
The default username and password are both vagrant.
You can quickly use this project to create your own minimal macOS 11.0.0 (Monterey) box by:
- Creating a box on VagrantUp titled macOS-Desktop (Note: The VagrantUp box name should match the
"box_basename"
in thetemplate.json
file.) - Changing the
"vagrantup_user"
variable intemplate.json
to your VagrantUp username - Acquiring a VagrantUp API token from the settings page
- Running the following code
bash start.sh # Ensures Bodega is installed
export VAGRANT_CLOUD_TOKEN=YourTokenHere
task packer:build
After running the code above, you will kick off a parallelized build for all the virtualization platforms that your computer currently has installed. If you want to install all of the virtualization platforms that your computer could potentially support then you can run task packer:install:platforms
.
After building the VM images, the example above will upload your images to your VagrantUp box repository (that you have to create before running the script that is above). If you want to build the box for another provider then look at the template.json
in the "builders"
section for the types of boxes you can create (e.g. virtualbox-iso
, vmware-iso
, parallels-iso
, qemu
).
If you do not want your box to be automatically uploaded to VagrantUp after you build it with Packer then you will need to remove the "vagrant-cloud"
section under "post-processors"
. The section is wrapped in a nested array. If you are removing the vagrant-cloud
post-processor, then the section no longer has to be placed in a nested array.
If a new release of the macOS 11.0.0 (Monterey) system is available, you can update your VagrantUp box. You can do this by changing the "iso_checksum_url"
, "iso_url"
, and "iso_version"
variables in the template.json
file. After that, run packer build -only=virtualbox-iso template.json
to build the image again.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page. If you would like to contribute, please take a look at the contributing guide.
Sponsorship
Dear Awesome Person,
I create open source projects out of love. Although I have a job, shelter, and as much fast food as I can handle, it would still be pretty cool to be appreciated by the community for something I have spent a lot of time and money on. Please consider sponsoring me! Who knows? Maybe I will be able to quit my job and publish open source full time.
Sincerely,
Brian Zalewski
Below you will find a list of services we leverage that offer special incentives for signing up for their services through our special links:
Copyright © 2020-2021 Megabyte LLC. This project is MIT licensed.