Detaching a Boot Volume
If a boot volume issue is causing a compute instance issues, you can stop the instance and detach the boot volume, then attach it to another instance as a data volume to troubleshoot it.
Required IAM Policy
To use Oracle Cloud Infrastructure, an administrator must be a member of a group granted security access in a policy by a tenancy 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 the tenancy administrator what type of access you have and which compartment your access works 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.
You can detach a boot volume from an instance only when the instance is stopped. See Stopping, Starting, or Restarting an Instance for information about managing an instance's state.
- Open the navigation menu and select Compute. Under Compute, select Instances.
-
Choose your Compartment.
- Select the instance that you want to detach the boot volume from.
- Under Resources, select Boot Volume.
- Select the for the boot volume, and then select Detach Boot Volume. Confirm when prompted.
You can now attach the boot volume to another instance. For more information, see Attaching a Boot Volume.
Use the
oci compute boot-volume-attachment detach
command and specify the--boot-volume-id
parameter to attach the volume to the instance:oci compute boot-volume-attachment detach --boot-volume-id boot_volume_id
For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Run the
DetachBootVolume
operation and specify thebootVolumeAttachmentId
attribute to detach a boot volume.