https://github.com/trycua/packer-plugin-lume
Packer plugin for Lume
https://github.com/trycua/packer-plugin-lume
apple lume packer plugin virtualization
Last synced: 12 months ago
JSON representation
Packer plugin for Lume
- Host: GitHub
- URL: https://github.com/trycua/packer-plugin-lume
- Owner: trycua
- License: mpl-2.0
- Created: 2025-03-06T19:45:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-19T18:33:40.000Z (about 1 year ago)
- Last Synced: 2025-05-31T10:59:19.333Z (about 1 year ago)
- Topics: apple, lume, packer, plugin, virtualization
- Language: Go
- Homepage:
- Size: 102 KB
- Stars: 10
- Watchers: 1
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](#)
[](#)
[](https://discord.com/invite/mVnXXpdE85)
**packer-plugin-lume** is a Packer plugin for building macOS and Linux VM images with [Lume](https://github.com/trycua/cua/tree/main/libs/lume) on Apple Silicon. It provides automated VM creation and provisioning through Lume's CLI/API.
## Installation
### Prerequisites
```bash
# Install Go
brew install golang
# Install Packer
brew tap hashicorp/tap
brew install hashicorp/tap/packer
```
### Steps
1. Install Lume if you haven't already:
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/lume/scripts/install.sh)"
```
2. Obtain a macOS IPSW restore image:
```bash
# Get the latest macOS IPSW download URL
lume ipsw
# Download the IPSW image (this may take a while)
curl -o macOS.ipsw [URL from previous command]
```
3. Build and install the plugin:
```bash
make dev
```
4. Navigate to the `bin` directory and customize `variables.hcl` with your desired configuration and full path to the IPSW image:
```bash
cd bin
# Edit variables.hcl to set vm_name, cpu_count, memory, and path of a IPSW image.
```
## Usage Example
Run the build:
```bash
packer build -var-file=variables.hcl macOS-15.arm64.lume.prepare-01.pkr.hcl
```
## Configuration Reference
### Builder Configuration
| Parameter | Description | Type | Default |
|-----------|-------------|------|---------|
| `vm_name` | Name for the VM | string | Required |
| `vm_base_name` | Base VM to clone | string | Optional |
| `ipsw` | Path to IPSW file or 'latest' | string | Optional |
| `cpu_count` | Number of CPU cores | number | 4 |
| `memory` | Memory size | string | "4GB" |
| `disk_size` | Disk size | string | "40GB" |
| `display` | Display resolution | string | "1024x768" |
| `headless` | Run without display | boolean | false |
| `recovery_mode` | Start in recovery mode | boolean | false |
| `ssh_username` | SSH username | string | Required |
| `ssh_password` | SSH password | string | Required |
| `ssh_timeout` | SSH connection timeout | string | "10m" |
## Contributing
We welcome and greatly appreciate contributions to packer-plugin-lume! Whether you're improving documentation, adding new features, fixing bugs, your efforts help make this packer plugin better for everyone.
Join our [Discord community](https://discord.com/invite/mVnXXpdE85) to discuss ideas or get assistance.
## Acknowledgements
The macOS boot command setup were adapted from the excellent work by [Cirrus Labs](https://github.com/cirruslabs/macos-image-templates), which is licensed under the [MIT License](https://github.com/cirruslabs/macos-image-templates/blob/master/LICENSE). Proper attribution is provided in accordance with the license terms.
Thanks to [PrashantRaj18198](https://github.com/PrashantRaj18198) for starting off the work to port the Tart Packer plugin to Lume.
## License
This project is licensed under the MPL-2.0 License - see the [LICENSE](LICENSE) file for details.
## Trademarks
Apple, macOS, and Apple Silicon are trademarks of Apple Inc. Ubuntu and Canonical are registered trademarks of Canonical Ltd. This project is not affiliated with, endorsed by, or sponsored by Apple Inc. or Canonical Ltd.