Stopping and Starting an Instance

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

If the instance is scheduled for infrastructure maintenance, when it is restarted, it is restarted on a healthy physical host.

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

Shutting Down or Restarting an Instance Using the Instance's OS

In addition to using the API and Console, you can shut down and restart instances using the commands available in the operating system when you are signed in to the instance. Shutting down an instance using the instance's OS does not stop billing for that instance. If you shut down 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 granted security access in a policy  by an administrator. This access is required whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you get a message that you don’t have permission or are unauthorized, verify with your administrator what type of access you have and which compartment  to 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.

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 the NVMe storage resources are preserved. 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: For VM instances that use shapes in the VM.GPU.GU1 (VM.GPU.A10) series, stopping an instance pauses billing. However, stopped instances continue to count toward your service limits. For all other GPU shapes, billing continues for stopped instances because GPU resources are preserved. 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 the NVMe storage resources are preserved. 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.
  • Optimized shapes: For VM instances, stopping an instance pauses billing. However, stopped instances continue to count toward your service limits. For bare metal instances, billing continues for stopped instances because the NVMe storage resources are preserved. 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.

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

For more information about Compute pricing, see Compute Pricing. 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.Standard3.64
  • BM.Standard.E2.64
  • BM.Standard.E3.128
  • BM.Standard.E4.128
  • BM.Standard.A1.160

Using the Console

To start an instance
  1. Open the navigation menu and click Compute. Under Compute, click Instances.
  2. Click the instance that you're interested in.
  3. Click Start.
To stop an instance
  1. Open the navigation menu and click Compute. Under Compute, click Instances.
  2. Click the instance that you're interested in.
  3. Click Stop.
  4. By default, the Console gracefully stops the instance by sending a shutdown command to the operating system. After waiting 15 minutes for the OS to shut down, the instance is powered off.

    Note

    If the applications that run on the instance take more than 15 minutes to shut down, they could be improperly stopped, resulting in data corruption. To avoid this, shut down the instance using the commands available in the OS before you stop the instance using the Console.

    If you want to stop the instance immediately, without waiting for the OS to respond, select the Force stop the instance by immediately powering off check box.

  5. Click Stop instance.
To reboot an instance
  1. Open the navigation menu and click Compute. Under Compute, click Instances.
  2. Click the instance that you're interested in.
  3. Click Reboot.
  4. Force reboot: By default, the Console gracefully restarts the instance by sending a shutdown command to the operating system. After waiting 15 minutes for the OS to shut down, the instance is powered off and then powered back on.

    Note

    If the applications that run on the instance take more than 15 minutes to shut down, they could be improperly stopped, resulting in data corruption. To avoid this, shut down the instance using the commands available in the OS before you restart the instance using the Console.

    If you want to reboot the instance immediately, without waiting for the OS to respond, select the Force reboot the instance by immediately powering off, then powering back on option.

  5. Infrastructure maintenance: If the instance is scheduled for infrastructure maintenance, for supported shapes, you can control when the maintenance downtime occurs by proactively reboot migrating the instance to a healthy physical host before the maintenance due date. Depending on the shape, do one of the following:

    • Standard VM shapes: The instance is migrated when you reboot it. You don't need to select any additional options.
    • Dense I/O VM shapes: If you want to reboot migrate the instance now, select the Delete the local NVMe-based SSD and reboot migrate to a healthy host option. For information about other maintenance options for dense I/O instances, see Infrastructure Maintenance.

      Caution

      The NVMe-based SSD is permanently deleted. We recommend that you create a backup of the SSD before proceeding.
    • Standard bare metal shapes: Select the Reboot migrate the instance to a healthy host option.
  6. Click Reboot instance.