From f3ee143cdfb886885089cc7ef03775ef8f8143c1 Mon Sep 17 00:00:00 2001 From: Mark Burnett Date: Thu, 26 Oct 2017 14:33:32 -0500 Subject: [PATCH] Fix: fixups for Jenkins environment Change-Id: I043b1d3f0f81594f0036ef0f8d8cacbf4981bee1 --- tools/g2/lib/log.sh | 3 ++- tools/g2/lib/virsh.sh | 2 +- tools/setup_gate.sh | 19 +++---------------- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/tools/g2/lib/log.sh b/tools/g2/lib/log.sh index 5577eb37..455b0416 100644 --- a/tools/g2/lib/log.sh +++ b/tools/g2/lib/log.sh @@ -2,10 +2,10 @@ if [[ -v GATE_COLOR && ${GATE_COLOR} = "1" ]]; then C_CLEAR="\e[0m" C_ERROR="\e[38;5;160m" C_HEADER="\e[38;5;164m" - C_TEMP="\e[38;5;226m" C_HILIGHT="\e[38;5;27m" C_MUTE="\e[38;5;238m" C_SUCCESS="\e[38;5;46m" + C_TEMP="\e[38;5;226m" else C_CLEAR="" C_ERROR="" @@ -13,6 +13,7 @@ else C_HILIGHT="" C_MUTE="" C_SUCCESS="" + C_TEMP="" fi log() { diff --git a/tools/g2/lib/virsh.sh b/tools/g2/lib/virsh.sh index 416e436c..622861ec 100644 --- a/tools/g2/lib/virsh.sh +++ b/tools/g2/lib/virsh.sh @@ -117,7 +117,7 @@ vm_create() { log Creating VM ${NAME} virt-install \ --name ${NAME} \ - --hvm \ + --virt-type kvm \ --cpu host \ --graphics vnc,listen=0.0.0.0 \ --noautoconsole \ diff --git a/tools/setup_gate.sh b/tools/setup_gate.sh index 084b934c..12ee3be2 100755 --- a/tools/setup_gate.sh +++ b/tools/setup_gate.sh @@ -10,7 +10,6 @@ export GATE_COLOR=${GATE_COLOR:-1} source ${GATE_UTILS} -REQUIRE_REBOOT=0 REQUIRE_RELOG=0 log_stage_header "Installing Packages" @@ -22,6 +21,8 @@ sudo apt-get install -q -y --no-install-recommends \ genisoimage \ jq \ libvirt-bin \ + qemu-kvm \ + qemu-utils \ virtinst log_stage_header "Joining User Groups" @@ -43,27 +44,13 @@ fi if ! sudo virt-host-validate qemu &> /dev/null; then log_note Host did not validate virtualization check: sudo virt-host-validate qemu || true - - if ! grep intel_iommu /etc/defaults/grub &> /dev/null; then - log_note Enabling Intel IOMMU - REQUIRE_REBOOT=1 - sudo mkdir -p /etc/defaults - sudo touch /etc/defaults/grub - echo 'GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT} intel_iommu=on"' | sudo tee -a /etc/defaults/grub - sudo update-grub - else - log Intel IOMMU appears enabled in grub configuration already - fi fi if [ ! -d ${VIRSH_POOL_PATH} ]; then sudo mkdir -p ${VIRSH_POOL_PATH} fi -if [ $REQUIRE_REBOOT -eq 1 ]; then - echo - log_note You must ${C_HEADER}reboot${C_CLEAR} before for the gate is ready to run. -elif [ $REQUIRE_RELOG -eq 1 ]; then +if [ $REQUIRE_RELOG -eq 1 ]; then echo log_note You must ${C_HEADER}log out${C_CLEAR} and back in before the gate is ready to run. fi