Skip to content

Commit

Permalink
Issue #75 Add logic to get qcow2 location for 4.2 cluster
Browse files Browse the repository at this point in the history
Due to openshift/installer#1956 , now
by default the location of the qcow2 images are part of
`/var/lib/libvirt/openshift/<cluster_name>_<random_hash>` so
this change will make sure we are copying the correct file as part of
our CI.
  • Loading branch information
praveenkumar committed Sep 10, 2019
1 parent 93f8b54 commit 71ba318
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions createdisk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@ function create_crc_libvirt_sh {
function create_qemu_image {
local destDir=$1

sudo cp /var/lib/libvirt/images/${VM_PREFIX}-master-0 $destDir
sudo cp /var/lib/libvirt/images/${VM_PREFIX}-base $destDir
if [ -f /var/lib/libvirt/images/${VM_PREFIX}-master-0 ]; then
sudo cp /var/lib/libvirt/images/${VM_PREFIX}-master-0 $destDir
sudo cp /var/lib/libvirt/images/${VM_PREFIX}-base $destDir
else
sudo cp /var/lib/libvirt/openshift-images/${VM_PREFIX}/${VM_PREFIX}-master-0 $destDir
sudo cp /var/lib/libvirt/openshift-images/${VM_PREFIX}/${VM_PREFIX}-base $destDir
fi

sudo chown $USER:$USER -R $destDir
${QEMU_IMG} rebase -b ${VM_PREFIX}-base $destDir/${VM_PREFIX}-master-0
Expand Down

0 comments on commit 71ba318

Please sign in to comment.