#
986b002c |
| 02-May-2024 |
mlarkin <mlarkin@openbsd.org> |
vmctl(8): Add 'vmctl status -r'
The -r option can be used to limit the output of 'vmctl status' to only running VMs. This is useful for machines that have a large number of stopped VMs, as the runni
vmctl(8): Add 'vmctl status -r'
The -r option can be used to limit the output of 'vmctl status' to only running VMs. This is useful for machines that have a large number of stopped VMs, as the running ones are printed at the top by default and previously required scrolling back to see the list of running VMs, and/or using 'grep RUNNING'.
There is no change for users not using -r.
ok dv
show more ...
|
#
0e4dbc4a |
| 09-Nov-2023 |
dv <dv@openbsd.org> |
vmctl(8): avoid abort when given an invalid "kernel" file.
The vmctl `start` command allows the user to pass an optional "kernel" file (either a ramdisk kernel or a SeaBIOS image). This file is open
vmctl(8): avoid abort when given an invalid "kernel" file.
The vmctl `start` command allows the user to pass an optional "kernel" file (either a ramdisk kernel or a SeaBIOS image). This file is opened by vmctl and the descriptor passed via imsg.
If the file provided isn't a regular file, the attempt to send the start message to vmd(8)'s control socket will fail and results in a the vmctl process aborting.
Check the file type after open and fail gracefully if not a regular file.
reported by and ok gnezdo@
show more ...
|
#
1e337eb1 |
| 02-May-2023 |
jsg <jsg@openbsd.org> |
free the correct pointer. Missed in rev 1.16. ok dv@
|
#
b848b186 |
| 28-Apr-2023 |
dv <dv@openbsd.org> |
vmd(8)/vmctl(8): allow vm owners to override boot kernel.
vmd allows non-root users to "own" a vm defined in vm.conf(5). While the user can start/stop the vm, if they break their filesystem they hav
vmd(8)/vmctl(8): allow vm owners to override boot kernel.
vmd allows non-root users to "own" a vm defined in vm.conf(5). While the user can start/stop the vm, if they break their filesystem they have no means of booting recovery media like a ramdisk kernel.
This change opens the provided boot kernel via vmctl and passes the file descriptor through the control channel to vmd. The next boot of the vm will use the provided file descriptor as boot kernel/bios. Subsequent boots (e.g. a reboot) will return to using behavior defined in vm.conf or the default bios image.
ok mlarkin@
show more ...
|
#
75df0aee |
| 25-Apr-2023 |
dv <dv@openbsd.org> |
vmctl(8): no longer needs vmmvar.h
Finally! We can remove kernel headers from vmctl.
ok mlarkin@
|
#
73a98491 |
| 25-Apr-2023 |
dv <dv@openbsd.org> |
vmm(4)/vmd(8): pull struct members out of vmm ioctl create struct.
The object sent to vmm(4) contained file paths and details the kernel does not need for cpu virtualization as device emulation is i
vmm(4)/vmd(8): pull struct members out of vmm ioctl create struct.
The object sent to vmm(4) contained file paths and details the kernel does not need for cpu virtualization as device emulation is in userland. Effectively, "pull up" the struct members from the vm_create_params struct to the parent vmop_create_params struct.
This allows us to clean up some of vmd(8) and simplify things for switching to having vmctl(8) open the "kernel" file (SeaBIOS, bsd.rd, etc.) to allow users to boot recovery ramdisk kernels.
ok mlarkin@
show more ...
|
#
d489aa7e |
| 28-Jan-2023 |
dv <dv@openbsd.org> |
Move some header definitions from vmm(4) to vmd(8).
Part of an ongoing effort to move userland-specific information out of a kernel header and directly into vmd(8). No functional change.
ok mlarkin@
|
#
7ac3f975 |
| 13-May-2022 |
yasuoka <yasuoka@openbsd.org> |
Follow the recent change that the unit of `imgsize' argument of create_imagefile() became MB. Also change the arguement's type from long to uint64_t that is preferred.
ok dv
|
#
ead1b146 |
| 04-May-2022 |
dv <dv@openbsd.org> |
vmctl(8)/vmd(8): convert disk sizes from MB to bytes
Continue converting other parts to storing data in bytes instead of MB. In this case, the logic for disk sizes was being scaled.
This fixes issu
vmctl(8)/vmd(8): convert disk sizes from MB to bytes
Continue converting other parts to storing data in bytes instead of MB. In this case, the logic for disk sizes was being scaled.
This fixes issues reported by Martin Vahlensieck where vmctl could no longer create disks larger than 7 MiB after previous commits to change storing memory sizes as bytes.
While this keeps the vm memory limit check in vmctl's size parser, it skips the limit check for disks. The error messages adjust accordingly and this removes the double error message logging.
Update comments and function types accordingly.
ok marlkin@
show more ...
|
#
39e812af |
| 04-May-2022 |
dv <dv@openbsd.org> |
Missed removing some memory scaling in vmm, vmctl.
Continuation of commitid RbITgDkOsW8SMssz removing use of megabytes instead of bytes in vmm(4) and vmctl(8). Missed this spot that only manifests a
Missed removing some memory scaling in vmm, vmctl.
Continuation of commitid RbITgDkOsW8SMssz removing use of megabytes instead of bytes in vmm(4) and vmctl(8). Missed this spot that only manifests after a vm is started and has its runtime details inspected.
show more ...
|
#
e545c54c |
| 03-May-2022 |
dv <dv@openbsd.org> |
vmm/vmd/vmctl: standardize memory units to bytes
At different points in the vm lifecycle vmm(4), vmctl(8), and vmd(8) refer to a vm's memory range sizes in either bytes or megabytes. This is needles
vmm/vmd/vmctl: standardize memory units to bytes
At different points in the vm lifecycle vmm(4), vmctl(8), and vmd(8) refer to a vm's memory range sizes in either bytes or megabytes. This is needlessly complex.
Switch to using bytes everywhere and adjust types and constants accordingly. While this makes it possible to specify vm's with memory in fractions of megabytes, the logic requiring whole megabyte values remains.
Feedback from deraadt@, mlarkin@, and Matthew Martin.
ok mlarkin@
show more ...
|
#
540e29f5 |
| 10-Jun-2021 |
dv <dv@openbsd.org> |
vmctl(8)/vmd(8): communicate TERMINATE_VM_EVENT imsgs on vm stop.
Instead of translating imsg types, update vmclt(8) to handle receiving IMSG_VMDOP_TERMINATE_VM_EVENT messages on vm termination.
Th
vmctl(8)/vmd(8): communicate TERMINATE_VM_EVENT imsgs on vm stop.
Instead of translating imsg types, update vmclt(8) to handle receiving IMSG_VMDOP_TERMINATE_VM_EVENT messages on vm termination.
This finishes the work previously committed for supporting multiple waiters or the cancellation of a client waiting on a vm shutdown. vmd no longer needs to translate an IMSG_VMDOP_TERMINATE_VM_RESPONSE into an *_EVENT.
ok mlarkin@
show more ...
|
#
3538c82e |
| 12-May-2021 |
dv <dv@openbsd.org> |
vmctl(8): remove unveil from disk image creation routines
James Cook reported an issue creating images from qcow2 disks that contained base images. Initial approach suggested was to replace the use
vmctl(8): remove unveil from disk image creation routines
James Cook reported an issue creating images from qcow2 disks that contained base images. Initial approach suggested was to replace the use of realpath(3), but since this is common code used in vmd(8) the better option is to just remove the use of unveil(1) in vmctl. (It was added very early in vmctl's development before support for disk conversion was added.)
This does not change existing unveil usage in vmctl for things like the control socket or the serial console. There's no change to vmd either.
Discussed with and OK from mlarkin@
show more ...
|
#
8b85f8f9 |
| 22-Mar-2021 |
kn <kn@openbsd.org> |
Properly reflect stopping state
Diff from Preben Guldberg < preben at guldberg dot org>, thanks!
In "vmctl status", VMs that are being stopped but are still running will simply show up as "running"
Properly reflect stopping state
Diff from Preben Guldberg < preben at guldberg dot org>, thanks!
In "vmctl status", VMs that are being stopped but are still running will simply show up as "running".
Give preference to showing the "stopping" state akin to how a paused VM is handled.
Tested by Dave Voutila OK tb
show more ...
|
#
7bfb33a3 |
| 27-Jan-2021 |
deraadt <deraadt@openbsd.org> |
split out extern and decl for -fno-common
|
#
90d78c52 |
| 02-Sep-2020 |
tb <tb@openbsd.org> |
Fix clang warning in vmctl(8)
If the path to a tty doesn't contain a '/' or ends in a '/' use the full path. (The intent is to chop off the leading "/dev/")
ok deraadt (who had the same diff) marti
Fix clang warning in vmctl(8)
If the path to a tty doesn't contain a '/' or ends in a '/' use the full path. (The intent is to chop off the leading "/dev/")
ok deraadt (who had the same diff) martijn millert
show more ...
|
#
8afcfef5 |
| 11-Mar-2020 |
jasper <jasper@openbsd.org> |
fix spelling of IMSG_VMDOP_TERMINATE_VM_RESPONSE in comment
from Matt Schultz
|
#
12d482ab |
| 15-Dec-2019 |
kn <kn@openbsd.org> |
Explicitly print root user in status OWNER column
With "owner root:wheel" (any group) the status output prints ":wheel" only, presumably to emphasize that only group membership matters.
Always prin
Explicitly print root user in status OWNER column
With "owner root:wheel" (any group) the status output prints ":wheel" only, presumably to emphasize that only group membership matters.
Always print whatever is configured to be explicit and less confusing.
OK jasper
show more ...
|
#
de12a377 |
| 12-Dec-2019 |
pd <pd@openbsd.org> |
vmd: start vms defined in vm.conf in a staggered fashion
This addresses 'thundering herd' problem when a lot of vms are configured in vm.conf. A lot of vms booting in parallel can overload the host
vmd: start vms defined in vm.conf in a staggered fashion
This addresses 'thundering herd' problem when a lot of vms are configured in vm.conf. A lot of vms booting in parallel can overload the host and also mess up tsc calibration in openbsd guests as it uses PIT which doesn't fire reliably if the host is overloaded.
We default to starting vms with parallelism of ncpuonline and a delay 30 seconds between batches. This is configurable in vm.conf.
ok mlarkin@ (also addressed comments from cheloha@)
show more ...
|
#
083b9ea2 |
| 07-Sep-2019 |
tobhe <tobhe@openbsd.org> |
Remove unused VMD_DISK_INVALID message type and mark it obsolete.
ok mlarkin@
|
#
baf88fe3 |
| 14-Aug-2019 |
anton <anton@openbsd.org> |
Improve the error message when supplying an invalid template to vmctl start. Favoring 'invalid template' over 'permission denied' should give the user a better hint on what went wrong.
ok kn@ mlarki
Improve the error message when supplying an invalid template to vmctl start. Favoring 'invalid template' over 'permission denied' should give the user a better hint on what went wrong.
ok kn@ mlarkin@
show more ...
|
#
8f40ce4b |
| 22-May-2019 |
jasper <jasper@openbsd.org> |
re-order to reported states based on order of significance: paused takes priority over running; running takes priority over disabled
ok mlarkin@ pd@
|
#
1f00b87e |
| 16-May-2019 |
jasper <jasper@openbsd.org> |
treat vms that are disabled in vm.conf the same as any other vm that's stopped "disabled" in this context might imply it being broken or otherwise unusable
prompted by and ok mlarkin@
|
#
3f77225d |
| 11-May-2019 |
jasper <jasper@openbsd.org> |
report vm state through 'vmctl status'; whereas previously this would display the state of the vcpu (which is why it got removed), it now actually reports the correct state (running, stopped, disable
report vm state through 'vmctl status'; whereas previously this would display the state of the vcpu (which is why it got removed), it now actually reports the correct state (running, stopped, disabled, paused, etc)
ok ccardenas@ mlarkin@
show more ...
|
#
628e8b46 |
| 02-Apr-2019 |
kn <kn@openbsd.org> |
Report reliable VM state on status command
`vmctl status id' reports the VM's VCPU states, that is whether they are running or halted.
Given that only one VCPU is currently supported per VM and the
Report reliable VM state on status command
`vmctl status id' reports the VM's VCPU states, that is whether they are running or halted.
Given that only one VCPU is currently supported per VM and the undocumented states change across repetitive status commands, change it to indicate the VM's general state based on whether the respective host procces is running or not.
This makes vmctl reliably report "STATE: RUNNING" and "STATE: STOPPED" for started and stopped VMs respectively.
OK mlarkin
show more ...
|