Azure Linux Support Team

Support for Linux on Azure

AZ CLI: How to delete and re-deploy a VM from VHD (unmanaged disk)

You should be able to use the built-in CLI on the portal, for more details on how to use it, please check: Azure Cloud Shell (quickstart) If not, you can always install it locally on your workstation or also using docker, for details, please follow the steps described here: Install the Azure CLI For the steps… Read more

How to: Add SWAP to Linux VM’s on Azure

Every virtual machine (VM) on Azure has what we call a temporary (ephemeral) disk which is recommended to be used ONLY as temporary storage and that includes SWAP files or data that does not need to be available upon a reboot or saved , the data stored in this drive will be lost. To create a swap file… Read more

Azure Linux Extensions: Custom Script for Linux

You have probably seen some extensions that are available on Azure, some of them listed/documented here: Azure Linux Extensions In this article, we will cover a few examples that you can use with the “Custom Script for Linux” extension. This extension basically allows you to run a script inside a Linux VM, so as long… Read more

Linux Recovery: Fixing non-boot issues related to Kernel problems using chroot

In a previous article, it was described how to manually fix kernel related issues that could cause a Linux VM to not boot properly. There is also an option where you can use steps to use CHROOT and then use tools to automatically fix these same issues without the need to manually edit files. Assuming… Read more

Linux Recovery: Manually fixing non-boot issues related to Kernel problems

You have a Linux VM that had kernel changes applied recently such as a kernel upgrade and is no longer starting up properly due to kernel errors during the boot process. Kernel messages will vary; some examples could be: no root device found, kernel timeouts, null pointer, kernel panic errors. Most of the time the recovery steps… Read more

Unsupported: How to install xRDP for GUI remote access on Linux

You want to access a Linux VM on Azure using a GUI through Remote Desktop or similar tools. The installation and configuration of 3rd party tools are beyond the scope of Azure Linux support but we have here a few notes and best practices to enable xRDP if needed. There are other ways of achieving similar… Read more

Best Practices: Monitoring Linux VM utilization with sysstat

Sysstat is a very interesting option to enable system monitoring without sacrificing performance and disk storage. Some distributions have it installed but disabled by default, other distributions you have to install it manually. With the steps provided in this article you can get sysstat up and running so you can have history data to analyze… Read more

Linux Recovery: Cannot SSH to Linux VM due to file system errors (fsck, inodes)

When a Linux VM requires fsck to repair possible file system issues, manual intervention will be required. Below you can see four examples on how to identify file system issues by looking at the boot diagnostics on a given VM under: Virtual Machines > VMNAME >  All settings > Boot diagnostics Example (1) Checking all file systems. [/sbin/fsck.ext4… Read more

Linux Recovery: Using CHROOT steps to recover VMs that are not accessible

You are facing an issue where you might need to basically delete a virtual machine (VM) , keep its OSDisk and attach it to another Linux VM where you can then repair whatever is wrong on that old VM, however in some instances you would also be able to have network access and some way… Read more

Best Practices: Using SSH keys to access Linux VMs on Azure

When deploying Linux workloads on Azure, Microsoft highly recommends using SSH keys since they provide a more secure way of logging on to a Linux instance using SSH than using normal passwords. Most of the time passwords can be cracked with for example a brute force attack whereas SSH keys are nearly impossible to decipher… Read more