If you're running servers on Oracle Cloud Infrastructure, there might come a time when you need to change the boot volume disk that contains your operating system. Maybe something went wrong, or perhaps you want to upgrade to a newer version. The good news? You don't have to tear everything down and start from scratch.
What This Feature Does
Oracle Cloud now lets you hot-swap this boot volume. Your instance pauses momentarily, switches to the new boot volume, and comes back up - almost like restarting your computer with a different hard drive. Everything else about your server stays the same.
Before You Start: What Works and What Doesn't
Not every server and operating system can use this feature. Here's what you need to know:Operating System Limitations:
This feature only
works with Linux-based systems. If you're running Windows servers or using
marketplace images (pre-configured software packages from Oracle's
marketplace), you'll need to stick with the traditional rebuild method.
Additionally, you can't switch between different Linux flavors. Running Oracle
Linux? You must replace it with another Oracle Linux boot volume. You can't
suddenly switch to Ubuntu or any other distribution during the swap.
What Your Instance Needs:
The technical bit here involves launch options - basically, the way your boot volume connects to your instance needs to match between the old and new volumes. If they don't align, Oracle won't let you proceed.
Getting Permission to Make Changes
The Permission Structure
Understanding the Safety Net
How Rollback Works:
One important detail: if you were replacing your boot volume with a newly created image and the rollback kicks in, that new boot volume gets deleted automatically. However, if you specified an existing volume by its ID, rollback keeps that volume around it just doesn't use it.
Replacing Your Boot Volume
- Log into the Oracle Cloud console and navigate to the Compute section. Find the Instances page and click on the specific server you want to modify.
- Once you're viewing its details, look for the "More Actions" dropdown menu and select "Replace Boot Volume."
First, decide
what happens to your current boot volume. You'll see an option called
"Preserve Boot Volume." If you enable this, your old boot volume
sticks around after the replacement succeeds, useful if you want to keep it as
a backup. If you disable it, the old volume gets deleted, freeing up storage
space and reducing costs.
Selecting Your Replacement
You have two main approaches here: using an existing boot volume or creating one from an image.In the
replacement dialog, you'll see several options:
- Preserve boot volume toggle: A switch at the top that controls whether your old boot volume is kept or deleted after successful replacement
- Replace by section: Two radio buttons letting you choose between "Boot volume" or "Image" as your replacement source
- Apply boot volume by: Two methods to specify your volume:
- Boot volume compartment: A dropdown to select which compartment to search in for available volumes
- Boot volume: The main dropdown where you pick your specific volume from the filtered list
Advanced Configuration Options
Beyond the basic replacement, Oracle provides advanced options to customize your new boot volume:
- Metadata section: Add custom key/value pairs such as SSH public keys needed to connect to the instance after replacement. This is particularly useful when you're switching to a fresh operating system installation and need to ensure you can access it
- Each pair has a Name field and Value field
- Use the X button to remove unwanted entries
- Extended metadata section: Provide additional metadata pairs that serve the same purpose as the standard metadata. This gives you extra flexibility for complex configurations where you need to pass multiple custom values to your instance
These advanced options ensure that when your instance boots up with the new volume, it has all the configuration details it needs to function properly in your environment.
Once you've made all your selections, hit the Replace button and let Oracle handle the rest. Your instance will stop, perform the swap, and restart automatically.
Working From the Command Line
Using Oracle's REST API
For developers building applications or custom tools, Oracle provides a REST API that exposes the boot volume replacement functionality. You can integrate this directly into your code using one of Oracle's SDKs or by making raw HTTP requests.
The key API operation is UpdateInstance, which handles boot volume replacement along with other instance modifications. You'll need to properly authenticate your API requests using Oracle's security credentials system.
When to Use This Feature
Boot volume replacement shines in several scenarios. Maybe you discovered your current operating system installation has issues and you have a clean backup image. Rather than manually fixing problems, you can swap to the backup and get running quickly. Perhaps you're standardizing your server configurations across a fleet of instances. You can create one perfect boot volume, then replicate it across multiple servers without rebuilding each one from scratch.
This feature also helps with disaster recovery. Keep recent boot volume backups, and if something catastrophic happens, you can roll back to a known-good state in minutes rather than hours.
Final Thoughts
Oracle Cloud's boot volume replacement feature removes a lot of friction from server maintenance. Instead of the old approach of destroying and recreating instances, you can now swap boot volumes like changing batteries - the device stays the same, you're just swapping out one component. Just remember the limitations: Linux only, matching distributions required, and you need proper permissions. Within those boundaries, this tool gives you flexibility to maintain, upgrade, and recover your cloud infrastructure with minimal downtime.
Whether you're a system administrator managing a handful of servers or a DevOps engineer orchestrating hundreds, having the ability to replace boot volumes without rebuilding instances makes life considerably easier.










