From 394c95188bc33e6afedadbc2c2e30b2745a3b6c5 Mon Sep 17 00:00:00 2001 From: amargari Date: Mon, 21 Dec 2020 22:34:15 -0700 Subject: [PATCH 1/2] improve install_all, add FAILED_DISK_DWNL --- install/install_all.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/install/install_all.sh b/install/install_all.sh index dbc4bb4..85cc98a 100755 --- a/install/install_all.sh +++ b/install/install_all.sh @@ -34,10 +34,12 @@ $SCRIPT_DIR/kernel/build_kernels.sh $KERNEL_DIR export IMAGE_DIR="$INSTALL_PATH/vm_images" echo "export IMAGE_DIR=\"$INSTALL_PATH/vm_images\"" >> $REPO_ROOT/source.sh +FAILED_DISK_DWNL=0 $SCRIPT_DIR/vm_disk_image/download_vm_disk_image.sh $IMAGE_DIR -if [ $? -eq 124 ]; then - # Timeout occurred - exit 124 +if [ $? -ne 0 ]; then + #echo "It seems that something is wrong with the download source. Please sent a message to Artemiy " + # Timeout occurred + FAILED_DISK_DWNL=1 fi echo "$REPO_ROOT/evaluation/disable_thp_no_drop.sh" >> $REPO_ROOT/source.sh @@ -48,5 +50,9 @@ echo "source $REPO_ROOT/venv/bin/activate" >> $REPO_ROOT/source.sh echo "cd $REPO_ROOT; source source.sh" >> ~/.bashrc - source $REPO_ROOT/source.sh + +if [ $FAILED_DISK_DWNL -eq 1]; then + echo "It seems that something went wrong when download the VM image. Please sent a message to Artemiy " + exit 101 +fi From ed12d78ae7d43fc4f300d5c226538695c3fd4930 Mon Sep 17 00:00:00 2001 From: Artemiy Margaritov Date: Tue, 22 Dec 2020 08:10:21 +0000 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f21a661..345b893 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ ssh-keygen -t rsa ``` * Boot a virtual machine with the provided disk image ```bash -KERNEL=clean; sudo qemu-system-x86_64 KERNEL=clean; sudo qemu-system-x86_64 -kernel $KERNEL_DIR/linux_$KERNEL/arch/x86/boot/bzImage -boot c -m 64G -hda $IMAGE_DIR/rootfs.img -append "root=/dev/sda rw" -device e1000,netdev=net0 -netdev user,id=net0,hostfwd=tcp::6666-:22 --enable-kvm -smp 20 -cpu host -nographic +KERNEL=clean; sudo qemu-system-x86_64 -kernel $KERNEL_DIR/linux_$KERNEL/arch/x86/boot/bzImage -boot c -m 64G -hda $IMAGE_DIR/rootfs.img -append "root=/dev/sda rw" -device e1000,netdev=net0 -netdev user,id=net0,hostfwd=tcp::6666-:22 --enable-kvm -smp 20 -cpu host -nographic ``` * Wait for machine to boot (login prompt should appear) * Start a new shell on the host, upload the generated ssh key to a virtual machine