commit: 222c9a9e554667a6531aa2229b178b3039d0f755
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 6 21:57:28 2024 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Oct 6 21:57:28 2024 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=222c9a9e
Fix the unit format, GiB => G for qemu-img
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
targets/support/create-qcow2.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/targets/support/create-qcow2.sh b/targets/support/create-qcow2.sh
index 7d7dd2e7..071dccac 100755
--- a/targets/support/create-qcow2.sh
+++ b/targets/support/create-qcow2.sh
@@ -10,7 +10,7 @@ source ${clst_shdir}/support/functions.sh
#
# Configuration parameters:
-# (All sizes are in forms as understood by parted and qemu-img)
+# All sizes are in forms as understood by parted: use MiB, GiB, ... or M, G,
...
# - clst_qcow2_size (internal) size of the qcow2 image (default 20GiB)
# - clst_qcow2_efisize size of the EFI boot partition (default 512MiB)
# - clst_qcow2_roottype type of the root partition (default xfs)
@@ -31,7 +31,7 @@ source ${clst_shdir}/support/functions.sh
#
# create a new qcow2 disk image file
-qemu-img create -f qcow2 "${1}.tmp.qcow2" ${clst_qcow2_size} || die "Cannot
create qcow2 file"
+qemu-img create -f qcow2 "${1}.tmp.qcow2" ${clst_qcow2_size/%iB/} || die
"Cannot create qcow2 file"
# connect the qcow2 file to a network block device
# TODO: find next free device