Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • DSA
  • Practice Problems
  • C
  • C++
  • Java
  • Python
  • JavaScript
  • Data Science
  • Machine Learning
  • Courses
  • Linux
  • DevOps
  • SQL
  • Web Development
  • System Design
  • Aptitude
  • GfG Premium
Open In App
Next Article:
How To Use Compute Engine To Launch And Manage Virtual Machines ?
Next article icon

How To Use Compute Engine To Launch And Manage Virtual Machines ?

Last Updated : 05 Feb, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

Google Compute Engine (GCE) is one of the cloud services offered by Google Cloud Platform (GCP). GCE provides Infrastructure as a service (IaaS) which allows users to create and manage Virtual Machines on Google's infrastructure. Users can launch their custom OS images using a VM. GCE follows a pay-per-use model which allows users to pay only for the usage.

What Is A Virtual Machine?

A Virtual Machine is a computer operating system that can be operated from the cloud. With the help of a Virtual Machine, a user can deploy various applications on the cloud, host a website, create and manage APIs as well as Microservices and many more cloud services.

In this article, I will walk you through a step-by-step guide on how to use a computing engine to Launch and Manage Virtual Machines.

Steps To Launch Virtual Machines

Step 1: Goto GCP Cloud Console

Step 2: Create a project

If you haven't created a GCP account or a project in GCP, you can refer to this article.

Step 3: Navigate to Compute Engine -> VM Instances

  • To do this, you can click the menu option in the top left and navigate to VM Instances as shown in the below image.
VM Instance

Step 4: Enable Compute Engine API if not done already

  • To enable the API, the GCP asks for a billing account. Make sure to set up the billing account.

Step 5: Create a new instance

  • The instance is the Virtual Machine instance that we need to launch.
  • Click on the CREATE INSTANCE button on the top right and fill in all the required parameters for your project.
  • The parameters include the name of your instance, the preferred region and zone of the instance, CPU and memory type, preferred OS, size of disk etc.
Create a instance
  • After filling in the parameters, click on the CREATE button. It will take a few minutes to create your VM instance.

Step 6: Connect to the VM instance

  • Once the instance is created, you can view it on the VM instances page. Click on the SSH button to connect to your machine through the command line.
Connecting VM with ssh

Step 7: (Optional) Connect to VM instance from local computer.

  • You can also connect to a VM instance from your local computer. Open the terminal and enter the below ssh command.
ssh YOUR_USERNAME@VM_EXTERNAL_IP

You can get the username and VM_EXTERNAL_IP from the GCP console.

Steps To Manage Your Virtual Machines

Step 1: Start, Stop or Resize the VM instance

  • Navigate to Compute Engine -> VM Instances. Here, you can see the list of VM instances. You can stop, restart, resize or delete a VM instance.

start/Stop the VM Instances

Step 2: Create a custom image or snapshot.

  • You can create a custom image or snapshot of your VM instance.
  • An image contains all the data of the VM machine while a snapshot captures the data at a specific point in time.
  • This can be used for backup and restore purposes.
  • To create an image/snapshot, navigate to Compute Engine -> images/snapshots as shown below.
Creating Images/Snapshot


Step 3: Creating health checks

Navigate to Compute Engine -> Health Checks same as above. Health checks are used to check whether applications in VMs respond to requests. You can create health checks for the applications in your VM instance.

Congratulations, you have successfully launched and managed a VM instance using GCE. In this way, you can easily launch and manage VM instances using the Compute Engine option. Do explore and experiment with various options provided by GCE.


Next Article
How To Use Compute Engine To Launch And Manage Virtual Machines ?

S

sainaveen_bhukya
Improve
Article Tags :
  • Cloud Computing
  • Geeks Premier League 2023

Similar Reads

    How To Use Azure Virtual Machines For High-Performance Computing ?
    Through Azure Virtual Machines, HPC jobs can take advantage of the platform's powerful and scalable nature, which is offered in the cloud environment. The possibility to boot virtual machines chosen for compute-intensive purposes helps to execute, e.g., simulations and big data analysis with ease. F
    8 min read
    How to Manage KVM Virtual Environment using Command Line Tools in Linux
    KVM, short for Kernel-based Virtual Machine, is a complete virtualization solution for Linux running on x86 hardware (Intel VT or AMD-V). Since version 2.6.20, the mainline Linux kernel has featured KVM, a complete virtualization solution for Linux running on Intel 64 and AMD 64 hardware that is fas
    8 min read
    How to Create Virtual Machines in Linux Using KVM (Kernel-based Virtual Machine)?
    In this tutorial, we are going to see how we can create a virtual machine in Linux using a Kernel-based Virtual Machine. Virtual machines are based on computer architectures and provide the functionality of a physical computer but first, we need to understand what is a kernel-based virtual machine.
    5 min read
    Differences Between Virtual Machines and Virtual Servers
    Virtualization has become one of the key technologies of modern computing, with proper utilization of hardware resources being made effective. When describing this technology, one encounters two frequently used terms: virtual machines and virtual servers. Although they do bring similar meanings, the
    12 min read
    How to Deploy a Kubernetes Cluster in Azure Virtual Machines?
    Azure Kubernetes Service provides a platform for managing containers with the help of Kubernetes. It also provides an easy and managed way for the deployment and scaling of containerized applications. Containerized applications are deployed in the Kubernetes cluster in Azure. But we can also manuall
    5 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences