How to Setup and Connect to Azure Linux Virtual Machine

This post is about creating and connecting to a Linux Virtual Machine running on Windows Azure. This is using the Ubuntu 14.04 LTS OS Image. First you need to create Linux VM in Azure, I am using old azure portal for creating the VM. You can create a VM using Quick Create option, you need to provide the VM Name, Image (Ubuntu 14.04 LTS), Size, Password and Region.

Create an Azure VM using Ubuntu 14.04 LTS Quick Create option

And you need to add Remote Desktop endpoint using end points option. Here is the list of endpoints the VM created.

List of Remote Desktop endpoints

Now from the Virtual Machine dashboard, you can download the RDP file to connect to the Linux VM. But before doing that you need to configure VM to accept remote connections. To connect to VM from your system you can use “putty” which will help you to execute commands on VM.

  • First you need to update your system and install desktop, I choose xfce4 instead of ubuntu-desktop.
sudo apt-get update
sudo apt-get install xfce4
  • Next you need to install the xrdp - is a daemon that supports Microsoft’s Remote Desktop Protocol, and start it.
sudo apt-get install xrdp
sudo /etc/init.d/xrdp start

You have completed the configuration, now download the RDP file from the dashboard and connect to VM using Remote Desktop connection. You will be prompted for the credentails which will be the one you created while creating the VM.

And here is the linux vm running with xfce desktop.

List of Remote Desktop endpoints

Happy Programming