Age | Commit message (Collapse) | Author |
|
Either a positive count is given or -i is omitted entirely; vm.conf(5) does
not allow interface configuration that results in zero interfaces either.
Raise the minimium count value to one and tell more about invalid counts
with the usual strtonum(3) idiom.
OK reyk
|
|
Without parentheses, this rule evaluates to the static list of
addresses at loadtime; this can be a problem when the machine's
network is not fully established when pf.conf is loaded.
From pf.conf(5):
When the interface name is surrounded by parentheses, the rule is
automatically updated whenever the interface changes its address.
The ruleset does not need to be reloaded.
This is especially useful with NAT.
This syncs vmctl(8) with the VMM FAQ.
Pointed out by Matthias Schmidt, thanks!
|
|
ok mlarkin@
|
|
Fix a wrong output when using 'vmctl stop' without any further arguments.
Patch from Caspar Schutijser, thanks!
ok deraadt
|
|
start. Favoring 'invalid template' over 'permission denied' should give
the user a better hint on what went wrong.
ok kn@ mlarkin@
|
|
|
|
from alessandro gallo
|
|
|
|
vmctl had a CLI-style syntax (bgpctl-style) for a short time but I
changed it back to a more suitable getopt syntax. I replaced the CLI
tokens to getopts flags but didn't consider swapping the order of
command options and arguments to be more UNIX-like again ("vmctl
create disk.img size 10G" simply became "vmctl create disk.img -s 10G").
This changes "create", "start", and "stop" commands to the commonly
expected syntax like "vmctl create -s 10G disk.img".
Requested by many
OK mlarkin@ kn@ solene@
|
|
paused takes priority over running; running takes priority over disabled
ok mlarkin@ pd@
|
|
"disabled" in this context might imply it being broken or otherwise unusable
prompted by and ok mlarkin@
|
|
Part of a patch from Stephen Gregoratto <dev at sgregoratto dot me>.
|
|
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@
|
|
ok pd@
|
|
|
|
input from jmc@
|
|
`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
|
|
Feedback and OK jmc
|
|
Document `vmctl start id ...' again but be clear about the difference
between starting new and existing VMs by name and ID respectively. This
completes what I started with vmctl.8 revision 1.61.
Feedback and OK jmc
|
|
`start' requires an alphanumeric VM name, must not be a number and in fact
must not start with a digit. Improve and simplify the current requirements
as starting with a letter directly implies all of the above.
OK mlarkin, feedback jmc
|
|
I blatantly missed the argc/argv adjustments after getopt(3), resulting in
valid commands like `vmctl create a -s 1G' to fail.
Noticed by ajacoutot the hard way.
OK ajacoutot jca
|
|
OK mlarkin
|
|
Next commit will delete vmm(4) for i386.
Reasons to delete i386 vmm:
- Been broken for a while, almost no one complained.
- Had been falling out of sync from amd64 while it worked.
- If your machine has vmx, you most probably can run amd64, so why not run that?
ok mlarkin@ deraadt@
|
|
ok mlarkin claudio
|
|
applied inconsistently, and applied consistently would make it
look like spaghetti;
ok mlarkin
|
|
|
|
Currently SeaBIOS will respect disk and cdrom and our kernel will
understand net.
OK ccardenas@, reyk@, mlarkin@
|
|
|
|
At the moment only 'net' is supported and all other values are silently ignored.
This allows to kick of an OpenBSD autoinstall by using:
vmctl start "installer" -Lc -B net -b bsd.rd -d disk.img
OK ccardenas@
|
|
stopped/terminates. Useful in scripts when waiting until a vm has finished
its work.
Ok ccardenas@, reyk@
|
|
This way they are in the appropriate place and code can be shared with vmd.
Ok ori@ mlarkin@ ccardenas@
|
|
ok reyk@
|
|
|
|
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 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@
|
|
OK millert@
|
|
OK ccardenas@ mlarkin@
|
|
This makes the "-d qcow2:" and "format qcow" arguments optional as vmctl
and vmd will read the magic bytes at the beginning of a file to guess if
it is a raw or a qcow image file.
The "vmctl create" command has been changed by removing the -f qcow2 option
and replacing it with the same syntax as -d: "vmctl create qcow2:foo.img".
In a slightly ununixy but intended way, the create command now also
considers the file extension for the format as "vmctl create foo.qcow2"
creates a qcow2 disk and not a raw image file.
Ok mlarkin@ (and ccardenas@ on an earlier version of the diff)
|
|
This is also be used to simplify the vmd rc stop script.
OK mlarkin@ ccardenas@
|
|
ok jmc@ jca@ mlarkin@
mdoc tip from bentley@
|
|
that do repeated lookups. OK tb@
|
|
Was in snaps for a while.
Ok mlarkin@ and reyk@
|
|
vmctl create now takes an optional disk format parameter: raw or qcow2.
If format is omitted, raw is used.
Many thanks to Ori Bernstein.
|
|
|
|
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.
|
|
Pointed out by Jon Williams
OK mlarkin@ kn@ ccardenas@
|
|
|
|
I committed the manpage but accidentally forgot the main.c part.
OK ccardenas@
|
|
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@
|
|
|