Azure Linux Support Team

Support for Linux on Azure

Best Practices: Running Linux on Azure

A lot of times we help customers getting the best out of running their workloads on Azure using any of our Endorsed Linux Distributions.

There are a few best practices and recommendations that will sure help getting the most out of your Linux virtual machines and we would like to share a few of them.

A great starting article is Running a Linux VM on Azure which also focus on deploying virtual machines using our Resource Manager (ARM) approach which is recommended for new deployments on Azure.

One topic that also is important for a lot of customers is security and we highly recommend using SSH Keys to access your Linux virtual machines on Azure, here is also a great article about this side of things

How to use SSH with Linux and Mac on Azure.

Sometimes you also need extra space on your Linux virtual machines so you might need to use additional data disks or even set them up to use LVM or MDAM if RAID is required, managing and enabling swap space, these are a few good articles on these topics too:

A) How to attach a data disk to a Linux virtual machine
B) Configure LVM on a Linux virtual machine in Azure
C) Configure software RAID on Linux
D) Optimize your Linux vM on Azure

Configuring SWAP on Linux is easily achieved by using the WAAgent to do that, we do not support/recommend adding swap manually on Linux VMS. To add SWAP on a Linux VM, please have a look at this article:

How to Add a SWAP file in Linux Azure VMS
When we also talk about kernels, it’s very important that you are running a stable and updated kernel due to the integration drivers required for Linux VM’s to properly run on Hyper-V/Azure, these are the specific links for each distribution which we update constantly with the supported releases.

Canonical also publishes a link with the End of Life kernels and recommended/supported kernels in their website too.

RedHat and CentOS

Monitoring should be also a good thing to do as well and for that, we can start by installing and setting up sysstat too, we will be posting more monitoring and performance related articles in here too.

Monitoring Linux VM utilization with sysstat

From a networking perspective, it is also very important that you don’t have any network security groups or firewall rules blocking traffic to and from the IP, for more information about that, please check the following link: What is the IP address

We hope these tips help you having a great experience when running Linux on Azure and we will be updating this article with more information as they are requested by customers or just found to be useful by anyone running Linux on Azure.

Azure Linux Support Team