Customer ID

Password

 
 
 

NoMachine Support

Your questions answered

Accessing your remote desktop on Azure via NoMachine

By combining NoMachine software with the Microsoft Azure infrastructure, you can create and access your own remote access and desktop delivery solution for employees, partners and customers alike. Or if it's just for your own use, by installing NoMachine you can get remote access to your own personal desktop hosted in Microsoft's cloud and get the same benefits as you would as if the physical hardware was really yours.

Azure is the Microsoft.com's cloud-computing service. It provides resizable compute capacity in the cloud, suitable for any organization or individual which needs flexible cloud hosting services. Virtual hosts can be fired up on many Linux/Windows OS's and configurations according to specific needs. This particular tutorial will concentrate on the Linux desktop.

Setting up a Linux desktop hosted on Azure

Azure Linux instances do not come with a GUI, so by default, you need terminal access for all application configuration in order to get started. Most of the developers/sysadmins working with Linux prefer the command line to Graphical User Interface. But users who are new to Linux will feel more comfortable with a GUI for installing and managing their applications. We will show you how to configure a graphical user interface (GUI) for an Azure Linux instance and then access that GUI using NoMachine.

We will install NoMachine (free version) on a virtual Linux host, and then access the desktop of this virtualized Linux OS. If you prefer, you can install one of the enterprise-oriented products. For this tutorial, we'll install it on CentOS 7.5. NoMachine can be installed on any of the Linux flavors, though some of the steps might change depending on what you choose to use. To get started you're going to need SSH to let you remotely log in and administer the Linux VM. Once NoMachine is installed, you'll be able to access the remote desktop securely via NX.

Log in to Azure

Go to https://portal.azure.com and log in or create an account (Fig. 1).

Create a free account on https://portal.azure.com

Fig. 1 - Go to https://portal.azure.com

Choosing an Azure VM instance

Remember you can also refer to their Getting Started Guide: https://azure.microsoft.com/en-us/get-started/.

Once logged-in, you will see the Microsoft Azure dashboard. Click on “Create a resource” on the top left side (Fig. 2).

Click create a resource to start the VM creation procedure

Fig. 2 - Click on “Create a resource”

  • Choose a Virtual Machine (VM).
  • Use 'Search in Marketplace' to find the VM instance with the OS of your needs. We've chosen CentOS 7.5 (Fig. 3).
Click create a resource to start the VM creation procedure

Fig. 3 - Once you've chosen the VM type, click on 'Create' to proceed to create the new VM

Configuring the virtual machine

In the first step, you need to configure the base details and features for your VM: Disks, Networking, Management, Guest config and Tags. There are plenty of possible configurations and you will be asked about creating machine’s type/size, name, username, login method and others.

 

Important! To enable access to your instance, be sure to choose 'Allow selected ports' (Fig. 4). In the same panel you have to create also the administrator's account. In our example it's 'nomachine'.

Create the administrator of the VM

Fig. 4 - Create the administrator of the VM (in our case the administrator is 'nomachine'). Be sure to check 'Allow selected ports'!

Preparing the virtual machine

Complete the configuration process by clicking on 'Next'. You can either customize your instance or leave the defaults, according to your specific needs. Once completed the configuration, click “Review + create” button. If all the required settings are accepted, you will see a green bar with information about passing validation (Fig. 5).

VM validation passed

Fig. 5 - Validation Passed! Your VM is almost ready.

  • Click on “Create” and wait a few minutes until your virtual machine is deployed.
  • Your VM is ready!

You will be taken to the VM’s details. Once you get there, copy the machine’s public IP address, shown on the right side of instance’s details, to use it in your local terminal for SSH connection (Fig 6).

Copy the Public IP address of the VM

Fig. 6 - Copy the Public IP address of the VM, in our example it's 23.99.198.24

  • Open a terminal.
  • Connect with your administrator's account to Azure’s Virtual Machine via SSH (Fig. 7).

 

Connect as administrator

Fig. 7 - Connect as administrator to the Virtual Machine

 

When you are connected to the remote Virtual Machine via SSH, make sure the latest version of the Operating System is installed and set up with a graphical desktop environment:

  • sudo yum update
  • sudo yum groupinstall "Server with GUI"
  • Configure the system to boot in graphical mode:

    sudo systemctl set-default graphical.target 

 

When the desktop installation is complete, go back to the Azure Portal Dashboard and accept to restart your virtual machine. Wait until it reboots (Fig. 8).

 

Restart the Virtual Machine

Fig. 8 - Restart the Virtual Machine

 

Download and save the NoMachine package suitable for the Operating System of your Virtual Machine on your local computer. Then send it to your Azure instance via SCP (Fig. 9).

SCP the NoMachine package to the VM

Fig. 9 - SCP the NoMachine package to the Virtual Machine

  • Connect to the Virtual Machine by SSH from your local terminal
  • Install the NoMachine package:
      sudo yum install nomachine_6.3.6_1_x86_64.rpm

 

Now go back to Azure Dashboard to create the networking rule necessary for enabling connection to port 4000, which is the NoMachine’s default port for connections by NX protocol. When the rule is added, you will be notified about successfully created inbound port rule (Fig. 10).

Enter the Networking panel on the Azure dashboard

Fig. 10 - Enter the Networking panel on the Azure dashboard and add the inbound security rule

Now you're ready to use your NoMachine desktop on Azure’s CentOS 7.5. On your local machine open the NoMachine User Interface and click New. Ceate a new connection by specifying the proper IP address of the remote host on Azure.

Provide the IP of the Azure VM

Fig. 11 - Provide the IP of the VM hosted on Azure

 

Follow the next step of the wizard, specify protocol and login method (in our example it's NX protocol and password-base authentication), give a name to this connection. Once completed, provide credentials to login to the VM on Azure when requested. Here we log-in to as the 'nomachine' user (Fig. 12).

Insert username and password for the VM

Fig. 12 - Provide username and password to log-in to the Azure's VM

 

Your NoMachine session has started: pass through the Welcome panels for quick hints on NoMachine features and configuration.

Read the NoMachine Welcome panels

Fig. 13 - Read the NoMachine Welcome panels for hints

 

You're now connected to the desktop of your Virtual Machine on Azure. Choose the user and enter the username.

Log-in to the VM desktop

Fig. 14 - Log-in to the VM desktop

It’s all done, enjoy your new desktop!

Enjoy your remote desktop session

Fig. 15 - You're in!

 

Remember: closing the NoMachine connection to your Virtual Machine does not shut down the virtual host. So when you finish using your Virtual Machine you need to stop it from Azure’s Dashboard to avoid additional charging. Be sure that the VM shows up as stopped/deallocated.