qq2clone now exits with an error message when a save fails

This commit is contained in:
Jesse Gardner 2021-04-14 04:05:55 -07:00
parent 2b2994db9f
commit 325b53d863
1 changed files with 4 additions and 1 deletions

View File

@ -2111,7 +2111,10 @@ save_domain ()
{
local uuid
uuid="${CL_MAP["$1"]}"
virsh managedsave "$uuid" &>/dev/null
virsh managedsave "$uuid" &>/dev/null ||
{ echo "Failed to save domain ${OPT[TEMPLATE]}#${1}";
echo "Does it have shared directories mounted?";
exit "$E_libvirt"; } >&2
return 0
}
#=========================================================================#