diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2017-07-04 21:23:53 +0100 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2017-07-04 21:25:37 +0100 |
commit | ec030129c0ea87b9067a78b2a7d08bcccb798388 (patch) | |
tree | a874727fd811768080ef9c0bdac96d6e0eb6f923 | |
parent | 344cc5364fb78c552c24bb8e9ba598c20062abb4 (diff) | |
download | vminstall-ec030129c0ea87b9067a78b2a7d08bcccb798388.tar.gz |
runinstallvm: Add SIZE parameter for block device
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
-rw-r--r-- | README | 2 | ||||
-rwxr-xr-x | runinstallvm.sh | 3 |
2 files changed, 4 insertions, 1 deletions
@@ -70,6 +70,8 @@ at some point. Maybe. for runinstallvm.sh, with the exception of DISK and EFIVAR (which it overrides). In addition, it provides the following: + - SIZE: Size of the virtio disk storage. Defaults to 16GB. + - KEEPME: When provided, create a directory with that name, and store the VM disk and EFI variables in that directory. Also generate a "runvm.sh" script in the same directory, which calls diff --git a/runinstallvm.sh b/runinstallvm.sh index 77a1676..73d5cf0 100755 --- a/runinstallvm.sh +++ b/runinstallvm.sh @@ -1,13 +1,14 @@ #!/bin/bash OUT=${KEEPME-tmp} +size=${SIZE-16G} mkdir -p $OUT || exit 1 export DISK=$(mktemp -p $OUT -t XXXXXXXXXXXXXXXX.img) export EFIVAR=$OUT/$(basename $DISK .img).fd -truncate -s 16G $DISK +truncate -s $size $DISK truncate -s 64M $EFIVAR if [ ! -z "$KEEPME" ]; then |