Page MenuHomeFreeBSD

New manual page for vmrun.sh
Needs ReviewPublic

Authored by trhodes on Nov 14 2021, 7:10 AM.
Tags
Referenced Files
Unknown Object (File)
May 12 2024, 7:19 PM
Unknown Object (File)
Apr 20 2024, 8:19 PM
Unknown Object (File)
Apr 20 2024, 7:06 PM
Unknown Object (File)
Apr 16 2024, 11:35 AM
Unknown Object (File)
Apr 11 2024, 1:46 PM
Unknown Object (File)
Mar 8 2024, 6:40 AM
Unknown Object (File)
Dec 21 2023, 8:47 PM
Unknown Object (File)
Dec 20 2023, 4:39 AM

Details

Reviewers
jmg
0mp
pauamma_gundo.com
Group Reviewers
Doc Committers
bhyve
Summary

Someone on Twitter said "vmrun.sh should have a manual page" and I decided to write one. It provides the list of accepted flags, though the unused one is hidden and noted in BUGS, and an example of creating and installing FreeBSD in a new guest.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Here is my quick go through.

vmrun.8
27

Nit pick: extra line

60–63
66
70–72

There are a number of ways to load this (in terms of configuration, plus manually loading), not only kldload(8).

74

From the script, it is that you must at least create and/or configure a tap0 if you do not specify the -t option at all.

75–78

The tap(4), which defaults to tap0 if unspecified, is only for the script to run. Whether you must bridge it with another NIC is another question.

84

The virtio-blk paravirtualization device implementation is irrelevant to the virtio(4) kernel driver, since virtio(4) is on the guest's perspective rather than the host's perspective, so I don't think it is appropriate to cross-reference virtio(4).

96–102
114–115

Do not mention it if it simply does not exist for now.

189–196
200–203

I don't see it anywhere in the script, and the commit I am talking about is 9cfd8046a48e.

By the way, we refer to the machine created under bhyve as guest rather than guest host.

0mp requested changes to this revision.Nov 15 2021, 10:06 AM

That's definitely a nice addition. Thanks for working on that.

vmrun.8
2

We are missing the SPDX tag here as well.

4

This part of the license can be dropped. See https://reviews.freebsd.org/D26980 for example.

36

Per style(9), options should be sorted like this: -AaEhiTv. Capital letters should go first.

83
86
91

Arguments to other flags need to be added as well.

93
187
This revision now requires changes to proceed.Nov 15 2021, 10:06 AM

Here is a new version based on all the feedback from everyone, keep the good comments coming please!

vmrun.8
36

Duh, thank you, I fixed this.

60–63

Slightly different version worked up, please let me know what you think (new diff attached).

70–72

True, I cleaned that up since we don't need to explain every one.

74

I altered the wording a little bit.

84

Okay, I used the virtio_blk 4 xref.

86

Thank you, surprised I didn't catch that.

91

Done - although, because some of the arguments are a little long in the SYNOPSIS, I reduced the wording a bit. It may be preferred or not, maybe SYNOPSIS should be updated? I'm open to suggestions.

93

I went back and forth on "two" versus "2" because in writing we use the former, but parameters as a literal would be the latter. I'm going to use "2" because it's technically a parameter.

96–102

I used a slightly different version to avoid repeating "device" twice in the same sentence. It still reads a tad bit awkward and I might need to kick it around a bit unless we like my suggestion.

114–115

This is interesting - the option is in usage(), but not part of the OPTARGs. I'm 50/50 here because the catch all will print the message that "-h" should be printing. But at the same time, a quick help menu either through the catch all or "-h" is certainly useful. And it's a very minor change:

  • current/share/examples/bhyve/vmrun.sh 2021-11-14 17:40:52.943682000 -0500

+++ vmrun.sh 2021-11-15 14:53:31.233837000 -0500
@@ -165,6 +165,9 @@

	F)
		vncsize="${OPTARG}"
		;;

+ h)
+ usage
+ ;;

	H)
		host_base=`realpath ${OPTARG}`
		;;
187

I'm sorry, I don't understand this, I thought it was whitespace but I cannot find it in my version.

200–203

I removed the entire section because, after a second look at the script, I observed what I stated above. I really think the "-h" flag was intended. The "-h" flag is in the version you linked, it's just near the bottom of usage. Easy to miss because you expect "-H" and "-h" to be grouped together, and I think it's what tripped me up as well.

Here is a new version based on all the feedback from everyone, keep the good comments coming please!

Thanks for the update! Would it be possible for you to post the new diff to Phabricator? It's slightly easier to post comments in the web UI.

trhodes marked 10 inline comments as done.

I'm sorry - I realized that updating the diff is done differently here. I made it work with a different review but added it incorrectly here. Thank you for asking!

Any updates on this one?

Arguably a matter of taste, but maybe s/utiliz(e|es|ing|ed)/us\1/g too?

All minor, fixable on commit.

(Also, if the lack of a manpages group reviewer isn't deliberate, consider this manpages approval.)

vmrun.8
27

Bump.

112

Comma splice.