3.4. Installing the Azure CLI
By using the Azure Command-Line Interface (CLI), you can connect to Azure Cloud and manage Azure resources directly from your host terminal.
Prerequisites
- You have completed the deployment of a RHEL image on Azure.
- You have an account with Microsoft Azure.
- You have installed Python 3.x.
Procedure
Import the Microsoft repository key:
$ sudo dnf --import https://packages.microsoft.com/keys/microsoft.ascCreate a local Azure CLI repository entry:
$ sudo sh -c 'echo -e "[azure-cli]\nname=Azure CLI\nbaseurl=https://packages.microsoft.com/yumrepos/azure-cli\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/azure-cli.repo'Update the
dnfpackage index:$ sudo dnf updateInstall the Azure CLI:
$ sudo dnf install -y azure-cliRun the Azure CLI:
$ az login
Next steps
- Install the Hyper-V device drivers to efficiently run VM on Azure.