Summary: | [bhyve][patch] Add option to specify emulated NIC in vmrun.sh | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Johannes Lundberg <johalun0> | ||||||
Component: | kern | Assignee: | Rodney W. Grimes <rgrimes> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Some People | CC: | emaste, rgrimes, virtualization | ||||||
Priority: | Normal | Keywords: | patch | ||||||
Version: | CURRENT | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
Attachments: |
|
Fix brain-o in assignment. First pass look at this patch leads to these comments: White space change at line 40, this change should not be made -n option added out of alpha order at line 74, should be after -m, "ethernet adapter" is a little vague and missleading, this is actually "network adapter emulation type" I am not sure how much should be added to vmrun.sh, this was suppose to be a simple script for simple operations, if your getting complicated you should be invoking bhyve, not vmrun, the only other valid option for -n at this time is e1000, is it really worth adding a knob to vmrun.sh to switch between virtio-net and e1000? Or even if we consider the ne2000 out of tree code, that is a 3 way option. I have discussed this change with the bhyve developers group and we plan to move forward with implementing the -n option. Created attachment 190234 [details]
updated patch
Don't know what was going on in my mind when I set n before m....
(In reply to Rodney W. Grimes from comment #3) Cool. Thanks! Please see the updated patch with suggested fixes. A commit references this bug: Author: rgrimes Date: Thu Feb 1 17:59:14 UTC 2018 New revision: 328695 URL: https://svnweb.freebsd.org/changeset/base/328695 Log: Add option '-n' network device emulation type which has a default of virtio-net PR: 225558 Submitted by: Johannes Lundberg <johalun0@gmail.com> Approved by: grehan (mentor) MFC after: 3 days Changes: head/share/examples/bhyve/vmrun.sh A commit references this bug: Author: rgrimes Date: Mon Feb 12 19:08:17 UTC 2018 New revision: 329179 URL: https://svnweb.freebsd.org/changeset/base/329179 Log: MFC: r328695,r328720,r328784,r328795 share/examples/bhyve/vmrun.sh additions and cleanups r328695: Add option '-n' network device emulation type which has a default of virtio-net PR: 225558 Submitted by: Johannes Lundberg <johalun0@gmail.com> r328720: Add -n <network device emulation type> to usage synopsis forgotten in r328695. Fix long lines in usage. Consistently use "default:" rather than "default is" r328784: Clean up long lines. r328795: Fold constants and unify vnc variable names. Approved by: grehan (mentor) PR: 225558 Changes: _U stable/11/ stable/11/share/examples/bhyve/vmrun.sh A commit references this bug: Author: rgrimes Date: Mon Feb 12 19:08:17 UTC 2018 New revision: 329179 URL: https://svnweb.freebsd.org/changeset/base/329179 Log: MFC: r328695,r328720,r328784,r328795 share/examples/bhyve/vmrun.sh additions and cleanups r328695: Add option '-n' network device emulation type which has a default of virtio-net PR: 225558 Submitted by: Johannes Lundberg <johalun0@gmail.com> r328720: Add -n <network device emulation type> to usage synopsis forgotten in r328695. Fix long lines in usage. Consistently use "default:" rather than "default is" r328784: Clean up long lines. r328795: Fold constants and unify vnc variable names. Approved by: grehan (mentor) PR: 225558 Changes: _U stable/11/ stable/11/share/examples/bhyve/vmrun.sh Merged |
Created attachment 190195 [details] patch for share/examples/bhyve/vmrun.sh This patch adds '-n' option to specify NIC. virtio-net is set as default.