Check for base VM in default project; rm if exists

This commit is contained in:
Derek Smith 2023-04-02 09:23:18 -04:00
parent 3aaf137707
commit 00b9c9bb55
Signed by: farscapian
GPG Key ID: B443E530A14E1C90

View File

@ -5,6 +5,10 @@ cd "$(dirname "$0")"
bash -c "./stub_lxc_profile.sh --lxd-hostname=$BASE_IMAGE_VM_NAME"
if lxc list -q --project default | grep -q "$BASE_IMAGE_VM_NAME" ; then
lxc delete -f "$BASE_IMAGE_VM_NAME" --project=default
fi
# let's download our base image.
if ! lxc image list --format csv --columns l | grep -q "$UBUNTU_BASE_IMAGE_NAME"; then
# if the image if cached locally, import it from disk, otherwise download it from ubuntu