diff options
author | Fatih Degirmenci <fdegir@gmail.com> | 2018-03-22 19:27:53 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-03-22 19:27:53 +0000 |
commit | 6d6aaedfc699d5fd480b2c0b2af428dc0b5d6b46 (patch) | |
tree | 03d7a0c43d9a2ae3ff75b7b4b3892d15b0422176 /xci | |
parent | a105e1a55d44c241d194c29ccc21aa8df0fe763b (diff) | |
parent | 39c7d5378132176436e54af7bbda18ed0221c151 (diff) |
Merge "xci: scripts: start-new-vm.sh: Improve do_copy()"
Diffstat (limited to 'xci')
-rwxr-xr-x | xci/scripts/vm/start-new-vm.sh | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/xci/scripts/vm/start-new-vm.sh b/xci/scripts/vm/start-new-vm.sh index 6e5c8194..f266d64f 100755 --- a/xci/scripts/vm/start-new-vm.sh +++ b/xci/scripts/vm/start-new-vm.sh @@ -179,6 +179,8 @@ else update_clean_vm_files fi +declare -r XCI_DEPLOYMENT_IMAGE="deployment_image.qcow2" + # Doesn't matter if we just built an image or got one from artifacts. In both # cases there should be a copy in the cache so copy it over. sudo rm -f ${BASE_PATH}/${OS}.qcow2 @@ -186,8 +188,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 +cp ${XCI_CACHE_DIR}/clean_vm/images/${OS}.qcow2.sha256.txt ${BASE_PATH}/${XCI_DEPLOYMENT_IMAGE}.sha256.txt +cp ${XCI_CACHE_DIR}/clean_vm/images/${OS}.qcow2 ${BASE_PATH}/${XCI_DEPLOYMENT_IMAGE} cd ${BASE_PATH} declare -r OS_IMAGE_FILE=${OS}.qcow2 @@ -332,11 +334,13 @@ EOF # Need to copy releng-xci to the vm so we can execute stuff do_copy() { - rsync -a \ - --exclude "${VM_NAME}*" \ - --exclude "${OS}*" \ - --exclude "build.log" \ - -e "$vm_ssh" ${BASE_PATH}/ ${VM_NAME}:~/releng-xci/ + echo "Copying releng-xci host folder to guest vm..." + rsync -a \ + --exclude "${VM_NAME}*" \ + --include "${XCI_DEPLOYMENT_IMAGE}*" \ + --exclude "*qcow2*" \ + --exclude "build.log" \ + -e "$vm_ssh" ${BASE_PATH}/ ${VM_NAME}:~/releng-xci/ } do_copy |