Oracle Cloud Infrastructure Documentation

Stopping and Starting an Instance

You can stop and start an instance as needed to update software or resolve error conditions.

For steps to manage the lifecycle state of instances in an instance pool, see Stopping and Starting the Instances in an Instance Pool.

Stopping or Restarting an Instance From Within the Instance

In addition to using the API and Console, you can stop and restart instances using the commands available in the operating system when you are logged in to the instance. Stopping an instance using the instance's OS does not stop billing for that instance. If you stop an instance this way, be sure to also stop it from the Console or API.

Required IAM Policy

To use Oracle Cloud Infrastructure, you must be given the required type of access in a An IAM document that specifies who has what type of access to your resources. It is used in different ways: to mean an individual statement written in the policy language; to mean a collection of statements in a single, named "policy" document (which has an Oracle Cloud ID (OCID) assigned to it); and to mean the overall body of policies your organization uses to control access to resources. written by an administrator, whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you try to perform an action and get a message that you don’t have permission or are unauthorized, confirm with your administrator the type of access you've been granted and which A collection of related resources that can be accessed only by certain groups that have been given permission by an administrator in your organization. you should work in.

For administrators: The policy in Let users launch Compute instances includes the ability to stop or start an existing instance. If the specified group doesn't need to launch instances or attach volumes, you could simplify that policy to include only manage instance-family, and remove the statements involving volume-family and virtual-network-family.

If you're new to policies, see Getting Started with Policies and Common Policies. For reference material about writing policies for instances, cloud networks, or other Core Services API resources, see Details for the Core Services.

Rebooting Your Virtual Machine (VM) Instance During Planned Maintenance

When an underlying Oracle Cloud Infrastructure component needs to undergo maintenance, you are notified before the impact to your VM instances. If your VM instances are scheduled for a maintenance reboot, you can proactively reboot, or stop and start your instances using the Console, API, or CLI at any time before the scheduled reboot. This let you control how and when your applications experience downtime. Customer-managed VM maintenance is supported on standard and GPU instance shapes, including Oracle-provided platform images and custom images imported from outside of Oracle Cloud Infrastructure.

To identify the VM instances that you can proactively reboot, using the Console, check the Maintenance Reboot field for the instance. If the instance has a maintenance reboot scheduled and can be proactively rebooted, this field displays the date and start time for the reboot. To check this using the API, use the timeMaintenanceRebootDue field for the Instance. For VM instances with a boot volume, additional iSCSI block volume attachments, and a single VNIC, you can proceed to reboot, or stop and start the instance. If you have non-iSCSI (paravirtualized or emulated) block volume attachments or secondary VNICs, you need to first detach these resources before you reboot your instance.

When you reboot, or stop and start the instance, it is migrated to a different physical VM host. Once the Maintenance Reboot field is blank, the instance is no longer impacted by the maintenance event. If you choose not to reboot before the scheduled time, then Oracle Cloud Infrastructure will reboot and migrate your instances within a 24-hour period after the scheduled time.

To make it easier to locate and perform these actions on your VM instances, you can use Search with a predefined query to find all instances that have a maintenance reboot scheduled.

To find all the instances scheduled for a maintenance reboot

Resource Billing for Stopped Instances

For both VM and bare metal instances, billing depends on the shape that you use to create the instance:

  • Standard shapes: Stopping an instance pauses billing. However, stopped instances continue to count toward your service limits.
  • Dense I/O shapes: Billing continues for stopped instances because of the attached NVMe storage, and related resources continue to count toward your service limits. To halt billing and remove related resources from your service limits, you must terminate the instance.
  • GPU shapes: Billing continues for stopped instances, and related resources continue to count toward your service limits. To halt billing and remove related resources from your service limits, you must terminate the instance.
  • HPC shapes: Billing continues for stopped instances because of the attached NVMe storage, and related resources continue to count toward your service limits. To halt billing and remove related resources from your service limits, you must terminate the instance.

Stopping an instance using the instance's OS does not stop billing for that instance. If you stop an instance this way, be sure to also stop it from the Console or API.

For more information about how instances running Microsoft Windows Server are billed when they are stopped, see How am I charged for Windows Server on Oracle Cloud Infrastructure?.

Hardware Reclamation for Stopped Bare Metal Instances

When a bare metal instance remains in the stopped state for longer than 48 hours, the instance is taken offline and the physical hardware is reclaimed. The next time that you restart the instance, it starts on different physical hardware. There are no changes to the block volumes, boot volumes, and instance metadata, including the ephemeral and public IP addresses.

However, the following properties do change when a bare metal instance restarts on different physical hardware: the MAC addresses and the host serial number. You might also notice changes in the BIOS firmware version, BIOS settings, and CPU microcode. If you want to keep the same physical hardware, do not stop the instance using the Console or the API, SDKs, or CLI. Instead, shut down the instance using the instance's OS. When you want to restart the instance, use the Console or the API, SDKs, or CLI.

This behavior applies to Linux instances that use the following shapes:

  • BM.Standard1.36
  • BM.Standard.B1.44
  • BM.Standard2.52
  • BM.Standard.E2.64

Using the Console

  1. Open the navigation menu. Under Core Infrastructure, go to Compute and click Instances.
  2. Click the instance that you want to stop or start.
  3. Click one of the following actions:

    • Start: Restarts a stopped instance. After the instance is restarted, the Stop action is enabled.
    • Stop: Shuts down the instance. After the instance is powered off, the Start action is enabled.
    • Reboot: Shuts down the instance, and then restarts it.

Using the API

For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.

Use the InstanceAction operation to restart an instance.

The following actions are only available using the API:

  • SOFTSTOP

  • SOFTRESET