Unregistering an Instance
Unregister an instance from Autonomous Linux to no longer have it managed by the service.
Using the Console
- Review What happens to the instance when it's unregistered?
- For OCI instances, verify you have the required policy in place before unregistering.
- Open the navigation menu and select Observability & Management.
- Select the compartment that contains the instance you're interested in.
- Select the name of the instance.
- (Optional) Review the instance's job history and reports. This information won't be available after you unregister the instance. See the following:
- Select Unregister.
- (Optional)
For on-premises or third-party cloud instances, if you no longer need to use the Management Agent service, remove the
mgmt_agent
package.- Oracle Linux 8 or 9
-
sudo dnf remove oracle.mgmt_agent
- Oracle Linux 7
-
sudo yum remove oracle.mgmt_agent
To remove the corresponding Management Agent resource from the Management Agent Cloud Service (MACS) in OCI, see Remove Management Agents.
What happens to the instance when it's unregistered?
Unregistering restores the yum or dnf repository files to their state before the instance was registered with the service.
Unregistering an OCI instance without the required policy in place creates a blocker file (osmh-agent-unregister
) to prevent the instance from automatically re-registering with the service. You must remove this file if you want to re-register the instance. See Troubleshooting: Instance was previously unregistered.
The blocker file is located at:
-
/var/lib/oracle-cloud-agent/plugins/oci-osmh/osmh-agent-unregister
Policy requirements for unregistering
Ensure you have one of the following policy statements in place before unregistering. Without the following policy, Autonomous Linux creates a blocking file (osmh-agent-unregister
) to prevent the instance from automatically re-registering with the service.
allow dynamic-group <dynamic-group> to use instance in compartment <compartment>
or
allow dynamic-group <dynamic-group> to {INSTANCE_UPDATE} in compartment <compartment>
- With the policy:
-
- OS Management Hub OCA plugin is disabled.
- No registration blocker file is created.
- You can re-register the instance by re-enabling the OS Management Hub OCA plugin.
- Without the policy:
-
- OS Management Hub OCA plugin remains enabled.
- Registration blocker file (
osmh-agent-unregister
) is created to prevent the agent from checking in with the service. - To re-register the instance, you must manually remove the blocker file. See Troubleshooting: Instance was previously unregistered
What's the difference between unregistering and disabling the OCA plugin?
For OCI instances, disabling the OS Management Hub OCA plugin within the Compute service isn't the same as unregistering the instance. Although they have similar effects, unregistering removes the instance from the service, disabling the plugin causes the instance to remain in the service but stop checking in.
When unregistering an instance (either by using the Console or with the DeleteManagedInstance API operation):
-
The osmh-agent no longer checks in with the service.
-
The instance is removed from Autonomous Linux.
-
If the required policy is in place, the OS Management Hub OCA plugin is disabled.
-
You will need to re-register the instance to use Autonomous Linux again.
When disabling the Autonomous Linux OCA plugin within the Compute service:
-
The osmh-agent no longer checks in with the service.
-
The instance remains in Autonomous Linux. It will be in 'Inactive' and then 'Offline' state.
- See Retention Policy for when offline instances are reclaimed.
-
Re-enabling the plugin allows the instance to check in with Autonomous Linux. You don't need to re-register to use Autonomous Linux again.