Page MenuHomeFreeBSD

bhyvectl: improve options error handling
ClosedPublic

Authored by novel on Dec 5 2025, 7:09 PM.
Tags
None
Referenced Files
F154897562: D54092.id167606.diff
Wed, Apr 29, 9:07 PM
Unknown Object (File)
Wed, Apr 29, 9:04 AM
Unknown Object (File)
Wed, Apr 29, 7:31 AM
Unknown Object (File)
Mon, Apr 27, 5:45 PM
Unknown Object (File)
Sat, Apr 25, 2:08 AM
Unknown Object (File)
Sat, Apr 18, 10:13 AM
Unknown Object (File)
Fri, Apr 17, 10:22 AM
Unknown Object (File)
Sat, Apr 11, 4:03 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