Deployment guide

Rocky Linux 8

Overview

Rocky Linux is a free, community-built enterprise operating system that is binary compatible with Red Hat Enterprise Linux. This image is a preconfigured Rocky Linux 8 virtual machine for Microsoft Azure, published by SecureAnyCloud on the Azure Marketplace.

What you get:

  • Rocky Linux 8.10, fully binary compatible with RHEL 8
  • Azure Linux Agent (waagent) for cloud integration
  • chronyd for NTP time synchronisation
  • SELinux in enforcing mode
  • Gen2 Hyper-V virtual machine support
  • 24/7 SecureAnyCloud support

Platform: Microsoft Azure (Gen2 Hyper-V) | Default user: azureuser

Prerequisites

Before you deploy this image, make sure 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.

1

Deploy the virtual machine

Option A: Azure Portal

  • Open the Azure Marketplace and search for "Rocky Linux 8 on Azure SecureAnyCloud".
  • Select the image and click Create.
  • On the basics tab, set:
    • Subscription: select your Azure subscription
    • Resource Group: create a new one or select an existing one
    • Virtual Machine Name: enter a name for your VM
    • Region: select your preferred Azure region
    • Size: Standard_B2s is recommended
  • Under Administrator Account, select SSH public key and enter your key. To log in with a password instead, choose Password.
  • Under Inbound Port Rules, allow SSH (port 22).
  • Click Review + Create, then Create.

Option B: Azure CLI

Accept the Marketplace terms once per subscription, then create the VM:

az vm image terms accept --urn sac1647283583153:rocky-linux-8:default:latest
az vm create \
  --resource-group myResourceGroup \
  --name my-rocky-linux-8-azure-vm \
  --image sac1647283583153:rocky-linux-8:default:latest \
  --size Standard_B2s \
  --admin-username azureuser \
  --generate-ssh-keys \
  --public-ip-sku Standard
2

Connect via SSH

When your VM is running, connect over SSH:

ssh azureuser@<public-ip-address>

If you deployed with an SSH key, password logins are off, so there is no password to enter. If SSH asks for one, your client is not offering the key you supplied when you created the VM.

If you chose Password in the portal instead, log in with that username and password: ssh <your-username>@<public-ip-address>.

To find your VM's public IP, run:

az vm show --resource-group myResourceGroup --name my-rocky-linux-8-azure-vm --show-details --query publicIps -o tsv
3

Verify the installation

After you connect, check the operating system version:

cat /etc/os-release uname -r

Check disk space and memory:

df -h free -h

Confirm that the Azure Linux Agent is running:

systemctl status waagent
4

Update the system

Install the latest security patches to keep the system up to date:

sudo dnf update -y
5

Configure the firewall (optional)

The Azure network security group (NSG) controls inbound and outbound traffic. It is the only firewall in front of this image. firewalld is not installed, so firewall-cmd is not found until you add it. The portal's default NSG rule opens SSH (port 22) only.

rpcbind (the NFS client helper, enabled by default on Rocky Linux 8) listens on port 111. Keep that port closed in the NSG. If you do not mount NFS shares, switch the service off:

sudo systemctl disable --now rpcbind.service rpcbind.socket

To add a host firewall as well, install firewalld. Its default public zone allows SSH, so your session stays open:

sudo dnf install -y firewalld
sudo systemctl enable --now firewalld
sudo firewall-cmd --list-all

To allow additional ports, run:

sudo firewall-cmd --permanent --add-port=80/tcp sudo firewall-cmd --permanent --add-port=443/tcp sudo firewall-cmd --reload

Common use cases

  • CentOS 8 replacement for production workloads
  • Enterprise application and database hosting
  • Web server and middleware deployments
  • Development and testing environments

Troubleshooting

Cannot connect via SSH

  • Verify that the VM is in the Running state in the Azure Portal.
  • Check that port 22 is allowed in the network security group.
  • Use the correct username: azureuser.
  • Verify that your SSH key matches the one configured during deployment. On a key-only deployment, password login is off, so a wrong key cannot fall back to a password prompt. If you have lost the key, use the portal's Reset password (below).

To see which key your client offers, run ssh -v azureuser@<public-ip-address> from your workstation and look for the Offering public key lines.

Reset password from the portal

The portal's Reset password (and az vm user update --username azureuser --password ...) sets the new password and switches SSH password logins on, and the portal reports Succeeded. On this image, however, the new password is refused until the SSH service restarts.

The reset tries to restart a service called ssh, but on Rocky Linux 8 the SSH service is sshd, so the running daemon keeps its old key-only settings. Restart it in any one of these ways, then log in with the new password:

  • In the portal, open the VM, go to Operations > Run command > RunShellScript, and run systemctl restart sshd. This needs no login.
  • Restart the VM from the portal.
  • If you can still log in with your key, run sudo systemctl restart sshd.

To use the Run Command route from the Azure CLI, run this on your own workstation:

az vm run-command invoke --resource-group myResourceGroup --name my-rocky-linux-8-azure-vm \
  --command-id RunShellScript --scripts "systemctl restart sshd"

Two things change when you use Reset password:

  • SSH password logins are switched on for the machine (PasswordAuthentication yes in /etc/ssh/sshd_config), so any account with a password can now log in with it.
  • sudo asks for that user's password, because the reset adds /etc/sudoers.d/waagent.

When your key works again, return to key-only logins:

sudo sed -i 's/^PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
sudo sshd -t && sudo systemctl restart sshd

Azure agent not running

sudo systemctl start waagent
sudo systemctl enable waagent

Package manager issues

sudo dnf update -y

If repositories are unreachable, check DNS resolution:

nslookup google.com

Important Notes

Rocky Linux is free and open source. No licence is required.

Support

For assistance with this image, contact SecureAnyCloud support:

  • Website: secureanycloud.com
  • Product catalogue: secureanycloud.com/products
  • User guides: secureanycloud.com/guides
  • SLA: 24-hour response guaranteed

Deploy on Azure

Launch Rocky Linux 8 on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure