diff --git a/scripts/build_kvm_image.sh b/scripts/build_kvm_image.sh index 5a56ac46ef..f9cd949018 100755 --- a/scripts/build_kvm_image.sh +++ b/scripts/build_kvm_image.sh @@ -20,8 +20,11 @@ on_exit() rm -f $kvm_log } -kvm_log=$(mktemp) -trap on_exit EXIT +on_error() +{ + echo "============= kvm_log ==============" + cat $kvm_log +} create_disk() { @@ -56,6 +59,10 @@ if [[ "$vs_build_prepare_mem" == "yes" ]]; then free -m fi +kvm_log=$(mktemp) +trap on_exit EXIT +trap on_error ERR + /usr/bin/kvm -m $MEM \ -name "onie" \ -boot "order=cd,once=d" -cdrom "$ONIE_RECOVERY_ISO" \