Setting Instance Availability During Maintenance Events
When the underlying infrastructure for a virtual machine (VM) instance needs to undergo planned maintenance or recover from an unexpected failure, Oracle Cloud Infrastructure automatically attempts to recover the instance by migrating it to healthy hardware. By default, the instance is recovered to the same lifecycle state as before the maintenance event - that is, if your instance was running, it will be rebooted. If you have an alternate process to recover the instance, you can optionally configure the instance to remain stopped after it is migrated to healthy hardware. You can then restart the instance on your own schedule.
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 edit the maintenance recovery action for an 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
Using the Console
Open the navigation menu. Under Core Infrastructure, go to Compute and click Instances.
- Click the instance that you're interested in.
- Click Edit.
- Click Show Advanced Options.
- For the Restore instance lifecycle state after infrastructure maintenance
check box, select an option:
- To reboot a running instance after it is recovered, select the check box.
- To recover the instance in the stopped state, clear the check box.
- Click Save Changes.
Using the API
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.
Use this API operation to edit the maintenance recovery action for an instance: