This document provides solutions to common issues you might encounter when updating a Compute Engine VM instance. For general instructions on how to update a VM, see Update instance properties.
Best practices
To avoid common issues when updating a VM, follow these best practices:
Use the
update-from-fileworkflow: Export the instance configuration to a file, modify the file, and then use thegcloud compute instances update-from-filecommand to apply the changes. This approach helps prevent errors from manual commands.Use the
most-disruptive-allowed-actionflag: This flag prevents accidental restarts. Set it toNO_EFFECTto test your changes,REFRESHfor non-disruptive updates, andRESTARTonly when you are sure a restart is acceptable.
Common issues
This section lists errors you might encounter when updating a VM and provides guidance on how to resolve them.
Metadata fingerprint mismatch
This error occurs when you try to update a VM instance, but the VM's metadata was updated by another process since you last refreshed the page or fetched the instance data.
Error message:
Supplied fingerprint does not match current metadata fingerprint
Resolution:
The instance fingerprint property in your request must match the current fingerprint of the instance to prevent simultaneous update requests from overwriting each other. Try the following:
Refresh the page: If you're using the Google Cloud console, refresh the VM instance Details page before making your changes.
Use the
--no-etag-cacheGoogle Cloud CLI flag: If you're using the Google Cloud CLI, use the--no-etag-cacheflag with yourgcloud compute instances updatecommand.Retry after a few minutes: As a last resort, try stopping the VM, waiting a few minutes, and then attempt to make the change again.