1. Get Started#

When you complete this milestone you will have created your first Google Compute Engine virtual machine (VM) and connected to it from using only your browser. You will have a running Linux server and a working remote shell session.

Prerequisites#

Before starting, make sure you:

  1. Follow the instructions in Canvas to redeem your Google Cloud credit

  2. Have a non-Cabrillo Google account that can access Google Cloud

Lab: Create and Connect to a VM#

1. Open Google Cloud Console and Cloud Shell#

  1. Go to https://console.cloud.google.com

  2. Select your course project from the project picker near the top of the page

  3. Click the Activate Cloud Shell icon (>_) in the top-right

  4. Wait for the Cloud Shell terminal to finish loading

2. Create a GCP Project#

If it’s your first time logging in to GCP a project is usually, but not always, created for you. All GCP resources have to belong to a project. This keeps resources organized. Projects have:

  1. A non-unique name that you use to identify it.

  2. A globally unique ID

  3. A globally unique number

Create a project called cis-91. Notice that the project ID gets randomized, for example cis-91-2381231. There can be only one cis-91 project ID on Earth and I have it already!

Select your new project using the dropdown.

3. Create a VM in Compute Engine#

Follow the process shown in class. Use the following settings:

  • Name: cis91-vm (any name will do)

  • Region/Zone: choose a nearby zone (for example, us-west1-a)

  • Machine type: e2-micro

  • Boot disk: Debian or Ubuntu LTS

  • Firewall: check Allow HTTP traffic (optional but useful later)

3. Connect from the Browser using SSH#

You can connect either from the VM list or from Cloud Shell commands. Both options are described below.

Option A: Connect from the VM instances page#

  1. In the VM instances table, find cis91-vm

  2. Click SSH in that row

  3. A browser-based terminal opens and logs you into the VM

Option B: Connect from Cloud Shell command line#

Run this command in Cloud Shell (replace zone if needed):

$ gcloud compute ssh cis-91-vm --zone us-west1-a

On first connect, type y if prompted to continue.

4. Verify You Are Logged Into the VM#

Run these commands inside the VM shell:

$ whoami
$ hostname
$ uname -a
$ cat /etc/os-release

You should see:

  1. Your Linux username

  2. The VM hostname (cis91-vm or similar)

  3. Kernel and OS information

5. Take a Screenshot#

Take a screenshot of a window where you are logged in to the VM with some of the commands from the last step showing. This confirms you can create files on your VM.

6. Exit the VM and Return to Cloud Shell#

$ exit

After exit, your prompt should return to Cloud Shell or the SSH window will close.

Troubleshooting#

If SSH does not connect:

  1. Confirm the VM status is Running

  2. Confirm you selected the correct project

  3. Confirm the zone in your command matches the VM zone

  4. Retry from VM instances > SSH to isolate command issues

  5. Wait 1-2 minutes after VM creation and try again

Clean Up (Required)#

To avoid ongoing charges, stop or delete your VM when finished.

Stop the VM#

  1. Go to Compute Engine > VM instances

  2. Select cis91-vm

  3. Click Stop

Delete the VM#

  1. Select cis91-vm

  2. Click Delete

  3. Confirm deletion

Project Documentation#

In Canvas discussion post:

  1. Introduce yourself

  2. Say what you would like to learn about the cloud

  3. Post the screenshot from this milestone