gcloud compute instances

NAME
gcloud compute instances - read and manipulate Compute Engine virtual machine instances
SYNOPSIS
gcloud compute instancesGROUP |COMMAND[GCLOUD_WIDE_FLAG]
DESCRIPTION
Read and manipulate Compute Engine virtual machine instances.

For more information about virtual machine instances, see thevirtual machineinstances documentation.

See also:InstancesAPI.

GCLOUD WIDE FLAGS
These flags are available to all commands:--help.

Run$gcloud help for details.

GROUPS
GROUP is one of the following:
bulk
Manipulate multiple Compute Engine virtual machines with single commandexecutions.
network-interfaces
Read and manipulate Compute Engine instance network interfaces.
ops-agents
Manage Google Cloud Observability agents for Compute Engine VM instances.
os-inventory
Read Compute Engine OS Inventory Data and Related Resources.
COMMANDS
COMMAND is one of the following:
add-access-config
Create a Compute Engine virtual machine access configuration.
add-iam-policy-binding
Add IAM policy binding to a Compute Engine instance.
add-labels
Add labels to Google Compute Engine virtual machine instances.
add-metadata
Add or update instance metadata.
add-resource-policies
Add resource policies to Compute Engine VM instances.
add-tags
Add tags to Compute Engine virtual machine instances.
attach-disk
Attach a disk to an instance.
create
Create Compute Engine virtual machine instances.
create-with-container
(DEPRECATED) Creates Compute Engine virtual machine instancesrunning container images.
delete
Delete Compute Engine virtual machine instances.
delete-access-config
Delete an access configuration from a virtual machine network interface.
describe
Describe a virtual machine instance.
detach-disk
Detach disks from Compute Engine virtual machine instances.
export
Export a Compute Engine virtual machine instance's configuration to a file.
get-guest-attributes
Get the Guest Attributes for a compute instance.
get-iam-policy
Get the IAM policy for a Compute Engine instance.
get-screenshot
Capture a screenshot (JPEG image) of the virtual machine instance's display.
get-serial-port-output
Read output from a virtual machine instance's serial port.
get-shielded-identity
Get the Shielded identity for a Compute Engine instance.
import
Create Compute Engine virtual machine instances from virtual appliance inOVA/OVF format.
list
List Compute Engine instances.
perform-maintenance
Perform maintenance of Google Compute Engine instance.
remove-iam-policy-binding
Remove IAM policy binding from a Compute Engine instance.
remove-labels
Remove labels from Google Compute Engine virtual machine instances.
remove-metadata
Remove instance metadata.
remove-resource-policies
Remove resource policies from Compute Engine VM instances.
remove-tags
Remove tags from Compute Engine virtual machine instances.
report-host-as-faulty
Report a host as faulty to start the repair process.
reset
Reset a virtual machine instance.
resume
Resume a virtual machine instance.
send-diagnostic-interrupt
Send a diagnostic interrupt to a virtual machine instance.
set-disk-auto-delete
Set auto-delete behavior for disks.
set-iam-policy
Set IAM policy for a Compute Engine instance.
set-machine-type
Set machine type for Compute Engine virtual machines.
set-name
Set the name of a Compute Engine virtual machine.
set-scheduling
Set scheduling options for Compute Engine virtual machines.
set-service-account
Set a service account and access scopes for a Compute Engine VM instance.
simulate-maintenance-event
Simulate host maintenance of VM instances.
start
Start a stopped virtual machine instance.
stop
Stop a virtual machine instance.
suspend
Suspend a virtual machine instance.
tail-serial-port-output
Periodically fetch new output from a virtual machine instance's serial port anddisplay it as it becomes available.
update
Update a Compute Engine virtual machine.
update-access-config
Update a Compute Engine virtual machine access configuration.
update-container
(DEPRECATED) Updates Compute Engine virtual machine instancesrunning container images.
update-from-file
Update a Compute Engine virtual machine instance using a configuration file.
NOTES
These variants are also available:
gcloudalphacomputeinstances
gcloudbetacomputeinstances

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

Last updated 2025-10-14 UTC.