Page MenuHomeFreeBSD

bhyvectl: improve options error handling
ClosedPublic

Authored by novel on Dec 5 2025, 7:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 25 2026, 1:10 AM
Unknown Object (File)
Jan 24 2026, 7:12 PM
Unknown Object (File)
Jan 20 2026, 11:13 PM
Unknown Object (File)
Jan 10 2026, 5:40 AM
Unknown Object (File)
Jan 2 2026, 1:53 PM
Unknown Object (File)
Dec 23 2025, 6:17 AM
Unknown Object (File)
Dec 22 2025, 10:57 PM
Unknown Object (File)
Dec 17 2025, 10:29 PM
Subscribers

Details

Summary

Currently, it's possible to execute bhyvectl(8) with mutually exclusive
options, such as "--destroy" and "--suspend", and it will print out
obscure errors, e.g.:

bhyvectl --suspend=/var/run/vms/my_vm --destroy --vm my_vm
connect() failed: Connection refused

Address that by failing early if mutually exclusive options were
specified.

Additionally, move the BHYVE_SNAPSHOT block before the errors are
printed, so its errors are also displayed.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 69080
Build 65963: arc lint + arc unit