Start your journey to the next level of remote computing
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.
Logging in to Azure
Fig. 1 - Go to https://portal.azure.com
Choosing an Azure VM instance
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).
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.
- 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'.
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).
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).
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).
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).
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).
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).
Fig. 10 - Enter the Networking panel on the Azure dashboard and add the inbound security rule
Connecting to your desktop via NoMachine
- 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 'Add'. Create a connection by specifying the NX protocol and the IP address of the remote host on Azure (Fig. 11).
Fig. 11 - Select NX as protocol and insert the the IP of the VM hosted on Azure
- You can give an appropriate name to this connection in this panel if you wish. You should also check that in 'Configuration' the authentication type is password-based after which click 'Connect'. Provide the appropriate credentials to login to the VM on Azure when requested. Here we log-in as the 'nomachine' user (Fig. 12). Welcome screens appear once you are connected.
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.
Fig. 13 - Read the NoMachine Welcome panels for hints
Fig. 14 - Log-in to the VM desktop
- It’s all done, enjoy your new desktop!
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.