How to Swap Your Oracle Cloud Boot Volume Without Rebuilding Your Server

 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


Think of your boot volume as the hard drive where your server's operating system lives. Traditionally, swapping it out meant shutting down your entire instance, deleting it, and creating a brand new one. That's time-consuming and risky.

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:

You'll need either a virtual machine or a bare metal instance. Beyond that, you need one of two things: a properly formatted block volume that already has a compatible operating system installed, or a backup image that matches your current setup.

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 


Oracle Cloud takes security seriously, which means you can't just make system-level changes without proper authorization. Your cloud administrator needs to grant you specific permissions through something called IAM policies.

The Permission Structure


There are different levels of permission you might receive. Some administrators prefer giving broad access across the entire cloud account (called a tenancy), while others limit permissions to specific compartments think of these as folders that organize your cloud resources.

At minimum, you need permission to manage instances or specifically to replace boot volumes. Your administrator will add you to a group with these rights. Without this setup, you'll get an "unauthorized" error when attempting the replacement.

Understanding the Safety Net


What happens if something goes wrong during the swap? Oracle has built in a rollback mechanism to protect you.

How Rollback Works:


If the replacement process hits a snag, the system automatically tries to restore everything to how it was before. It brings back your original settings, reconnects your volumes, and restarts your instance with the old boot volume. This safety feature works well in most situations, though there are rare edge cases where a complete restoration might not be possible. It's still good practice to have backups before making major changes.

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

you can replace your boot volume using several methods including Web interface (Console),  CLI and API. Below steps show you - how to do it with Web interface while logging into the OCI console.

  • 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:
                >  "Select from a list" - Browse available volumes from a dropdown menu
                >  "Input OCID" - Directly paste the unique identifier if you already know it  
  • 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




If you're going with an existing boot volume, you can either pick it from the compartment-filtered dropdown list or enter its OCID - a unique identifier string that Oracle assigns to every resource. The OCID method is faster if you already know the specific volume you want. Similarly, if you're using an image to create a new boot volume, you can browse through available images or paste in an image OCID directly.

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
                      - Click "Add item" to insert new metadata pairs
                      - 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


If you prefer automation or working in scripts, Oracle's Command Line Interface (CLI) lets you perform boot volume replacements programmatically. You'll use the instance update command with a JSON file that describes the changes you want to make. This JSON file contains all the specifications for your instance, including the new boot volume details. The CLI approach is particularly useful when managing multiple instances or integrating this process into larger automation workflows. You can generate example JSON files to see the correct format, then modify them for your needs.


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.

OCI Networking Series – Part 7: Monitoring & Troubleshooting OCI Networks

Designing a secure and scalable OCI network is only half the job. In real-world enterprise environments, networks evolve continuously—routes change, security rules get updated, hybrid links fluctuate, and workloads scale dynamically. Without strong observability and troubleshooting capabilities, even the best-designed architectures can fail operationally.

Oracle Cloud Infrastructure (OCI) provides native tools that give deep visibility into network behavior, traffic flows, routing decisions, and connectivity paths. 

This blog focuses on how to monitor, analyze, and troubleshoot OCI networks effectively using Flow Logs, Logging Analytics, Path Analyzer, and operational diagnostic tools.

1. VCN Flow Logs – Foundational Network Visibility


What VCN Flow Logs Are

VCN Flow Logs capture metadata about IP traffic flowing to and from a VNIC or subnet within a VCN. They do not capture packet payloads; instead, they record key attributes such as source and destination IP, ports, protocol, action (ALLOW/DENY), bytes transferred, and timestamps.

Flow Logs provide a factual record of how network security and routing decisions are applied in practice—not how they are intended to work.

Why Flow Logs Are Critical

Flow Logs form the ground truth for network troubleshooting. When traffic fails, they help answer questions like:

  • Did the packet reach the subnet or VNIC?
  • Was it allowed or denied?
  • Which port or protocol was involved?
  • Was the issue security-related or routing-related?
Without Flow Logs, architects often rely on assumptions.

How to Enable VCN Flow Logs

  • Navigate to Networking → Virtual Cloud Networks.
  • Select the Subnet and select monitoring tab
  • Enable Flow Logs.
  • Select or create a Log Group.
  • Save the configuration.
















Like shown in the above diagram, we can enable the flow logs for the subnet, it will show what traffic is coming to the selected subnet, whether its accepted or rejected with source and destination IP details.




















You can also select the log retention period as it takes the cost for the object storage space. By default its 30 days as shown in the above diagram.

