[kvmbuild]: print out kvm_log on error (#4384)
Signed-off-by: Guohan Lu <lguohan@gmail.com>
This commit is contained in:
parent
2a59551eff
commit
5299644dc0
@ -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" \
|
||||
|
Loading…
Reference in New Issue
Block a user