fix: do not use qemu-img to determine the disk_format

Use the traditional default of qcow2, running qemu-img while a VM is running will return bogus information.
This commit is contained in:
Martin Wimpress 2024-05-11 11:52:36 +01:00 committed by Martin Wimpress
parent dc30cc51b1
commit eb6e9bf4df
1 changed files with 1 additions and 1 deletions

View File

@ -1851,7 +1851,7 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then
# Set the default disk_format if not provided by user # Set the default disk_format if not provided by user
if [ -z "${disk_format}" ] && [ -e "${disk_img}" ]; then if [ -z "${disk_format}" ] && [ -e "${disk_img}" ]; then
disk_format=$(${QEMU_IMG} info "${disk_img}" | grep 'file format' | cut -d ':' -f 2 | tr -cd '[:graph:]') disk_format="qcow2"
fi fi
if [ -n "${display}" ]; then if [ -n "${display}" ]; then