Skip to content

Support macOS guests#4595

Draft
AkihiroSuda wants to merge 2 commits intolima-vm:masterfrom
AkihiroSuda:macos-guest
Draft

Support macOS guests#4595
AkihiroSuda wants to merge 2 commits intolima-vm:masterfrom
AkihiroSuda:macos-guest

Conversation

@AkihiroSuda
Copy link
Member

Usage:

limactl create --video template:macos
limactl start macos
limactl shell macos

The password prompt is shown during creating an instance, so as to run chown root:wheel ~/.lima/_mnt/0/Library/LaunchDaemons/..., which is required for the lima-macos-init launch daemon to run.

The password for GUI login is randomly generated and stored in /Users/${USER}.guest/password in the VM.

Fix #3618

TODOs (maybe in follow-up PRs):

  • Docs
  • Switch back the default shell to zsh
  • Graceful limactl stop (currently it has to be stopped from the guest)
  • Propagate additional cloud-init data
    • Hostname
    • Timezone
    • DNS
    • CA Certificates
  • Support non-plain mode
    • mounts
    • port forwards
  • Let limactl sudoers generate the entry for chowning files
    (chown root:wheel ~/.lima/_mnt/0/Library/LaunchDaemons/...)
  • Support headless mode (--video=false)
  • Support macOS in hack/update-template.sh

Depends on:

jandubois and others added 2 commits February 17, 2026 02:43
Replace the legacy basedisk/diffdisk naming with self-documenting
filenames: "image" (downloaded VM image), "disk" (VM disk), and "iso"
(optional CDROM).

New instances download to "image" and create symlinks: non-ISO images
get disk→image; ISO images get iso→image plus a real empty disk.
QEMU no longer creates a qcow2 overlay backed by basedisk; it
symlinks disk→image directly.

Existing instances are migrated by MigrateDiskLayout, which creates
disk→diffdisk and (for ISO basedisks) iso→basedisk symlinks. The
original files remain so older Lima versions can still use them.

Boot paths now check for the "iso" symlink via osutil.FileExists
instead of calling iso9660util.IsISO9660 at startup. Both QEMU and
VZ attach the VM disk before the ISO.

Signed-off-by: Jan Dubois <jan.dubois@suse.com>
Usage:
```
limactl start --video template:macos
limactl shell macos
```

The password prompt is shown during creating an instance,
so as to run `chown root:wheel ~/.lima/_mnt/0/Library/LaunchDaemons/...`,
which is required for the `lima-macos-init` launch daemon to run.

The password for GUI login is randomly generated and
stored in `/Users/${USER}.guest/password` in the VM.

Fix issue 3618

TODOs (maybe in follow-up PRs):
- [ ] Docs
- [ ] Switch back the default shell to `zsh`
- [ ] Graceful `limactl stop` (currently it has to be stopped from the guest)
- [ ] Propagate additional cloud-init data
  - [ ] Hostname
  - [ ] Timezone
  - [ ] DNS
  - [ ] CA Certificates
- [ ] Support non-plain mode
  - [ ] mounts
  - [ ] port forwards
- [ ] Let `limactl sudoers` generate the entry for chowning files
  (`chown root:wheel ~/.lima/_mnt/0/Library/LaunchDaemons/...`)
- [ ] Support headless mode (`--video=false`)
- [ ] Support macOS in `hack/update-template.sh`

- - -

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VM drivers for supporting macOS guests (vz, host-user)

2 participants