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)
Fri, May 15, 1:03 AM
Unknown Object (File)
Thu, May 14, 2:48 PM
Unknown Object (File)
Thu, May 14, 2:47 PM
Unknown Object (File)
Thu, May 14, 3:31 AM
Unknown Object (File)
Thu, May 14, 3:31 AM
Unknown Object (File)
Wed, May 13, 11:24 PM
Unknown Object (File)
Wed, May 13, 10:49 AM
Unknown Object (File)
Tue, May 12, 4:10 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