diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2018-01-10 15:00:00 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2018-01-10 15:00:00 +0000 |
commit | 0b7c001183536695b46fe033c152c2f109b77de7 (patch) | |
tree | 7c95703ab208c5fd7937ca4adcd2cd974e5bc0ad /usr.sbin | |
parent | 3b6ca1d85c0ef352a08fc5d91c79bb7f91c43e19 (diff) |
Don't require "disk" or "kernel", also allow just "cdrom" instead, a VM can
still be useful with only cdrom storage. ok ccardenas@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/vmd/vmd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/vmd/vmd.c b/usr.sbin/vmd/vmd.c index 450e8f8babd..c0499e03813 100644 --- a/usr.sbin/vmd/vmd.c +++ b/usr.sbin/vmd/vmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmd.c,v 1.78 2018/01/08 11:58:27 mpi Exp $ */ +/* $OpenBSD: vmd.c,v 1.79 2018/01/10 14:59:59 sthen Exp $ */ /* * Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org> @@ -1140,8 +1140,9 @@ vm_register(struct privsep *ps, struct vmop_create_params *vmc, } else if (vcp->vcp_nnics > VMM_MAX_NICS_PER_VM) { log_warnx("invalid number of interfaces"); goto fail; - } else if (strlen(vcp->vcp_kernel) == 0 && vcp->vcp_ndisks == 0) { - log_warnx("no kernel or disk specified"); + } else if (strlen(vcp->vcp_kernel) == 0 && + vcp->vcp_ndisks == 0 && strlen(vcp->vcp_cdrom) == 0) { + log_warnx("no kernel or disk/cdrom specified"); goto fail; } else if (strlen(vcp->vcp_name) == 0) { log_warnx("invalid VM name"); |