Solved Command doesn't understand -k option

Hi,

I'm trying to move all parameter into bhyve_config and call bhyve -k my_vm.conf. However it yields the error that k is invalid option.

According to this manual page, -k is valid one to use: https://www.freebsd.org/cgi/man.cgi?query=bhyve

My Freebsd version: FreeBSD 13.0-RELEASE-p4

Is there anything I missed?

PS. I posted this question before and it disappeared. I wonder why it's removed?
 
. I posted this question before and it disappeared.
It didn't 'disappear', it was held for moderation. Moderation happens to all new users for the first 10 posts and 10 days. Mods aren't around 24/7 though, so things might be stuck in the moderation queue for a few hours.
 
… it says options k is not valid. …

Welcome to FreeBSD Forums.

Can you share the content of the configuration file?

Code:
% bhyve -k
bhyve: option requires an argument -- k
Usage: bhyve [-AaCDeHhPSuWwxY]
             [-c [[cpus=]numcpus][,sockets=n][,cores=n][,threads=n]]
             [-G port] [-k config_file] [-l lpc] [-m mem] [-o var=value]
             [-p vcpu:hostcpu] [-r file] [-s pci] [-U uuid] vmname
       …
       -k: key=value flat config file
       …
%

bhyve_config(5)
 
Welcome to FreeBSD Forums.

Can you share the content of the configuration file?

Code:
% bhyve -k
bhyve: option requires an argument -- k
Usage: bhyve [-AaCDeHhPSuWwxY]
             [-c [[cpus=]numcpus][,sockets=n][,cores=n][,threads=n]]
             [-G port] [-k config_file] [-l lpc] [-m mem] [-o var=value]
             [-p vcpu:hostcpu] [-r file] [-s pci] [-U uuid] vmname
       …
       -k: key=value flat config file
       …
%

bhyve_config(5)
Thanks for giving it a try but I don't see as what you see so the configuration file is not relevant yet.

My full FreeBSD version:
- freebsd-version: 13.0-RELEASE-p5
- uname -a: FreeBSD HOME-SERVER 13.0-RELEASE-p4 FreeBSD 13.0-RELEASE-p4 #0: Tue Aug 24 07:33:27 UTC 2021 root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64

