Files
ternfs-XTXMarkets/kmod/createimg.sh
Francesco Mazzoli 009cf11359 More Kernel CI
2023-06-16 15:20:40 +00:00

15 lines
337 B
Bash
Executable File

#!/usr/bin/env bash
set -eu -o pipefail
base_img=$(realpath ${1})
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR
set -x
qemu-img create -f qcow2 -b $base_img ubuntu.img 100G
cloud-localds init.img image-init.yml
# remove existing key if any
ssh-keygen -R '[localhost]:2222' >/dev/null