diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-08-02 17:32:27 +0200 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-08-03 14:19:29 +0000 |
commit | c4156877d3f3f4f7efbca6e129bbeafdbe877d22 (patch) | |
tree | 90d365403853893d26115423064362439afd012d /mcp | |
parent | d453485ff3ddd9602b993a31dc950dc8dc5970d8 (diff) |
[lib.sh] Support older jumpserver libvirt
`virsh undefine` argument `--nvram` is only supported by newer
versions of libvirt.
Although this is mandatory for AArch64, for x86_64 this is not a
blocker (since we don't enable OVMF for the VMs on the jumpserver).
Change-Id: I3a82bc54b36228980a41d77a463a7558a685c03d
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp')
-rw-r--r-- | mcp/scripts/lib.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh index ce5db251f..c9c1bbd0a 100644 --- a/mcp/scripts/lib.sh +++ b/mcp/scripts/lib.sh @@ -243,7 +243,8 @@ function cleanup_vms { for node in $(virsh list --name --all | grep -P '\w{3}\d{2}'); do virsh domblklist "${node}" | awk '/^.da/ {print $2}' | \ xargs --no-run-if-empty -I{} sudo rm -f {} - virsh undefine "${node}" --remove-all-storage --nvram + virsh undefine "${node}" --remove-all-storage --nvram || \ + virsh undefine "${node}" --remove-all-storage done } |