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) vOCI 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
| Resource | Configuration |
|---|---|
| Region / AD | Hyderabad AD-1 |
| Compartment | EBS-OCI-LAB |
| Shape | VM.Standard.E2.1.Micro |
| OS | Oracle Linux 9.8 x86_64 |
| Private subnet | EBS-APP-PRIVATE |
| NSG | EBS-APP-NSG |
| Public IP | None |
| Storage | Default 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.






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.


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):
hostnamefree -mswapon --showcat /proc/cmdlinecat /sys/kernel/kexec_crash_sizesystemctl status sshd --no-pagersystemctl status kdump --no-pagerjournalctl -k --no-pager | grep -iE 'oom|out of memory|killed process'systemctl --failed --no-pagerps -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-killerOut 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=exclsudo chmod 600 /swapfile2sudo mkswap /swapfile2sudo swapon /swapfile2sudo 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/fstabsudo systemctl daemon-reloadsudo 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.servicesudo systemctl status dnf-makecache.service --no-pager -lvmstat 5 6PID=$(systemctl show dnf-makecache.service -p MainPID --value)# While the service is running and PID is nonzero:sudo cat /proc/$PID/iosleep 30sudo cat /proc/$PID/io
Metadata cache created.status=0/SUCCESS726.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.servicesudo systemctl reset-failed mcelog.service
7. Reboot validation and results
sudo syncsudo reboot
After reconnecting through the bastion, I ran:
uptimefree -mswapon --showdf -hT /systemctl --failed --no-pagersystemctl is-active sshdsystemctl is-enabled kdumpsystemctl is-enabled mcelogsudo cat /sys/kernel/kexec_crash_sizegrep -E 'swap' /etc/fstabsystemctl list-timers dnf-makecache.timer --no-pagersudo 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 availableMem: 945 505 199 440Swap: 2545 0 2545swapon --showNAME SIZE USED PRIO/.swapfile 498M 0B -2/swapfile2 2G 0B -3
| Metric | Before | After |
|---|---|---|
| OS-visible RAM | 498 MiB | 945 MiB (+89.8%) |
| Swap | 497 MiB | 2545 MiB |
| Crash reservation | 448 MiB | 0 |
| Failed services | 2 (DNF, mcelog) | 0 |
| DNF | OOM killed | Successful test |
| SSH | Initially unresponsive | Recovered 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
| Resource | Limit | Used | Available |
|---|---|---|---|
| E2 Micro quota | 2 | 2 | 0 |
| Regional free storage | 200 GB | 94 GB | 106 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.




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.
Leave a Reply