summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authornovel <novel@FreeBSD.org>2016-06-26 14:44:01 +0000
committernovel <novel@FreeBSD.org>2016-06-26 14:44:01 +0000
commitbb60d9d56b5b703b57e4eda44e5c5197a368d2ef (patch)
tree47ecd1fa7f04450474461ab18533a5662959d852 /usr.sbin
parentfeef92098a4ea6c4e7e0243cf3143ac04db9ce74 (diff)
downloadFreeBSD-src-bb60d9d56b5b703b57e4eda44e5c5197a368d2ef.zip
FreeBSD-src-bb60d9d56b5b703b57e4eda44e5c5197a368d2ef.tar.gz
bhyve: improve memory size documentation
A couple of minor memory size option related nits: - use common name 'memsize' (instead of 'max-size' or just 'size') - bhyve: update usage with memsize unit suffix, drop legacy "MB" unit - bhyveload: update usage with memsize unit suffix - bhyve(8): document default size - bhyveload(8): use memsize formatting like it's done in bhyve(8) Reviewed by: wblock, grehan Approved by: re (kib), wblock, grehan Differential Revision: https://reviews.freebsd.org/D6952
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bhyve/bhyve.89
-rw-r--r--usr.sbin/bhyve/bhyverun.c4
-rw-r--r--usr.sbin/bhyveload/bhyveload.819
-rw-r--r--usr.sbin/bhyveload/bhyveload.c2
4 files changed, 16 insertions, 18 deletions
diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8
index 5bd2092..5c476af 100644
--- a/usr.sbin/bhyve/bhyve.8
+++ b/usr.sbin/bhyve/bhyve.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 18, 2016
+.Dd June 24, 2016
.Dt BHYVE 8
.Os
.Sh NAME
@@ -36,7 +36,7 @@
.Op Fl c Ar numcpus
.Op Fl g Ar gdbport
.Op Fl l Ar lpcdev Ns Op , Ns Ar conf
-.Op Fl m Ar size Ns Op Ar K|k|M|m|G|g|T|t
+.Op Fl m Ar memsize Ns Op Ar K|k|M|m|G|g|T|t
.Op Fl p Ar vcpu:hostcpu
.Op Fl s Ar slot,emulation Ns Op , Ns Ar conf
.Op Fl U Ar uuid
@@ -105,7 +105,7 @@ and
.Ar com2
and the boot ROM device
.Ar bootrom .
-.It Fl m Ar size Ns Op Ar K|k|M|m|G|g|T|t
+.It Fl m Ar memsize Ns Op Ar K|k|M|m|G|g|T|t
Guest physical memory size in bytes.
This must be the same size that was given to
.Xr bhyveload 8 .
@@ -114,6 +114,9 @@ The size argument may be suffixed with one of K, M, G or T (either upper
or lower case) to indicate a multiple of kilobytes, megabytes, gigabytes,
or terabytes.
If no suffix is given, the value is assumed to be in megabytes.
+.Pp
+.Ar memsize
+defaults to 256M.
.It Fl p Ar vcpu:hostcpu
Pin guest's virtual CPU
.Em vcpu
diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c
index bfa135b..9350748 100644
--- a/usr.sbin/bhyve/bhyverun.c
+++ b/usr.sbin/bhyve/bhyverun.c
@@ -125,7 +125,7 @@ usage(int code)
fprintf(stderr,
"Usage: %s [-abehuwxACHPSWY] [-c vcpus] [-g <gdb port>] [-l <lpc>]\n"
- " %*s [-m mem] [-p vcpu:hostcpu] [-s <pci>] [-U uuid] <vm>\n"
+ " %*s [-m memsize[K|k|M|m|G|g|T|t]] [-p vcpu:hostcpu] [-s <pci>] [-U uuid] <vm>\n"
" -a: local apic is in xAPIC mode (deprecated)\n"
" -A: create ACPI tables\n"
" -c: # cpus (default 1)\n"
@@ -135,7 +135,7 @@ usage(int code)
" -h: help\n"
" -H: vmexit from the guest on hlt\n"
" -l: LPC device configuration\n"
- " -m: memory size in MB\n"
+ " -m: memory size\n"
" -p: pin 'vcpu' to 'hostcpu'\n"
" -P: vmexit from the guest on pause\n"
" -s: <slot,driver,configinfo> PCI slot config\n"
diff --git a/usr.sbin/bhyveload/bhyveload.8 b/usr.sbin/bhyveload/bhyveload.8
index b566343..519c16b 100644
--- a/usr.sbin/bhyveload/bhyveload.8
+++ b/usr.sbin/bhyveload/bhyveload.8
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 26, 2016
+.Dd June 24, 2016
.Dt BHYVELOAD 8
.Os
.Sh NAME
@@ -42,7 +42,7 @@ guest inside a bhyve virtual machine
.Op Fl e Ar name=value
.Op Fl h Ar host-path
.Op Fl l Ar os-loader
-.Op Fl m Ar mem-size
+.Op Fl m Ar memsize Ns Op Ar K|k|M|m|G|g|T|t
.Ar vmname
.Sh DESCRIPTION
.Nm
@@ -103,16 +103,12 @@ will use
which presents a standard
.Fx
loader.
-.It Fl m Ar mem-size Xo
-.Sm off
-.Op Cm K | k | M | m | G | g | T | t
-.Xc
-.Sm on
-.Ar mem-size
+.It Fl m Ar memsize Ns Op Ar K|k|M|m|G|g|T|t
+.Ar memsize
is the amount of memory allocated to the guest.
.Pp
The
-.Ar mem-size
+.Ar memsize
argument may be suffixed with one of
.Cm K ,
.Cm M ,
@@ -123,9 +119,8 @@ or
Kilobytes, Megabytes, Gigabytes or Terabytes
respectively.
.Pp
-The default value of
-.Ar mem-size
-is 256M.
+.Ar memsize
+defaults to 256M.
.It Fl C
Include guest memory in the core file when
.Nm
diff --git a/usr.sbin/bhyveload/bhyveload.c b/usr.sbin/bhyveload/bhyveload.c
index 9df680f..c67a2f6 100644
--- a/usr.sbin/bhyveload/bhyveload.c
+++ b/usr.sbin/bhyveload/bhyveload.c
@@ -648,7 +648,7 @@ usage(void)
fprintf(stderr,
"usage: %s [-S][-c <console-device>] [-d <disk-path>] [-e <name=value>]\n"
- " %*s [-h <host-path>] [-m mem-size] <vmname>\n",
+ " %*s [-h <host-path>] [-m memsize[K|k|M|m|G|g|T|t]] <vmname>\n",
progname,
(int)strlen(progname), "");
exit(1);
OpenPOWER on IntegriCloud