Tag Archives: Linux

Bash on Windows 10 | Developer Mode Failure

Recently with Windows 10 Anniversary Update Microsoft has introduced Linux Subsystem as an optional feature. In order to get enable Bash on Windows first you need to enable and install Developer Mode package through Settings > Update & Security > For Developers > Developer Mode. Surprisingly on a fresh installation of Windows 10 1607 I’ve encountered below error.


The trick is even after this error message I was able to enable Linux subsystem through Control Panel > Programs > Turn Windows Features on or off as below.


The reason for this behavior is the extra components required by the OS to enable additional debugging features in Visual Studio or the Windows Device Portal not being installed automatically. Although you see this error message, your PC will be in developer mode and you can enable Windows Developer Mode package like Bash without any issue. Therefore you can ignore the 0x80004005 error.

One thing to keep in mind is that Linux Subsystem is still beta feature and not complete. So you can expect some things to work while there can be failures.

Docker Client for Windows is here

Last year Microsoft has partnered with Docker Inc to provide the next generation applications called Containers. As a result of the journey towards heterogeneous apps,  Microsoft has released the GA version of Docker CLI for Windows last week. As of today, using this tool you can manage Linux containers hosted in Azure or your own VMs straight from your Windows desktop. Microsoft plans to introduce their own container technology as below.

Windows Server containers

The idea behind this container is similar to Linux Container technology. Containers are isolated, but they share OS kernel and, where appropriate bins/libraries. Simply put we are talking about OS Virtualization where applications doesn’t need to be OS specific.

Hyper-V Containers

Using Microsoft Hyper-V technology these containers are fully isolated from the OS itself by running on the hypervisor layer. This ensures that one container has no impact on it’s host or any other containers in the same system. Even though these containers are running inside a hypervisor it doesn’t have any restriction over container deployment. You can simply deploy containers that you targeted for Windows Server in Hyper-V containers and vice versa without any modification.

Nano Server

Microsoft’s Nano server is the Windows version of Red Hat’s Atomic host, an OS designed to run containers in cloud. This version of Windows has no GUI stack, 32 bit support (WOW64), MSI and a number of default Server Core components has also been taken off. Also local logon and Remote Desktop has been removed and managing a nano server can be done only via  WMI and PowerShell. As per Microsoft nano server has 93% lower VHD size, 92% fewer critical bulletins and most importantly 80% fewer reboots.

Installing Docker CLI in Windows

There are two methods currently supported for installing Docker CLI for Windows.


Boot2Docker will install a tiny Linux VM running on Virtual Box (Yes you will have to disable Hyper-V engine for this). It is a lightweight linux distro called Tiny Core Linux specifically designed to run Docker containers. You can download the Windows version from here.


This is Machine Package manager like built for Windows.Think it as YUM or apt-get for Windows. Installation is rather simple. Let’s see how we install Docker CLI using this method. You can visit their website for more information on all supported packages other than Docker.

  • Open a Command Prompt as admin and execute below command.

