Ne pas traîter les images sans snapshot

This commit is contained in:
Adrien Bourmault 2022-05-22 00:54:36 +02:00 committed by admin666
parent e5a095cc81
commit 2596ddc584
1 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ do
path_vda=$(sudo virsh domblklist $vm | grep vda | cut -d" " -f 8) path_vda=$(sudo virsh domblklist $vm | grep vda | cut -d" " -f 8)
path_vdb=$(sudo virsh domblklist $vm | grep vdb | cut -d" " -f 8) path_vdb=$(sudo virsh domblklist $vm | grep vdb | cut -d" " -f 8)
if [ ! -z "$path_vda" ] if [ ! -z "$path_vda" ] && [[ ! "$path_vda" =~ ".raw" ]]
then then
echo "-- BLOCKCOMMITTING $vm disk vda ..." echo "-- BLOCKCOMMITTING $vm disk vda ..."
retour=$(sudo virsh blockcommit $vm vda --active --verbose --pivot --delete 2>&1 | tee /dev/tty) retour=$(sudo virsh blockcommit $vm vda --active --verbose --pivot --delete 2>&1 | tee /dev/tty)
@ -21,7 +21,7 @@ do
fi fi
fi fi
if [ ! -z "$path_vdb" ] if [ ! -z "$path_vdb" ] && [[ ! "$path_vda" =~ ".raw" ]]
then then
echo "-- BLOCKCOMMITTING $vm disk vdb ..." echo "-- BLOCKCOMMITTING $vm disk vdb ..."
retour=$(sudo virsh blockcommit $vm vdb --active --verbose --pivot --delete 2>&1 | tee /dev/tty) retour=$(sudo virsh blockcommit $vm vdb --active --verbose --pivot --delete 2>&1 | tee /dev/tty)