Common Use Cases

  • Troubleshooting “instance not reachable” issues.
  • Verifying NSG or Security List behavior.
  • Auditing hybrid traffic entering via DRG.
  • Identifying suspicious inbound connection attempts.

2. Logging Analytics – Making Sense of Flow Logs at Scale


What Logging Analytics Is

Logging Analytics is OCI’s centralized log analytics and observability platform. It ingests logs (including VCN Flow Logs), indexes them, applies machine learning, and presents insights through dashboards, queries, and alerts.

While Flow Logs capture raw data, Logging Analytics turns data into insights.

Why Logging Analytics Matters

In large environments, Flow Logs can generate millions of records. Logging Analytics enables:

  • Pattern detection (normal vs abnormal traffic)

  • Traffic trend analysis over time

  • Rapid filtering of denied or suspicious flows

  • Correlation across network, compute, and application logs

It significantly reduces mean time to resolution (MTTR).


How to Enable Logging Analytics

  1. Navigate to Observability & Management → Logging Analytics.

  2. Enable the Logging Analytics service for the tenancy.

  3. Grant required IAM policies for log ingestion.

  4. In OCI Logging, configure Flow Logs to be forwarded to Logging Analytics.

  5. Use built-in parsers and dashboards to visualize traffic.



you can enable the logging analytics from the home screen as highlighted in below screen.











Common Use Cases

  • Identifying spikes in denied traffic after rule changes.

  • Monitoring hybrid connectivity stability.

  • Investigating security incidents using historical logs.

  • Creating alerts for repeated denied connections.


3. Path Analyzer – Understanding Routing and Security Decisions


What Path Analyzer Does

Path Analyzer simulates the network path traffic would take between two endpoints in OCI. It evaluates route tables, gateways, NSGs, security lists, and 
DRG attachments to determine whether traffic is allowed and how it is routed.

This is not packet capture—it is deterministic path simulation based on configuration.


Why Path Analyzer Is Essential

In complex environments—hub-spoke VCNs, hybrid connectivity, multi-region architectures—routing behavior can be difficult to predict. Path Analyzer eliminates guesswork by showing:

  • Which route table is selected
  • Which gateway is used
  • Whether security rules allow traffic
  • Where traffic would be dropped

How to Use Path Analyzer

  • Navigate to Networking → Network Path Analyzer.
  • Define the Source (instance, VNIC, or IP).
  • Define the Destination (instance, CIDR, on-prem IP).
  • Select protocol and port.
  • Run the analysis to view the simulated path and results.






















you can do bidirectional as well as unidirectional analysis also depending on the issue.





















Once you have given all the source, destination, port, protocol and direction details then run the analysis.


Common Use Cases

  • Debugging hub-spoke connectivity failures.
  • Validating DRG routing logic.
  • Troubleshooting asymmetric routing.
  • Confirming hybrid traffic paths.
  • Diagnosing backend reachability behind load balancers.

4. Common OCI Networking Troubleshooting Scenarios


Instance Not Reachable

This typically results from:
  • Missing or incorrect route table entries.
  • NSG or Security List blocking traffic.
  • Incorrect gateway (IGW vs NAT).
  • OS-level firewall restrictions.
Flow Logs identify denies, while Path Analyzer reveals routing issues.


Hybrid Connectivity Issues

Common causes include:
  • IPSec tunnel down or BGP not established.
  • Overlapping CIDR blocks.
  • Incorrect DRG route table association.
  • MTU mismatches causing silent packet drops.
  • Missing return routes on on-prem routers.
Hybrid issues often require validating both OCI and customer-edge configuration.


Routing Conflicts

These occur due to:
  • Overlapping VCN CIDRs.
  • Incorrect DRG attachment route priorities.
  • Multiple gateways competing for the same prefix.
Path Analyzer is the fastest way to isolate such issues.

Conclusion


Monitoring and troubleshooting are not optional in cloud networking—they are foundational. OCI provides a robust set of native tools that allow architects to observe 
real traffic behavior, simulate routing decisions, and diagnose issues across VCNs, DRGs, and hybrid environments. By combining Flow Logs, Logging Analytics, Path Analyzer, and operational tools like CLI and traceroute, teams can significantly reduce outages, improve reliability, and maintain confidence in complex OCI network architectures.

This concludes the OCI Networking Series, where we explored networking from fundamentals to advanced monitoring and troubleshooting. Thank you for following along — see you soon in the next one...!!!!

Happy Networking. :)