You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It provides `VmnetNetwork` serialization to VMs.
`limactl vz-vmnet` takes flags:
- `--enable-mach-service[=true,false]`: register/unregister Mach service to `launchd`
- It creates a launchd plist under ~/Library/LaunchAgents and bootstraps it.
- The Mach service "io.lima-vm.vz.vmnet" is registered.
- The working directory is $LIMA_HOME/_networks/vz-vmnet.
- It also creates a shell script named "io.lima-vm.vz.vmnet.sh" that runs
"limactl vz-vmnet" to avoid launching "limactl" directly from launchd.
macOS System Settings (General > Login Items & Extensions) shows the first
element of `ProgramArguments` as the login item name; using a shell script with
a fixed filename makes the item easier to identify.
- There is no need to register manually because the VZ driver is registered as appropriate.
- `--mach-service=<service name>`: launched as Mach server by `launchd` via `io.lima-vm.vz.vmnet.plist`
- Launched on demand to connection from VZ driver by `launchd`.
- Receives a request payload from VZ driver with fields:
- `Network`: name of the network ("shared", "host", etc)
- `Configuration`: `[]bytes@ representing `VzNetworkConfig` in JSON.
- Validates clients are the same executable (cdhash) by using xpc_peer_requirement API.
- Create `VmnetNetwork` from provided `Configuration` if cached one does not exist.
- Replies to VZ driver with fields:
- `Configuration`: If `VmnetNetwork` is cached, it may be created by different configuration.
- `Serialization`: newly created or cached.
- Monitors changes of networks
- When the interface created by `VmnetNetwork` disappears from host, remove them from cache.
- If all `VmnetNetwork` are removed, `limactl vz-vmnet` exits.
VZ driver (hostagent) does:
- Read `.vz` VzVmnetConfig from `networks.yaml`
- Use them on `- vz: <network>` fields; "shared" and "host" network are predefined.
- Register `limactl vz-vmnet` to `launchd` if not registered.
- Request serialization to the Mach service "io.lima-vm.vz.vmnet".
- Create `VmnetNetwork` by provided serialization, then use them.
Additional changes:
- Because shutdown takes longer on using `VmnetNetwork`:
- Extend VZ driver's shutdown timeout from 5 seconds to 15 seconds
- Add `ExitTimeOut` key with 20 seconds to autostart `io.lima-vm.autostart.INSTANCE.plist`
- `lima.yaml`: `- vzShared` and `- vzHost` are renamed to `- vz: shared` and `- vz: host`
Signed-off-by: Norio Nomura <[email protected]>
0 commit comments