summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bhyveload
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bhyveload')
-rw-r--r--usr.sbin/bhyveload/bhyveload.85
-rw-r--r--usr.sbin/bhyveload/bhyveload.c11
2 files changed, 12 insertions, 4 deletions
diff --git a/usr.sbin/bhyveload/bhyveload.8 b/usr.sbin/bhyveload/bhyveload.8
index c168832..fc9c8e1 100644
--- a/usr.sbin/bhyveload/bhyveload.8
+++ b/usr.sbin/bhyveload/bhyveload.8
@@ -35,6 +35,7 @@
guest inside a bhyve virtual machine
.Sh SYNOPSIS
.Nm
+.Op Fl S
.Op Fl c Ar cons-dev
.Op Fl d Ar disk-path
.Op Fl e Ar name=value
@@ -111,8 +112,10 @@ respectively.
The default value of
.Ar mem-size
is 256M.
-.El
+.It Fl S
+Wire guest memory.
.Sh EXAMPLES
+.El
To create a virtual machine named
.Ar freebsd-vm
that boots off the ISO image
diff --git a/usr.sbin/bhyveload/bhyveload.c b/usr.sbin/bhyveload/bhyveload.c
index 8ebf116..8178bb2 100644
--- a/usr.sbin/bhyveload/bhyveload.c
+++ b/usr.sbin/bhyveload/bhyveload.c
@@ -629,7 +629,7 @@ usage(void)
{
fprintf(stderr,
- "usage: %s [-c <console-device>] [-d <disk-path>] [-e <name=value>]\n"
+ "usage: %s [-S][-c <console-device>] [-d <disk-path>] [-e <name=value>]\n"
" %*s [-h <host-path>] [-m mem-size] <vmname>\n",
progname,
(int)strlen(progname), "");
@@ -642,16 +642,17 @@ main(int argc, char** argv)
void *h;
void (*func)(struct loader_callbacks *, void *, int, int);
uint64_t mem_size;
- int opt, error, need_reinit;
+ int opt, error, need_reinit, memflags;
progname = basename(argv[0]);
+ memflags = 0;
mem_size = 256 * MB;
consin_fd = STDIN_FILENO;
consout_fd = STDOUT_FILENO;
- while ((opt = getopt(argc, argv, "c:d:e:h:m:")) != -1) {
+ while ((opt = getopt(argc, argv, "Sc:d:e:h:m:")) != -1) {
switch (opt) {
case 'c':
error = altcons_open(optarg);
@@ -678,6 +679,9 @@ main(int argc, char** argv)
if (error != 0)
errx(EX_USAGE, "Invalid memsize '%s'", optarg);
break;
+ case 'S':
+ memflags |= VM_MEM_F_WIRED;
+ break;
case '?':
usage();
}
@@ -715,6 +719,7 @@ main(int argc, char** argv)
}
}
+ vm_set_memflags(ctx, memflags);
error = vm_setup_memory(ctx, mem_size, VM_MMAP_ALL);
if (error) {
perror("vm_setup_memory");
OpenPOWER on IntegriCloud