C:/>@powershell -NoProfile -ExecutionPolicy unrestricted -Command “iex ((new-object net.webclient).DownloadString(‘https://chocolatey.org/install.ps1’))” && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

  • Once it finishes open a PS seesion as an administrator and set the execution policy to at least Bypass. Then type the below command to proceed.

PS:/>iex ((new-object net.webclient).DownloadString(‘https://chocolatey.org/install.ps1’))

  • Now it’s time to install the Docker CLI. Using either PowerShell or Command prompt execute below command to install Docker CLI.

C:/>choco install docker

  • To upgrade the Docker Client type choco upgrade docker


Introducing Linux Integration Services 4.0 Preview for Microsoft Azure

In Hyper-V platform integration services or rather device drivers for emulated hardware plays a vital role. The purpose of these services are to enhance the functionality of VMs to get the maximum performance in par with an actual physical server. Microsoft has announced the availability of LIS 4.0 for Azure VMs recently as a early preview.

This preview version of LIS supports CentOS 6.0-6.6, 7.0-7.1 64 bit editions running on Azure VMs and has introduced below additional functionality to Azure Linux IaaS VMs.

  • CentOS version 6.6 through 7.1 is now supported.
  • Dynamic Memory – Hot Add for above CentOS releases which allows you to dynamically increase the amount of memory that is available to a running VM.

You can download and install the LIS Package from this official Microsoft Link. For a list of features offered by Integration Services for Linux & FreeBSD refer here.

Upgrading Linux Integration Services on Azure Linux VMs

Following procedure needs to be performed as a super user or a user in suborders list.

  • Verify the Linux version first by running below command.

# cat /etc/centos-release

  • SCP (secure copy) the lis4.tar.gz file to the target VM. You can use putty for this.
  • Extracted the tar file by executing

# tar xvzf lis4.tar.gz

  • Traverse to the appropriate release version inside the lis4 directory where XX is the version obtained earlier.

# cd lis4/CentOs<XX>

  • Execute the upgrade script and reboot the VM.

# ./upgrade.sh

# reboot



Azure VM Extensions for Linux VMs

Whenever you are creating a Linux VM (or a Windows VM) in Azure from the gallery you may have noticed that in the last screen you get the option to install Azure Agent depending on the platform. This Azure Virtual Machine Agent can be is used to install, configure, manage and run Azure VM Extensions which extends the functionality of the VMs that they are installed on.

VM Agent

VM Extensions

VM Extensions can,

  • Modify security and identity features, such as resetting account values and using anti malware
  • Start, stop, or configure monitoring and diagnostics
  • Reset or install connectivity features, such as RDP and SSH
  • Diagnose, monitor, and manage your VMs

What we are focusing today is VM Extenstions for Linux VMs.Below are some of the cool VM Extensions that you can use in Linux VMs.

CustomScript: Run any script on a Linux VM

  • Download files and run scripts from an Azure storage account
  • Not limited to a specific scripting language


  • Reset the password of the original provisioned user or create new user
  • (Re)set SSH key for user
  • Ensure SSH firewall port (22) is open
  • Restore the SSH server configuration to a working default


  • Extension enables scheduled/automatic updates for a Linux VM
  • Coordinate patch schedule across multiple VMs
  • Portal integration

VMAccess extension in particular is a great tool if you ever lost access to your Linux VM. In Linux you always reach the VM via SSH and this extension is capable of altering the SSH configuration in case of a disaster.

Below are some great resources you can use if you are interested in leveraging VM extensions for Azure Linux VMs.


  1. Regaining control of your Linux VM with VMAccess Extension
  2. List of Azure VM Extensions
  3. Automated OS patching for Linux VMs

Monitoring Linux Servers with SCOM 2012 R2

The world is heterogeneous. All though Windows Server is running on 75% of data centers, organizations use various Linux distributions to run enterprise applications. If you are in to middleware you know for a fact how critical these applications are and the need to monitor same very closely to avoid service interruption.

Let’s have a quick look on how to setup a monitoring solutions for your Linux servers with SCOM. I’m going describe the process in a high level.

  1. Set up the environment for monitoring
  2. Install & import the SCOM Management Pack for Linux/Unix Monitoring in the SCOM management server
  3. Install the Operations Manager agent in the server to be monitored.
  4. Define monitors, rules and tasks an necessary

Step 1 | Setup the environment

Below are a list of prerequisites that you need to configure prior setting up the monitoring.

  1. SSH should be up and running on the destination server. It’s how SCOM talks to the agent.
  2. Port 22 (for SSH) & Port 1270 (for SCOM Agent) should be opened on both sides.
  3. OpenSSL should be up and running to for certificate signing. This is vital if you have couple of SCOM management servers and wish to use a SSH key for authentication
  4. Configure resource pool & Run As accounts for Linux servers. If you’re not sure about this I’ve provided some great articles in the end to refer courtesy of TechNet

Step 2 | Installing the MP for Linux/Unix

Now you already know that a management pack contains the parameters & functions that are require to monitor a specific application, be it an OS or just an application. So in our scenario we will have to install the latest MP for Linux/Unix monitoring installed and imported to SCOM in order to setup basic health monitoring for Linux. You can download these through here.

Step 3 | Agent installation and Discovery

Now for those who wish to automatically discover the Linux resources can run an Discovery Wizard in SCOM. But remember the linux user assigned for the Run As account should have enough privileges (best if that user is in the sudoers list) for the agent installation.  If you want to do a manual agent installation all you have to to is to install the System Center SCX agent which comes as an rpm file in the SCOM installation directory in the Linux server using rpm command. Once you run the discovery against the server it will automatically identify that a proper agent is already in place.

Step 4 | Define your own monitoring criteria

Now that you have installed the agent after a short while you may notice the basic system health data is being reported to SCOM. You can start creating your own custom MP to store overrides for existing monitors or create new ones. What I recommend is to leave the system for couple of hours to get settled in and the to start defining the monitoring subjects.

Below are some great resources that I’ve come across when I setup monitoring for Linux. Hope you will find same useful .

TUX in Microsoft Azure

Microsoft Azure supports a number of guest operating systems including most of the major Linux distributions. Now in this blog post I’m going to give you an overview about running Linux VMs in your cloud and what capabilities you can have with these guest VMs.

Officially Microsoft Azure supports below Linux distributions.  Now although CentOS is listed as a officially supported OS, I wonder whether there will be support for Red Hat Enterprise Linux as it is the commercial version of CentOS & Fedora in future.

Distribution Version Drivers Kernel Compatibility Patch Agent
Canonical UBUNTU Ubuntu 12.04.1, 12.10, and 13.04 In Kernel Required for 12.04 or 12.04.01 only Package: In package repo under walinuxagent
Source: GitHub
CentOS by Open Logic CentOS 6.3+ CentOS 6.3: LIS drivers; CentOS 6.4+ drivers: in Kernel Required for 6.3 only Package:In Open Logic package repo under walinuxagent
Source: GitHub
Oracle Linux 6.4+ In Kernel N/A Package: In repo, name: WALinuxAgent
Source: GitHub
SUSE Linux Enterprise SLES 11 SP3+ In Kernel N/A Package: In Cloud:Tools repo, name: WALinuxAgent
Source Code: GitHub
openSUSE OpenSUSE 13.1+ In Kernel N/A Package: In Cloud:Tools repo, name: WALinuxAgent
Source Code: GitHub

Provisioning a Linux VM in Azure in pretty straight forward. But keep in mind you can use your favorite SSH client like PuTTY to log in to your Linux VM without any exception.

There are series of KB articles in Microsoft Azure Documentation that will guide you to manage your Open Source VMs in cloud. You can find them in below links.

Also there is a new VM Agent introduced as an optional extension to Virtual Machines on Azure. This is a lightweight extension that can be installed on Windows or Linux VMs. A VM Agent can be used to install and manage extensions, and can extend the functionality of a VM as software modules. Microsoft will deliver number of VM agents on different platforms in near future so you can install optionally and can be used to manage your VMs

You can find more about VM Agents & Extensions in Azure from below links.