History log of /openbsd/usr.sbin/vmctl/vmctl.c (Results 26 – 50 of 90)
Revision Date Author Comments
# 917458a3 06-Dec-2018 claudio <claudio@openbsd.org>

Add a new argument -B device to vmctl start. It allows to set the boot device.
At the moment only 'net' is supported and all other values are silently ignored.
This allows to kick of an OpenBSD autoi

Add a new argument -B device to vmctl start. It allows to set the boot device.
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@

show more ...


# 583f6618 04-Dec-2018 claudio <claudio@openbsd.org>

Add 'vmctl wait <VM>' a command that waits until the specified VM is
stopped/terminates. Useful in scripts when waiting until a vm has finished
its work.
Ok ccardenas@, reyk@


# 62df93ee 26-Nov-2018 reyk <reyk@openbsd.org>

Move the {qcow2,raw} create functions from vmctl into vmd/vio{qcow2,raw}.c

This way they are in the appropriate place and code can be shared with vmd.

Ok ori@ mlarkin@ ccardenas@


# 4d2a1fb2 19-Oct-2018 reyk <reyk@openbsd.org>

Add support to create and convert disk images from existing images

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 conve

Add support to create and convert disk images from existing images

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@

show more ...


# 73613953 08-Oct-2018 reyk <reyk@openbsd.org>

Add support for qcow2 base images (external snapshots).

This works is from Ori Bernstein, committing on his behalf:

Add support to vmd for external snapshots. That is, snapshots that are
derived fr

Add support for qcow2 base images (external snapshots).

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@

show more ...


# 31607d49 02-Oct-2018 reyk <reyk@openbsd.org>

Fix potential rounding errors when calculating the qcow2 l1 and ref tables sizes

OK ccardenas@ mlarkin@


# e0b12962 27-Sep-2018 reyk <reyk@openbsd.org>

Add vmctl stop -a [-fw] option to stop or terminate all running VMs.

This is also be used to simplify the vmd rc stop script.

OK mlarkin@ ccardenas@


# dee31871 16-Sep-2018 millert <millert@openbsd.org>

Use user_from_uid(3) and group_from_gid(3) in a few more places
that do repeated lookups. OK tb@


# 5f3f4152 11-Sep-2018 ccardenas <ccardenas@openbsd.org>

Add ability to create qcow2 disk.

vmctl create now takes an optional disk format parameter: raw or qcow2.
If format is omitted, raw is used.

Many thanks to Ori Bernstein.


# f224f92a 09-Sep-2018 ccardenas <ccardenas@openbsd.org>

Add initial qcow2 image support.

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 usin

Add initial qcow2 image support.

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.

show more ...


# d9672895 23-Aug-2018 reyk <reyk@openbsd.org>

Allow to boot CDROM-only VMs.

Pointed out by Jon Williams

OK mlarkin@ kn@ ccardenas@


# 6429e633 12-Jul-2018 reyk <reyk@openbsd.org>

Allow to use configured/running VMs as templates for other VM instances.

This introduces new grammar and the -t optional in vmctl start.

(For now, only root can create VM instances; but it is plann

Allow to use configured/running VMs as templates for other VM instances.

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@

show more ...


# eab0cc3b 11-Jul-2018 reyk <reyk@openbsd.org>

check string lengths in vm_start


# 3be9785f 11-Jul-2018 reyk <reyk@openbsd.org>

Add -w option to vmctl stop to wait for completion of VM termination.

Use it in /etc/rc.d/vmd accordingly.

OK sthen@


# f6e5c9eb 11-Jul-2018 reyk <reyk@openbsd.org>

Add -f option to vmctl stop to forcefully kill a VM.

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 t

Add -f option to vmctl stop to forcefully kill a VM.

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@

show more ...


# 574a6dcb 04-Jul-2018 anton <anton@openbsd.org>

When a VM stop request fails, set errno prior to calling warn() in order to
display the correct error message. This is a pattern found elsewhere in vmctl.

With input from deraadt@ and encouraged by

When a VM stop request fails, set errno prior to calling warn() in order to
display the correct error message. This is a pattern found elsewhere in vmctl.

With input from deraadt@ and encouraged by mlarkin@

show more ...


# 6d26286f 19-Jun-2018 reyk <reyk@openbsd.org>

knf


# 8c340e5d 14-Mar-2018 mlarkin <mlarkin@openbsd.org>

block two VMs from using the same disk image file at the same time.
Also changes an error message in vmctl to reflect same.


# a8df2bc2 14-Mar-2018 mlarkin <mlarkin@openbsd.org>

knf


# 5fd19063 26-Feb-2018 ccardenas <ccardenas@openbsd.org>

vmctl: clarify console error message

Clear up ambiguous error message when attaching to a console fails as
the vm id is not guaranteed to be populated.

ok mlarkin@


# 95ab188f 03-Jan-2018 ccardenas <ccardenas@openbsd.org>

Add initial CD-ROM support to VMD via vioscsi.

* 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:

Add initial CD-ROM support to VMD via vioscsi.

* 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@

show more ...


# 2da5c9db 08-Sep-2017 mlarkin <mlarkin@openbsd.org>

better VM termination handling.

diff provided by Carlos Cardenas, thanks


# a3f50fa8 08-Sep-2017 mlarkin <mlarkin@openbsd.org>

vmctl: style cleanup - spaces vs tabs.

Noticed by Carlos Cardenas


# 016c06c1 31-Aug-2017 mlarkin <mlarkin@openbsd.org>

vmctl: change a feedback message displayed to the user from "terminated
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) grace

vmctl: change a feedback message displayed to the user from "terminated
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".

show more ...


# 31749646 31-Aug-2017 mlarkin <mlarkin@openbsd.org>

vmd/vmctl: disallow use of block or character devices as disks in VMs.

These don't work today and present the user with a confusing error
message if an attempt is made to use them. This commit detec

vmd/vmctl: disallow use of block or character devices as disks in VMs.

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!

show more ...


1234