Create and Manage VM instance for Google Console

Inception Innovation, Susan K.C.

Introduction

 

In this blog, I will help you to create instance in virtual machine. You can create instances from following ways:

1. Creating an instance from a public image

2. Creating an instance from a custom image

3. Creating an instance from a snapshot   

Compute Engine automatically starts the VM instance after you create it.For this tutorial I am going to install Linux OS but you can select anything listed in the public list.                                                          Before you begin                                                                                                                                                             You must have a paid google server and setup all billing information before you start your configuration.

1. Creating an instance from a public image                                                                                                       The disk images listed in the public repository can be used to create your own customized server instance. An image contains the bootloader, root filesystem, and an operating system that runs on the instance. Public 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 with common operating system images.                                                                                   

    Steps: 

        1. Go to the VM instances page.

        2. Select your project and click continue.

        3. Click the create instance button.

        4. Specify a name for your instance.

        5. Optionally, change the zone for this instance.

        6. Select a machine type for your instance. (Select CPU and memory)

        7. In the Boot disk section, click change to configure your boot disk.

            a. Click on OS images tab, choose an image (for eg. Ubuntu 16.04 LTS).

            b. Select boot disk type (SSD persistent disk or Standard persistent disk)

            c. Select size of disk

            d. Click select

        8. Allow access for Firewall (enable HTTP and HTTPS traffic)

        9. Click on the management, disks, networking, SSH keys.

            a.  Select networking and change default network type to custom network type.

        10. Click the create button to create and start the instance.  

2. Creating an instance from a custom image

A custom image created only belongs to your project. To create an instance with a custom image, you must first have a custom image.                                                                                   

    Steps: 

        1. Go to the VM instances page.

        2. Select your project and click continue.

        3. Click the create instance button.

        4. Specify a name for your instance.

        5. Optionally, change the zone for this instance.

        6. Select a machine type for your instance. (Select CPU and memory)

        7. In the Boot disk section, click change to configure your boot disk.

            a. Select the Custom Images tab

            b. Make sure your project is selected in the dropdown menu.

            c. Choose the image you want

            d. Select Boot disk type (SSD persistent disk or Standard persistent disk)

            e. Select size of disk

            f. Click the Select button.

        8. Allow access for Firewall (enable HTTP and HTTPS traffic)

        9. Click on the management, disks, networking, SSH keys.

            a.  Select networking and change default network type to custom network type.

        10. Click the create button to create and start the instance.

3. Creating an instance from a snapshot

First you need to backup root persistent disk with a snapshot, then you can use that snapshot to create new instance Creating an instance from a snapshot is useful when you need to roll an instance back to a previous state or restore the root disk of an instance that you deleted unintentionally.                                                                                   

    Steps: 

        1. Go to the VM instances page.

        2. Select your project and click continue.

        3. Click the create instance button.

        4. Specify a name for your instance.

        5. Optionally, change the zone for this instance.

        6. Select a machine type for your instance. (Select CPU and memory)

        7. In the Boot disk section, click change to configure your boot disk.

            a. Click the Snapshots tab and choose a snapshot from the list.

            b. Select Boot disk type (SSD persistent disk or Standard persistent disk)

            c. Select size of disk

            d. Click the Select button.

        8. Allow access for Firewall (enable HTTP and HTTPS traffic)

        9. Click on the management, disks, networking, SSH keys.

            a.  Select networking and change default network type to custom network type.

        10. Click the create button to create and start the instance.