Oracle Linux 9 (LVM) on Azure User Guide
Overview
This guide covers deploying and operating Oracle Linux 9 (LVM) on Microsoft Azure using cloudimg's pre configured virtual machine image from the Azure Marketplace.
Oracle Linux 9 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 9, fully binary compatible with Red Hat Enterprise Linux 9, 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 withlvextend,vgextendand friends lvm2tooling 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.timerenabled, not just installed) - The undocumented
rpcbindport (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:
- An active Microsoft Azure subscription
- Access to the Azure Portal or Azure CLI
- An SSH key pair for Linux VM access
- Familiarity with Azure VM management
Recommended VM Size: Standard_B2s (2 vCPU, 4 GB RAM) or larger. Oracle Linux 9 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
- In the Azure Marketplace, search for "Oracle Linux 9 LVM cloudimg"
- Select the image and click Create
- Configure the basics:
- Subscription: your Azure subscription
- Resource Group: create new or select existing
- Virtual Machine Name: a name for your VM
- Region: your preferred Azure region
- Size:
Standard_B2srecommended - Under Administrator Account, select SSH public key and paste your public key. This key becomes the
azureuserlogin; the image ships no password and no pre installed key. - Under Inbound Port Rules, allow SSH (port 22)
- Click Review + Create, then Create
Option B: Azure CLI
az vm create \
--resource-group myResourceGroup \
--name my-oel9-lvm-vm \
--image cloudimg:oracle-linux:oel9lvm: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-oel9-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 9:
cat /etc/oracle-release
grep -E 'PRETTY_NAME|VERSION_ID' /etc/os-release
uname -r
Expected output:
Oracle Linux Server release 9.8
VERSION_ID="9.8"
PRETTY_NAME="Oracle Linux Server 9.8"
6.12.0-204.92.4.4.3.el9uek.x86_64

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.

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.

Step 6: The LVM Disk Layout
This is what makes this image different from a plain Oracle Linux 9 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.

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 9 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 9 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 9 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 9 compatible enterprise applications that expect a flexible LVM storage layout
- A patched, hardened Oracle Linux 9 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
- Verify the VM is in Running state in the Azure Portal
- Check that port 22 is allowed in the Network Security Group
- Ensure you are using the correct username:
azureuser - 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 9'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:
- Website: www.cloudimg.co.uk
- Product Catalogue: www.cloudimg.co.uk/products
- User Guides: www.cloudimg.co.uk/guides
- SLA: 24 hour response guaranteed