Share on facebook
Share on twitter

Create a VM Instance with Debian 9 on Google Cloud

Creating a new Debian 9 (Stretch) virtual server (VM) on Google Cloud is a very easy. It is nothing like the installation process which you may encounter while installing  Debian 9 on  Local computer(PC or Laptop). In this blog, I will show you in a Step-by-step manner, how to create a VM server with Debian 9 (Stretch) on Google Cloud.

Google Cloud has two ways, which you can follow to install  9 (Stretch) (s) on boot disks.

  • Using Public images : These type of system images are provided and maintained by Google, open-source communities, and third-party vendors. By default, all projects have access to these images and can use them to create instances. The process of creating a VM out of public image is very simple. 
  • Using Custom images: These type of images are available only to your project. You can create a custom image from boot disks and other images. Then, use the custom image to create an instance. You should only follow this method if  you want to import your Debian 9 (stretch) from other cloud server or want to install it from Raw- system images. Here is a Google Cloud Link for more information.

In this tutorial, we’ll use Google Cloud Debian 9 (Stretch) Public Image to create a VM server.
So, let’s get started,

How much it cost to create a Debian 9 (Stretch) VM server on Google Cloud?

There are is no extra charge for Debian 9 (Stretch)  but you have to pay for your VM instances.

Prerequisites

  • A working Google Cloud account
  • And little Patience.

Step 1- Create an new Instance

Log in to your Google Cloud account. On your Google Cloud  dashboard and click the hamburger menu in the upper left-hand corner of the screen.

Log in to your Google Cloud account. On your Google Cloud  dashboard and click the hamburger menu in the upper left-hand corner of the screen.

Now, Navigate to Compute Engine >> VM instances.

After that, Click on ‘Create’ to launch a new VM instance.

You also can Launch Debian 9 (Stretch) from Google cloud Marketplace

Step 2- Configuring VM Instance with Debian 9 (Stretch)

After you have launch your VM instance, it is time to configure your VM.

Name: It is your instance name. Give any name as you wise.

Region: Choose a specific geographical location, this is where google cloud going to setup your Debian 9 (Stretch) server. Here is a link of google cloud website for more information.

Zone: Every region on Google Cloud has one or more zones. For example, the europe-west2 region denotes a region on the west of the Europe that has three zones: europe-west2-aeurope-west2-b, and europe-west2-c.

Machine type: Chose a machine as per your budget or need. Here I choose f1-mini which has 0.2 vCpu and 614 MB ram. Here is link of google cloud website  for more information. 

Here is the most important part of this tutorial, If you launch  Debian 9 (Stretch) from google cloud marketplace, then you don’t need to change your Boot disk to Debian 9 (Stretch).

Boot Disk: Click the Change button to select Debian 10 system image.

Now, navigate to OS images and choose Debian GNU/Linux 10 (buster) from the section menu.

Boot disk type: Choose your boot disk type and size. Google has two type of boot disk, SSD persistent disk (SSD) and  Standard persistent disk (mechanical hard disk). If you want to set up a web server then I recommand you to choose SSD.

Firewall: If you want to set up a web server, then check the boxes to allow HTTP and HTTPS traffic. It will open 80, 443 ports in google cloud firewall.

Finally, Again click the Create button, to deploy your Debian 9 (Stretch) VMs on google cloud.

Step 3- Reserve an IP Address

You can ignore this step if you don’t need a static IP address. By default, Google cloud VMs External IP address could change automatically. If you are going to set up a web server or need a fix IP for your work then you should reserve a static IP address. Follow the below steps to reserve IP address.

On your Google Cloud  dashboard and click the hamburger menu in the upper left-hand corner of the screen. Then, navigate to Networking >> VPC network >> External IP addresses.

Now, form the type section, choose Static. After that Give a name and click on the reserve button.

Step 4- Setting up your Debian 9 (Stretch) Server

If you are a beginner, then you will face many difficulties.  It takes me many days to figure out how to use Google Cloud Platform. 

Those following tutorial will help you to increase your productivity and usability. And also help you to save your valuable time.

Initial Server Setup with Debian 9 (Stretch) on Google Cloud

After you have created a new Debian 10 server, there are a few configuration steps that you should take early on as part of the basic setup. Those steps will increase the security and usability of your server and also help you to build a solid foundation for subsequent actions. 

Cloud Platform usually don’t have any built in file management or transfer (upload and download basically) system, Google Cloud is not exceptional in this regard. 

To transfer your files to your Debian 9 (Stretch) VM, you have to set up SFTP.

Now it is your time!

I tried my best to provide you a complete tutorial on  How to create a Debian 9 (Stretch) VM on  Google Cloud Platform. I hope you liked it.

If you need help just drop a comment.

If you benefited from this tutorial, and would like to support my work, please like my Facebook page.

Thanks,

Leave a Comment

Your email address will not be published. Required fields are marked *