Ol
Operating Systems Azure

Oracle Linux 8 (LVM) on Azure User Guide

| Product: Oracle Linux 8 (LVM) on Azure

Overview

This guide covers deploying and operating Oracle Linux 8 (LVM) on Microsoft Azure using cloudimg's pre configured virtual machine image from the Azure Marketplace.

Oracle Linux 8 is Oracle's binary compatible enterprise Linux distribution, built on the Unbreakable Enterprise Kernel (UEK). No application is preinstalled: the operating system itself is the product. The distinguishing feature of this image is its LVM disk layout — the root filesystem sits on a logical volume inside a volume group rather than on a fixed raw partition. That means you can extend the root volume onto a larger disk, add new logical volumes and reshape storage on a running system with standard LVM tooling, instead of being locked to the size and shape the image shipped with.

What's included:

  • Oracle Linux 8, fully binary compatible with Red Hat Enterprise Linux 8, on the Unbreakable Enterprise Kernel (UEK)
  • An LVM disk layout: the root filesystem is on a logical volume (rootvg/rootlv), so storage can be grown and managed with lvextend, vgextend and friends
  • lvm2 tooling installed so you can extend and add volumes out of the box
  • Brought fully up to date at build time (no pending security updates at capture)
  • Secure by default: SELinux in enforcing mode, key only SSH (password authentication disabled), root login locked
  • No baked in credentials: access is by the SSH key you choose at launch, so no two instances share a secret
  • Unattended security updates armed and proven (dnf-automatic.timer enabled, not just installed)
  • The undocumented rpcbind port (111) closed by default, while NFSv4 client capability is retained
  • Azure Linux Agent (waagent) for cloud integration, Chronyd for time synchronisation
  • Gen2 Hyper V virtual machine support
  • 24/7 cloudimg support

Platform: Microsoft Azure (Gen2 Hyper V) Default user: azureuser (created from the SSH key you supply at deploy time)

Prerequisites

Before deploying this image, ensure you have:

  1. An active Microsoft Azure subscription
  2. Access to the Azure Portal or Azure CLI
  3. An SSH key pair for Linux VM access
  4. Familiarity with Azure VM management

Recommended VM Size: Standard_B2s (2 vCPU, 4 GB RAM) or larger. Oracle Linux 8 runs comfortably on the whole B, D and E series; scale to suit your workload.

Step 1: Deploy the Virtual Machine

Option A: Azure Portal

  1. In the Azure Marketplace, search for "Oracle Linux 8 LVM cloudimg"
  2. Select the image and click Create
  3. Configure the basics:
  4. Subscription: your Azure subscription
  5. Resource Group: create new or select existing
  6. Virtual Machine Name: a name for your VM
  7. Region: your preferred Azure region
  8. Size: Standard_B2s recommended
  9. Under Administrator Account, select SSH public key and paste your public key. This key becomes the azureuser login; the image ships no password and no pre installed key.
  10. Under Inbound Port Rules, allow SSH (port 22)
  11. Click Review + Create, then Create

Option B: Azure CLI

az vm create \
  --resource-group myResourceGroup \
  --name my-oel8-lvm-vm \
  --image cloudimg:oracle-linux:oel8lvm:latest \
  --size Standard_B2s \
  --admin-username azureuser \
  --generate-ssh-keys \
  --public-ip-sku Standard

Step 2: Connect via SSH

Find your VM's public IP, then connect:

az vm show --resource-group myResourceGroup --name my-oel8-lvm-vm --show-details --query publicIps -o tsv
ssh azureuser@<public-ip>

Only the SSH key you supplied at deploy time is accepted. Password authentication is disabled on the image.

Step 3: Verify the Release

After connecting, confirm you are on Oracle Linux 8:

cat /etc/oracle-release
grep -E 'PRETTY_NAME|VERSION_ID' /etc/os-release
uname -r

Expected output:

Oracle Linux Server release 8.10
VERSION_ID="8.10"
PRETTY_NAME="Oracle Linux Server 8.10"
5.15.0-322.203.3.4.5.el8uek.x86_64

Verifying the Oracle Linux 8 release and UEK kernel

Step 4: Confirm the Image is Fully Patched

The image is shipped fully patched. You can confirm no security updates were outstanding at capture:

sudo dnf -q check-update ; echo "exit=$?  (100 = updates available, 0 = fully patched)"

A clean image returns exit=0.

Confirming the image is fully patched

Step 5: Review the Security Posture

This image is secure by default. Verify the key hardening properties:

getenforce
sudo sshd -T | grep -E '^passwordauthentication'
sudo passwd -S root | awk '{print $1, $2}'

Expected: SELinux Enforcing, passwordauthentication no, and root reported as LK (locked). Access is by your SSH key only.

Reviewing the default security posture

Step 6: The LVM Disk Layout

This is what makes this image different from a plain Oracle Linux 8 image: the root filesystem lives on an LVM logical volume, not a fixed partition. Inspect the layout:

lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT
findmnt -no SOURCE,FSTYPE /
sudo vgs
sudo lvs

