Create a VM from an image stored in Google Cloud Platform

Currently, you can't use the console to create a VM from an imported image. Select the Command Line tab to use the Google Cloud command-line interface to create a virtual machine.

  1. Run this command to set a compute zone:

    gcloud config set compute/zone <zone>

  2. Run this command to create a Compute Engine image:

    gcloud compute images create <image-name> --source-uri <filepath>

    • <image-name> is the name of the image.
    • <filepath> is the complete path to the image tar.gz file.

    In this example, replace <image-name> with my-image-name, and <filepath> with gs://my-bucket-name/my-tar-file-name.tar.gz:

    gcloud compute images create my-image-name --source-uri gs://my-bucket-name/my-tar-file-name.tar.gz

Create an instance of the VM

Perform the following steps to create and launch an instance of the VM:

  1. Click Compute Engine.

  2. Click Images.

  3. Click Create Instance. and give a name.

  4. Enter a name for the instance.

  5. Specify the region and the zone.

  6. Choose the default machine configuration. Select one or both of Allow HTTP traffic and Allow HTTPS traffic under Firewall.

See Creating and starting a VM instance for more details on using VMs in Google Cloud.