Bug 230580 - sysutils/vm-bhyve: Add support for guest memory wiring
Summary: sysutils/vm-bhyve: Add support for guest memory wiring
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: feature, needs-patch
Depends on:
Blocks:
 
Reported: 2018-08-13 01:58 UTC by Victor Sudakov
Modified: 2020-01-04 10:23 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (churchers)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Sudakov 2018-08-13 01:58:35 UTC
We need a configuration option to support the  -S (Wire guest memory) parameter in sysutils/vm-bhyve. 

bhyve_options="-S" won't work because this parameter should be simultaneously passed to bhyve AND bhyveload which bhyve_options does not do.
Comment 1 churchers 2018-08-13 07:58:27 UTC
A wired_memory option may be desirable.
Adding this via bhyve_options does affect both commands already though

loader="bhyveload"
bhyve_options="-S"

# vm start bsd1
# tail /vm/bsd1/vm-bhyve.log
Aug 13 08:55:39: bhyveload -S -m 512M -e autoboot_delay=3 -d /vm/bsd1/disk0.img bsd1
Aug 13 08:55:47:  [bhyve options: -c 4 -m 512M -AHP -S -U 93d7327e-7396-11e8-9ed9-50e549369bc6 -u]
Comment 2 Victor Sudakov 2018-08-13 09:49:27 UTC
(In reply to churchers from comment #1)

> Adding this via bhyve_options does affect both commands already though

Sorry, this is not working for me:

Aug 13 16:43:09: bhyve exited with status 1
Aug 13 16:43:09: destroying network device tap0
Aug 13 16:43:09: stopped
Aug 13 16:43:12: initialising
Aug 13 16:43:12:  [loader: bhyveload]
Aug 13 16:43:12:  [uefi: no]
Aug 13 16:43:12:  [cpu: 1]
Aug 13 16:43:12:  [memory: 1G]
Aug 13 16:43:12:  [hostbridge: standard]
Aug 13 16:43:12:  [com ports: com1]
Aug 13 16:43:12:  [uuid: e148afdb-d4af-11e6-9a94-5404a6b49a66]
Aug 13 16:43:12:  [utctime: yes]
Aug 13 16:43:12:  [debug mode: no]
Aug 13 16:43:12:  [primary disk: disk0.img]
Aug 13 16:43:12:  [primary disk dev: file]
Aug 13 16:43:12: initialising network device tap0
Aug 13 16:43:12: adding tap0 -> bridge0 (main)
Aug 13 16:43:12: booting
Aug 13 16:43:12: bhyveload -c /dev/nmdm0A -m 1G -e autoboot_delay=3 -d /d02/vm/fido/disk0.img fido
Aug 13 16:43:17:  [bhyve options: -c 1 -m 1G -AHP -S -U e148afdb-d4af-11e6-9a94-5404a6b49a66 -u]
Aug 13 16:43:17:  [bhyve devices: -s 0,hostbridge -s 31,lpc -s 4:0,virtio-blk,/d02/vm/fido/disk0.img -s 5:0,virtio-net,tap0,mac=58:9c:fc:01:f6:ac]
Aug 13 16:43:17:  [bhyve console: -l com1,/dev/nmdm0A]
Aug 13 16:43:17: starting bhyve (run 1)
Aug 13 16:43:17: bhyve exited with status 1
Aug 13 16:43:17: destroying network device tap0
Aug 13 16:43:17: stopped


Here is my complete config:

guest="freebsd"
loader="bhyveload"
cpu=1
memory=1G
network0_type="virtio-net"
network0_switch="main"
disk0_type="virtio-blk"
disk0_name="disk0.img"
utctime="yes"
uuid="e148afdb-d4af-11e6-9a94-5404a6b49a66"
network0_mac="58:9c:fc:01:f6:ac"
bhyve_options="-S"
Comment 3 churchers 2018-08-13 10:57:10 UTC
Above issue was present in v1.1 and has been fixed in vm-bhyve 1.2, which is already in the ports tree.

wired_memory option has been added to next release.
Comment 4 Victor Sudakov 2019-01-20 15:00:03 UTC
(In reply to churchers from comment #3)
bhyve_options="-S"
seems to work on vm-bhyve-1.2.3 from ports. Thank you.
Comment 5 Victor Sudakov 2020-01-04 10:22:50 UTC
With the  wired_memory guest configuration option vm-bhyve-1.3.0 I think we can close the PR.