diff --git a/hack/test-lxd.sh b/hack/test-lxd.sh index ebd427e1d083..ab472067fd3e 100755 --- a/hack/test-lxd.sh +++ b/hack/test-lxd.sh @@ -11,17 +11,21 @@ if [ "$#" -ne 2 ]; then fi INSTANCE="$1" +IMAGE="ubuntu:24.04" FILE="$2" NAME="$(basename -s .yaml "$FILE")" -sudo lxc version - INFO "Validating \"$FILE\"" limactl validate "$FILE" +INFO "Creating \"$NAME\" from \"$FILE\"" limactl --tty=false create --cpus=1 --memory=1 "$FILE" -sudo lxc init ubuntu:24.04 "$INSTANCE" --config limits.cpu=1 --config limits.memory=1GiB +sudo lxc version +sudo lxc image copy "$IMAGE" local: + +INFO "LXC: Creating \"$INSTANCE\" from \"$IMAGE\"" +sudo lxc init "$IMAGE" "$INSTANCE" --config limits.cpu=1 --config limits.memory=1GiB INFO "LXC: Starting \"$INSTANCE\"" sudo lxc start "$INSTANCE"