Stopping and Starting the Instances in an Instance Pool

You can stop and start all the instances in an instance pool as needed to update software or resolve error conditions.

To automatically stop and start instances in an instance pool based on a schedule, you can enable autoscaling for the pool.

Tip

To stop all instances in an instance pool, stop the pool itself, rather than the individual instances. If you stop all of the instances in a pool without stopping the pool, the pool tries to relaunch the instances.

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

You can shut down and restart instances using the commands available in the operating system when you are logged in to the instance. Shutting down an instance using the instance's OS does not stop billing for that instance. If you shut down the instances in an instance pool this way, be sure to also stop the instance pool 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: For a typical policy that gives access to instance pools and instance configurations, see Let users manage Compute instance configurations, instance pools, and cluster networks.

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 pool pauses billing. However, stopped instances continue to count toward your service limits.
  • Dense I/O shapes: Billing continues for stopped instance pools 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 delete the instance pool.
  • GPU shapes: For VM instances that use shapes in the VM.GPU.A10 series, stopping an instance pool pauses billing. However, stopped instances continue to count toward your service limits. For all other GPU shapes, billing continues for stopped instance pools 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 delete the instance pool.
  • HPC shapes: Billing continues for stopped instance pools 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 delete the instance pool.
  • Optimized shapes: For VM instances, stopping an instance pool pauses billing. However, stopped instances continue to count toward your service limits. For bare metal instances, billing continues for stopped instance pools 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 delete the instance pool.

Shutting down an instance using the instance's OS does not stop billing for that instance. If you shut down the instances in an instance pool this way, be sure to also stop the instance pool 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?.

  • To start all instances in a pool
    1. Open the navigation menu and click Compute. Under Compute, click Instance Pools.
    2. Click the name of the instance pool in which are the instances you want to start.
    3. Click Start, and then confirm when prompted.
    To stop all instances in a pool
    1. Open the navigation menu and click Compute. Under Compute, click Instance Pools.
    2. Click the name of the instance pool in which are the instances you want to stop.
    3. Click Stop.
    4. By default, the Console gracefully stops the instances by sending a shutdown command to the operating system. After waiting 15 minutes for the OS to shut down, the instances are powered off.

      Note

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

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

    5. Click Stop instance pool.
    To reboot all instances in a pool
    1. Open the navigation menu and click Compute. Under Compute, click Instance Pools.
    2. Click the name of the instance pool in which are the instances you want to reboot.
    3. Click Reboot.
    4. By default, the Console gracefully restarts the instances by sending a shutdown command to the operating system. After waiting 15 minutes for the OS to shut down, the instances are powered off and then powered back on.

      Note

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

      If you want to reboot the instances immediately, then without waiting for the OS to respond, select the Force reboot the instance pool by immediately powering off every instance in the pool, then powering them back on check box.

    5. Click Reboot instance pool.
  • To manage the lifecycle state of the instances in an instance pool using the CLI, open a command prompt and run any of the following commands.

    To start (power on) the instances in the specified instance pool, use the instance-pool start command:

    oci compute-management instance-pool start --instance-pool-id <INSTANCE_POOL_OCID>

    To stop (immediate power off) the instances in the specified instance pool, use the instance-pool stop command:

    oci compute-management instance-pool stop --instance-pool-id <INSTANCE_POOL_OCID>

    To softstop (ACPI shutdown) the instances in the specified instance pool, use the instance-pool softstop command:

    oci compute-management instance-pool softstop --instance-pool-id <INSTANCE_POOL_OCID>

    To reset (immediate power off and power on) the instances in the specified instance pool, use the instance-pool reset command:

    oci compute-management instance-pool reset --instance-pool-id <INSTANCE_POOL_OCID>

    To softreset (ACPI shutdown and power on) the instances in the specified instance pool, use the instance-pool softreset command:

    oci compute-management instance-pool softreset --instance-pool-id <INSTANCE_POOL_OCID>

    For a complete list of flags and variable options for the Compute Service CLI commands, see the command line reference for Compute.

  • For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.

    To manage the lifecycle state of the instances in an instance pool with the API, use the following operations: