diff --git a/build_image.sh b/build_image.sh index 05eb3ca78b7..706f4e937cf 100755 --- a/build_image.sh +++ b/build_image.sh @@ -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 diff --git a/build_kvm_image.sh b/build_kvm_image.sh index 2e1f767329a..b08db96f573 100755 --- a/build_kvm_image.sh +++ b/build_kvm_image.sh @@ -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=$! diff --git a/check_install.py b/check_install.py index 58923c1a139..09979f61e4b 100755 --- a/check_install.py +++ b/check_install.py @@ -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)