Browse Source

feat: output logs in verbose mode before cleanup

pull/98/head
Giovanni Torres 6 months ago
parent
commit
cbfcf16d91
  1. 9
      kvm-install-vm

9
kvm-install-vm

@ -574,8 +574,17 @@ _EOF_
${GRAPHICS_OPTION} \ ${GRAPHICS_OPTION} \
${BOOTFLAG} \ ${BOOTFLAG} \
${VIRT_INSTALL_EXTRA}; then ${VIRT_INSTALL_EXTRA}; then
# Cleanup on failure # Cleanup on failure
red "VM creation failed. Cleaning up..." red "VM creation failed. Cleaning up..."
if [ "${VERBOSE}" -eq 1 ] && [ -f "${VMNAME}.log" ]; then
yellow "Log contents:"
cat "${VMNAME}.log"
else
yellow "Run with -v flag to see detailed logs"
fi
popd popd
delete_vm delete_vm
die "Could not create domain with virt-install." die "Could not create domain with virt-install."

Loading…
Cancel
Save