A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://cloud.google.com/compute/docs/machine-images/create-machine-images below:

Create machine images | Compute Engine Documentation

Create machine images

Stay organized with collections Save and categorize content based on your preferences.

Use a machine image to store all the configuration, metadata, permissions, and data from multiple disks for a VM instance running on Compute Engine. The VM instance that you use to create a machine image is referred to as a source VM instance.

For information about when and how to use machine images, see Machine images.

This document describes the steps for creating a machine image from a source VM instance.

Before you begin Limitations and restrictions Instance and disk properties not supported by machine image

When you create machine images from VM instances or create VM instances from machine images, the following instance and disk properties are not preserved or restored:

Creating a machine image from a VM Permissions required for this task

To perform this task, you must have the following permissions:

You can create machine images using either the Google Cloud console, the Google Cloud CLI, or REST.

To create a machine image, you need the following information:

Console
  1. In the Google Cloud console, go to the Machine images page.

    Go to Machine images

  2. Click Create Machine image.

  3. Specify a Name for your machine image.

  4. Optional: Provide a Description.

  5. Select the Source VM instance.

  6. Optional: Specify where to store the machine image. Choose between Multi-regional or Regional storage. For more information about location, see Machine image storage location.

  7. Optional: Select an Encryption method.

  8. Click Create.

gcloud

Use the gcloud compute machine-images create command to create a machine image from an instance.

gcloud compute machine-images create MACHINE_IMAGE_NAME \
    --source-instance=SOURCE_VM_NAME

Replace the following:

Example

For example, you can use the following gcloud command to create a machine image called my-machine-image from a source instance called my-instance:

gcloud compute machine-images create my-machine-image  \
    --source-instance=my-instance

The process takes a few minutes. When the machine image is created, you get an output that resembles the following:

Created [https://www.googleapis.com/compute/v1/projects/project-12345/global/machineImages/my-machine-image].
NAME               STATUS
my-machine-image   READY
REST

In the API, construct a POST request to the machineimages.insert method. In the request body, include the following POST request:

POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/machineImages

{
  "name": "MACHINE_IMAGE_NAME",
  "sourceInstance": "SOURCE_INSTANCE_URL"
}

Replace the following:

What's next?

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-07 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["Machine images store a VM instance's configuration, metadata, permissions, and data from multiple disks, using a source VM instance as the base."],["Machine images can be created through the Google Cloud console, the Google Cloud CLI, or REST API, requiring specific permissions such as `compute.machineImages.create`."],["Creating a machine image involves specifying a name, the source VM instance, and its zone, with optional settings like storage location and encryption key, with a limit of six creations per instance every 60 minutes."],["Certain instance and disk properties are not preserved or restored when creating or using machine images, such as `disks.architecture`, `disks.description`, and `resourcePolicies`, among others."],["Machine images can not be created from source VMs that exceed 200TB of disks, have no attached disks, any attached Hyperdisk volumes or use a C3D, H3, A3 or Z3 machine type."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4