microagent apply
microagent apply --file <path> [--state-dir <dir>]apply updates the persisted workspace manifest from a spec file. It is for
small declarative changes that do not need a rootfs rebuild.
Today it supports:
- restart policy changes
- network intent changes while the workspace is stopped
- live Firecracker port-forward host bind changes when the workspace is running
For a running Firecracker workspace, apply can live-reload this kind of
change:
network: mode: user forwards: - host: 0.0.0.0 hostPort: 8581 guestPort: 8581 protocol: tcpThe host bind can change, but the network mode, host port, guest port, and
protocol must stay the same. Changes to ports, guest wiring, network mode,
resources, files, setup, image, or service command still require stop/start
or recreating the workspace.
Example
Section titled “Example”microagent apply --file ./homebridge.yamlIf the workspace is running and only the Firecracker host bind changed,
apply restarts the host-side port-forwarder and leaves the VM running.