Creating A VM Instance Using GCP

SAM PRINCE FRANKLIN K
2 min readJul 4, 2021

--

YouTube Tutorial Video : https://www.youtube.com/watch?v=IHk5Pnh7I7c

Overview

In this lab, you will explore the Virtual Machine instance options and create several VMs with different characteristics.

Task 1: Create a utility virtual machine

Create a VM

  1. In the Cloud Console, on the Navigation menu , click Compute Engine > VM instances.
  2. Click Create.
  3. For Name, type a name for your instance. Hover over the question mark icon for advice about what constitutes a properly formed name.
  4. For Region and Zone select us-central1 and us-central1-c respectively.
  5. For Machine configuration, select Series as N1.
  6. For Machine type, examine the options.
  7. Click Details to the right of the Machine type list to see the breakdown of estimated costs.
  8. For Machine type, click n1-standard-4 (4 vCPUs, 15 GB memory). How did the cost change?
  9. For Machine type, click n1-standard-1 (1 vCPUs, 3.75 GB memory).
  10. For Boot disk, click Change.
  11. Click Version and select Debian GNU/Linux 10 (buster).
  12. Click Select.
  13. Click Management, security, disks, networking, sole tenancy.
  14. Click Networking.
  15. For Network interfaces, click the Edit icon
  16. Select None for External IP.
  17. Click Done.
  18. Leave the remaining settings as their defaults, and click Create. Wait until the new VM is created.

Task 2: Create a Windows virtual machine

Create a VM

  1. On the Navigation menu click Compute Engine > VM instances.
  2. Click Create instance.
  3. Specify the following, and leave the remaining settings as their defaults:

4. Click Select.

5. For Firewall, enable Allow HTTP traffic and Allow HTTPS traffic.

6. Click Create.

Set the password for the VM

  1. Click on the name of your Windows VM to access the VM instance details.
  2. You don’t have a valid password for this Windows VM: you cannot log in to the Windows VM without a password. Click Set Windows password.
  3. Click Set.
  4. Copy the provided password, and click CLOSE.

Connect via SSH to your custom VM

  1. For the custom VM you just created, click SSH.
  2. To see information about unused and used memory and swap space on your custom VM, run the following command:
freecontent_copy
  1. To see details about the RAM installed on your VM, run the following command:
sudo dmidecode -t 17content_copy
  1. To verify the number of processors, run the following command:
nproccontent_copy
  1. To see details about the CPUs installed on your VM, run the following command:
lscpucontent_copy
  1. To exit the SSH terminal, run the following command:
exit

--

--

SAM PRINCE FRANKLIN K
SAM PRINCE FRANKLIN K

Written by SAM PRINCE FRANKLIN K

Software Engineering Student at VIT — Chennai

No responses yet