| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
and bootp renewals with vmd(8)'s built-in dhcp server. Previous behavior
ignored did not intercept these packets and instead transmitted them.
This should make vmd(8)'s dhcp behave more as a true dhcp server should and
allows it to work properly with the new dhcpleased(8) attempting a renewal.
OK mlarkin@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Diff and (slightly tweaked) text below from
Dave Voutila < dave at sisu dot io >, thanks!
--
Since 6.7 switched to FFS2 as the default filesystem for new installs,
the ability for vmd(8) to load a kernel and boot.conf from a disk image
directly (without SeaBIOS) has been broken.
A diff from tb to add FFS2 support never mdae it into the tree.
On 5th Jan 2021, new ramdisks for amd64 have started shipping gzipped,
breaking the ability to load the bsd.rd directly as a kernel image for a vmd
guest without first uncompressing the image.
Using BIOS works, the FFS2 change happend ten months ago and few if any have
complained about the breakage. vmctl(8) is still vague about supporting it
per its man page and one still has to pass the disk image twice as a "-b"
and "-d" argument to boot an OpenBSD guest *without* BIOS.
Josh Rickmar reported the gzip issue on bugs@ and provided patches to add
support for compressed ramdisks and kernel images. The easiest way to do so
is to drop support for FFS images since they require a call to fmemopen(3)
while all the other logic uses fopen(3)/fdopen(3) calls and a file
descriptor. It is much easier to get thsoe patches merged if they don't
have to account for extracting files from disk images.
--
No objections anyone
"Removing it makes sense" reyk (who wrote the FFS module)
OK mlarkin
|
|
|
|
|
| |
tested by josh rickmar
ok kn@
|
|
|
|
|
|
|
|
|
| |
a handful of separate variables. this will makes it easier for vmd to report
and check on the individual vm states
no functional change intended
ok ccardenas@ mlarkin@
|
|
|
|
|
|
| |
This means that when using '-L', the IP addresses of the VMs are stable.
ok reyk@
|
|
|
|
|
|
|
| |
This turns most warn + returns that should never happen into hard failures,
and improves the user directed error messages.
ok @mlarkin, @reyk
|
|
|
|
| |
ok & test ccardenas@, additional review from kn@
|
|
|
|
|
|
|
| |
The disk path wasn't updated so vmd tried to open the derived disk
image for each base over and over again.
OK ori@ mlarkin@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The -i option to vmctl create (eg. vmctl create output.qcow2 -i input.img)
lets you create a new image from an input file and convert it if it is a
different format. This allows to convert qcow2 images from raw images,
raw from qcow2, or even qcow2 from qcow2 and raw from raw to re-optimize
the disk.
This re-uses Ori's vioqcow2.c from vmd by reaching into it and
compiling it in. The API has been adjust to be used from both vmctl
and vmd accordingly.
OK mlarkin@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This looping has been experienced by people who run VMs with a broken
kernel or boot loader that trigger a very fast reboot loop (triple
fault) of a VM that ends up using a lot of CPU and resources on the
host. Some fixes in vmm(4) and vmd(8) helped to avoid such conditions
but it can still occur if something is wrong in the guest VM itself.
If the VM restarts after less than VM_START_RATE_SEC (6) seconds, we
increment the limit counter. After VM_START_RATE_LIMIT (3) of suchs
fast reboots the VM is stopped.
There are only very few people who intentionally want to reboot-loop a
VM very quickly (many times within a second); mostly for fuzzing.
They will have to recompile and adjust the stated #defines in the code
as we don't have a config option to disable it.
OK mlarkin@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This works is from Ori Bernstein, committing on his behalf:
Add support to vmd for external snapshots. That is, snapshots that are
derived from a base image. Data lookups start in the derived image,
and if the derived image does not contain some data, the search
proceeds ot the base image. Multiple derived images may exist off of
a single base image.
A limitation of this format is that modifying the base image will
corrupt the derived image.
This change also adds support for creating disk derived disk images to
vmctl. To use it:
vmctl create derived.qcow2 -s 16G -b base.qcow2
From Ori Bernstein
OK mlarkin@ reyk@
|
|
|
|
|
|
| |
The new vm_checkaccess() call didn't account for the vmboot case.
OK ccardenas@ mikeb@
|
|
|
|
| |
Found by mikeb@
|
|
|
|
|
|
|
|
|
| |
The limits are currently hard-coded and undocumented (4 CPUs/VMs, 2G
memory, 8 interfaces) but will be configurable in an upcoming diff.
These limits are tracked in total usage; for example, a user will be
able to run up to 4 VMs with 512M of memory or a single VM with 2G.
OK ccardenas@ mlarkin@
|
|
|
|
|
|
| |
This prevents time of TOCTOU attacks for instances.
OK mlarkin@
|
|
|
|
|
|
| |
Use it in /etc/rc.d/vmd accordingly.
OK sthen@
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Turn tracing messages into DPRINTF (only compiled with DEBUG).
- Pass __func__ to vm_stop and vm_remove: this way we can track who
called the function in the async context. It replaces the manual
log_debug in front of each vm_stop/vm_remove. This debug logging
trick can be removed in the future once we are more confident about
it.
OK ccardenas@ mlarkin@
|
| |
|
| |
|
|
|
|
| |
Also changes an error message in vmctl to reflect same.
|
|
|
|
|
|
|
|
|
| |
When attempting to start a vm from vm.conf that fails due to inadequate
resources and such, do not remote vm entry from vm list.
Reported by mpi@
ok mpi@
|
|
|
|
| |
ok mlarkin@ ccardenas@
|
|
|
|
|
|
| |
Reported by jca@.
Ok mlarkin@ and deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Adds 'cdrom' keyword to vm.conf(5) and '-r' to vmctl(8)
* Support various sized ISOs (Limitation of 4G ISOs on Linux guests)
* Known working guests: OpenBSD (primary), Alpine Linux (primary),
CentOS 6 (secondary), Ubuntu 17.10 (secondary).
NOTE: Secondary indicates some issue(s) preventing full/reliable
functionality outside the scope of the vioscsi work.
* If the attached disks are non-bootable (i.e. empty), SeaBIOS (vmd's
default BIOS) will boot from CD-ROM.
ok mlarkin@, jca@
|
| |
|
| |
|
|
|
|
| |
From Carlos Cardenas, many thanks!
|
|
|
|
|
|
|
|
|
|
|
| |
These don't work today and present the user with a confusing error
message if an attempt is made to use them. This commit detects attempts
to use block or character devices and if detected, presents the user with
a better message.
ok jasper
From Carlos Cardenas, thanks!
|
|
|
|
|
|
|
| |
vmctl so that it can display proper errors for "disk missing" and "bios
missing" situations. Expands on an earlier idea/diff from jasper.
ok jasper@, pd@, tedu@
|
|
|
|
| |
ok reyk@ and mlarkin@
|
|
|
|
|
|
| |
This allows to configure VM interfaces and switches in individual rdomains.
OK mlarkin@
|
|
|
|
|
|
|
| |
The default prefix is 100.64.0.0/10 from RFC6598.
Requested by sthen@ chris@
OK mlarkin@
|
|
|
|
|
|
| |
This avoids jumping into vmboot in some edge conditions.
OK mlarkin@
|
|
|
|
|
|
|
| |
This allows to use the non-BIOS on-disk bootloader for testing. It
might go away after release when we feel more confident about BIOS.
OK mlarkin@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of using the internal "vmboot", VMs will now be booted using
the external BIOS firmware in /etc/firmware/vmm-bios (which is subject
to a LGPLv3 license). Direct booting of OpenBSD kernels or
non-default BIOS images is still supported for now using the -b/boot
option that is replacing the -k/kernel option.
As requested by Theo, vmd(8) fails if neither the default BIOS is
found nor a kernel has been specified in the VM configuration. The
"vmm" BIOS has to be installed using fw_update(1), which will be done
automatically in most cases where the OpenBSD can fetch it after
install/upgrade.
OK mlarkin@
|
|
|
|
|
|
|
| |
This is especially useful when multiple VMs share a switch, the
implementation is independent from the underlying switch or bridge.
no objections mlarkin@
|
|
|
|
|
|
|
| |
This allows matching users to start or stop VMs that they "own" and to
access the console accordingly.
OK mlarkin@
|
|
|
|
|
|
|
|
| |
This allows more flexibility for upcoming changes and better pledge.
We also didn't use half of the features of libutil's openpty function.
Additionally, make sure that the ttys are closed correctly on shutdown.
OK gilles@
|
|
|
|
| |
steal code.
|
|
|
|
|
|
|
|
| |
pty and re-send it to the vmm monitor process. With additional
changes in vmm.c, this will allow perform a cold reboot of VM.
With testing and feedback from Jon Bernard
OK mlarkin@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This make the kernel/-k argument optional and, if not specified, tries
to find the /bsd kernel in the primary hd0a partition of the first
disk image itself. It doesn't support hd0a:/etc/boot.conf yet, and it
is no BIOS or full boot loader, but it makes booting and handling of
VMs a bit easier - booting an external kernel is still supported.
The UFS file system code ufs.c is directly from libsa which is also
used by the real boot loader. The code compiles with a few signedness
warning which will be fixed separately.
OK mlarkin@
|
|
|
|
|
|
|
| |
loading of invalid kernel files.
Reported by mlarkin@
OK mlarkin@
|
|
|
|
|
|
| |
once again after setting the next available id.
Suggested by edd@
|
|
|
|
|
|
| |
style that is used in other places. Also keep the vmid from the parent.
OK edd@
|
|
|
|
|
|
|
| |
Brings us one step closer to having disabled by default vms is vm.conf(5),
which can be started with vmctl(8).
Input, testing and OK reyk@. Thanks.
|
|
|
|
| |
Requested and tested by martijn@
|
| |
|
|
|
|
|
|
| |
See vm.conf(5) for more details.
OK mlarkin@
|
|
|
|
|
|
|
|
|
|
|
| |
operations that aren't allowed under pledge. This is a companion to
the "vmd" process that runs as root but with pledge.
With the "priv" process, each new tap(4) interface now gets a
description to indicate the vm, eg. "vm1-if0-myvm". For network
configuration will be done by vmd/priv later.
OK mlarkin@
|
|
|
|
| |
No objections from mlarkin@ sunil@
|