Page MenuHomeFreeBSD

D30050.id88428.diff
No OneTemporary

D30050.id88428.diff

Index: release/Makefile.vm
===================================================================
--- release/Makefile.vm
+++ release/Makefile.vm
@@ -7,8 +7,8 @@
VMTARGETS= vm-image
VMFORMATS?= vhd vmdk qcow2 raw
-VMSIZE?= 4096M
-SWAPSIZE?= 1G
+VMSIZE?= 4096m
+SWAPSIZE?= 1g
VMBASE?= vm
VHD_DESC= Azure, VirtualPC, Hyper-V, Xen disk image
@@ -54,7 +54,7 @@
.if ( ${TARGET_ARCH} != "i386" ) || ( ${MACHINE_ARCH} != "amd64" )
.if !exists(/usr/local/bin/qemu-${TARGET_ARCH}-static)
.if exists(${PORTSDIR}/emulators/qemu-user-static/Makefile)
- env - PATH=$$PATH make -C ${PORTSDIR}/emulators/qemu-user-static BATCH=1 all install clean
+ env - UNAME_r="${REVISION}-${BRANCH}" PATH=$$PATH make -C ${PORTSDIR}/emulators/qemu-user-static BATCH=1 all install clean
.else
.if !exists(/usr/local/sbin/pkg-static)
env ASSUME_ALWAYS_YES=yes pkg bootstrap -y
Index: release/release.conf.sample
===================================================================
--- release/release.conf.sample
+++ release/release.conf.sample
@@ -106,8 +106,8 @@
## If WITH_VMIMAGES is set to a non-empty value, this is the size of the
## virtual machine disk filesystem. Valid size values are described in
-## the truncate(1) manual page.
-#VMSIZE="20G"
+## the makefs(8) manual page.
+#VMSIZE="20g"
## If WITH_VMIMAGES is set to a non-empty value, this is a list of disk
## image formats to create. Valid values are listed in the mkimg(1)
Index: release/tools/basic-ci.conf
===================================================================
--- release/tools/basic-ci.conf
+++ release/tools/basic-ci.conf
@@ -4,7 +4,7 @@
#
# Should be enough for base image, image can be resized in needed
-export VMSIZE=5G
+export VMSIZE=5g
# Set to a list of third-party software to enable in rc.conf(5).
export VM_RC_LIST="sshd growfs"
Index: release/tools/ec2.conf
===================================================================
--- release/tools/ec2.conf
+++ release/tools/ec2.conf
@@ -24,7 +24,7 @@
# Note that if this is set to <N>G, we will end up with an <N+1> GB disk
# image since VMSIZE is the size of the UFS partition, not the disk which
# it resides within.
-export VMSIZE=5000M
+export VMSIZE=5000m
# No swap space; the ec2_ephemeralswap rc.d script will allocate swap
# space on EC2 ephemeral disks. (If they exist -- the T2 low-cost instances
Index: release/tools/gce.conf
===================================================================
--- release/tools/gce.conf
+++ release/tools/gce.conf
@@ -4,7 +4,7 @@
#
# The default of 3GB is too small for GCE, so override the size here.
-export VMSIZE=20G
+export VMSIZE=20g
# Set to a list of packages to install.
export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs \
Index: release/tools/vagrant.conf
===================================================================
--- release/tools/vagrant.conf
+++ release/tools/vagrant.conf
@@ -4,7 +4,7 @@
#
# The default of 3GB is too small for Vagrant, so override the size here.
-export VMSIZE=8G
+export VMSIZE=8g
# Packages to install into the image we're creating. This is a deliberately
# minimalist set, providing only the packages necessary to bootstrap.
Index: share/man/man7/release.7
===================================================================
--- share/man/man7/release.7
+++ share/man/man7/release.7
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd September 1, 2020
+.Dd March 4, 2021
.Dt RELEASE 7
.Os
.Sh NAME
@@ -383,9 +383,9 @@
.It Va VMSIZE
Set to change the size of the virtual machine disk capacity.
The default value is
-.Va 20G .
+.Va 20g .
See
-.Xr truncate 1
+.Xr makefs 8
for valid values.
.Pp
Virtual machine disk images are, by default, created as sparse images.
Index: usr.sbin/bhyve/bhyverun.c
===================================================================
--- usr.sbin/bhyve/bhyverun.c
+++ usr.sbin/bhyve/bhyverun.c
@@ -69,6 +69,7 @@
#include <sysexits.h>
#include <stdbool.h>
#include <stdint.h>
+#include <uuid.h>
#ifdef BHYVE_SNAPSHOT
#include <ucl.h>
#include <unistd.h>
@@ -1077,6 +1078,16 @@
fbsdrun_addcpu(ctx, BSP, vcpu, rip);
}
+bool
+is_valid_uuid(const char* uuid_str)
+{
+ uuid_t uuid;
+ uint32_t uuid_status;
+
+ uuid_from_string(uuid_str, &uuid, &uuid_status);
+ return uuid_status == uuid_s_ok;
+}
+
int
main(int argc, char *argv[])
{
@@ -1196,6 +1207,9 @@
rtc_localtime = 0;
break;
case 'U':
+ if (is_valid_uuid(optarg) == false) {
+ errx(EX_USAGE, "invalid UUID '%s'", optarg);
+ }
guest_uuid_str = optarg;
break;
case 'w':

File Metadata

Mime Type
text/plain
Expires
Fri, Mar 20, 11:42 AM (12 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29990369
Default Alt Text
D30050.id88428.diff (4 KB)

Event Timeline