[vs]: fail the build when build kvm image fails (#2297)
Signed-off-by: Guohan Lu <gulv@microsoft.com>
This commit is contained in:
parent
9c6ba9484b
commit
f09488473d
@ -87,6 +87,11 @@ elif [ "$IMAGE_TYPE" = "kvm" ]; then
|
||||
|
||||
SONIC_USERNAME=$USERNAME PASSWD=$PASSWORD sudo -E ./build_kvm_image.sh $KVM_IMAGE_DISK $onie_recovery_image $OUTPUT_ONIE_IMAGE $KVM_IMAGE_DISK_SIZE
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error : build kvm image failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -r $KVM_IMAGE_DISK ] || {
|
||||
echo "Error : $KVM_IMAGE_DISK not generated!"
|
||||
exit 1
|
||||
|
@ -56,7 +56,7 @@ prepare_installer_disk
|
||||
-vga std \
|
||||
-drive file=$DISK,media=disk,if=virtio,index=0 \
|
||||
-drive file=$INSTALLER_DISK,if=virtio,index=1 \
|
||||
-serial telnet:localhost:$KVM_PORT,server > $kvm_log 2>&1 &
|
||||
-serial telnet:127.0.0.1:$KVM_PORT,server > $kvm_log 2>&1 &
|
||||
|
||||
kvm_pid=$!
|
||||
|
||||
|
@ -24,7 +24,7 @@ def main():
|
||||
cmd_prompt = "%s@sonic:~\$ $" % args.u
|
||||
grub_selection = "The highlighted entry will be executed"
|
||||
|
||||
p = pexpect.spawn("telnet localhost %s" % args.p, timeout=600, logfile=sys.stdout)
|
||||
p = pexpect.spawn("telnet 127.0.0.1 %s" % args.p, timeout=600, logfile=sys.stdout)
|
||||
|
||||
# select ONIE embed
|
||||
p.expect(grub_selection)
|
||||
|
Loading…
Reference in New Issue
Block a user