32 macOS
A macOS VM on the apple platform, installed from Apple's restore image, with an account and SSH set up on its first boot.
WARNING
macOS guests are experimental. Everything up to the install is tested, but a full install has not been run end to end yet. Please report what happens.
What you practice
platform: apple: Apple's Mac machine instead of the generic UEFI one- A restore image (
.ipsw) underdisksas installer media, and the disk macOS installs onto - The same
init:cloud-config as Linux, used here to create the account without Setup Assistant
Topology
| Node | Disks | CPUs / memory | Addresses | Role |
|---|---|---|---|---|
mac | macos-arm64.ipsw installer, empty 80GiB disk | 4 / 8GiB | mgmt 10.132.0.11 | macOS, login lab / lab |
Before you start
Check the free space first: the restore image is about 26 GB, and the installed system takes about 20 GB more on macos.asif. vz image pull refuses to start without room for the download.
bash
df -h ~
vz image pull ipsw macos # the newest macOS this Mac can runRun it
bash
cd examples/32-macos
vz validate # one warning: macOS guests are experimental
vz up # returns once the install has started
vz node ls # "installing N%", 20 to 30 minutes, then "running"
vz node display mac # watch it, or log in on the screen
ssh lab@10.132.0.11 # password: labTry it
bash
ssh lab@10.132.0.11 'sw_vers' # the macOS version
vz node display mac # the desktop, at 1920x1080
vz node pause mac # freeze it; SSH hangs
vz node resume mac
vz down # shuts macOS down
vz up # boots the installed system: no second installNotes
- There is no serial console:
vz node console macsays to use the display or SSH. - The account is created only on the first boot after the install. After changing
init/mac/user-data, reinstall:vz down,vz node reset mac --yes,vz up. - Only
usersandssh_pwauthin the user-data mean something to macOS.vz validatewarns about any other key. - One Mac runs at most two macOS VMs at a time;
vz validatechecks this per lab. - Once macOS is installed, the node also starts without the
.ipswline indisks. macos.asifis ignored by git, so the installed system is never committed.
Clean up
bash
vz down
vz destroy --yes # deletes the Mac machine's state; macos.asif stays in this folder
rm macos.asif # the installed system