How to add SUSE Linux image to Azure Stack

In Azure Stack you can publish your own images essentially virtual machines that can be used when deploying a new virtual machine. This is handy for publishing servers that need to be pre-configured in a certain way for consumers of your cloud. In order for your published images to show up as an option in compute within Azure Stack the images need to be added to the Platform Image Repository (PIR) within the Compute Resource Provider (CRP).

SUSE has recently published a pre-built SUSE Linux Enterprise Server 12 SP1 image that has been prepped specifically for Azure Stack. This image is ready to go and can be published to the CRP’s PIR without any needed prep of the virtual machine. In this blog post I am going to walk through the steps I took to add this image to my Azure Stack.

SUSE already has an image out there for Azure. The SUSE image used on Azure does not work right now on Azure Stack. As of right now Azure and Azure Stack have different “initialization code”. In the future I would expect these to be the same. The SUSE image also includes SUSE/azurectl a command line tool that helps you manage SUSE updates from a Linux VM hosted on Azure. More info on this here: To download the SUSE Azure Stack image go to and complete the fields as show in the following screenshot.


You will be brought to a login page to access the download. If you do not have a SUSE account sign up for one and login. You will see the actual download at that point. Go ahead and download it onto your Azure Stack Host.


Extract the SLE-12-SP1-Server-Azure-Stack-x86_64.vhd and copy it to C:\ClusterStorage\Volume1\Share\VM.


Microsoft has the steps for adding images to Azure Stack’s Platform Image Repository (PIR). The process is essentially running a PowerShell script. The script is included with Azure Stack. The script creates the image directory needed in C:\ClusterStorage\Volume1\Share\CRP\PlatformImages, the JSON file in that directory, and makes a copy of the VHD in that directory. The JSON file contains the meta data about the image that shows in the Azure Stack Portal. Here is the link to the Microsoft document:

Here are the steps for running the script:

In PowerShell navigate to:


Run this script in PowerShell:


NOTE: My DATAIMAGE drive letter was D. You may have a different letter.

You will be prompted for the following:

  • PlatformImageRepositoryPath use this \\SOFS\Share\CRP\PlatformImages\
  • ImagePath I put C:\ClusterStorage\Volume1\Share\VM\SLE-12-SP1-Server-Azure-Stack-x86_64.vhd
  • Publisher I put SUSE
  • Offer I put LinuxServer
  • Sku I put SUSE-Linux-Ent-12-SP1
  • Version I put 12.0.0
  • OsType I put Linux


NOTE: These prompts are used to populate the JSON file for the image. Here is an example of the JSON file:






“PlatformImage” :{

“OsDisk” : {






Alternatively you could run the script as:

.\CopyImageToPlatformImageRepository.ps1 -PlatformImageRespositoryPath ‘\\SOFS\Share\CRP\PlatformImages’ -ImagePath ‘C:\ClusterStorage\Volume1\Share\VM\SLE-12-SP1-Server-Azure-Stack-x86_64.vhd’ -Publisher ‘SUSE’ -Offer ‘LinuxServer’ -Sku ‘SUSE-Linux-Ent-12-SP1’ -OsType ‘Linux’

As long as the script worked you should have the following as an end result in C:\ClusterStorage\Volume1\Share\CRP\PlatformImages:



If you have the Azure Stack portal open close out of the browser and go back in. It should be listed as an available image in Compute as shown in the following screenshot.


Notice the difference between a Windows image and a Linux image. The Linux image gives you an authentication option of Password or SSH Key.

Windows Linux
 AS-Suse-8  AS-Suse-9

Read More

mbstring PHP extension was not found

I was getting an error message when I accessed phpMyAdmin. The error was:

"The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results.

This error means that mbstring PHP extension is not enabled or installed. In my case it was not enabled.

To resolve this I had to enable it in my ...

Read More

CentOS supported on Hyper-V

Microsoft officially supports CentOS on Hyper-V now. This is great news because CentOS is the flavor of Linux i prefer to use. I will go back to running this instead of SUSE on Hyper-V. Here is a great blog post about installing the integration for CentOS running on Hyper-V:

Here is a link on Microsoft of support Linux flavors in Hyper-V (CentOS is not added to this lis...

Read More

How to Install Skype on CentOS

I am currently studying for the Linux + certification. I work with Linux alot becuase of my web site work. This is typically all command shell through SSH, Webmin, or WHM. I am forcing myself to use Linux on a daily basis as my workstation so I will learn it even more. The flavor of Linux I am using is CentOS. One of the tools I use is Skype. Skype does not have a RPM package for CentOS. This application has to be installed manually. I had to figure out how to get this installed. Here are the steps I took to install this and configure it.


Skype only comes in 32 bit so if you have a 64 bit machine you need to run the following to install 32 bit libraries. This is required to run the 32 bit Skype application.

yum install glib2.i386 qt4.i386 zlib.i386 alsa-lib.i386 libX11.i386 \ libXv.i386 libXScrnSaver.i386

Read More

Automatically backup MySQL database

I needed to backup a couple of MySQL databaes automatically. Here is what I did to accomplish this.

I created a folder called mysqlbackup. I then created a script called “” and put this script file in the mysqlbackup folder.

It contains “rm /mysqlbackup/DBNAME_backup.sql
mysqldump -u USERNAME -pPASSWORD DBNAME > /mysqlbackup/DBNAME_backup.sql

I used the “rm” command to remove the last database backup before the new ...

Read More

CP Omitting Linux Command Error

So I was trying to copy one folder to another location and kept getting this error:

cp: omitting directory

and it would not copy the directory over. This is the command I was running

 cp FOLDER /root/DRIVE

I am fairly new to Linux so I did not know what I was doing wrong.  After looking at the man page and some searching I found that I needed to put a -r after CP. Here is the syntax:

 cp -r FOLDER /root/DRIVE

the -r is copying th...

Read More

Setup VNC Server on CentOS

I recently had the task of setting up VNC Server on CentOS for a client of mine. VNC is very much like remote desktop in windows. You can even use VNC on Windows servers. I found VNC to be a little bit slower then remote desktop and it kept kicking me out every once in a while. Here are the steps I took to set it up:

First I opened the necessary ports.

Path to access the firewall:

Read More