diff --git a/README.md b/README.md index d795074..c220868 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ OPTIONS -M Mac address (default: auto-assigned) -p Console port (default: auto) -s Custom shell script - -t Linux Distribution (default: centos7) + -t Linux Distribution (default: centos8) -T Timezone (default: US/Eastern) -u Custom user (defualt: $USER) -v Be verbose @@ -93,6 +93,7 @@ DISTRIBUTIONS centos7 CentOS 7 centos centos7-atomic CentOS 7 Atomic Host centos centos6 CentOS 6 centos + centos8 CentOS 8 centos debian9 Debian 9 (Stretch) debian fedora27 Fedora 27 fedora fedora27-atomic Fedora 27 Atomic Host fedora diff --git a/kvm-install-vm b/kvm-install-vm index 855228c..4a8b5b5 100755 --- a/kvm-install-vm +++ b/kvm-install-vm @@ -61,7 +61,7 @@ function usage_subcommand () printf " -M Mac address (default: auto-assigned)\n" printf " -p Console port (default: auto)\n" printf " -s Custom shell script\n" - printf " -t Linux Distribution (default: centos7)\n" + printf " -t Linux Distribution (default: centos8)\n" printf " -T Timezone (default: US/Eastern)\n" printf " -u Custom user (default: $USER)\n" printf " -y Assume yes to prompts (default: false)\n" @@ -71,6 +71,7 @@ function usage_subcommand () printf "DISTRIBUTIONS\n" printf " NAME DESCRIPTION LOGIN\n" printf " amazon2 Amazon Linux 2 ec2-user\n" + printf " centos8 CentOS 8 centos\n" printf " centos7 CentOS 7 centos\n" printf " centos7-atomic CentOS 7 Atomic Host centos\n" printf " centos6 CentOS 6 centos\n" @@ -84,7 +85,7 @@ function usage_subcommand () printf "\n" printf "EXAMPLES\n" printf " $prog create foo\n" - printf " Create VM with the default parameters: CentOS 7, 1 vCPU, 1GB RAM, 10GB\n" + printf " Create VM with the default parameters: CentOS 8, 1 vCPU, 1GB RAM, 10GB\n" printf " disk capacity.\n" printf "\n" printf " $prog create -c 2 -m 2048 -d 20 foo\n" @@ -294,6 +295,14 @@ function fetch_images () DISK_FORMAT=qcow2 LOGIN_USER=ec2-user ;; + centos8) + QCOW=CentOS-8-GenericCloud-8.1.1911-20200113.3.x86_64.qcow2 + OS_TYPE="linux" + OS_VARIANT="centos8" + IMAGE_URL=https://cloud.centos.org/centos/8/x86_64/images + DISK_FORMAT=qcow2 + LOGIN_USER=centos + ;; centos7) QCOW=CentOS-7-x86_64-GenericCloud.qcow2 OS_TYPE="linux" @@ -472,7 +481,7 @@ function set_cloud_init_remove () centos6 ) CLOUDINITDISABLE="chkconfig cloud-init off" ;; - centos7|amazon?|fedora??|ubuntu*|debian? ) + centos8|centos7|amazon?|fedora??|ubuntu*|debian? ) CLOUDINITDISABLE="systemctl disable cloud-init.service" ;; *-atomic) @@ -784,7 +793,7 @@ function set_defaults () VMDIR=${HOME}/virt/vms # Directory to store virtual machines BRIDGE=virbr0 # Hypervisor bridge PUBKEY="" # SSH public key - DISTRO=centos7 # Distribution + DISTRO=centos8 # Distribution MACADDRESS="" # MAC Address PORT=-1 # Console port TIMEZONE=US/Eastern # Timezone diff --git a/tests/check_distributions.bats b/tests/check_distributions.bats index d9645bd..5d556aa 100644 --- a/tests/check_distributions.bats +++ b/tests/check_distributions.bats @@ -32,6 +32,14 @@ function remove_test_vm () remove_test_vm centos7-atomic } +@test "Install VM (CentOS 8) - $VMNAME-centos8" { + create_test_vm centos8 +} + +@test "Delete VM (CentOS 8) - $VMNAME-centos8" { + remove_test_vm centos8 +} + @test "Install VM (Fedora 29) - $VMNAME-fedora29" { create_test_vm fedora27 } diff --git a/tests/check_script.bats b/tests/check_script.bats index f80a988..56cf88d 100644 --- a/tests/check_script.bats +++ b/tests/check_script.bats @@ -23,7 +23,7 @@ load vmname [[ "${lines[0]}" =~ "NAME" ]] } -@test "Install VM (CentOS7) - $VMNAME" { +@test "Install VM (CentOS8) - $VMNAME" { run kvm-install-vm create $VMNAME [ "$status" -eq 0 ] }