Tag: Always Free

  • Oracle EBS Home Lab on OCI – Part 2: Private Compute, SSH Troubleshooting and Linux Memory Optimization

    Alhamdulillah, in Part 1 I built the OCI networking foundation and public bastion, and encountered compute capacity constraints. In Part 2 I deploy a private Oracle Linux instance, investigate SSH banner timeouts and memory pressure, and validate the fixes after reboot without resizing the instance. This is an infrastructure lab, not an EBS installation.

    Key Results

    RAM: 498 → 945 MiB (+89.8%). Swap: 497 → 2545 MiB. Failed services: 2 → 0.

    DNF completed in 10 minutes 55 seconds. SSH was responsive before remediation and again after reboot. Recorded OCI cost for December 1–5: SGD 0.00.

    1. Lab architecture

    Windows workstation
    | SSH TCP 22 (source-restricted)
    v
    OCI VCN 10.20.0.0/16 — Hyderabad
    Public subnet 10.20.1.0/24
    EBS-BASTION-01 (10.20.1.99)
    | SSH TCP 22 (private)
    v
    Private subnet 10.20.2.0/24
    EBS-APP-LAB-01 (10.20.2.198)
    No public IP

    2. Private compute provisioning

    ResourceConfiguration
    Region / ADHyderabad AD-1
    CompartmentEBS-OCI-LAB
    ShapeVM.Standard.E2.1.Micro
    OSOracle Linux 9.8 x86_64
    Private subnetEBS-APP-PRIVATE
    NSGEBS-APP-NSG
    Public IPNone
    StorageDefault boot volume; no additional volume

    The provisioning work request succeeded on December 5 at 19:16:31 UTC. I generated a separate SSH key pair for the private instance.

    AMD Micro compute shape selection
    AMD Micro compute shape selection
    Private network configuration
    Private network configuration
    Public IP disabled for the application instance
    Public IP disabled for the application instance
    Successful compute instance provisioning
    Successful compute instance provisioning
    Private application instance shape details
    Private application instance shape details
    Private VNIC configuration
    Private VNIC configuration

    3. SSH connectivity troubleshooting

    The initial connection through the bastion timed out during banner exchange. From Windows PowerShell I used separate keys (paths and public IP anonymized):

    $BastionKey = "<path-to-bastion-key>"
    $AppKey = "<path-to-app-key>"
    ssh -i "$AppKey" -o IdentitiesOnly=yes -o ConnectTimeout=60 -o "ProxyCommand=ssh -i $BastionKey -o IdentitiesOnly=yes -W %h:%p opc@<BASTION_PUBLIC_IP>" opc@10.20.2.198

    Verify the server host key through a trusted channel before accepting it. From the bastion, TCP port 22 was reachable, but the server banner was absent. A successful TCP handshake does not establish SSH protocol health.

    timeout 10 bash -c 'echo > /dev/tcp/10.20.2.198/22'
    timeout 30 bash -c 'exec 3<>/dev/tcp/10.20.2.198/22; head -n 1 <&3'

    SSH recovered by approximately 21:31 UTC, roughly two hours and fifteen minutes after provisioning. The precise outage duration was not measured. No network or OS changes preceded recovery. Later kernel evidence suggests DNF memory pressure during the first hours likely impaired SSH responsiveness; this is an inference, not proof of every timeout.

    4. Console history, IAM and Run Command

    Console history showed a completed boot and a login prompt. The Cloud Shell serial console was accessible, but I had no password for opc. The Run Command plugin was running, yet the initial command stayed Accepted until I configured instance-agent IAM access.

    Accessing OCI console history
    Accessing OCI console history
    Saved OCI console history
    Saved OCI console history

    I created EBS-APP-LAB-DG in the Default identity domain and EBS-APP-LAB-RUNCOMMAND-POLICY in the lab compartment.

    Matching rule:
    instance.id = '<APPLICATION_INSTANCE_OCID>'
    Policy statement:
    Allow dynamic-group EBS-APP-LAB-DG to use instance-agent-command-execution-family in compartment EBS-OCI-LAB where request.instance.id=target.instance.id

    The operator also needs permission to create commands. Oracle documents the following example; it is a reference policy, not an additional policy I created in this lab.

    Allow group RunCommandUsers to manage instance-agent-command-family in compartment EBS-OCI-LAB

    See Oracle IAM policy guidance for instances. I did not create a separate operator policy; the existing permissions allowed me to submit the command. The command succeeded about ten minutes after the agent policy was created.

    The diagnostic script included these commands (section labels omitted):

    hostname
    free -m
    swapon --show
    cat /proc/cmdline
    cat /sys/kernel/kexec_crash_size
    systemctl status sshd --no-pager
    systemctl status kdump --no-pager
    journalctl -k --no-pager | grep -iE 'oom|out of memory|killed process'
    systemctl --failed --no-pager
    ps -eo pid,user,%mem,%cpu,comm --sort=-%mem | head -15

    The response was truncated, but confirmed 498 MiB RAM, 497 MiB swap and a 469762048-byte crash kernel reservation (448 MiB). Oracle documents the plain-text output limit and agent privilege requirements in its Run Command guide.

    5. OOM investigation and memory optimization

    Kernel logs, read after SSH recovery, showed the following events on December 5 at 21:18 UTC:

    sshd-session invoked oom-killer
    Out of memory: Killed process 9787 (dnf)

    The two failed services were dnf-makecache.service (OOM kill) and mcelog.service (unsupported AMD processor). DNF, not sshd-session, was the process killed in this event. SSH was confirmed responsive by approximately 21:31 UTC, about 13 minutes after the OOM kill. This timing supports the memory-pressure hypothesis but does not establish causation.

    I repeated the GRUB backup, default-kernel crashkernel removal and swap procedure documented in Part 1, section 6. On this host the original crashkernel reservation was 448 MiB and the original swap was only 497 MiB. I preserved alternate and rescue boot entries, verified the backup, disabled kdump and removed crashkernel from the default UEK entry and GRUB defaults before rebooting.

    Key finding: The 448 MiB crashkernel reservation represented about 44% of the nominal 1 GiB memory capacity. Removing it recovered 447 MiB of OS-visible RAM without resizing the instance. Disabling kdump sacrifices crash dump collection. This was a lab-specific decision, not a general production recommendation.

    After reboot, OS-visible RAM was 945 MiB. I added 2 GiB swap on the existing XFS root filesystem, using dd instead of fallocate to avoid potential swap-file allocation issues on XFS. I backed up fstab before adding the entry.

    sudo dd if=/dev/zero of=/swapfile2 bs=1M count=2048 status=progress conv=excl
    sudo chmod 600 /swapfile2
    sudo mkswap /swapfile2
    sudo swapon /swapfile2
    sudo cp -p /etc/fstab /etc/fstab.bak_$(date +%Y%m%d_%H%M%S)
    grep -qE '^/swapfile2[[:space:]]' /etc/fstab || echo '/swapfile2 none swap sw 0 0' | sudo tee -a /etc/fstab
    sudo systemctl daemon-reload
    sudo findmnt --verify --verbose

    6. DNF validation and AMD mcelog

    The DNF metadata cache test ran from 21:50:15 to 22:01:10 UTC (10 minutes 55 seconds). During the test, swap usage exceeded 2 GiB and sampled I/O wait reached 56%. I compared process I/O counters to establish that work continued despite temporary D-state waits.

    sudo systemctl start --no-block dnf-makecache.service
    sudo systemctl status dnf-makecache.service --no-pager -l
    vmstat 5 6
    PID=$(systemctl show dnf-makecache.service -p MainPID --value)
    # While the service is running and PID is nonzero:
    sudo cat /proc/$PID/io
    sleep 30
    sudo cat /proc/$PID/io
    Metadata cache created.
    status=0/SUCCESS
    726.3M memory peak

    No new OOM messages were detected. Separately, mcelog rejected AMD EPYC 7551 family 23 and suggested edac_mce_amd. Oracle documents this behavior in its Oracle Linux 8.10 release notes. The notes concern OL8.10, not OL9. The edac_mce_amd module existed on my OL9 guest but was not loaded. I disabled the failing daemon; replacement hardware error monitoring was not configured or validated.

    sudo systemctl disable --now mcelog.service
    sudo systemctl reset-failed mcelog.service

    7. Reboot validation and results

    sudo sync
    sudo reboot

    After reconnecting through the bastion, I ran:

    uptime
    free -m
    swapon --show
    df -hT /
    systemctl --failed --no-pager
    systemctl is-active sshd
    systemctl is-enabled kdump
    systemctl is-enabled mcelog
    sudo cat /sys/kernel/kexec_crash_size
    grep -E 'swap' /etc/fstab
    systemctl list-timers dnf-makecache.timer --no-pager
    sudo journalctl -k -b --no-pager | grep -iE 'oom|out of memory|killed process'

    Selected values from the final post-reboot checks at 22:17 UTC (abridged output):

    free -m
    total used free available
    Mem: 945 505 199 440
    Swap: 2545 0 2545
    swapon --show
    NAME SIZE USED PRIO
    /.swapfile 498M 0B -2
    /swapfile2 2G 0B -3
    MetricBeforeAfter
    OS-visible RAM498 MiB945 MiB (+89.8%)
    Swap497 MiB2545 MiB
    Crash reservation448 MiB0
    Failed services2 (DNF, mcelog)0
    DNFOOM killedSuccessful test
    SSHInitially unresponsiveRecovered before changes; responsive after reboot

    Both swap files activated automatically, root filesystem usage was 29%, and the DNF timer remained scheduled. Long-term stability is not yet established.

    8. Free Tier costs and lessons learned

    ResourceLimitUsedAvailable
    E2 Micro quota220
    Regional free storage200 GB94 GB106 GB

    Cost Analysis for December 1–5, 2026 UTC recorded SGD 0.00 across Compute, Block Storage, Database, Telemetry and Virtual Cloud Networking. Reporting delays remain possible.

    E2 Micro quota: 2 of 2 used
    E2 Micro quota: 2 of 2 used
    Regional Free Tier storage: 94 of 200 GB used
    Regional Free Tier storage: 94 of 200 GB used
    Cost Analysis: SGD 0.00 recorded
    Cost Analysis: SGD 0.00 recorded
    Daily service-wise cost details: SGD 0.00
    Daily service-wise cost details: SGD 0.00

    The two Micro slots are now occupied. A1 capacity was unavailable during Part 1; neither quota nor free eligibility guarantees host capacity. Oracle also warns that idle Always Free compute may be reclaimed; see Always Free Resources. If an idle instance is reclaimed, its configuration may be lost; retain independent backups.

    Conclusion

    Alhamdulillah, the private instance is accessible and the changes survived reboot. The key lessons were that TCP reachability does not guarantee SSH responsiveness, Run Command depends on agent IAM authorization, and a 448 MiB crash reservation is significant on a 1 GB host. The successful DNF test required substantial swap and I/O, illustrating why Micro instances are suitable for infrastructure experiments rather than EBS workloads. For the next installment I plan to explore local x86 EBS installation readiness without provisioning additional paid OCI resources.

    Disclaimer: This is a personal home-lab project for learning and knowledge sharing. Hostnames and private IP addresses are lab values. Public IP addresses and instance identifiers in commands are anonymized. The configuration changes are specific to this lab and are not production recommendations.

  • Oracle EBS Home Lab on OCI – Part 1: Networking, Bastion and Always Free Limits

    1. Lab objective

    Alhamdulillah, I started exploring Oracle Cloud Infrastructure (OCI) as a possible platform for extending my Oracle E-Business Suite home lab. My objective was to build the initial network and administrative access using Always Free eligible resources, without additional expenditure. My existing VirtualBox home lab lets me test Oracle software locally; OCI gives me a way to explore cloud networking and infrastructure provisioning separately. This article documents the infrastructure phase, not a completed EBS installation.

    2. Compartment and VCN

    I created a dedicated compartment named EBS-OCI-LAB in the Hyderabad region and a VCN named EBS-OCI-VCN with CIDR 10.20.0.0/16. I kept the lab resources in their own compartment so I could track them separately.

    Creating the virtual cloud network
    Creating the virtual cloud network
    VCN configuration details
    VCN configuration details

    3. Network architecture

    The design separates the public administrative subnet (10.20.1.0/24) from the private application (10.20.2.0/24) and database (10.20.3.0/24) subnets. The application and database compute instances remain planned. An Internet Gateway supports public connectivity, a NAT Gateway supports outbound connectivity for private resources, and a Service Gateway provides access to supported Oracle services.

    Private application and database subnets
    Private application and database subnets
    OCI route tables
    OCI route tables
    Creating the NAT Gateway
    Creating the NAT Gateway
    Route rules
    Route rules
    Internet Gateway
    Internet Gateway
    Bastion subnet route table
    Bastion subnet route table

    4. Security configuration

    I configured network security groups and reviewed ingress and egress rules. The intended design restricts administrative SSH access and avoids public IP addresses on application and database servers. Private-tier connectivity has not yet been validated end to end.

    Application security rules
    Application security rules
    Database security rules
    Database security rules

    5. Bastion compute

    I provisioned EBS-BASTION-01 using Oracle Linux 9.8 on the AMD-based VM.Standard.E2.1.Micro shape and established SSH connectivity using MobaXterm. This is a self-managed jump host, not the OCI managed Bastion service. During initial testing, SSH returned a connection refused error and I used the boot console to investigate. SSH access was subsequently restored; the original cause of the refusal was not conclusively established.

    ssh -i /path/to/private_key opc@<BASTION_PUBLIC_IP>

    6. Linux memory troubleshooting

    The small Bastion instance had approximately 498 MiB of OS-visible RAM in my earlier lab observations. I investigated the crashkernel reservation and backed up the boot configuration before making changes. The original before-change terminal output has not been recovered.

    The following commands are the actual historical procedure from my shell history, not commands to repeat on an already configured host. Disabling kdump removes kernel crash dump capability and is a lab-specific decision.

    Step 1: Disable kdump and back up the boot configuration

    sudo systemctl disable --now kdump.service
    BACKUP_DIR="/root/grub_backup_$(date +%Y%m%d_%H%M%S)"
    sudo mkdir -p "$BACKUP_DIR"
    sudo cp -a /etc/default/grub "$BACKUP_DIR/"
    sudo cp -a /boot/loader/entries "$BACKUP_DIR/"
    sudo grubby --info=ALL | sudo tee "$BACKUP_DIR/grubby_info.txt" >/dev/null

    Step 2: Remove the reservation from the default kernel and reboot

    sudo grubby --update-kernel="$(sudo grubby --default-kernel)" --remove-args="crashkernel"
    sudo grubby --info=DEFAULT
    sudo reboot

    Step 3: After reboot, remove the old reservation from the GRUB defaults

    sudo sed -i 's/ crashkernel=1G-64G:448M,64G-:512M//g' /etc/default/grub

    Step 4: Validate the running configuration

    free -m
    sudo cat /sys/kernel/kexec_crash_size
    cat /proc/cmdline
    sudo grep GRUB_CMDLINE_LINUX /etc/default/grub
    systemctl is-active sshd systemd-journald
    systemctl is-enabled kdump.service
    systemctl is-active kdump.service

    My subsequent validation returned the following memory output:

                   total        used        free      shared  buff/cache   available
    Mem:             945         328         532           0         221         617
    Swap:            944         294         650

    The crashkernel reservation was 0 bytes. Both the running kernel command line and GRUB defaults no longer contained the crashkernel reservation argument. SSH and systemd-journald were active, while kdump was disabled and inactive.

    Even with the extra usable RAM from removing crashkernel, kernel logs showed 15 DNF out-of-memory kills between December 1 and 3, 2026. I added a second 2 GiB swap file on the existing boot volume, bringing total swap to 2,992 MiB. The next metadata refresh completed successfully in 10 minutes and 11 seconds without new OOM events. After configuring swap persistence, systemctl --failed listed zero failed units.

    sudo cp -p /etc/fstab /etc/fstab.bak_$(date +%Y%m%d_%H%M%S)

    I added /swapfile2 none swap sw 0 0 to /etc/fstab and reloaded systemd. Activation after reboot was not tested. The detailed DNF troubleshooting is a topic for a separate follow-up.

    7. Terraform and Resource Manager

    I created a Resource Manager stack and ran Terraform Plan successfully. The subsequent Apply failed during instance provisioning. The OCI Resource Manager job logs confirmed the exact error: 500-InternalError, Out of host capacity. The failure occurred during LaunchInstance in ap-hyderabad-1 on December 2, 2026, using OCI Terraform provider 9.15.0. The Plan succeeded in 48 seconds, while Apply failed after 43 seconds. This identifies a host capacity failure during provisioning.

    8. Always Free capacity and architecture

    On December 2, 2026 (IST), my attempts to provision VM.Standard.A1.Flex in Hyderabad AD-1 encountered insufficient host capacity, including attempts with different memory configurations and fault-domain selections. Although the shape was eligible for Always Free, I could not provision it during my attempts. Ampere A1 is ARM-based and should not be assumed compatible with a conventional EBS x86-64 deployment. I have not verified EBS certification on ARM, so I will use x86-64 for the planned EBS installation.

    Browsing available compute shapes
    Browsing available compute shapes
    Compute shape options
    Compute shape options

    9. Cost considerations

    On December 4, 2026 (IST), I reviewed OCI Cost Analysis for December 1–3 (UTC). No charges were recorded across Compute, Block Storage, Database, Telemetry and Virtual Cloud Network services. Usage reporting may be delayed by approximately 24 hours, and the invoice may differ from the estimate.

    I also checked the failed Apply job’s Job resources tab, which displayed no items. A full compartment inventory has not yet been verified.

    10. Conclusion

    Alhamdulillah, the initial networking and administrative host were established. The Bastion was operational after crashkernel removal and additional swap, with zero failed services at the final check and no cloud charges recorded at the time of validation. The application and database tiers remain pending. For my next attempt, I would validate compute availability and EBS platform compatibility before investing more time in provisioning. In a future part, I intend to explore suitable compute options and validate private connectivity. Happy Learning!