What is yours and did you do anything to update bhyve alone (if that's even possible?)
Code:
% bhyve -k
bhyve: illegal option -- k
Usage: bhyve [-aehuwxACDHPSWY]
             [-c [[cpus=]numcpus][,sockets=n][,cores=n][,threads=n]]
             [-l <lpc>]
             [-m mem] [-p vcpu:hostcpu] [-s <pci>] [-U uuid] <vm>
       -a: local apic is in xAPIC mode (deprecated)
       -A: create ACPI tables
       -c: number of cpus and/or topology specification
       -C: include guest memory in core file
       -D: destroy on power-off
       -e: exit on unhandled I/O access
       -h: help
       -H: vmexit from the guest on hlt
       -l: LPC device configuration
       -m: memory size in MB
       -p: pin 'vcpu' to 'hostcpu'
       -P: vmexit from the guest on pause
       -s: <slot,driver,configinfo> PCI slot config
       -S: guest memory cannot be swapped
       -u: RTC keeps UTC time
       -U: uuid
       -w: ignore unimplemented MSRs
       -W: force virtio to use single-vector MSI
       -x: local apic is in x2APIC mode
       -Y: disable MPtable generation
 
It's still available on a recent 13-STABLE, so that seems unlikely.

Code:
root@molly:~ # bhyve -k
bhyve: option requires an argument -- k
Usage: bhyve [-AaCDeHhPSuWwxY]
             [-c [[cpus=]numcpus][,sockets=n][,cores=n][,threads=n]]
             [-G port] [-k config_file] [-l lpc] [-m mem] [-o var=value]
             [-p vcpu:hostcpu] [-r file] [-s pci] [-U uuid] vmname
       -A: create ACPI tables
       -a: local apic is in xAPIC mode (deprecated)
       -C: include guest memory in core file
       -c: number of CPUs and/or topology specification
       -D: destroy on power-off
       -e: exit on unhandled I/O access
       -G: start a debug server
       -H: vmexit from the guest on HLT
       -h: help
       -k: key=value flat config file
       -l: LPC device configuration
       -m: memory size in MB
       -o: set config 'var' to 'value'
       -P: vmexit from the guest on pause
       -p: pin 'vcpu' to 'hostcpu'
       -S: guest memory cannot be swapped
       -s: <slot,driver,configinfo> PCI slot config
       -U: UUID
       -u: RTC keeps UTC time
       -W: force virtio to use single-vector MSI
       -w: ignore unimplemented MSRs
       -x: local APIC is in x2APIC mode
       -Y: disable MPtable generation

P5 only updated a couple of userland issues and fixed a bug in vmci(4).

 
To me this sounds like the OP does have a 13.0 kernel but still has a 12.x userland.

BaoNT can you post the output of freebsd-version -uk?
 
To me this sounds like the OP does have a 13.0 kernel but still has a 12.x userland.

BaoNT can you post the output of freebsd-version -uk?
If I may suggest, just to cover all bases: freebsd-version -ukr

This is somewhat unfamiliar territory for me but, as to bhyve actually being part of the kernel or userland, and considering:
  • (my emphasis)
    Rich (BB code):
    % man freebsd-version
    <snip>
    -k     Print the version and patch level of the installed kernel.
           Unlike uname(1), if a new kernel has been installed but the
           system has not yet rebooted, freebsd-version will print the
           version and patch level of the new kernel.
    
    -r     Print the version and patch level of the running kernel. Un-
           like uname(1), this is unaffected by environment variables.
  • The Design and Implementation of the FreeBSD Operating System, 2nd edition; book: p. 415 (Section 8.10) here:
    Some hypervisors, such as FreeBSD’s bhyve, are embedded within existing operating-system kernels.
    same book: p. 415 (Section 8.10):
    For example, bhyve combines an in-kernel hypervisor with a userspace process implementing configuration, memory management, and device emulation.
 
This is somewhat unfamiliar territory for me but, as to bhyve actually being part of the kernel or userland
There are basically two parts, the vmm(4) kernel module and the bhyve(8), bhyvectl(8) and bhyveload(8) userland tools to manage them. So it's both. The kernel module doesn't do much without the userland tools and the userland tools don't work without the kernel module.
 
Here are some additional information:
1641590228046.png


man bhyve doesn't have -k option
1641590309832.png


Thanks all for chiming in. To be clear, my system was on 12.x and upgraded to 13 a month ago or so. It's not a direct install to 13, FWIW.

Is there any update command I could force?
 
Here are some additional information:
1641590228046.png
from your screenshot, it looks like you have userland (the -u option to freebsd-version) at patchlevel 4, while kernel (the -k option) is at patchlevel 5. I guess mentally, I'm still stuck onto that bit of info. 😅
 
Extraordinary. Certainly not consistent with <https://www.freebsd.org/cgi/man.cgi?query=bhyve&sektion=8&manpath=FreeBSD+13.0-RELEASE>.

… 12.x and upgraded to 13 …

Please: upgraded with which method, exactly? Which page/guide did you follow?

… What is yours …

Sorry, I should have mentioned it.

Code:
% uname -iKrsU
FreeBSD 14.0-CURRENT GENERIC-NODEBUG 1400046 1400046
%

I don't use bhyve, I simply ran bhyve -k to present what's seen at <https://forums.freebsd.org/threads/command-doesnt-understand-k-option.83596/post-549862> above.
 
Last edited:
Extraordinary.

On closer inspection: BaoNT your case is not extraordinary.

… my first thought would be that the -k option disappeared 𠉥…

Certainly, it's illegal here (with a test machine in VirtualBox):

Code:
grahamperrin@mowa219-gjp4-vm-freebsd-13-zfs:~ % freebsd-version -kru
13.0-RELEASE-p4
13.0-RELEASE-p4
13.0-RELEASE-p5
grahamperrin@mowa219-gjp4-vm-freebsd-13-zfs:~ % su -
Password:
root@mowa219-gjp4-vm-freebsd-13-zfs:~ # setenv PAGER cat && freebsd-update fetch
Looking up update.FreeBSD.org mirrors... 2 mirrors found.
Fetching metadata signature for 13.0-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

No updates needed to update system to 13.0-RELEASE-p5.
root@mowa219-gjp4-vm-freebsd-13-zfs:~ # bhyve -k
bhyve: illegal option -- k
Usage: bhyve [-aehuwxACDHPSWY]
             [-c [[cpus=]numcpus][,sockets=n][,cores=n][,threads=n]]
             [-l <lpc>]
             [-m mem] [-p vcpu:hostcpu] [-s <pci>] [-U uuid] <vm>
       -a: local apic is in xAPIC mode (deprecated)
       -A: create ACPI tables
       -c: number of cpus and/or topology specification
       -C: include guest memory in core file
       -D: destroy on power-off
       -e: exit on unhandled I/O access
       -h: help
       -H: vmexit from the guest on hlt
       -l: LPC device configuration
       -m: memory size in MB
       -p: pin 'vcpu' to 'hostcpu'
       -P: vmexit from the guest on pause
       -s: <slot,driver,configinfo> PCI slot config
       -S: guest memory cannot be swapped
       -u: RTC keeps UTC time
       -U: uuid
       -w: ignore unimplemented MSRs
       -W: force virtio to use single-vector MSI
       -x: local apic is in x2APIC mode
       -Y: disable MPtable generation
root@mowa219-gjp4-vm-freebsd-13-zfs:~ #

<https://cgit.freebsd.org/src/log/?h=releng/13.0&qt=grep&q=byhve> finds only one commit, not relevant in this case. Corrected below. Sorry.
 
Last edited:

I suspect that the online page above, and <https://www.freebsd.org/cgi/man.cgi?query=bhyve&sektion=8&manpath=FreeBSD+13.0-stable> for stable/13, are is somehow bugged.

BaoNT as far as I can tell, the feature is not yet released.

MFC

Postscript (correction)

  • is in stable/13
  • is a cherry-pick
  • can not be found by searching.


Searching code - GitHub Docs

  • Only the default branch is indexed for code search.

Using Git, how could I search for a string across all branches? - Stack Overflow
 
Here are some additional information:
View attachment 12548

man bhyve doesn't have -k option
[...]
Is there any update command I could force?

13.0-RELEASE: releng/13.0 - no k option

13.0-STABLE: stable/13.0 - has k option:

It does seem that the bhyve man page on the website for 13.0-RELEASE is indeed wrong.

So, all in all, it seems there is nothing wrong with your 13.0-RELEASE; only the disappointment that you will have to wait for 13.1-RELEASE to have the k option.

It is released in 13-STABLE, switch to it and you will have your k option. If you are not fully aware of the differences between a supported RELEASE and supported STABLE version (Supported FreeBSD releases), please consult the FreeBSD website & handbook and decide if that is applicable to your use case.

___
P.S. Please note (in reference to message #14) the output order of freebsd-version(1):
If several of the above options are specified, freebsd-version will print
the installed kernel version first, then the running kernel version, and
finally the userland version, on separate lines. If neither is
specified, it will print the userland version only.
 
And this is the real "debugging process" - not the 15-minute chore that the rest of the Internet claims it is. 😩 Unless you're thoroughly familiar with the code and documentation and how things even add up, "15-minute bug-quash" is a total joke.
 
Back
Top