From: Markos Chandras Date: Thu, 1 Feb 2018 09:49:42 +0000 (+0000) Subject: xci: scripts: vm: Use LVM backend if available X-Git-Tag: 6.0.0~167^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F49%2F51449%2F2;p=releng-xci.git xci: scripts: vm: Use LVM backend if available The CI nodes come with a big secondary mechanical disk which can be attached directly to the clean VM. As such, we split the disk into one logical volume per distribution and flush the qcow2 image to it before attaching it to the VM. If the XCI volume group is not available, then we revert back to using a file-based storage backend. Finally, we hide stdout/stderr from the package installation process to minimize the script output. Change-Id: I11ea82899c411f8a4168e5f23cbbd8187cc891df Signed-off-by: Markos Chandras --- diff --git a/xci/scripts/vm/start-new-vm.sh b/xci/scripts/vm/start-new-vm.sh index e5a13b6b..70dc4efb 100755 --- a/xci/scripts/vm/start-new-vm.sh +++ b/xci/scripts/vm/start-new-vm.sh @@ -130,7 +130,7 @@ while true; do pgrep -fa "${pkg_mgr_cmd%*install*}" 2>&1 && sleep 60 || break done -eval ${pkg_mgr_cmd} +eval ${pkg_mgr_cmd} &> /dev/null echo "Ensuring libvirt and docker services are running..." sudo systemctl -q start libvirtd @@ -173,9 +173,6 @@ declare -r OS_IMAGE_FILE=${OS}.qcow2 [[ ! -e ${OS_IMAGE_FILE} ]] && echo "${OS_IMAGE_FILE} not found! This should never happen!" && exit 1 -echo "Resizing disk image '${OS}' to ${DISK}G..." -qemu-img resize ${OS_IMAGE_FILE} ${DISK}G - echo "Creating new network '${NETWORK}' if it does not exist already..." if ! sudo virsh net-list --name --all | grep -q ${NETWORK}; then cat > /tmp/${NETWORK}.xml <