From b5083aff99d308234ed95aadda67df7c98e776b3 Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Tue, 14 Dec 2021 15:28:36 +0100 Subject: [PATCH] Specify backing format for restoring images https://github.com/libguestfs/libguestfs/commit/45de287447bb18d59749fbfc1ec5072413090109 provides a fix to autodect the backing format. Until we have that fix in libguestfs, specify it explicitly. Related: rhbz#1998820 Change-Id: Ibfbefcacd684f046c0798987483c48a97e222092 Signed-off-by: Bogdan Dobrelya --- roles/snapshot-libvirt/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/snapshot-libvirt/tasks/main.yml b/roles/snapshot-libvirt/tasks/main.yml index d65880ca1..ffb9ca2d7 100644 --- a/roles/snapshot-libvirt/tasks/main.yml +++ b/roles/snapshot-libvirt/tasks/main.yml @@ -47,7 +47,7 @@ - name: Create snapshot shell: | mv {{ libvirt_volume_path }}/{{ item.name }}.qcow2 {{ libvirt_volume_path }}/{{ item.name }}.qcow2.bak - qemu-img create -f qcow2 -b {{ libvirt_volume_path }}/{{ item.name }}.qcow2.bak {{ libvirt_volume_path }}/{{ item.name }}.qcow2 + qemu-img create -F qcow2 -f qcow2 -b {{ libvirt_volume_path }}/{{ item.name }}.qcow2.bak {{ libvirt_volume_path }}/{{ item.name }}.qcow2 args: creates: "{{ libvirt_volume_path }}/{{ item.name }}.qcow2.bak" with_items: "{{ overcloud_nodes }}" @@ -57,7 +57,7 @@ - name: Restore previous snapshot shell: | rm {{ libvirt_volume_path }}/{{ item.name }}.qcow2 - qemu-img create -f qcow2 -b {{ libvirt_volume_path }}/{{ item.name }}.qcow2.bak {{ libvirt_volume_path }}/{{ item.name }}.qcow2 + qemu-img create -F qcow2 -f qcow2 -b {{ libvirt_volume_path }}/{{ item.name }}.qcow2.bak {{ libvirt_volume_path }}/{{ item.name }}.qcow2 with_items: "{{ overcloud_nodes }}" when: snapshot_restore|bool changed_when: true