You can create customized Windows Server images from existing Compute Engine Windows Server images. Use these custom images to create instances with boot disks that are the same as your existing instances.
These custom images are useful for saving the operating system configuration of your existing instances and reusing the same configuration to create other instances.
Before you create the image, run GCESysprep
on the instance to prepare it for the image creation process.
GCESysprep
prepares an instance for becoming a Compute Engine image by completing the following steps:
GCESysprep
operations are logged to the Windows event log and serial port 1. Sysprep writes to multiple log files.
When creating a custom image, you can specify the image's Cloud Storage location, excluding dual-region locations. By specifying the image storage location, you can meet your regulatory and compliance requirements for data locality as well as your high availability needs by ensuring redundancy across regions.
The storage location feature is optional. If you don't select a location, Compute Engine will store your image in the multi-region closest to the image source. You can create custom images from source disks, images, snapshots, or images stored in Cloud Storage. You can use these images to create new VM instances.
All of your existing images prior to this feature launch remain where they are. The only change is that you can view the image location of all your images. If you have an existing image you want to move, you must recreate it in the selected location.
Consoleus
to store the image in the us
multi-region, or us-central1
to store it in the us-central1
region. If you don't make a selection, Compute Engine will store the image in the multi-region closest to your image's source location.Use the gcloud compute
with images create
, and provide the source persistent disk from which you want to create an image. Optionally, include the --force
flag to create the image even if it is attached to a running instance.
gcloud compute images create example-image --source-disk DISK_NAME \
--source-disk-zone ZONE \
--storage-location LOCATION \
[--force]
Replace the following:
DISK_NAME
: the name of the source disk to create the image from.ZONE
: the zone of the disk.LOCATION
: an optional flag that lets you designate the region or multi-region where your image is going to be stored. For example, specify us
to store the image in the us
multi-region, or us-central1
to store it in the us-central1
region. If you don't make a selection, Compute Engine stores the image in the multi-region closest to your image's source location.--force
: an optional flag that creates the image even if the disk is attached to a running instance. This option might compromise the integrity of your image. Stop the instance before you create the image if possible.When you run this command, gcloud compute
creates a new image based on the persistent disk you provided and adds it to your collection. You can confirm that your image was successfully created by running:
gcloud compute images list
Go
Before trying this sample, follow the Go setup instructions in the Compute Engine quickstart using client libraries. For more information, see the Compute Engine Go API reference documentation.
To authenticate to Compute Engine, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
JavaBefore trying this sample, follow the Java setup instructions in the Compute Engine quickstart using client libraries. For more information, see the Compute Engine Java API reference documentation.
To authenticate to Compute Engine, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Node.js Node.jsBefore trying this sample, follow the Node.js setup instructions in the Compute Engine quickstart using client libraries. For more information, see the Compute Engine Node.js API reference documentation.
To authenticate to Compute Engine, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Python PythonBefore trying this sample, follow the Python setup instructions in the Compute Engine quickstart using client libraries. For more information, see the Compute Engine Python API reference documentation.
To authenticate to Compute Engine, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
RESTMake a POST
request to the images().insert
method, with a sourceDisk
URL in the request body.
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/images?FORCE_OPTION
{
"name": "IMAGE_NAME",
"sourceDisk": "zones/ZONE/disks/DISK_NAME",
"storageLocations": "LOCATION",
}
Replace the following:
PROJECT_ID
: the project ID for this request.FORCE_OPTION
: an optional flag to create the image even if the source disk is attached to a running instance. Specify forceCreate=true
at the end of your POST line to set this option. This option might compromise the integrity of your image. Stop the instance before you create the image if possible.IMAGE_NAME
: the name to give this image.ZONE
: the zone of the source disk to create an image from.DISK_NAME
: the name of the source disk.LOCATION
: an optional parameter that lets you select the multi-region or a region storage location of your image. For example, specify us
to store the image in the us
multi-region, or us-central1
to store it in the us-central1
region. If you don't make a selection, Compute Engine stores the image in the multi-region closest to your image's source location.For more information about adding images, see the images reference.
Compute Engine occasionally releases new Windows images with the latest agents and scripts. These items assist Windows instances with startup and shutdown processes, account management, and address management.
Since Windows image version v20160112
, the Windows agent updates itself with upstream releases. You can disable these agent updates by setting the disable-agent-updates
instance metadata key to true
. If you have instances that are based on older image releases, you can manually update the Windows agent of those instances.
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