Google Compute Engine (GCE)
- GCE is one of the core GCP Services for creating virtual machines
- Base resources of virtual machine are
- processors
- memory
- storage
- network
- Google uses KVM hypervisor secured and hardened by google itself Refer Here
- VM will be referred as instance in gcp.
- GCE offers machines families for different types of workloads, here is the basic summary of machine families
- General Purpose:
- This offers best balance between price and performance
- Compute Optimized:
- This delivers the highest performace per core on Compute Engine and it is designed for compute intensive worloads
- Memory Optimized: This is perfect for tasks that require large amount of memory, providing more memory per core with Maximum capacity of 12 TB RAM
- Accelartor Optimized:
- This is specifically tailore to massively paralleized Compute Unifided Device Architecture (CUDA) compute workloads such as machine learning (ML) and High performance compute (HPC)
- General Purpose:
- GCE machines are further classified by series and generation
- General-purpose workloads Refer Here
- E2
- N2, N2D and N1
- C3
- Tau T2D and Tau T2A
- Compute Optimzied Refer Here
- C2, C2D
- Memory Optimized Refer Here
- Accelarator Optimized Refer Here
- Terminolgy Refer Here
Create an Ubuntu Linux VM Instance Using Console
- Steps

- Now choose region and zone, provide name

- Select a machine family and series

- GCP Supports preset sizing and also custom sizing



- Inside the vm instance if we want to run a container then gcp directly supports it

- Boot disk lets us select Image and also set the disk size


- Lets select the service account








- Once the vm is created ssh into the vm
ssh -i <path to private key> username@externalip

* Now lets install nginx server in it
Create a Windows server using console
To create a Windows Server VM instance in the Google Cloud Platform (GCP) and log in to it, follow these steps:
1. Prerequisites
- Google Cloud Account: Ensure you have a Google Cloud account. If not, create one and enable billing for your project[3].
- Compute Engine API: Enable the Compute Engine API for your project[3].
- RDP Client: If you’re not using Windows on your local machine, install an RDP client such as Chrome Remote Desktop[3].
2. Create a Windows Server VM Instance
- Sign in to Google Cloud Console: Log in to the Google Cloud Console.
- Select or Create a Project: On the project selector page, select or create a Google Cloud project[3].
- Navigate to Compute Engine: Go to the Compute Engine section.
- Create an Instance:
- Click on Create an instance.
- Provide a name for your VM instance.
- Choose the region and zone as needed[4][6].
- Configure the Boot Disk:
- In the Boot disk section, click Change.
- On the Public images tab, choose Windows Server from the Operating system list.
- Select the desired version of Windows Server (e.g., Windows Server 2019 Datacenter)[3][5].
- Configure Machine Type:
- Select the machine type based on your requirements. For example, you can choose from general-purpose, compute-optimized, memory-optimized, or GPU-optimized instances[4].
- Firewall Settings:
- Ensure that the firewall settings allow the necessary traffic. By default, you may need to allow HTTP traffic and create a custom firewall rule to allow RDP (port 3389)[2][3].
3. Create the VM
- Click Create to create the VM instance. It will take a short time for the instance to start[3].
4. Set Windows Password
- Go to VM Instances Page:
- Navigate to the VM instances page.
- Set Windows Password:
- Click on the name of your VM instance.
- Under the Remote access section, click Set Windows password.
- Specify a username and click Set to generate a new password. Save the username and password for later use[3][6].
5. Connect to the VM Using RDP
- Get External IP:
- Note the external IP address of your VM instance.
- Create Firewall Rule for RDP:
- If not already done, create a firewall rule to allow incoming traffic on port 3389 for RDP[2].
- Connect via RDP:
- Open your RDP client and enter the external IP address of your VM instance.
- Use the username and password you set earlier to log in[2][3][6].
Example Steps from Sources
- Detailed Steps with Firewall Configuration: Refer to the YouTube video by Vishal Bulbule for detailed steps including firewall configuration[2].
- Quick Tutorial: The video by Dominic from starscreek.net provides a concise tutorial on creating and connecting to a Windows VM[6].
By following these steps, you can successfully create a Windows Server VM instance in GCP and log in to it using Remote Desktop Protocol (RDP).
Citations:
[1] https://holowczak.com/getting-started-with-google-cloud-platform-creating-a-windows-server-vm/
[2] https://www.youtube.com/watch?v=GqakgxJEthQ
[3] https://cloud.google.com/compute/docs/create-windows-server-vm-instance
[4] https://www.youtube.com/watch?v=AanhtRcqsDI
[5] https://cloud.google.com/compute/docs/instances/windows/creating-managing-windows-instances
[6] https://www.youtube.com/watch?v=pTMn7M8OJQ8
[7] https://www.youtube.com/watch?v=p5wl1s5gKY0
[8] https://console.cloud.google.com/getting-started?tutorial=compute_short_quickstart
Exercise
- Create a redhat linux vm
- Create an centos linux vm
