summaryrefslogtreecommitdiff
path: root/usr.sbin/vmctl
AgeCommit message (Collapse)Author
2017-05-04Report command failure back to vmctl reload, reset, load, log verbose.Reyk Floeter
OK mlarkin@
2017-05-04Report error for vmctl commands that need root privileges.Reyk Floeter
specifically: vmctl (load|reload|reset|log) Reported by Christian Barthel
2017-04-19Add support for dynamic "NAT" interfaces (-L/local interface).Reyk Floeter
When a local interface is configured, vmd configures a /31 address on the tap(4) interface of the host and provides another IP in the same subnet via DHCP (BOOTP) to the VM. vmd runs an internal BOOTP server that replies with IP, gateway, and DNS addresses to the VM. The built-in server only ever responds to the VM on the inside and cannot leak its DHCP responses to the outside. Thanks to Uwe Werler, Josh Grosse, and some others for testing! OK deraadt@
2017-04-14Update a man page example to reflect recent changes.Mike Larkin
Spotted by Ilya Kaliman, thanks.
2017-04-06Do not expose vmm(4) VM IDs to the user, use vmd(8)'s IDs instead.Reyk Floeter
Each VM has two IDs: one from the kernel (vmm) and a different one from userland (vmd). The vmm ID is not consistent and incremented on every boot during runtimg of the host system. The vmd ID remains the same during the lifetime of a configured VM, even after reboots. Configured VMs will even get and keep their IDs when the configuration is loaded. This is more what users expect. Pointed out and tested by otto@ OK deraadt@
2017-03-30Set interface flag to VMIFF_UP when using -i option. This way vmd will makeClaudio Jeker
sure the interfaces are up on startup. OK deraadt@, reky@
2017-03-25Boot using BIOS from /etc/firmware/vmm-bios by default.Reyk Floeter
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@
2017-03-15Print "-" if the tty name is empty.Reyk Floeter
2017-03-03Undefined behavior: Variable 'user' was used as parameter andReyk Floeter
destination in snprintf(). Use a temporary variable instead. Found and OK by jsg@
2017-03-01Rename start_vm_complete to vm_start_complete for consistency.Reyk Floeter
2017-03-01unbreak vmctl build by renaming a function that now conflicts withMike Larkin
something from vmd.h . Temporary fix until the original committer can fix it the way he desires.
2017-03-01Add "owner" option to set a user/group ownership for pre-configured VMsReyk Floeter
This allows matching users to start or stop VMs that they "own" and to access the console accordingly. OK mlarkin@
2017-02-28Use fmt_scaled(3) in vmctl status output to print curmem/maxmemReyk Floeter
This matches the accepted input in vmctl start and vm.conf that supports using M, G, T etc. instead of a hardcoded MB. It also allows to shrink the column size as the unit will be scaled automatically. OK mlarkin@
2017-01-24sort previous;Jason McIntyre
2017-01-24mark start -m as optional; reorder start synopsis to match vmctl usageRichard Procter
ok mlarkin@
2017-01-24vmctl start -k is optional; also emphasise it specifies a path on the hostRichard Procter
ok mlarkin@
2017-01-13Make it possible to remove VMs from vmd(8)'s internal queue.Edd Barrett
The semantics agreed with reyk@ are: * ad-hoc created vms, created with `vmctl start`, are removed once stopped. * Stopped VMs defined in a config file are flushed before a `vmctl reload`. OK reyk@
2017-01-13Mention attempted graceful shutdown and vmmci(4)Reyk Floeter
2017-01-11Add imsg communication channel between vmd and invividual VMs.Reyk Floeter
For now, this is only used to forward "log verbose|brief" requests, but it will be used for better things later. OK mlarkin@
2016-12-14Allow to start disabled and pre-configured VMs by name, "vmctl start foo".Reyk Floeter
With testing from Jon Bernard OK mlarkin@
2016-11-26If -m/memory is not specified, use 512M by default.Reyk Floeter
Default value picked with mlarkin - not too small and not too large. OK mlarkin@
2016-11-26-add -n to the main summary;Jason McIntyre
2016-11-26Add the vmctl start -n option to specify add a network interface toReyk Floeter
the specified virtual switch from the command line. OK mlarkin@
2016-11-24Add support for booting the kernel from the disk image.Reyk Floeter
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@
2016-11-22Insert disabled VMs into vmd(8)'s queues and allow vmctl(8) to display them.Edd Barrett
Tested by Jon Bernard and reyk@. OK reyk@, no objections mlarkin@. Thanks
2016-10-26vmd(8)/vmctl(8) for i386. Some ugliness in #ifdef __i386__ areas will beMike Larkin
fixed in tree, but the changes required were pretty minimal. Note that i386 hosts are still presently limited to running i386 guests. ok deraadt, stefan, jca
2016-10-13The name argument is of the start command is not optional.Martijn van Duren
OK mlarkin@
2016-10-12Fix functionality and semantics of vmctl load/reload/reset.Reyk Floeter
OK rzalamena@
2016-10-06The start control imsg has been switched to a new "structReyk Floeter
vmop_create_params" that also includes configuration that is only for userland. I forgot to commit this chunk. Found the hard way by mlarkin@
2016-10-04Add an example to find the generated tap(4) interface description.Reyk Floeter
2016-09-12less markup; from rob pierceJason McIntyre
2016-09-03Some .h files are not neededTheo de Raadt
2016-08-18use a more standard page layout; ok mlarkinJason McIntyre
2016-08-18various fixes for previous;Jason McIntyre
2016-08-18add section on VM networking. more to come, this is a starting point forMike Larkin
further documentation.
2016-05-10move some argument checking from vmmaction() to start_vm()Mike Larkin
from a diff posted to tech@ by Fabien Siron, thanks.
2016-05-10typo in commentMike Larkin
2016-04-25make vmctl 'create' usage description match the man pageMike Larkin
2016-03-17Last parameter to execl[e]() functions *must* be cast to a pointer.Kenneth R Westerback
Just NULL is not good practise as NULL is theoretically allowed to be an integer rather than a pointer. Use (char *)NULL consistently instead of scattering a few (char *)0 and (void *)NULL into the mix. Prompted by and probably ok deraadt@ millert@ kettenis@ Definitely ok mestre@ ratchov@
2016-03-13Introduce memory ranges to support VMs with >= 4G RAMStefan Kempf
Kernel bits: - When creating a VM, a list of memory ranges has to be specified, similar to the BIOS memory map. This is necessary for VMs with RAM sizes approaching 4G because we'll need PCI MMIO space in the higher parts of the 32 bit address space. vmctl and vmd bits: - Construct appropriate memory ranges to create a VM with a given RAM size - Construct a corresponding BIOS memory map from the memory ranges and update the boot params page accordingly. - Make sure that all variables that represent guest physical addresses match the address width of the target CPU instead of using uint32_t. - Fix some integer promotion glitches that actually restricted VM RAM size to 2G. This changes the VM create ioctl interface, so update your kernel, vmd, and vmctl. ok mlarkin@
2016-01-26lseek() + write() can be replaced by a slightly shorter ftruncate()Reyk Floeter
call. Note that using ftruncate() to extend a file is not portable (POSIX allows either zero-filling until the given size is reached, or alternatively erroring out), but that shouldn't be a proble as vmm(4) isn't cross-platform either. unlink() the image file when extending it fails for consistency with the other error case (the file can't be created). From Martin Natano OK mlarkin@
2016-01-26The division "res->size /= 1024 / 1024" is a no-op: 1024 / 1024 isReyk Floeter
evaluated first, resulting in res->size /= 1. Remove the division and the following check, as it can never fail; it is a left-over from previous code that didn't check the size in the caller. From Martin Natano OK mlarkin@
2016-01-13Update the comments in vmctl.c that are describing function arguments.Reyk Floeter
2016-01-05don't use the second argument of pledge(2) as the whitelist is not stabilizedSebastien Marie
for now. ok reyk@
2016-01-03Clarify vmctl console operation.Mike Larkin
From Michal Mazurek, thanks!
2015-12-14track used memory in each VM. This is passed back to vmctl status.Mike Larkin
ok reyk@, beck@, mpi@
2015-12-11The vmctl "id" argument can now be a number of or a vm name, eg.Reyk Floeter
vmctl stop 3 vmctl stop "openbsd.vm"
2015-12-11Remove unused argument in parse_vmid()Reyk Floeter
2015-12-11Allow to specify relative pathnames on the command line (eg. -k ./bsd).Reyk Floeter
2015-12-08style(9) says that is OK to not include sys/cdefs.h directly, as itReyk Floeter
comes from sys/types.h (include-what-you-use doesn't know this policy). Pointed out by Jan Schreiber