You will see the root filesystem mounted from /dev/mapper/rootvg-rootlv (an LVM logical volume of type lvm), a volume group rootvg, and the logical volumes inside it. Because storage is managed by LVM, you are never boxed in by the shape the image shipped with.

The LVM disk layout showing the root filesystem on a logical volume

Growing the root filesystem

If you deployed with a larger OS disk (or resized it in Azure later), you can grow the root logical volume and its XFS filesystem online, with no reboot. First rescan the disk so the kernel sees the new size, then extend the physical volume, the logical volume, and finally the filesystem:

# Identify the physical volume backing rootvg (usually a partition on the OS disk)
sudo pvs
# Grow the partition table entry to fill the enlarged disk, then rescan
sudo growpart /dev/sda 5      # adjust the device/partition to match `pvs`
sudo pvresize /dev/sda5
# Extend the root logical volume to use all free space in the volume group
sudo lvextend -l +100%FREE /dev/rootvg/rootlv
# Grow the XFS filesystem to fill the enlarged logical volume (XFS grows online)
sudo xfs_growfs /
df -h /

Adding a new data volume

Attach a new data disk in Azure, then bring it under LVM management:

# Assume the new disk appears as /dev/sdc
sudo pvcreate /dev/sdc
sudo vgextend rootvg /dev/sdc                       # add capacity to the existing VG
sudo lvcreate -n datalv -l 100%FREE rootvg          # or grow rootlv instead
sudo mkfs.xfs /dev/rootvg/datalv
sudo mkdir -p /data
echo '/dev/rootvg/datalv /data xfs defaults,nofail 0 2' | sudo tee -a /etc/fstab
sudo mount /data

Step 7: Keeping the Image Up to Date

Unattended security updates are armed on this image out of the box — dnf-automatic.timer is enabled and its effective configuration applies all available updates automatically, not just security-tagged ones (Oracle's updateinfo errata feed is sparse, so a security-only policy can silently apply nothing; this image is deliberately configured to avoid that trap). Confirm it yourself:

systemctl is-enabled dnf-automatic.timer
sudo dnf-automatic --timer 2>&1 | tail -5

Because Oracle Linux 8 is the current major stream, the standard BaseOS and AppStream repositories are enabled so you can also update on your own schedule at any time:

  • Apply the latest updates within the Oracle Linux 8 stream:

bash sudo dnf update -y

  • Reboot if a new kernel was installed:

bash sudo dnf needs-restarting -r || sudo systemctl reboot

  • Review only security advisories before applying them:

bash sudo dnf updateinfo list security sudo dnf update --advisory=<ELSA-ID>

Oracle Linux 8 ships two supported kernel lines side by side: the Unbreakable Enterprise Kernel (kernel-uek-*, booted by default) and the Red Hat Compatible Kernel (kernel-*). Both stay current on this image; pick whichever your workload needs with grubby or the standard dnf kernel package names.

Step 8: Configure the Firewall (Optional)

The Azure Network Security Group (NSG) is the first line of network control. Oracle Linux also ships firewalld for host level rules:

sudo systemctl enable --now firewalld
sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --permanent --add-port=80/tcp
sudo firewall-cmd --permanent --add-port=443/tcp
sudo firewall-cmd --reload

Common Use Cases

  • Workloads that need to grow the root or data volumes over time without rebuilding the VM
  • RHEL 8 compatible enterprise applications that expect a flexible LVM storage layout
  • A patched, hardened Oracle Linux 8 base for teams standardising on LVM managed storage
  • Cloud native and container node images built on a known good enterprise OS

Troubleshooting

Cannot Connect via SSH

  1. Verify the VM is in Running state in the Azure Portal
  2. Check that port 22 is allowed in the Network Security Group
  3. Ensure you are using the correct username: azureuser
  4. Verify your SSH private key matches the public key configured at deployment. Password login is disabled by design.

Azure Agent Not Running

sudo systemctl start waagent
sudo systemctl enable waagent

Package Manager Issues

If repositories are unreachable, check DNS resolution, then retry:

nslookup yum.oracle.com
sudo dnf clean all && sudo dnf update -y

Need NFSv3 Client Support

rpcbind ships disabled so the image does not expose an undocumented listener on port 111. Oracle Linux 8's default NFSv4 does not need it; re-enable it only if you need NFSv3:

sudo systemctl enable --now rpcbind.socket

Important Notes

Oracle Linux is free and open source, and Oracle explicitly permits redistribution: Oracle provides the Oracle Linux binaries, updates and errata at no cost, and a paid Oracle Linux Support subscription is optional, never required to use, patch or resell the OS. This image is Oracle Linux the operating system — it is not Oracle Database and carries no Oracle Database licensing. The distribution is assembled from thousands of independently packaged components, each carrying its own licence (GPL, LGPL, MIT, BSD, Apache-2.0, MPL and more — readable with rpm -qi <package> and under /usr/share/licenses/). No licence fee or subscription is required to run this image. "Oracle Linux" is used here only to name the distribution the image contains; cloudimg is not affiliated with or endorsed by Oracle Corporation.

Support

For assistance with this image, contact cloudimg support: