diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2018-12-11 07:44:26 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2018-12-11 07:44:26 +0000 |
commit | 5989d8376e7ebd9b2ec367102e63931d6d3023b4 (patch) | |
tree | 6840cd96010d9ec4c70d71680209ca6ad2632eff /usr.sbin | |
parent | 43280a78c4413aee0280f177010c660771f50f2a (diff) |
Extend vmctl start -B argument to work for disk, cdrom and net.
Currently SeaBIOS will respect disk and cdrom and our kernel will
understand net.
OK ccardenas@, reyk@, mlarkin@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/vmctl/main.c | 10 | ||||
-rw-r--r-- | usr.sbin/vmctl/vmctl.8 | 27 |
2 files changed, 28 insertions, 9 deletions
diff --git a/usr.sbin/vmctl/main.c b/usr.sbin/vmctl/main.c index 6269f2c24e3..3f6d0a4a65c 100644 --- a/usr.sbin/vmctl/main.c +++ b/usr.sbin/vmctl/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.50 2018/12/06 09:23:15 claudio Exp $ */ +/* $OpenBSD: main.c,v 1.51 2018/12/11 07:44:25 claudio Exp $ */ /* * Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org> @@ -856,8 +856,14 @@ ctl_start(struct parse_result *res, int argc, char *argv[]) case 'B': if (res->bootdevice) errx(1, "boot device specified multiple times"); - if (strcmp("net", optarg) == 0) + if (strcmp("disk", optarg) == 0) + res->bootdevice = VMBOOTDEV_DISK; + else if (strcmp("cdrom", optarg) == 0) + res->bootdevice = VMBOOTDEV_CDROM; + else if (strcmp("net", optarg) == 0) res->bootdevice = VMBOOTDEV_NET; + else + errx(1, "unknown boot device %s", optarg); break; case 'r': if (res->isopath) diff --git a/usr.sbin/vmctl/vmctl.8 b/usr.sbin/vmctl/vmctl.8 index 6c1a1080dde..e367dadbd16 100644 --- a/usr.sbin/vmctl/vmctl.8 +++ b/usr.sbin/vmctl/vmctl.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: vmctl.8,v 1.57 2018/12/07 21:59:57 anton Exp $ +.\" $OpenBSD: vmctl.8,v 1.58 2018/12/11 07:44:25 claudio Exp $ .\" .\" Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: December 7 2018 $ +.Dd $Mdocdate: December 11 2018 $ .Dt VMCTL 8 .Os .Sh NAME @@ -160,14 +160,27 @@ Boot the VM with the specified kernel or BIOS image. If not specified, the default is to boot using the BIOS image in .Pa /etc/firmware/vmm-bios . .It Fl B Ar device -Force system to boot from the specified device for the next boot. +Force system to boot from the specified device for this boot. .Ar device -can be set to +can be set to: +.Pp +.Bl -tag -width "cdrom" -compact +.It Ar disk +boot from disk. +.It Ar cdrom +boot the CD-ROM image. +.It Ar net +perform a PXE boot using the first network interface. +.El +Currently .Ar net -to perform a PXE boot using the first network interface. -Currently only supported when starting the VM with +is only supported when booting a kernel using the .Fl b -specifying a kernel image. +flag while +.Ar disk +and +.Ar cdrom +only work with BIOS images. .It Fl c Automatically connect to the VM console. .It Fl d Ar disk |