bad things

This commit is contained in:
nora 2024-07-22 22:15:04 +02:00
parent 0b4e5f1e27
commit 0b152a9001
10 changed files with 142 additions and 1 deletions

22
vm-setup/setup.sh Executable file
View file

@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -eu
IMG_DOWNLOADED=debian-12-generic-amd64.qcow2
IMG=debian-12-generic-amd64-bigger.qcow2
mkdir -p tmp
mkdir -p state
if ! [ -f "tmp/$IMG_DOWNLOADED" ]; then
curl -L -o "tmp/$IMG_DOWNLOADED" https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2
fi
if ! [ -f "tmp/$IMG" ]; then
cp "tmp/$IMG_DOWNLOADED" "tmp/$IMG"
sudo qemu-img resize tmp/$IMG 30G
sudo modprobe nbd max_part=10
sudo qemu-nbd -c /dev/nbd0 tmp/$IMG
sudo gparted /dev/nbd0
sudo qemu-nbd -d /dev/nbd0
fi