Host Network Commands
3 minute read
Inspect, install, and remove the fixed-IP network used by Linux guests.
This reference covers Barn 1.4.0. Option tables mark the earliest version that introduced each option; see the version baseline. All commands inherit the global options.
barn network status
Inspect the one host-wide Linux-guest network: backend, installed CIDR, ownership, health, and lifecycle preflight findings. --cidr checks an expected subnet; omitting it inspects the installed one. It is read-only. This network is separate from each native Mac VM’s private network.
Aliases: st.
| Option | Meaning / default | Available in |
|---|---|---|
-c, --cidr string |
Optional expected private /24; otherwise inspect the installed subnet | 1.1.0 |
barn network install
On macOS, network installation and repair accept an active sharing service whose vmnet preferences have neither a custom subnet address nor a mask. If the preview cannot read the preferences, it reports the deferred check for both fresh installation and repair of an existing matching network; once approved, Barn checks both keys before writing network files or restarting socket_vmnet. A conflict with a live interface, route, or node address blocks installation or repair at preview time. An unreadable, conflicting, or partially configured subnet during the approved check also stops the operation without changing the host.
Inspect or install the host-wide backend: socket_vmnet on macOS or barn0 through the active Linux network manager. On a terminal it shows a privileged plan and asks; structured/noninteractive calls only preview unless --yes is supplied. On a fresh Mac, use setup to obtain the pinned socket_vmnet archive first.
--archive and --interface-id are macOS-only. host/shared are macOS vmnet modes; Linux rejects shared. An existing network must match the chosen configuration; review status before changing subnet or mode.
Aliases: i.
| Option | Meaning / default | Available in |
|---|---|---|
-a, --archive string |
macOS: pinned socket_vmnet archive | 1.1.0 |
-c, --cidr string |
network: an RFC1918 IPv4 /24 (default “10.10.10.0/24”) | 1.1.0 |
-i, --interface-id string |
macOS: persistent vmnet UUID | 1.1.0 |
-m, --mode string |
macOS vmnet mode: host or shared (default “host”) | 1.1.0 |
-y, --yes |
apply the displayed privileged plan without confirmation (sudo may still ask for a password) | 1.1.0 |
barn network uninstall
Remove only Barn-owned network configuration and restore recorded host settings. Stop running Linux guests first: the operation refuses a live deployment. Terminal mode asks after showing the plan; structured/noninteractive calls preview unless --yes is set. This does not delete VM disks or native Mac networks.
Aliases: u.
| Option | Meaning / default | Available in |
|---|---|---|
-y, --yes |
apply the displayed privileged plan without confirmation (sudo may still ask for a password) | 1.1.0 |
Implementation
The version baseline identifies the released source and the changes across 1.1.0–1.4.0.