Skip to content

Your First VM

This walkthrough takes you from a fresh install to a running instance with RStudio open in your browser.

1. Start vmup

vmup

vmup opens on the Instances tab. On first run the list will be empty. If you aren't authenticated with Google Cloud yet, vmup offers to run gcloud auth login for you.

2. Create a new instance

Press N (or open the command palette with : and choose new-instance). The launch form appears with sensible defaults already filled in:

Field Default Notes
Project ID auto-detected from gcloud config The GCP project to deploy into
VM name Lowercase letters, numbers, and hyphens
Image first available image Listed from your configured image project, then the standard public GCP images
Region / Zone us-central1 / us-central1-a Chosen from live lists fetched from GCP; the zone options update to match the selected region
Machine type e2-highmem-2 Filtered to the image's CPU architecture (ARM64/x86_64); a live hourly cost estimate is shown as you choose
Boot disk size 20 GB
Port mapping 8787:8787 Comma-separated local:remote pairs

This example uses a custom RStudio image

The screens below show a custom my-rstudio-image (an image with RStudio preinstalled) surfaced through an image-project setting. Without a custom image project configured, the picker lists the standard public GCP images (Debian, Ubuntu, etc.) — pick any of those to follow along.

The cost estimate comes from the Cloud Billing API (with built-in fallback rates), so you see roughly what the machine costs per hour before anything is created.

Configure New VM

  Project ID
  GCP project to create the instance in
  my-gcp-project           

  VM Name
  Must be lowercase, no underscores
  rstudio-demo▎            

  Image
  my-rstudio-image 

  Region
  us-central1 

  Zone
  us-central1-a 

  Machine Type
> ★ e2-highmem-2 (2 vCPU, 16 GB)   ~$0.12/hr
    ★ e2-highmem-4 (4 vCPU, 32 GB)   ~$0.24/hr
    ★ e2-standard-2 (2 vCPU, 8 GB)   ~$0.08/hr

  Boot Disk Size (GB)
  OS and system files — destroyed with the VM
  20                       

  Port Mapping
  Comma-separated local:remote (e.g. 8787:8787,2222:22)
  8787:8787                

  ✓ Submit  Cancel

  ctrl+c cancel

3. Review and launch

Completing the form opens a review screen that summarizes the VM. Nothing is created until you confirm — press Y (or select Yes) to launch, or Esc / No to go back to the form with everything you entered still in place. This makes it hard to create a VM by accidentally pressing Enter.

Review New VM

  VM Name:       rstudio-demo
  Image:         my-rstudio-image
  Image Project: my-image-project
  Region:        us-central1
  Zone:          us-central1-a
  Machine Type:  e2-highmem-2
  Boot Disk:     20 GB
  Port Mapping:  8787:8787

  Create this VM?

  > Yes    No

  ←/→ toggle • enter submit • y Yes • n No • esc/ctrl+c back to edit

Confirm, and vmup runs Terraform for you — init, then apply — streaming the output live into the progress screen. Behind the scenes this creates an isolated VPC, NAT, IAP-only firewall rules, and the instance itself (see Infrastructure Created).

Provisioning typically takes a few minutes. The startup script on the VM also runs system updates, so allow a couple of extra minutes before everything is responsive.

 Launching rstudio-demo (1m 12s)

  google_compute_network.vpc: Creation complete after 22s
  google_compute_subnetwork.subnet: Creation complete after 19s
  google_compute_router_nat.nat: Creation complete after 11s
  google_compute_instance.main: Creating...
  google_compute_instance.main: Still creating... [20s elapsed]

  ↑/↓ scroll • ←/→ pan • esc/ctrl+c back

4. Check the status screen

When the apply finishes, the status screen shows:

  • Your username and password for services on the VM (the password is auto-generated)
  • The SSH tunnels that were started automatically for each port mapping
VM Info

  Successfully launched rstudio-demo

  VM Name:       rstudio-demo
  Project:       my-gcp-project
  Zone:          us-central1-a
  Machine:       e2-highmem-2
  Image:         my-rstudio-image
  Boot Disk:     20 GB
  Port Mapping:  8787:8787
  Username:      demo
  Password:      xR9kL2mP5nQ8vW

  Active Tunnels:
    http://localhost:8787 (PID 52114)

  enter/b/esc back • q quit

5. Open your service

With the default port mapping, RStudio is now reachable at localhost:8787. Log in with the credentials from the status screen.

Change your password

The generated password is meant to be temporary. SSH in (C from the instance list) and run sudo passwd <your-username>.

6. When you're done

  • X — stop tunnels, and optionally stop the VM to save money while keeping it around
  • S — start it back up later; tunnels reconnect automatically
  • Shift+D — destroy the VM and all its infrastructure when you no longer need it

Continue to Managing Instances for the full tour.