Skip to content

Commit 71ba318

Browse files
committed
Issue #75 Add logic to get qcow2 location for 4.2 cluster
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.
1 parent 93f8b54 commit 71ba318

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

createdisk.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,13 @@ function create_crc_libvirt_sh {
3838
function create_qemu_image {
3939
local destDir=$1
4040

41-
sudo cp /var/lib/libvirt/images/${VM_PREFIX}-master-0 $destDir
42-
sudo cp /var/lib/libvirt/images/${VM_PREFIX}-base $destDir
41+
if [ -f /var/lib/libvirt/images/${VM_PREFIX}-master-0 ]; then
42+
sudo cp /var/lib/libvirt/images/${VM_PREFIX}-master-0 $destDir
43+
sudo cp /var/lib/libvirt/images/${VM_PREFIX}-base $destDir
44+
else
45+
sudo cp /var/lib/libvirt/openshift-images/${VM_PREFIX}/${VM_PREFIX}-master-0 $destDir
46+
sudo cp /var/lib/libvirt/openshift-images/${VM_PREFIX}/${VM_PREFIX}-base $destDir
47+
fi
4348

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

0 commit comments

Comments
 (0)