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.

When applicable, Oracle Cloud Infrastructure live migrates supported VM instances from the physical VM host that needs maintenance to a healthy VM host without disrupting running instances. If you do not want your instances live migrated, you can choose to receive a notification for the maintenance event. After you receive the notification, you have 14 days to reboot migrate your instance. The instance is only live migrated if you do not reboot the instance before the due date. If the instance can't be live migrated, reboot migration is used instead.

After a migration, by default the instance is recovered to the same lifecycle state as before the maintenance event. If you have an alternate process to recover the instance after a reboot migration, 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 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: 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 volume-family and virtual-network-family.

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 use the Console to configure live migration options as well as the lifecycle state of instances after a migration.

Configuring live migration

  1. Open the navigation menu and click Compute. Under Compute, click Instances.
  2. Click the instance that you're interested in.
  3. Click Edit.
  4. Click Show Advanced Options.
  5. In the Availability Configuration tab, in the Live migration section, select an option:
    • Let Oracle Cloud Infrastructure choose the best migration option: Select this option to let Oracle Cloud Infrastructure choose the best option to migrate the instance to a healthy physical VM host if an underlying infrastructure component needs to undergo maintenance.
    • Opt-in: Select this option to have the instance live migrated to a healthy physical VM host without any notification or disruption. If live migration isn't successful, reboot migration is used. Some shapes do not support live migration.
    • Opt-out: Select this option to have a notification sent for the maintenance event. The instance is live migrated if you do not proactively reboot the instance before the due date.
  6. Click Save Changes.

Configuring the lifecycle state

  1. Open the navigation menu and click Compute. Under Compute, click Instances.
  2. Click the instance that you're interested in.
  3. Click Edit.
  4. Click Show Advanced Options.
  5. In the Availability Configuration tab, 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.
  6. Click Save Changes.