750 Commits

Author SHA1 Message Date
Guido Falsi
3b7925fd7e Pass the vm name to bhyveload guests as a variable. 2022-09-17 18:16:16 +02:00
Matt Churchyard
07f96108ea Merge pull request #472 from galdor/master
fix ifconfig data matching in info::guest_networking
2022-08-02 14:10:50 +01:00
Nicolas Martyanoff
0c291329b9 fix ifconfig data matching in info::guest_networking
The description field uses '/' as separator since 52a504e.

close #471
2022-08-02 08:03:16 +02:00
Matt Churchyard
714475f556 Fix #462 makes sense to pass uuid to bhyveload 2022-07-29 12:29:25 +01:00
Matt Churchyard
07013f7d25 Move interface init code into emulation specific switch modules 2022-07-22 11:50:07 +01:00
Matt Churchyard
e323640b88 Merge pull request #458 from stephen-fox/removed-unsafe-shell-source
security: Removed unsafe relative path sourcing.
2022-07-21 09:30:20 +01:00
Matt Churchyard
9614e81049 Set to 1.5 for importing into ports v1.5.0 2022-07-19 09:40:23 +01:00
Matt Churchyard
ab539a182c Merge pull request #459 from benoitc/vm-switch-netgraph
add netgraph switch support
2022-07-19 09:35:16 +01:00
benoitc
d940e51c49 add netgraph switch support
This change add simiular support to VALE for netgraph switches. Switches
must be configured manually. Devices will be added using the bhyve
support of netgraph.

Link Num of a peer in the bridge is found by iterrating all devices
already setup in. (Similiar hack is found in jail example).
2022-04-18 06:17:19 +02:00
Stephen Fox
9537cb32ed security: Removed unsafe relative path sourcing.
The "vm" script is responsible for executing shell script
functions found in other vm-bhyve scripts. It does this by
sourcing other vm-bhyve shell scripts, which automatically
execute code that handles the user's input.

One of the first actions "vm" takes is to check if the relative
file "./lib/vm-core" exists. If this file exists, it sets
the parent directory for sourcing scripts to "./lib",
resulting in all shell scripts being sourced from a path
relative to the user's current working directory.

This is unsafe because sourcing from a relative file path
may result in execution of untrusted code.

For example, imagine the user cloned a git repository that
contains malicious code stored at "<git-dir>/lib/". If the
user were to "cd" to this imaginary cloned repository and
execute the "vm" script, they would inadvertently source and
execute code from that directory.

