Oracle Linux 7.9 on Azure User Guide
Videos
Overview
This guide covers the deployment and configuration of Oracle Enterprise Linux 7.9 on Microsoft Azure using cloudimg's pre configured virtual machine image from the Azure Marketplace.
What's included:
- Oracle Enterprise Linux 7.9, patched to the final Oracle Linux 7 errata available at build time
- Unbreakable Enterprise Kernel (UEK) for enhanced performance
- Azure Linux Agent (waagent), installed but shipped disabled: enable it at deploy time (Step 1) or right after your first login (Step 2)
- Chronyd for NTP time synchronisation
- SELinux set to permissive in
/etc/selinux/config - cloudimg's support team on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours
Platform: Microsoft Azure (Gen2 Hyper V)
Default user: azureuser
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.
Step 1: Deploy the Virtual Machine
Option A: Azure Portal
- Navigate to the Azure Marketplace and search for "Oracle Linux 7.9 on Azure cloudimg"
- Select the image and click Create
- Configure the basics:
- Subscription: Select your Azure subscription
- Resource Group: Create new or select existing
- Virtual Machine Name: Enter a name for your VM
- Region: Select your preferred Azure region
- Size:
Standard_B2srecommended - Under Administrator Account, select SSH public key and enter your key
- Under Inbound Port Rules, allow SSH (port 22)
- On the Advanced tab, paste the cloud-init below into Custom data, so the Azure Linux Agent is switched on at first boot (see "Why enable the Azure Linux Agent" below)
- Click Review + Create, then Create
#cloud-config
runcmd:
- [systemctl, enable, --now, --no-block, waagent]
Option B: Azure CLI
az vm image terms accept --urn cloudimg1647283583153:oracle-linux-7:default:latest
cat > enable-waagent.yaml <<'YAML'
#cloud-config
runcmd:
- [systemctl, enable, --now, --no-block, waagent]
YAML
az vm create \
--resource-group myResourceGroup \
--name my-oracle-linux-7-azure-vm \
--image cloudimg1647283583153:oracle-linux-7:default:latest \
--size Standard_B2s \
--admin-username azureuser \
--generate-ssh-keys \
--public-ip-sku Standard \
--custom-data enable-waagent.yaml
Why enable the Azure Linux Agent
This image is provisioned by cloud-init, and the Azure Linux Agent (waagent) ships installed but disabled. Your VM deploys and you can log in with SSH either way, but until the agent runs the portal shows Agent status: Not Ready, and everything that works through the agent fails: VM extensions (including the ones Azure Policy, Microsoft Defender for Cloud or Azure Monitor add automatically), Run Command, the portal's Reset password, and Azure Backup. The custom data above switches it on at first boot. If you deployed without it, run the command in Step 2 once after you log in.
Step 2: Connect via SSH
Once your VM is running, connect using SSH:
ssh azureuser@<public-ip-address>
If you did not pass the custom data in Step 1, switch the Azure Linux Agent on now (it starts immediately and stays on after reboots):
sudo systemctl enable --now waagent
To find your VM's public IP:
az vm show --resource-group myResourceGroup --name my-oracle-linux-7-azure-vm --show-details --query publicIps -o tsv
Step 3: Verify the Installation
After connecting, verify the operating system:
cat /etc/os-release
uname -r
Check disk space and memory:
df -h
free -h
Check the Azure Linux Agent:
systemctl status waagent
It should show active (running). If it shows inactive (dead), the agent was not enabled at deploy time; enable it now, and within a minute or two the portal's Agent status changes to Ready:
sudo systemctl enable --now waagent
systemctl is-active waagent
Step 4: Update the System
Keep your system up to date with the latest security patches:
sudo yum update -y
Step 5: Configure Firewall (Optional)
The Azure Network Security Group (NSG) controls inbound and outbound traffic. You can also configure the local firewall:
sudo firewall-cmd --list-all
To allow additional ports:
sudo firewall-cmd --permanent --add-port=80/tcp
sudo firewall-cmd --permanent --add-port=443/tcp
sudo firewall-cmd --reload
Common Use Cases
- Legacy Oracle Database hosting (11g, 12c)
- Enterprise applications requiring RHEL 7 compatibility
- Migration of on premises Oracle Linux 7 workloads to Azure
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 key matches the one configured during deployment
Azure Agent Not Running, or the Portal Shows "Agent status: Not Ready"
The agent ships disabled (see Step 1). Extensions, Run Command, Reset password and Azure Backup fail until it runs. Enable it:
sudo systemctl enable --now waagent
Once the portal shows Ready, retry the extension, Run Command or password reset that failed.
Reset Password Says "Succeeded" but the New Password Is Refused
The portal's Reset password needs the Azure Linux Agent running (see above). On this image the reset sets the password and turns on SSH password logins, but the SSH service keeps its old settings until it restarts. After a reset, Restart the VM from the portal (or, if you can still log in with your key, run sudo systemctl restart sshd), then log in with the new password. A reset also makes sudo ask for that password.
Package Manager Issues
sudo yum update -y
If repositories are unreachable, check DNS resolution:
nslookup google.com
Important Notes
Oracle Linux 7 left Oracle's Premier Support on 31 December 2024 and 7.9 is its final release, so the free public yum channel publishes no new errata. Continued security updates need an Oracle Linux Extended Support subscription. For new deployments, cloudimg also publishes Oracle Linux 8 and Oracle Linux 9 images on Azure.
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