- Click Launch.
- Select a zone where you want to launch the VM(such as us-east1-)
- Optionally change the number of cores and amount of memory. ( This defaults to 1 vCPUs and 3.75 GB ram)
- Optionally change the boot disk type and size. (This defaults to 'Standard Persistent Disk' and 30 GB respectively)
- Optionally change the network name and subnetwork names.
Be sure that whichever network you specify has ports 22 (for ssh), 3389 (for RDP), 80 (for HTTP) and 443 (for HTTPS) exposed.
- Click Deploy when you are done.
- A summary page displays when the compute engine is successfully deployed. Click on the Instance link to go to the instance page .
- On the instance page, click on the "SSH" button, select "Open in browser window".
- This will open SSH window in a browser.
- Run below command to set the password for "ubuntu" user
sudo passwd ubuntu
- Now the password for ubuntu user is set, you can connect to the VM's desktop environment from any local windows machine using RDP protocol.
- To connect using RDP via Windows machine, first note the external IP of the VM from VM details page as highlighted below
- Then From your local windows machine, goto "start" menu , in the search box type and select "Remote desktop connection"
- In the "Remote Desktop connection" wizard, paste the external ip and click connect
- This will connect you to the VM's desktop environment. Provide "ubuntu" as the userid and the password set in step 6 to authenticate. Click OK
- For connecting via Web Interface, SSH to the VM as shown in Step 4 and run below command-
Note down auto-generated password.
Note: If the password is empty in the file, wait for 2 minutes and check again.
- Once the vm is up and running, you can access Visual Studio Code by going to https://VM_Public_IP
Make sure you type https and not http.
- You will see certificate warning, accept the warning to proceed for login
- Use above auto-generated password from Step 13
Note: If you happen to see a blank screen in the browser after login or page load error, wait for 1-2 minutes and open again in new browser window to see VSCode load.