From 5b3f3881d62d4230e7564f62fb187471e88a86cd Mon Sep 17 00:00:00 2001 From: Sunil Thaha Date: Mon, 18 Apr 2022 05:39:43 +1000 Subject: [PATCH] Add Fedora 34 to the list of supported images (#72) Signed-off-by: Sunil Thaha <3005132+sthaha@users.noreply.github.com> --- kvm-install-vm | 11 ++++++++++- tests/check_distributions.bats | 8 ++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/kvm-install-vm b/kvm-install-vm index 51f3ef5..0f7db8c 100755 --- a/kvm-install-vm +++ b/kvm-install-vm @@ -83,6 +83,7 @@ function usage_subcommand () printf " fedora31 Fedora 31 fedora\n" printf " fedora32 Fedora 32 fedora\n" printf " fedora33 Fedora 33 fedora\n" + printf " fedora34 Fedora 34 fedora\n" printf " opensuse15 OpenSUSE Leap 15.2 opensuse\n" printf " ubuntu1604 Ubuntu 16.04 LTS (Xenial Xerus) ubuntu\n" printf " ubuntu1804 Ubuntu 18.04 LTS (Bionic Beaver) ubuntu\n" @@ -268,7 +269,7 @@ function delete_vm () else output "Domain ${VMNAME} does not exist" fi - + [[ -d ${VMDIR}/${VMNAME} ]] && DISKDIR=${VMDIR}/${VMNAME} || DISKDIR=${IMAGEDIR}/${VMNAME} [ -d $DISKDIR ] \ && outputn "Deleting ${VMNAME} files" \ @@ -405,6 +406,14 @@ function fetch_images () DISK_FORMAT=qcow2 LOGIN_USER=fedora ;; + fedora34) + QCOW=Fedora-Cloud-Base-34-1.2.x86_64.qcow2 + OS_TYPE="linux" + OS_VARIANT="fedora34" + IMAGE_URL=https://download.fedoraproject.org/pub/fedora/linux/releases/34/Cloud/x86_64/images + DISK_FORMAT=qcow2 + LOGIN_USER=fedora + ;; ubuntu1604) QCOW=ubuntu-16.04-server-cloudimg-amd64-disk1.img OS_TYPE="linux" diff --git a/tests/check_distributions.bats b/tests/check_distributions.bats index 98584bf..fb6c68b 100644 --- a/tests/check_distributions.bats +++ b/tests/check_distributions.bats @@ -88,6 +88,14 @@ function remove_test_vm () remove_test_vm fedora33 } +@test "Install VM (Fedora 34) - $VMNAME-fedora34" { + create_test_vm fedora34 +} + +@test "Delete VM (Fedora 34) - $VMNAME-fedora34" { + remove_test_vm fedora34 +} + @test "Install VM (Ubuntu 16.04) - $VMNAME-ubuntu1604" { create_test_vm ubuntu1604 }