aboutsummaryrefslogtreecommitdiffstats
path: root/bin/makeqcow2
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-10-31 16:06:52 +0000
committerLaurent Bercot <ska@appnovation.com>2023-10-31 16:06:52 +0000
commit77b8f043ffc48226c69f9052eb2cf127b590f7ca (patch)
treec0c58706f235746383e034e733feaf2171855270 /bin/makeqcow2
parentf3cd8ba5db865e204d1dd6bcd9fbbbeaedaeb668 (diff)
downloadlh-bootstrap-77b8f043ffc48226c69f9052eb2cf127b590f7ca.tar.gz
Throw out libguestfs, build e2fsprogs and do things by hand again
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'bin/makeqcow2')
-rwxr-xr-xbin/makeqcow28
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/makeqcow2 b/bin/makeqcow2
new file mode 100755
index 0000000..2be0468
--- /dev/null
+++ b/bin/makeqcow2
@@ -0,0 +1,8 @@
+#!/bin/sh -e
+
+name="$1"
+size="$2"
+
+truncate -s "$size" "$name".raw
+mkfs.ext4 -b 4096 -d "$name" -F -L `basename "$name"` -O ^huge_file -q -U random "$name".raw
+exec qemu-img convert -f raw -O qcow2 -c -o compression_type=zstd "$name".raw "$name".qcow2