Performing a reset on your VM is similar to doing a hard reset on your computer, where you might press a reset button or press and hold the power button. Resetting a VM forcibly wipes the memory contents of the machine and resets the VM to its initial state. The VM does not perform a clean shutdown of the guest OS. Throughout this process, the VM remains in the RUNNING state.
Explore further
For detailed documentation that includes this code sample, see the following:
Code sample
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.
Java
Before 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.
Node.js
Before 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.
PHP
Before trying this sample, follow the PHP setup instructions in the Compute Engine quickstart using client libraries. For more information, see the Compute Engine PHP API reference documentation.
Python
Before 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.
What's next
To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.