Start, stop, reboot, and delete a virtual machine
Start, stop, restart, pause, and resume virtual machines, rename them, protect them from deletion, and delete them, choosing whether to keep the OS disk.
Change an instance's power state, rename it, protect it from deletion, or delete it. In the instance list and on the instance page, every power action and every deletion asks for confirmation first.
Before you begin
- You need the Owner or Contributor role, or a custom role with Manage access to Compute / Instances, on the subscription or on the project. With any role that has Read access to Compute / Instances, you can view instances but not change them.
- Know what keeps being billed: a stopped instance is still billed for compute. See Power states and billing.
Start, stop, or restart an instance
In the console, go to ComputeInstances, and select the instance.
Select the action. Start, Stop, and Resume are at the top of the page, depending on the instance's state. Restart, Hard restart, and Pause are in the More actions menu (⋯).
In the confirmation, select the action again.
The console shows a notification when the action starts and when it finishes. Which actions are available depends on the state:
| State | Available actions |
|---|---|
| Running | Stop, Restart, Hard restart, Pause |
| Stopped | Start |
| Paused | Resume |
- Restart reboots the guest gracefully.
- Hard restart power-cycles the instance without a guest shutdown, so unsaved data in the guest can be lost. It has its own confirmation. Use it only when a normal restart doesn't respond.
- Pause stops the instance from serving traffic at once and holds its memory in place. Resume continues from where it was paused.
An instance runs one action at a time. While a start, stop, restart, pause, resume, or resize is in progress, another one is refused with Another action is already in progress on this resource. Wait for it to finish, then try again.
From the instance list
You can also run these actions from the instance list:
- For one instance, open the actions menu (⋯) at the end of its row.
- For several instances, select their check boxes, and select Start or Stop. The confirmation names the instances that are affected.
Rename an instance
On the instance page, open the More actions menu (⋯), and select Rename.
In Instance name, enter the new name: 1 to 63 lowercase letters, digits, and hyphens.
Select Save.
Renaming changes only the display name. The instance's ID, disks, and network stay the same. Right after you create an instance, a rename can fail until the cloud has accepted the instance. Try again a moment later.
Turn deletion protection on or off
While deletion protection is on, the console and the REST API refuse to delete the instance. On the instance page, Delete is disabled until you turn the protection off.
On the instance page, select the Overview tab.
Turn the Deletion protection switch on or off.
The change takes effect at once.
Delete an instance
Caution
Deleting an instance can't be undone. Nothing in the console brings a deleted instance back.
On the instance page, open the More actions menu (⋯), and select Delete.
Decide what happens to the OS disk. Leave Keep the root (boot) volume cleared to delete it with the instance, or select it to keep the disk as a separate volume.
Select Delete.
The instance's status changes to Deleting, and the instance disappears from the list when the deletion finishes. The confirmation also shows the monthly compute saving against your subscription's current estimate; disks and Floating IPs aren't part of that figure.
To delete several instances, select their check boxes in the instance list, and select Delete. The same choice for the OS disks applies to all of them.
What happens to related resources
| Resource | When you delete the instance |
|---|---|
| OS disk created for the instance | Deleted, unless you select Keep the root (boot) volume. A kept disk stays in Block Storage. |
| Volume that you booted from | Kept. It stays in Block Storage. |
| Data disks | Detached and kept in Block Storage. |
| Floating IP allocated by the creation wizard | Released. |
| Floating IP that you allocated separately | Disassociated and kept. It stays allocated until you release it. |
| Add-ons and licenses | Detached. |
For what keeps being billed after the deletion, see Stop all charges for an instance.
If the OS disk that would be deleted has its own deletion protection turned on, the console and the REST API refuse the deletion. Turn off the volume's protection, or select Keep the root (boot) volume.
If restore points or images that were captured from the instance still exist, the cloud can't delete the OS disk: the instance is deleted, but the OS disk stays in Block Storage with the status Error, and it keeps being billed. Delete those restore points and images, and then delete the volume. See What blocks a deletion.