From a95627d34212abefeecf75b1b40e1f193db4d4b4 Mon Sep 17 00:00:00 2001 From: Himanshu Neema Date: Sat, 16 Mar 2024 14:39:44 -0700 Subject: [PATCH] ssh commands for internet access & dns resolution wait 2s for microVM to be up and then run ssh commands on the host to setup internet access and DNS resolution in the guest Signed-off-by: Himanshu Neema --- docs/getting-started.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 9ff2c0f9023..7532c12e133 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -257,16 +257,19 @@ curl -X PUT --unix-socket "${API_SOCKET}" \ # API requests are handled asynchronously, it is important the microVM has been # started before we attempt to SSH into it. -sleep 0.015s +sleep 2s + +# Setup internet access in the guest +ssh -i ./ubuntu-22.04.id_rsa root@172.16.0.2 "ip route add default via 172.16.0.1 dev eth0" + +# Setup DNS resolution in the guest +ssh -i ./ubuntu-22.04.id_rsa root@172.16.0.2 "echo 'nameserver 8.8.8.8' > /etc/resolv.conf" # SSH into the microVM ssh -i ./ubuntu-22.04.id_rsa root@172.16.0.2 # Use `root` for both the login and password. # Run `reboot` to exit. -# -# For internet access in the guest, run `ip route add default via 172.16.0.1 dev eth0` -# For DNS resolution in the guest, run `echo "nameserver 8.8.8.8" > /etc/resolv.conf` ``` Issuing a `reboot` command inside the guest will gracefully shutdown