https://github.com/timsutton/packer-startosinstall
https://github.com/timsutton/packer-startosinstall
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/timsutton/packer-startosinstall
- Owner: timsutton
- Created: 2020-03-18T15:41:05.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-18T16:09:59.000Z (about 6 years ago)
- Last Synced: 2025-02-25T00:58:13.460Z (over 1 year ago)
- Language: Shell
- Size: 9.77 KB
- Stars: 7
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# packer-startosinstall (an experiment)
Idea here is to use packer and startosinstall to perform an automated installation of macOS in a VM. It requires VMware Fusion.
## Usage
Run `prepare_iso` to create a new installer VMDK. This relies a tool that's bundled with VMware Fusion:
```
./prepare_iso /path/to/a/10.15.3/installer/app installer_10.15.3.vmdk
```
Run `create_bootstrap_pkg.sh` to generate a post-install package that we'll eventually pass to the macOS installer:
```
./create_bootstrap_pkg.sh
```
Now we can run packer to build it, passing our installer VMDK as a variable:
```
packer build -var iso_url=installer_10.15.3.vmdk packer.json
```
## Additional options
See the `variables` section of `packer.json` for more configuration options. Notably, there's an option to disable SIP.
## Debugging
You may want to set the `PACKER_LOG=info` or `PACKER_LOG=debug` environment variables if you're hacking on this and debugging connectivity/sequence issues with Packer.
## TODO
* Fix the issue where we currently need to manually hack the installer path in `vmx.gotmpl` (see `sata0:1.fileName`)
* Add back a configuration profile or other means to disable Setup Assistant things, auto-login, and other updated items from [osx-vm-templates](https://github.com/timsutton/osx-vm-templates/), etc.
* Explain more about how this works
* Document why we use a .gotmpl for the VMX configuration, why packer's existing VMX configuration options weren't sufficient.