summaryrefslogtreecommitdiff
path: root/bin/makeqcow2
blob: 2be046888d4d85230867cfa64bd4a20cfa80ea00 (plain)
1
2
3
4
5
6
7
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