This commit removes this behavior. The "vm" script now
sources scripts exclusively from "/usr/local/lib/vm-bhyve/".
2022-04-09 17:08:43 -04:00
Matt Churchyard
ec0e12e974 Merge pull request #457 from cgull/fix-utctime-default
The default of utctime=yes was lost; restore it.
2022-04-06 16:08:41 +01:00
John Hood
d7d23bc6fd The default of utctime=yes was lost; restore it. 2022-04-05 15:16:21 -04:00
Mateusz Kwiatkowski
779b730fad Merge pull request #377 from dstolfa/master
Replace uname -U with uname -K when loading if_tuntap.ko
2022-03-22 11:38:14 +01:00
Mateusz Kwiatkowski
a4e277063e Merge pull request #394 from pasztor/fix/zfs-provision
Fix provision issue in case of zfs datasets
2022-03-22 11:38:00 +01:00
Mateusz Kwiatkowski
e1ab269106 Merge pull request #448 from driesmp/nodescription
Don't set interface description on manual bridges
2022-03-22 11:37:29 +01:00
Matt Churchyard
43da9ed519 Don't override maxlen if a caller sets it 2022-03-07 09:01:30 +00:00
Matt Churchyard
357d57be9b Merge pull request #452 from EricKrausser/EricKrausser-patch-1
Fix variable __maxlen to _maxlen
2022-03-07 08:57:42 +00:00
EricKrausser
14d9a716de Fix variable __maxlen to _maxlen
I did not test this, but it looks obviously like a bug.
2022-03-05 09:55:38 +01:00
Matt Churchyard
8be5f5fcb4 Merge pull request #451 from driesmp/Update-manpage-for-issue-251
Update manpage for issue 251
2022-02-28 10:51:56 +00:00
Matt Churchyard
c8b7c1d204 Hopefully fix #427 not a NetBSD user but looks like disk naming has changed 2022-02-25 10:15:40 +00:00
Matt Churchyard
be2203540f Add documentation for uefi_vars setting 2022-02-25 09:56:52 +00:00
Matt Churchyard
b977c60896 Add support for persistent uefi vars with uefi_vars=yes config option 2022-02-25 09:40:20 +00:00
Dries Michiels
1e8b79442b Fix formatting 2022-02-24 13:58:03 +01:00
Dries Michiels
81cd2d5767 Improve usage 2022-02-24 13:50:49 +01:00
Dries Michiels
e09cd8720f Add usage 2022-02-24 13:43:12 +01:00
Dries Michiels
27591076c8 Add header entry 2022-02-24 13:40:52 +01:00
Mateusz Kwiatkowski
a4d64064c0 Merge pull request #379 from tingox/master
fixed a couple of typos in the man page
2022-02-23 13:22:27 +01:00
Mateusz Kwiatkowski
61470e96a3 Merge pull request #418 from JamesRM/master
Fix typo in README.md.
2022-02-23 13:10:03 +01:00
Mateusz Kwiatkowski
f75d41f48d Merge pull request #422 from cgull/document-bhyveload_args
Document new bhyveload_args configuration option introduced in 678832df94
2022-02-23 13:06:36 +01:00
Mateusz Kwiatkowski
b7b40789f4 Merge pull request #430 from brd/fix-grammar
Fix grammar
2022-02-23 13:03:07 +01:00
Dries Michiels
899607dabc Fix type and reword comment 2022-02-19 12:03:03 +01:00
Dries Michiels
175594c834 Update vm-switch-manual 2022-02-19 12:01:29 +01:00
Dries Michiels
c1620f8a25 Don't set interface description on manual bridges
Manual bridges are fully configured using rc.conf. This is also true for the description of the bridge.
2022-02-18 20:01:41 +01:00
Matt Churchyard
361856d23d Merge pull request #437 from runhyve/cloud-init-override-hostname
Allow override hostname with cloud-init configuration
2022-02-17 08:59:38 +00:00
Matt Churchyard
b6e73e3a31 Merge pull request #440 from runhyve/vm-name-length
Allow to use up to 229 characters for VM names on >=13.0
2022-02-15 16:26:56 +00:00
Matt Churchyard
d22917d69c Merge pull request #441 from runhyve/wait-zvol
Wait for storage device to appear when creating a VM
2022-02-15 16:26:34 +00:00
Matt Churchyard
8845bc160a Merge pull request #445 from laffer1/patch-1
MidnightBSD guests work with the default freebsd bhyveload
2022-02-15 15:39:10 +00:00
Matt Churchyard
232e2ce5af Merge pull request #446 from ddowse/sound
Add HD Audio device to guest via config
2022-02-15 15:38:07 +00:00
Daniel Dowse
10d726ebbe Add HD Audio device to guest via config 2022-01-28 03:37:31 +01:00
Lucas Holt
690f2e4596 MidnightBSD guests work with the default freebsd bhyveload 2021-12-31 18:00:09 -05:00
Mateusz Kwiatkowski
346e5bb4bd Allow to use up to 229 characters for VM names on >=13.0
The limit was increased in this commit: https://svnweb.freebsd.org/base?view=revision&revision=349948
2021-11-13 20:49:07 +01:00
Mateusz Kwiatkowski
c1d720d62c Wait for zvol to appear 2021-11-13 20:26:19 +01:00
Mateusz Kwiatkowski
31bcb7aeef Allow override hostname with cloud-init configuration
Currently hostname passed to cloud-init is set to VM's name.
With this change it's possible to override this with additional field
in network config. Example:

vm create -t grub -c 4 -m 4096M -i focal-server-cloudimg-amd64.img -s 12G -C -k /tmp/.sshpk.68067 -n 'nameservers=1.1.1.1,8.8.8.8;gateway=185.17.43.97;ip=185.17.43.100/27;netmask=255.255.255.224;hostname=myhostname.example.com' my_virtual_machine
2021-11-10 14:20:16 +01:00
Brad Davis
3f2f46f656 Fix grammar 2021-08-04 16:22:57 -06:00
John Hood
0ec8c91a3f Document new bhyveload_args configuration option. 2021-05-19 00:05:46 -04:00
James Mintram
57877b403f Update README.md 2021-05-01 21:33:12 +02:00
Matt Churchyard
678832df94 Fix #403 add config option to allow passing bhyveload arguments (bhyveload_args) 2021-03-18 13:17:57 +00:00
Matt Churchyard
55dd860070 Fix #399 documentation is not clear that specifying 'template.conf' will cause an error 2021-03-12 14:51:36 +00:00
Matt Churchyard
0d5905bd69 Reimplement the send/recv code as migrate
I believe some people did use this, but I had intermittent problems getting it to work reliably.
It has now been re-implemented as a single "migrate" command using ssh.

A guest can now be transferred completely from the source host using a single command.
See the man page for more details

vm migrate -s guest-name new-host

Ideally passwordless key-auth should be used, although not strictly necessary.
2021-03-12 14:48:01 +00:00
Matt Churchyard
79f44430d7 Allow auto interfaces to be given a specific name 2021-01-06 10:47:38 +00:00