diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2018-12-06 09:23:16 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2018-12-06 09:23:16 +0000 |
commit | 97bef4c1d0b92215e63006d754555d38107418d3 (patch) | |
tree | 5148d75af81a48b7ceb800d0f4684e77a71ae406 /usr.sbin/vmctl/vmctl.c | |
parent | 232ccf2186c725c6c77341f3b4bed35c91d322d2 (diff) |
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@
Diffstat (limited to 'usr.sbin/vmctl/vmctl.c')
-rw-r--r-- | usr.sbin/vmctl/vmctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/vmctl/vmctl.c b/usr.sbin/vmctl/vmctl.c index 334f43968c8..68e6c1d6a97 100644 --- a/usr.sbin/vmctl/vmctl.c +++ b/usr.sbin/vmctl/vmctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmctl.c,v 1.64 2018/12/04 08:17:17 claudio Exp $ */ +/* $OpenBSD: vmctl.c,v 1.65 2018/12/06 09:23:15 claudio Exp $ */ /* * Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org> @@ -73,7 +73,7 @@ unsigned int info_flags; int vm_start(uint32_t start_id, const char *name, int memsize, int nnics, char **nics, int ndisks, char **disks, int *disktypes, char *kernel, - char *iso, char *instance) + char *iso, char *instance, unsigned int bootdevice) { struct vmop_create_params *vmc; struct vm_create_params *vcp; @@ -184,6 +184,7 @@ vm_start(uint32_t start_id, const char *name, int memsize, int nnics, if (strlcpy(vmc->vmc_instance, instance, sizeof(vmc->vmc_instance)) >= sizeof(vmc->vmc_instance)) errx(1, "instance vm name too long"); + vmc->vmc_bootdevice = bootdevice; imsg_compose(ibuf, IMSG_VMDOP_START_VM_REQUEST, 0, 0, -1, vmc, sizeof(struct vmop_create_params)); |