Search Posts

Month: March 2019

Azure CLI: How to delete and re-deploy a VM from VHD

NOTE: Recently the azure cli has changed to the az cli, unless you have the older azure cli tools still installed, you should visit the new and updated post with instructions for the az cli here. Unless you are still using the old azure cli tool, the instructions bellow will not work in the new az cli. Before moving further, please, make sure you have the Azure CLI tools installed:Install the Azure CLI For the […]

Azure PowerShell: How to delete and re-deploy a VM from VHD

Before moving further, please make sure you have Azure PowerShell installed:How to install and configure Azure PowerShell For basic information about using Azure Powershell with Resource Manager (ARM), please have a look at:Using Azure PowerShell with Azure Resource Manager In this example, the following variables are being used: Resource Group: ARMGROUPOriginal VM Name: LinuxVMLocation: southcentralusNIC Name: LinuxVM-NICStorage Account: ARMSTORAGEVHD URI: https://ARMSTORAGE.blob.core.windows.net/vhds/linuxvm.vhd You should be able to get a list of parameters from a given VM […]

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 of updating let’s say packages, adding a user account or doing any task that you can do on a normal […]

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 you have your system ready after going to the steps described in this article, meaning you just went through the […]

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 as the Linux Agent (WAAGENT) is working correctly you should be able to use this extension without problems. You can […]

How to: Resize Linux osDisk partition on Azure

Most Linux images on Azure will by default have 30GB size for the osDisk and that is something that you might want to resize moving forward. NOTE: We recommend to store applications and data on a separate data disk not only because of space but also for performance reasons. Resizing the partition is really simple on Azure and we can be done by the following procedure: a) Stopping and deallocating the VM on the portal […]

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 in the directory that’s defined by the ResourceDisk.MountPoint parameter, you can update the /etc/waagent.conf file by setting […]

How to: Deploy a basic wordpress on Ubuntu 16.04 LTS on Azure

How to deploy a simple WordPress instance using Ubuntu 16.04 LTS, Nginx, MariaDB and Memcache in Azure. This article is destined to help understand a basic WordPress deployment on Azure using Ubuntu 16.04 LTS, Nginx with PHP-fpm (for PHP support), MariaDB and Memcache In this example, we are deploying a Standard_F2S VM with premium disk, 2 CPU’s, 4GB of memory and also a local 7GB SSD (Ephemeral disk) which we will use for swap configuration […]

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 Azure 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 to work properly, please, make sure you are logged into the Azure CLI: <tt>az login</tt> NOTE: You will […]

/var/empty/sshd must be owned by root and not group or world-writable

Problem Statement: You are attempting to ssh into a Linux VM and are unsuccessful. We have seen customers modify key sshd configuration files and upon restarting sshd or rebooting the VM connectivity is lost. symptoms/errors experienced The serial or console log may exhibt errors such as this: SuSE /var/empty must be owned by root and not group or world-writable. startproc: exit status of parent of /usr/sbin/sshd: 255 Failed CentOS Starting sshd: /var/empty/sshd must be owned […]

Next Page »