TerraformPilot

DevOps

Terraform for Oracle Solaris Legacy on OCI

Manage Oracle Solaris legacy workloads with Terraform on Oracle Cloud Infrastructure: SPARC bare metal, ZFS, zones, and hybrid migration.

LLuca Berton1 min read

Oracle Solaris 11.4 is still maintained for Oracle's own customers in 2026. The realistic Terraform pattern uses the oci provider to provision OCI Compute instances (Solaris isn't an OCI image option, so most teams move workloads to Oracle Linux 9 — Terraform provisions both sides of the migration) plus the surrounding network.

Provision Oracle Linux Replacement

#
terraform {
  required_providers {
    oci = { source = "oracle/oci", version = "~> 7.0" }
  }
}
 
provider "oci" {
  tenancy_ocid = var.tenancy_ocid
  user_ocid    = var.user_ocid
  fingerprint  = var.fingerprint
  private_key_path = var.private_key_path
  region       = "us-ashburn-1"
}
 
data "oci_core_images" "ol9" {
  compartment_id           = var.compartment_id
  operating_system         = "Oracle Linux"
  operating_system_version = "9"
  shape                    = "VM.Standard.E5.Flex"
  sort_by                  = "TIMECREATED"
  sort_order               = "DESC"
}
 
resource "oci_core_instance" "replace_solaris" {
  availability_domain = data.oci_identity_availability_domain.ad1.name
  compartment_id      = var.compartment_id
  display_name        = "ol9-from-solaris"
  shape               = "VM.Standard.E5.Flex"
  shape_config { ocpus = 4; memory_in_gbs = 32 }
 
  source_details {
    source_type = "image"
    source_id   = data.oci_core_images.ol9.images[0].id
  }
 
  create_vnic_details {
    subnet_id = oci_core_subnet.private.id
  }
}

ZFS Migration to OCI Block Volume

#

OCI doesn't expose ZFS-as-a-service; either install ZFS-on-Linux on the new instance or move data into OCI Object Storage:

resource "oci_core_volume" "data" {
  availability_domain = data.oci_identity_availability_domain.ad1.name
  compartment_id      = var.compartment_id
  display_name        = "solaris-zpool-data"
  size_in_gbs         = 2000
}

Best Practices

#
  • Don't try to run Solaris on cloud VMs — most cloud hypervisors don't support it.
  • Mirror ZFS pool layout in ZFS-on-Linux if you need bytewise compatibility.
  • Use OCI FastConnect for the migration window — terabytes of zfs send streams hate VPN.
  • Tag everything Migration=from-solaris for tracking.
#
#Terraform#Solaris#Oracle Cloud#ZFS#Legacy

Share this article