summaryrefslogtreecommitdiff
path: root/usr.sbin/vmctl
AgeCommit message (Collapse)Author
2018-09-21Add explanations about vmctl send commandsolene
ok jmc@ jca@ mlarkin@ mdoc tip from bentley@
2018-09-16Use user_from_uid(3) and group_from_gid(3) in a few more placesTodd C. Miller
that do repeated lookups. OK tb@
2018-09-13Add initial set of unveil's to vmctl.ccardenas
Was in snaps for a while. Ok mlarkin@ and reyk@
2018-09-11Add ability to create qcow2 disk.ccardenas
vmctl create now takes an optional disk format parameter: raw or qcow2. If format is omitted, raw is used. Many thanks to Ori Bernstein.
2018-09-09tweak previous;Jason McIntyre
2018-09-09Add initial qcow2 image support.ccardenas
Users are able to declare disk images as 'raw' or 'qcow2' using either vmctl and vm.conf. The default disk image format is 'raw' if not specified. Examples of using disk format: vmctl start bsd -Lc -r cd64.iso -d qcow2:current.qc2 or vmctl start bsd -Lc -r cd64.iso -d raw:current.raw is equivalent to vmctl start bsd -Lc -r cd64.iso -d current.raw in vm.conf vm "current" { disable memory 2G disk "/home/user/vmm/current.qc2" format "qcow2" interface { switch "external" } } or vm "current" { disable memory 2G disk "/home/user/vmm/current.raw" format "raw" interface { switch "external" } } is equivlanet to vm "current" { disable memory 2G disk "/home/user/vmm/current.raw" interface { switch "external" } } Tested by many. Big Thanks to Ori Bernstein.
2018-08-23Allow to boot CDROM-only VMs.Reyk Floeter
Pointed out by Jon Williams OK mlarkin@ kn@ ccardenas@
2018-07-29add missing markup and some minor tweaks; ok jmc@anton
2018-07-12The vmctl start -I option was changed to -t.Reyk Floeter
I committed the manpage but accidentally forgot the main.c part. OK ccardenas@
2018-07-12Allow to use configured/running VMs as templates for other VM instances.Reyk Floeter
This introduces new grammar and the -t optional in vmctl start. (For now, only root can create VM instances; but it is planned to allow users to create their own VMs based on permissions and quota.) OK ccardenas@ mlarkin@ jmc@
2018-07-11check string lengths in vm_startReyk Floeter
2018-07-11remove useless macro;Jason McIntyre
2018-07-11Add -w option to vmctl stop to wait for completion of VM termination.Reyk Floeter
Use it in /etc/rc.d/vmd accordingly. OK sthen@
2018-07-11Add -f option to vmctl stop to forcefully kill a VM.Reyk Floeter
This also fixes a bug in vmm_sighdlr where it might have missed forwarding the TERMINATE_EVENT to the vmd parent after a VM child died, leading to an abandoned VM in the vmd parent process. OK ccardenas@ mlarkin@ benno@ kn@
2018-07-04When a VM stop request fails, set errno prior to calling warn() in order toanton
display the correct error message. This is a pattern found elsewhere in vmctl. With input from deraadt@ and encouraged by mlarkin@
2018-06-19knfReyk Floeter
2018-03-14block two VMs from using the same disk image file at the same time.Mike Larkin
Also changes an error message in vmctl to reflect same.
2018-03-14knfMike Larkin
2018-02-26vmctl: clarify console error messageccardenas
Clear up ambiguous error message when attaching to a console fails as the vm id is not guaranteed to be populated. ok mlarkin@
2018-02-24sort;Jason McIntyre
2018-02-24add an alias for vmctl show, matches finger memory and the rest of thePeter Hessler
*ctl programs OK mlarkin@ benno@ deraadt@
2018-01-03pretty up the "start" command;Jason McIntyre
2018-01-03Add initial CD-ROM support to VMD via vioscsi.ccardenas
* 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@
2017-11-05Add minimal DHCP support to vmd's built-in DHCP/BOOTP server.Reyk Floeter
This fixes "local interface" mode with the udhcpc client. udhcpc, a DHCP client that is used by busybox and many embedded Linux distributions, does not support BOOTP which is the predecessor and a valid subset of DHCP. OK mlarkin@, Carlos Cardenas
2017-10-07Prefer memset() over bzero()Philip Guenther
ok deraadt@ mlarkin@
2017-09-08better VM termination handling.Mike Larkin
diff provided by Carlos Cardenas, thanks
2017-09-08vmctl: style cleanup - spaces vs tabs.Mike Larkin
Noticed by Carlos Cardenas
2017-09-05Detail how VM guests acquire a nameserver for local interfaces.Edd Barrett
OK mlarkin@, krw@. Thanks!
2017-09-01vmctl: -L option clarification in man pageMike Larkin
2017-08-31vmctl: change a feedback message displayed to the user from "terminatedMike Larkin
vm X" to "sent request to terminate vm X". vmctl/vmd have not forcibly terminated VMs in a while, we try to let vmmci(4) gracefully shutdown the VM, so "vmctl stop" commands are really requests to stop, not forced stops. The new message indicates that a shutdown is (possibly) in progress and not "complete".
2017-08-31vmd/vmctl: disallow use of block or character devices as disks in VMs.Mike Larkin
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!
2017-08-30remove use of PAGE_SIZE and #include <sys/param.h>Mike Larkin
ok deraadt
2017-08-29quarterly rescan of the tree: remove unneccessary sys/param.h, andTheo de Raadt
annotate the ones which are needed.
2017-08-18distinguish errors during vm launch and return different error codes toMike Larkin
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@
2017-08-15merge parse_vmid() and parse_vmname()Jasper Lievisse Adriaanse
ok mlarkin@ pd@
2017-08-14return a proper error message instead of 'no such file or directory' whenJasper Lievisse Adriaanse
invoking 'stop' for a non-existent vm ok mlarkin@
2017-08-14whitespace and fix a comment typoJasper Lievisse Adriaanse
2017-08-14catch ENOENT and display a proper error message when a specified disk image isJasper Lievisse Adriaanse
not found ok mlarkin@
2017-08-14don't allow starting vms whose name starts with '-', '.' or '_'Jasper Lievisse Adriaanse
2017-08-10don't have cu try to open '/dev', instead check if there's a valid ttyJasper Lievisse Adriaanse
associated with the vm upfront as discussed with and ok mlarkin@ pd@
2017-07-15consistent case;Jason McIntyre
2017-07-15Add vmctl send and vmctl receivepd
ok reyk@ and mlarkin@
2017-07-09vmd/vmctl: Add ability to pause / unpause vmspd
With help from Ashwin Agrawal ok reyk@ mlarkin@
2017-06-07vmctl: change default "vmctl console" (cu) baud rate to 115200. NotMike Larkin
strictly needed but matches the previous baudrate diff committed earlier to vmd. ok deraadt, phessler
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@