Commit Graph

468 Commits

Author SHA1 Message Date
Koichiro Iwao
a11cc00a48 Add support for injecting multiple SSH pubkeys with cloud-init
Resolves: #354

Example:
    % vm create -t centos7 -i AlmaLinux-9-GenericCloud-latest.x86_64.qcow2 \
      -C -k ~/.ssh/authorized_keys multipubkey
2025-02-13 09:13:04 +09:00
Mateusz Kwiatkowski
522d44de3a Merge pull request #576 from oshogbo/pci_devices
Use entire PCI device range
2025-01-22 13:58:12 +01:00
Mateusz Kwiatkowski
7ab78f4155 Merge pull request #582 from ctuffli/ctuffli-fix-list
fix: Restore verbose option to list command
2025-01-22 13:57:57 +01:00
Mateusz Kwiatkowski
ccfd892806 Merge pull request #579 from tywkeene/master
lib/vm-core: Replace calls to pcregrep with grep and sed
2025-01-22 11:45:35 +01:00
Mateusz Kwiatkowski
10a8b818c5 Merge pull request #525 from dag-erling/des/opts
Fix UEFI VM options for modern edk2 versions. 

Should fix https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273560
2025-01-22 10:42:08 +01:00
Chuck Tuffli
85d916fd00 fix: Restore verbose option to list command
Commit 378d95e ("Add option to only list running VMs") removed the call
to cmd::parse_args which supported the -v ("verbose") option. Add back
the ability to pass the -v option directly instead of using the utility
function itself.

While here, also update the man page to document the verbose option.

Reported-by: drTr0jan
2025-01-16 10:47:16 -08:00
Tyrell Keene (tywkeene)
03d33a7258 lib/vm-core: Replace calls to pcregrep with grep and sed
pcregrep doesnt seem to be installed on FreeBSD systems by
default, this commit changes calls to this command to grep
and sed where possible in lib/vm-core.
2025-01-11 16:12:57 -05:00
Arne Steinkamm
0ca0b56c79 Use entire PCI device range
Previously, vm-bhyve only distributed devices on PCI bus 0,
despite bhyve supporting multiple PCI buses. This limited the
number of virtual devices a VM could use.

This commit addresses that issue by using the entire range of
PCI buses.
2025-01-06 13:35:20 +01:00
Mateusz Kwiatkowski
31358b639c Merge pull request #536 from churchers/issue/535
Resize file backed images after writting cloud image with qemu-img
2024-09-10 10:59:39 +02:00
Marek Zarychta
d88bc164ff Replace genisoimage with makefs(8) from the base 2024-03-15 17:05:51 +01:00
Marek Zarychta
6f17f66b29 Revert "Remove dependency on genisoimage, use tar and libarchive from base system instead"
This reverts commit 4fa2cbaf6f.
2024-03-15 16:59:58 +01:00
Marek Zarychta
4fa2cbaf6f Remove dependency on genisoimage, use tar and libarchive from base system instead 2024-02-29 16:57:03 +01:00
Mateusz Kwiatkowski
350cd9ee47 Resize file backed images after writting cloud image with qemu-img
Fixes #535
2023-11-29 12:25:55 +01:00
Dag-Erling Smørgrav
653d01f5b5 Fix bhyve options:
- When configuring UEFI, don't overwrite previous options.
- When configuring UEFI, don't repeat -H.
- Move -w from UEFI options to default options.
2023-09-08 15:42:02 +02:00
Chuck Tuffli
378d95e946 Add option to only list running VMs 2023-07-05 14:13:05 -07:00
Emile 'iMil' Heitor
56da39dc9e fix: s/qemu-utils/qemu-tools/g 2022-12-27 10:13:02 +01:00
Matt Churchyard
bda366b92a Merge pull request #490 from huskyii/fix_ng_create_typo
switch::netgraph:create -> switch::netgraph::create
2022-11-08 09:41:52 +00:00
Jiang Zhu
532a86d685 switch::netgraph:create -> switch::netgraph::create 2022-10-28 23:50:38 +08:00
Matt Churchyard
84bbd040b5 Merge pull request #479 from madpilot78/bhyveload_pass_vm_hostname
Pass the vm name to bhyveload guests as a variable.
2022-10-25 12:04:17 +01:00
Matt Churchyard
984ce46284 Merge pull request #480 from madpilot78/sound_recording
Sound recording
2022-10-25 12:03:13 +01:00
moracca
45286351c4 fix bad _netgraph, variable
Fix "local: _netgraph,: bad variable name" warning when running `vm switch info`
2022-10-13 19:27:47 -04:00
Guido Falsi
f2296e20b4 Correctly quote variable being tested. 2022-09-19 18:26:17 +02:00
Guido Falsi
48576f6905 Add support for defining a sound recording device. 2022-09-19 10:48:43 +02:00
Guido Falsi
3b7925fd7e Pass the vm name to bhyveload guests as a variable. 2022-09-17 18:16:16 +02: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
9614e81049 Set to 1.5 for importing into ports 2022-07-19 09:40:23 +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
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
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
b977c60896 Add support for persistent uefi vars with uefi_vars=yes config option 2022-02-25 09:40:20 +00: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
Daniel Dowse
10d726ebbe Add HD Audio device to guest via config 2022-01-28 03:37:31 +01: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
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
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
Matt Churchyard
52a504e409 fix #382. change interface description to use delimiter not used in guest names 2021-01-05 09:47:58 +00:00