Page MenuHomeFreeBSD

bhyvectl: improve options error handling
ClosedPublic

Authored by novel on Dec 5 2025, 7:09 PM.
Tags
None
Referenced Files
F164904235: D54092.id.diff
Tue, Aug 4, 4:51 PM
F164806593: D54092.id167961.diff
Tue, Aug 4, 3:36 AM
Unknown Object (File)
Mon, Aug 3, 4:28 AM
Unknown Object (File)
Mon, Aug 3, 1:56 AM
Unknown Object (File)
Tue, Jul 28, 3:20 PM
Unknown Object (File)
Mon, Jul 27, 4:47 PM
Unknown Object (File)
Fri, Jul 24, 2:21 PM
Unknown Object (File)
Mon, Jul 20, 3:09 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 Not Applicable
Unit
Tests Not Applicable