Launch an Azure Virtual Machine

Last modified: July 12, 2021


This document explains how to create an Azure® virtual machine with a cPanel & WHM image.

Log in to your Azure account

Log in to your Azure account. If you do not have an account, sign up for one.

Go to the cPanel listing in the Marketplace


We strongly recommend you only create a virtual machine from the cPanel & WHM marketplace listing. Creating an Azure virtual machine directly from the Virtual machines interface will not configure some settings properly.

  1. Navigate to the cPanel & WHM for Azure listing on the Marketplace.
  2. Click Create. The Create a virtual machine interface will appear.

Create the virtual machine

Once you are on the Create a virtual machine interface, perform the following steps:

  1. Select your Project details:

    • Subscription — Select the subscription to pay for the virtual machine.
    • Resource group — Either select an existing resource group or use the default (New) Resource group value to create a new resource group.
      • If you do not select an existing resource group, Azure will use the Virtual machine name you enter to name a new resource group.
      • We recommend you make a new resource group any time you create a virtual machine. It is easier to delete all parts of the virtual machine by deleting the resource group rather than the individual parts.
  2. Enter your Instance details:

    • Virtual machine name — Name your virtual machine.

      You cannot change this name after you create the virtual machine.

    • Region — Select the instance’s region. We suggest that you select a region that is close to you, your customers, or your customers’ visitors.
    • Availability options — Select infrastructure redundancy options.
    • Image — This will prepopulate with the cPanel & WHM Bring your own license - Gen1 image. If it does not, you can manually select it.
    • Azure Spot instance — Select whether to use Azure Spot.

      We strongly recommend you do not use Azure Spot for your cPanel & WHM virtual machines.

    • Size — Select the VM size for your virtual machine.

      Even though cPanel & WHM requires a minimum of 1GB of RAM and 20GB of disk space, we recommend at least 2GB of RAM and 40GB of dsk space.

      For more information about hardware requirements, read our Installation Guide - System Requirements for CentOS documentation.

  3. Enter your Administrator account details:

    • Authentication type — You can choose to use an SSH public key or a password.
      • If you use a password for your administrator account, you can easily log into WHM using your administrator username and password.
      • If you use an SSH key for authentication, there are extra steps before you can log in to WHM for the first time. Follow the instructions in the Log in for the first time section below.
    • Username — Enter the administrator username for the virtual machine.
    • SSH public key source — If you choose to use an SSH key, select the source of the key.
      • Generate a new key pair — Generate a new key pair. Then, enter a Key pair name.
      • Use existing key stored in Azure — Select a key from Stored Keys.
      • Use existing public key — Paste your public key into the SSH public keys field.
    • Password — Enter a password for your virtual machine’s administrator account.
    • Confirm password — Confirm your password.
  4. There are further customizations you can make to your virtual machine using the Disks, Networking, Management, Advanced, and Tags tabs. You do not need to enter any information in those tabs to create a virtual machine. However, for more information, read Azure’s Linux virtual machine documentation.

  5. Click Review + create. An interface with all the details of your potential virtual machine will appear.

  6. Review the details of your virtual machine then click Create.


    If you chose to create a new SSH key pair, after you click Create, you will have the option to download your key. We highly recommend you download it.

  7. A deployment interface will appear, showing the virtual machine creation’s progress. It will also list all of the associated resources for your virtual machine.

  8. Once deployment is complete, a Your deployment is complete message will appear. It will contain a link to your virtual machine.

The WHM installation process

When you create a virtual machine, WHM will automatically begin installation in the background. You can watch the installation progress via your virtual machine’s serial console. To access your virtual machine’s serial console:

  1. Access your virtual machine, using one of the following options:

    • At the bottom of the Your deployment is complete message, click Go to resource.
    • Enter Virtual Machines in the search bar, then select your machine.
    • Your Azure portal home page.
  2. From your virtual machine’s page, scroll the left side menu down to the Support + troubleshooting section and click Serial console.

From the serial console, you can watch the progress of WHM’s installation. If there are any errors in installing WHM, they will appear in red.


The installation process takes about 10-15 minutes. You cannot log in to WHM until the installation process is complete.

Logging in to WHM for the first time

Logging in to WHM for the first time differs based on your administrator account’s authentication method.

Using a password

If you use a password for your administrator account, you can log into WHM using your administrator username and password. In a web browser, connect to your virtual machine’s public IP address using HTTPS on port 2087. For example: The cPanel & WHM installation process creates a limited version of a reseller account using that username and password.

If you need to access your virtual machine’s root account, perform the following steps:

  1. Log in to WHM.
  2. Navigate to WHM’s Change Root Password interface (WHM >> Server Configuration >> Change Root Password).

Using an SSH key

If you choose to use an SSH key rather than a password, you must perform the following extra steps before you can log in to WHM for the first time:

  1. If using a new key pair, add your key to your computer.


    If you did not download your key while launching your virtual machine, you can access it from Azure’s Resource groups interface. Click the name of your virtual machine’s resource group, then the name of the key.

    On an macOS® computer that uses the default download folder:

    1. Run the following command, where example represents the key pair’s name:

      mv ~/Downloads/example.pem ~/.ssh
    2. Run the following command to modify the permissions for the .pem file, where example represents the key pair’s name:

      chmod 600 ~/.ssh/example.pem
    3. Run the following command to add the key pair, where example represents the key pair’s name:

      ssh-add ~/.ssh/example.pem

      An Identity added message will appear.

    On a Windows® computer that runs the PuTTY client and uses the default download folder, perform the following steps:

    1. From the Windows Start menu, open PuttyGen.

    2. Under the Conversions heading, click Import.

    3. Navigate to the PuTTY Key Generator interface and select the .pem key you downloaded. Click Open.

    4. Enter a passphrase in the Key passphrase and Confirm passphrase text boxes.

    5. Click Save private key and save the key as a .ppk file.

    6. From the Windows Start menu, open PuTTY.

    7. In the Session interface, enter the following information:

      • Hostname (or IP address) — You virtual machine’s IP address.
      • Port — Enter 22.
      • Connection type — Select SSH.
      • Saved sessions — Enter a name for your session. Then click Save.
    8. Navigate to the Auth interface under the SSH category.

    9. Click Browse, select the .ppk file you created, and click Open.

  2. After completing the installation of WHM on your virtual machine, log in to your virtual machine’s administrator user over SSH. Use the following command, where key represents the file path of your SSH key, user represents the user you created with your virtual machine and IP represents your virtual machine’s IP address:

    ssh -i key user@IP
  3. To get a temporary WHM login URL, run the following command:

    sudo whmlogin
  4. Use that login URL to add a password to the root user.

Configure WHM

For more information on configuring cPanel & WHM, read our WebHost Manager documentation.

For more information on how to quickly build a website on a newly-installed cPanel & WHM server, read our From WHM to Website documentation.


cPanel & WHM requires a valid license. If this is a new installation, you can activate a free 15-day trial license.

Managing your virtual machine

For more information on managing your Azure virtual machine, read our Azure Virtual Machine Management documentation.

Additional Documentation