Commit Graph

37 Commits

Author SHA1 Message Date
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
Matt Churchyard
6e90fc9143 Create config::yesno to reduce clutter and vars in run functions just to check config file yes/no flags 2020-02-04 14:47:34 +00:00
Matt Churchyard
392a640b24 Fix get_part whitespace handling and add uptime to vm list -v 2020-02-04 10:13:26 +00:00
Matt Churchyard
7fcf2c1d92 Provide a verbose list option to include cpu and memory usage from ps(1) 2020-01-29 14:45:26 +00:00
Matt Churchyard
b215760b3b reformat if_tuntap code slightly 2019-11-05 09:52:49 +00:00
Dave Cottlehuber
16214543d2 handle unified tuntap(4) after r347241
In r347241 in FreeBSD HEAD, tun(4) and tap(4) have been merged.
We need to detect and handle which kernel module has to be loaded,
using the closest kernel ABI change in FreeBSD 13.0-CURRENT.
2019-05-22 13:09:31 +00:00
Matt Churchyard
b32f6826ef Merge branch 'master' into vm-parameters 2018-11-29 11:18:59 +00:00
Mateusz Kwiatkowski
c76ae38bd2 Ability to override CPU and memory during VM creation
Fixes #273
2018-11-28 21:36:20 +01:00
Mateusz kwiatkowski
3ffbb52d5c Initial support for cloud images
Ref. https://github.com/churchers/vm-bhyve/issues/256
2018-10-17 07:47:19 +02:00
Matt Churchyard
5df10f2408 Add a "vm restart guest" command
This causes a guest shutdown but then restarts the guest without requiring a full
reload or destroying/re-creating network devices.
2018-10-09 11:09:09 +01:00
Matt Churchyard
69eae5a9ea Current bhyve checks only work on Intel
Maybe we can find some way to confirm bhyve support on AMD, but for now just let it run and see what happens
2018-10-08 10:37:23 +01:00
Matt Churchyard
c4a40bff1f Change Windows to put 8 ahci devices on one controller by default
This allows adding disks without pushing network devices onto higher
slots, causing Windows to see it as a new interface.
2018-08-22 09:03:36 +01:00
Matt Churchyard
d2763d307a Allow _ in vm names
Dash/hyphen and underscore are fairly common and benign characters.
Don't see much reason to support much else and possibly cause problems
in other parts of the code.
2018-08-20 12:18:38 +01:00
Matt Churchyard
1fea449a33 Update comments on check_bhyve_support 2018-08-20 12:11:19 +01:00
Matt Churchyard
6f6fac042b Refactor the host checks slightly 2018-08-20 12:08:06 +01:00
Matt Churchyard
3210da78e5 Remove ugly dmesg parsing and replace with checks for a couple of sysctls.
I cannot get confimation from devs that these sysctls are a viable or stable
way of testing for bhyve support (although cap.* sysctls seem fairly solid)
As such, also add an rc option to bypass the lot. This also allows bypassing the iommu
check just in case someone happens to have a iommu-capable machine that we think isn't.
2018-08-20 09:23:44 +01:00
Matt Churchyard
48ae40b504 Wrong default in util::check_name comments 2018-08-14 09:27:08 +01:00
Matt Churchyard
a44d6be56b Add "wired_memory" option to control the -S argument to bhyveload/bhyve
Note that this removes the ability to use bhyve_options="-S"
2018-08-13 09:32:24 +01:00
Matt Churchyard
eb96491b08 Small change to group tests together 2018-06-29 08:14:20 +00:00
Matt Churchyard
6b4b97584e Tidy some functions up and limit switch names to 12 chars 2018-06-27 08:34:12 +00:00
Matt Churchyard
152cb92250 Simplify stat commands and fix bridge interface listing 2018-06-26 10:16:21 +00:00
Matt Churchyard
ab73130132 Move master to next version 2018-06-26 09:56:51 +00:00
Matt Churchyard
1edf7155fa Don't output an entire screen of usage info for an invalid command 2018-06-22 08:33:43 +00:00
Matt Churchyard
9f76d63817 Address #211 - default.conf should be availble by default
This allows basic guests to be created without getting an error about a missing
template, or requiring the user to manually create/copy it.
2018-06-20 09:39:35 +00:00
nihr43
a36728f4fe check for amdvi support 2018-03-20 22:08:17 -05:00
nihr43
ad6bde19df check for amdvi support 2018-03-20 22:03:25 -05:00
Mark Johnston
4c931a7e01 Fix exit status for many vm commands
The pattern "[ $? -ne 0 ] && util::err ..." is problematic since it
leaves an exit status of 1 if the test fails, which is the non-error
case. So various commands (e.g., vm datastore add) return status 1 even
when they succeed if this pattern appears as the last line of a command
implementation.

Fix this by mechanically converting this pattern to
"[ $? -eq 0 ] || util:err ...".
2018-02-06 17:39:30 -05:00
Matt Churchyard
22512d7dc1 Declare all local variables
Doesn't actually affect anything, more for correctness and documentation than anything
2017-01-17 14:47:27 +00:00
matias pizarro
57e9005e39 Make vm-bhyve compatible with verbose boot dmesg output 2017-01-15 21:22:11 +01:00
Matt Churchyard
40f1b9ebe1 Add ability to configure private mode on existing switches
Note that we don't bother reconfiguring running guests, so changing
the setting only affects guests started from cold-boot afterwards.
2016-11-18 09:48:19 +00:00
Matt Churchyard
af3f1a5216 Skip cpu checks if no dmesg.boot log
I don't want to fully rely on these checks as it could stop us from running
on a system that actually supports bhyve. If the system doesn't support bhyve,
and doesn't have dmesg.boot, then bhyve will just fail to run.
2016-10-19 09:07:44 +01:00
Matt Churchyard
a3d9a6cff7 More work on send/recv 2016-08-08 19:23:35 +01:00
Matt Churchyard
b1d4a73b33 Add datastore option to vm recv 2016-08-03 18:48:27 +01:00
Matt Churchyard
42289f5ca8 Add "media" datastores and extend iso handling
If you have a directory (or network mount) containing iso files, you
can configure vm-bhyve to look there by adding it as
a media datastore. (vm datastore iso my-media /path/to/iso/dir).
Also we now look in the current dir for iso files, and accept full paths.
2016-08-01 16:02:57 +01:00
Matt Churchyard
55fa19f9b7 Add multiple guest support for the info commands
Don't think any of the remaining commands really need the ability
to specify multiple guests.
2016-07-29 10:40:27 +01:00
Matt Churchyard
8990032422 Update documentation
Add information on supported global config (one console so far).
mention foreground/interactive mode under start/install.
mention ability to start multiple guests with start command.
update windows details as 11 will have vnc support.
2016-07-28 10:43:02 -04:00
Matt Churchyard
52b9f2eb8b Follow some Google shell scripting advice
I already do pretty much everything they advise anyway
Grouping functions together by using "prefix::" is quite a nice feature though.
Nothing too clever, just makes use of the fact that a colon appears
to be a valid character in a shell function.
2016-06-09 10:47:47 +01:00