Detaching a Boot Volume

If you think a boot volume issue is causing a compute instance problem, you can stop the instance and detach the boot volume using the steps described in this topic. Then you can attach it to another instance as a data volume to troubleshoot it.

Required IAM Policy

To use Oracle Cloud Infrastructure, you must be given the required type of access in a policy  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 compartment  you should work in.

For administrators: The policy in Let users launch Compute instances includes the ability to attach and detach existing block volumes. The policy in Let volume admins manage block volumes, backups, and volume groups lets the specified group do everything with block volumes and backups, but not launch instances.

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.

Using the Console

You can detach a boot volume from an instance only when the instance is stopped. See Stopping and Starting an Instance for information about managing an instance's state.

  1. Open the navigation menu. Under Core Infrastructure, go to Compute and click Instances.
  2. Choose your Compartment.

  3. Click the instance that you want to detach the boot volume from.
  4. Under Resources, click Boot Volume.
  5. Click the Actions icon (three dots) for the boot volume, and then click Detach Boot Volume. Confirm when prompted.

You can now attach the boot volume to another instance. For more information, see Attaching a Volume.

Using the API

To delete an attachment, use the following operation:

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.