Managing Network Resources
Managing Compute Engine Resources
This course has been designed to teach you how to manage networking and compute resources on Google Cloud Platform. The content in this course will help prepare you for the Associate Cloud Engineer exam.
The topics covered within this course include:
- Adding subnets to a VPC
- Expanding existing subnets
- Reserving static addresses via the console and Cloud Shell
- Managing, configuring, and connecting to VM instances
- Adding GPUs and installing CUDA libraries
- Creating and deploying from snapshots and images
- Working with instance groups
- Learn how to manage networking and compute resources on Google Cloud Platform
- Prepare for the Google Associate Cloud Engineer Exam
- Those who are preparing for the Associate Cloud Engineer exam
- Those looking to learn more about managing GCP networking and compute features
To get the most from this course, you should have some exposure to GCP resources, such as VCPs, VM Instances, Cloud Console, and Cloud Shell. However, this is not essential.
Hi everyone, welcome back. In this lesson, I am going to show you how to stop and start a VM Instance using both the Cloud Console and gcloud. As you can see on your screen, I'm logged in to my console here. To stop a running VM, what I need to do is go to the VM Instances page in my console. So, we'll go ahead and browse to our instances page here. From here, I simply need to choose the instance that I want to stop. So, we'll select my VM here, and then after I've selected my instance, I can see at the top of the page I have the option to stop my VM. So we go ahead and click Stop, and then we'll confirm it.
As I mentioned earlier, what happens when I do this is the Compute Engine sends a shutdown signal to the instance itself, which causes the OS to gracefully shut down. Compute Engine then waits a short while for this shutdown to complete, and then it terminates the VM. The terminated instance doesn't go away; it still exists, complete with its configuration settings and instance metadata. However, it does lose any in-memory data and the virtual machine state itself. Any resources that are attached to this instance remain attached. That includes virtual NICs, persistent discs, etc. Now that my instance is stopped, I can either restart the instance or delete it. I'll just go ahead and restart it here.
So that's how you stop and start a VM using the Console. Now, if I wanted to perform the same tasks in Cloud Shell, I can do that by launching Cloud Shell from up top here. With Cloud Shell launched, I can use the
gcloud compute instances stop command to stop my instance. To use this command, just type out what you see on the screen here and we'll go through it right now. We'll use
gcloud compute instances, and then we'll specify the
stop command and then the name of the VM I'm stopping. Now, what I also want to do here is specify the zone that hosts my VM. So we'll use the
--zone flag here, and then we'll specify
us-central1-a, and we'll go ahead and hit Enter here. And then we can see once I've executed this command, the same process begins. The OS gets shut down, and then the instance is terminated. If we wanted to start the VM using gcloud, we'd simply use the
start command instead of
stop. So that's how you stop and start VMs using both the Console and gcloud.
Tom is a 25+ year veteran of the IT industry, having worked in environments as large as 40k seats and as small as 50 seats. Throughout the course of a long an interesting career, he has built an in-depth skillset that spans numerous IT disciplines. Tom has designed and architected small, large, and global IT solutions.
In addition to the Cloud Platform and Infrastructure MCSE certification, Tom also carries several other Microsoft certifications. His ability to see things from a strategic perspective allows Tom to architect solutions that closely align with business needs.
In his spare time, Tom enjoys camping, fishing, and playing poker.