Manage the power state of VMs that use VM Runtime on GDC
Stay organized with collections
Save and categorize content based on your preferences.
This document is intended for application owners that run Google Distributed Cloud.
This document shows you how to manage the power state of virtual machines (VMs)
that use VM Runtime on GDC.
You can stop, start, and restart VMs as needed to support the lifecycle of your
applications. For example, you may want to change the number of assigned vCPUs
or amount of memory. After you edit the configuration of your VM, you must
cycle the power state to apply the changes.
Before you begin
To complete this document, you need access to the following resources:
[[["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-25 UTC."],[],[],null,["# Manage the power state of VMs that use VM Runtime on GDC\n\nThis document is intended for application owners that run Google Distributed Cloud.\nThis document shows you how to manage the power state of virtual machines (VMs)\nthat use VM Runtime on GDC.\n\nYou can stop, start, and restart VMs as needed to support the lifecycle of your\napplications. For example, you may want to change the number of assigned vCPUs\nor amount of memory. After you edit the configuration of your VM, you must\ncycle the power state to apply the changes.\n\nBefore you begin\n----------------\n\nTo complete this document, you need access to the following resources:\n\n- A VM that runs in one of your clusters. If needed, [create a VM in Google Distributed Cloud](/kubernetes-engine/distributed-cloud/bare-metal/docs/vm-runtime/quickstart).\n- The `virtctl` client tool installed as a plugin for `kubectl`. If needed, [install the virtctl client tool](/kubernetes-engine/distributed-cloud/bare-metal/docs/vm-runtime/quickstart#install_the_virtctl_client_tool).\n\nStop a VM\n---------\n\nWhen you stop a VM, compute resources such as CPU and memory are freed from the\nunderlying host. The VM is shut down.\n\nTo stop a VM that's in a running state, use the following steps.\n\n1. Use `kubectl` to stop a VM:\n\n kubectl virt stop \u003cvar label=\"name\" translate=\"no\"\u003eVM_NAME\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e with the name of the VM that you want to\n stop.\n2. Check the `STATUS` of your VM:\n\n kubectl get gvm \u003cvar label=\"name\" translate=\"no\"\u003eVM_NAME\u003c/var\u003e\n\n The following example output shows the VM in a `Stopped` state: \n\n NAME STATUS AGE IP\n vm1 Stopped 1m 192.168.2.72\n\nStart a VM\n----------\n\nTo start a VM that's in a stopped state, use the following steps.\n\n1. Use `kubectl` to start a VM:\n\n kubectl virt start \u003cvar label=\"name\" translate=\"no\"\u003eVM_NAME\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e with the name of the VM that you want\n to start.\n2. Check the `STATUS` of your VM:\n\n kubectl get gvm \u003cvar label=\"name\" translate=\"no\"\u003eVM_NAME\u003c/var\u003e\n\n The following example output shows the VM in a `Running` state: \n\n NAME STATUS AGE IP\n vm1 Running 1m 192.168.2.72\n\nRestart a VM\n------------\n\nTo restart a VM that's in a running state, use the following steps.\n\n1. Use `kubectl` to restart a VM:\n\n kubectl virt restart \u003cvar label=\"name\" translate=\"no\"\u003eVM_NAME\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e with the name of the VM that you want to\n restart.\n2. Check the `STATUS` of your VM:\n\n kubectl get gvm \u003cvar label=\"name\" translate=\"no\"\u003eVM_NAME\u003c/var\u003e\n\n The following example output shows the VM in a `Stopping` state: \n\n NAME STATUS AGE IP\n vm1 Stopping 7s 192.168.2.72\n\n3. Check the `STATUS` of your VM again after a minute or two:\n\n kubectl get gvm \u003cvar label=\"name\" translate=\"no\"\u003eVM_NAME\u003c/var\u003e\n\n After the VM has successfully restarted, the following example output shows\n the VM in a `Running` state again: \n\n NAME STATUS AGE IP\n vm1 Running 1m 192.168.2.73\n\n This example VM uses an ephemeral pod IP address, so the address changes\n when the VM restarts.\n\nWhat's next\n-----------\n\n- [Edit a VM in Google Distributed Cloud](/kubernetes-engine/distributed-cloud/bare-metal/docs/vm-runtime/edit-vm).\n- When you no longer need VMs, [Delete a VM in Google Distributed Cloud](/kubernetes-engine/distributed-cloud/bare-metal/docs/vm-runtime/delete)."]]