summaryrefslogtreecommitdiffstats
path: root/xci/scripts/vm/start-new-vm.sh
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2018-03-08 11:39:42 +0000
committerMarkos Chandras <mchandras@suse.de>2018-03-08 12:24:02 +0000
commit20b01a6b7163971201a5aa0d6db354d80657d17f (patch)
tree43b4c80749ffa9e2f02064573af5974a8a8448ac /xci/scripts/vm/start-new-vm.sh
parente66847184999a84c472648e78d71e12b7c5b23d2 (diff)
bifrost: Ensure OS images are present in the PXE directory
The XCI deployment script may wipe the PXE directories so we need to place the OS images after this has happened so we don't download them every time. Change-Id: Iccf943bc75592e7f5dddea59dfee14b2b080e7ef Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci/scripts/vm/start-new-vm.sh')
-rwxr-xr-xxci/scripts/vm/start-new-vm.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/xci/scripts/vm/start-new-vm.sh b/xci/scripts/vm/start-new-vm.sh
index e2a918b3..868de6c3 100755
--- a/xci/scripts/vm/start-new-vm.sh
+++ b/xci/scripts/vm/start-new-vm.sh
@@ -180,6 +180,8 @@ sudo rm -f ${BASE_PATH}/${OS}.qcow2
sudo chmod 777 -R $XCI_CACHE_DIR/clean_vm/images/
sudo chown $uid:$gid -R $XCI_CACHE_DIR/clean_vm/images/
cp ${XCI_CACHE_DIR}/clean_vm/images/${OS}.qcow2* ${BASE_PATH}/
+cp ${XCI_CACHE_DIR}/clean_vm/images/${OS}.qcow2.sha256.txt ${BASE_PATH}/deployment_image.qcow2.sha256.txt
+cp ${XCI_CACHE_DIR}/clean_vm/images/${OS}.qcow2 ${BASE_PATH}/deployment_image.qcow2
declare -r OS_IMAGE_FILE=${OS}.qcow2
[[ ! -e ${OS_IMAGE_FILE} ]] && echo "${OS_IMAGE_FILE} not found! This should never happen!" && exit 1
@@ -324,6 +326,7 @@ EOF
do_copy() {
rsync -a \
--exclude "${VM_NAME}*" \
+ --exclude "${OS}*" \
--exclude "build.log" \
-e "$vm_ssh" ${BASE_PATH}/ ${VM_NAME}:~/releng-xci/
}
@@ -338,10 +341,6 @@ $vm_ssh ${VM_NAME} "sudo mv /home/devuser/releng-xci/vm_hosts.txt /etc/hosts"
# Disable 3-level nested virtualization since it makes things terribly slow
$vm_ssh ${VM_NAME} "sudo bash -c 'echo \"options kvm_intel nested=0\" > /etc/modprobe.d/qemu-system-x86.conf'"
$vm_ssh ${VM_NAME} "sudo modprobe -r kvm_intel && sudo modprobe -a kvm_intel"
-# Copy image files over
-$vm_ssh ${VM_NAME} "sudo mkdir /httpboot"
-$vm_ssh ${VM_NAME} "sudo mv /home/devuser/releng-xci/${OS}.qcow2.sha256.txt /httpboot"
-$vm_ssh ${VM_NAME} "sudo mv /home/devuser/releng-xci/${OS}.qcow2 /httpboot/deployment_image.qcow2"
set +e