test/ostree-simplified-installer: destroy VM fixup

There was another virt-install added recently and it was missed in
1d51c0764936902c681283a3489845ef660fef5e
This commit is contained in:
Jakub Rusz 2022-03-28 10:49:55 +02:00 committed by Jakub Rusz
parent 0eca6b4027
commit 55a3556e9f

View file

@ -749,9 +749,15 @@ sudo virt-install --name="${IMAGE_KEY}-fdorootcert"\
--boot uefi,loader_ro=yes,loader_type=pflash,nvram_template=/usr/share/edk2/ovmf/OVMF_VARS.fd,loader_secure=no \
--nographics \
--noautoconsole \
--wait=-1 \
--wait=15 \
--noreboot
# Installation can get stuck, destroying VM helps
# See https://github.com/osbuild/osbuild-composer/issues/2413
if [[ $(sudo virsh domstate "${IMAGE_KEY}-fdorootcert") == "running" ]]; then
sudo virsh destroy "${IMAGE_KEY}-fdorootcert"
fi
# Start VM.
greenprint "💻 Start UEFI VM"
sudo virsh start "${IMAGE_KEY}-fdorootcert"