Step-By-Step: Insert your own image in the Microsoft Azure Gallery

Hello folks,

I am just getting back to writing after spending last week preparing and delivering with Anthony Bartolo an Azure Camp at our head office in Mississauga.  It was the biggest Camp we ever delivered in this format. Over 120 people attended.

23

It was great. When we were looking at the Azure Gallery for creating new virtual machines, a lot of questions were asked about how do we populate this?

How do I make my own Gallery?? 

image

It’s actually pretty straight forward.  We can use images from the Gallery to create virtual machines.  There are actually quite a large number of platform VM images available.  Here is a list I generated using PowerShell

PS C:\windows\system32> Get-AzureVMImage | Format-Table -AutoSize -Property Label

Label
-----
Visual Studio Premium 2013 Update 1 on Windows Server 2012
Visual Studio Professional 2013 Update 1 on Windows Server 2012
Visual Studio Ultimate 2013 Update 1 on Windows Server 2012
Microsoft Dynamics NAV 2013 R2 on Windows Server 2012
Microsoft Dynamics NAV 2013 R2 on Windows Server 2012
Microsoft Dynamics GP 2013 Developer on Windows Server 2012 R2
RightImage CentOS 6.2 x64 v5.8.8.1
RightImage CentOS 6.3 x64 v5.8.8
RightImage CentOS 6.3 x64 v5.8.8.5
RightImage CentOS 6.3 x64 v5.8.8.6
RightImage CentOS 6.3 x64 v5.8.8.7
RightImage CentOS 6.3 x64 v5.8.8.8
RightImage CentOS 6.3 x64 v5.8.8.9
RightImage-CentOS-6.4-x64-v13.4
RightImage CentOS 6.4 x64 v13.5.0.1
RightImage CentOS 6.4 x64 v13.5.0.2
RightImage CentOS 6.5 x64 v13.5.2
RightImage CentOS 6.5 x64 v13.5.3
RightImage-Ubuntu-12.04-x64-v13.4
RightImage Ubuntu 12.04 x64 v13.5.0.1
RightImage Ubuntu 12.04 x64 v13.5.2
RightImage Ubuntu 12.04 x64 v13.5.3
RightImage Ubuntu 12.04 x64 v5.8.8
RightImage Ubuntu 12.04 x64 v5.8.8.5
RightImage Ubuntu 12.04 x64 v5.8.8.7
RightImage Ubuntu 12.04 x64 v5.8.8.8
JDK 6 on Windows Server 2012
JDK 7 on Windows Server 2012
JDK 8 on Windows Server 2012 R2
Oracle Database 11g R2 Enterprise Edition on Windows Server 2008 R2
Oracle Database 11g R2 and WebLogic Server 11g Enterprise Edition on Windows Server 2008 R2
Oracle Database 11g R2 Standard Edition on Windows Server 2008 R2
Oracle Database 11g R2 and WebLogic Server 11g Standard Edition on Windows Server 2008 R2
Oracle Database 12c Enterprise Edition on Windows Server 2012
Oracle Database 12c Standard Edition on Windows Server 2012
Oracle Database 12c and WebLogic Server 12c Enterprise Edition on Windows Server 2012
Oracle Database 12c and WebLogic Server 12c Standard Edition on Windows Server 2012
Oracle WebLogic Server 12c Enterprise Edition on Windows Server 2012
Oracle WebLogic Server 12c Standard Edition on Windows Server 2012
Oracle WebLogic Server 11g Enterprise Edition on Windows Server 2008 R2
Oracle WebLogic Server 11g Standard Edition on Windows Server 2008 R2
BizTalk Server 2013 Enterprise on Windows Server 2012
BizTalk Server 2013 Standard on Windows Server 2012
Windows Server Essentials Experience on Windows Server 2012 R2
Windows Server Essentials Experience on Windows Server 2012 R2
Windows Server Essentials Experience on Windows Server 2012 R2
Windows Server Essentials Experience on Windows Server 2012 R2
Windows Server Essentials Experience on Windows Server 2012 R2
Windows Server Essentials Experience on Windows Server 2012 R2
OpenLogic
Windows Server 2008 R2 SP1, March 2014
Windows Server 2008 R2 SP1, April 2014
Windows Server 2012 Datacenter, March 2014
Windows Server 2012 Datacenter, April 2014
Windows Server 2012 R2 Datacenter, March 2014
Windows Server 2012 R2 Datacenter, April 2014
Windows Server Remote Desktop Session Host on Windows Server 2012 R2
Windows Server RDSHwO13P on Windows Server 2012 R2
Windows Server RDSHwO13P on Windows Server 2012 R2
Ubuntu Server 12.04.3 LTS
Ubuntu Server 12.04.3 LTS
Ubuntu Server 12.04.3 LTS
Ubuntu Server 12.04.3 LTS
Ubuntu Server 12.04.3 LTS
Ubuntu Server 12.04.3 LTS
Ubuntu Server 12.04.3 LTS
Ubuntu Server 12.04.3 LTS
Ubuntu Server 12.04.3 LTS
Ubuntu Server 12.04.3 LTS
Ubuntu Server 12.04.3 LTS
Ubuntu Server 12.04.3 LTS
Ubuntu Server 12.04.3 LTS
Ubuntu Server 12.04.3 LTS
Ubuntu Server 12.04.3 LTS
Ubuntu Server 12.04.3 LTS
Ubuntu Server 12.04.3 LTS
Ubuntu Server 12.04.4 LTS
Ubuntu Server 12.04.4 LTS
Ubuntu Server 12.04.4 LTS
Ubuntu Server 13.10
Ubuntu Server 13.10
Ubuntu Server 13.10
Ubuntu Server 13.10
Ubuntu Server 13.10
Ubuntu Server 13.10
Ubuntu Server 13.10
Ubuntu Server 13.10
Ubuntu Server 13.10
Ubuntu Server 13.10
Ubuntu Server 13.10
Ubuntu Server 13.10
Ubuntu Server 13.10
Ubuntu Server 13.10
Ubuntu Server 13.10
Ubuntu Server 13.10
Ubuntu Server 14.04 LTS
Ubuntu Server 14.04 LTS
Ubuntu Server 14.04 LTS
Ubuntu Server 14.04 LTS
Ubuntu Server 12.04.3 LTS DAILY
Ubuntu Server 12.04.4 LTS DAILY
Ubuntu Server 12.04.4 LTS DAILY
Ubuntu Server 12.04.4 LTS DAILY
Ubuntu Server 12.04.4 LTS DAILY
Ubuntu Server 13.10 DAILY
Ubuntu Server 13.10 DAILY
Ubuntu Server 13.10 DAILY
Ubuntu Server 13.10 DAILY
Ubuntu Server 14.04 LTS DAILY
Ubuntu Server 14.04 LTS DAILY
Ubuntu Server 14.04 LTS DAILY
Ubuntu Server 14.04 LTS DAILY
Ubuntu Server 14.04 LTS DAILY
SUSE Linux Enterprise Server 11 SP3
openSUSE 13.1
RightImage Windows 2008R2 SP1 x64 iis75 v5.8.8
RightImage Windows 2008R2 SP1 x64 iis75 v5.8.8.11
RightImage Windows 2008R2 SP1 x64 sqlsvr2012 v5.8.8
RightImage Windows 2008R2 SP1 x64 sqlsvr2012 v5.8.8.1
RightImage Windows 2008R2 SP1 x64 sqlsvr2012 v5.8.8.12
RightImage Windows 2008R2 SP1 x64 sqlsvr2012 v5.8.8.15
RightImage Windows 2008R2 SP1 x64 v5.8.8
RightImage Windows 2008R2 SP1 x64 v5.8.8.11
RightImage Windows 2008R2 x64 iis7.5 v13.4.12.2
RightImage Windows 2008R2 x64 iis7.5 v13.5
RightImage Windows 2008R2 x64 iis7.5 v14
RightImage Windows 2008R2 x64 sqlsvr2012 v13.4.3.1
RightImage Windows 2008R2 x64 sqlsvr2012 v13.5.1
RightImage Windows 2008R2 x64 sqlsvr2012 v14
RightImage Windows 2008R2 x64 sqlsvr2012ent v13.4.3.1
RightImage Windows 2008R2 x64 sqlsvr2012ent v13.5
RightImage Windows 2008R2 x64 sqlsvr2012ent v14
RightImage Windows 2008R2 x64 sqlsvr2k8r2 v13.5
RightImage Windows 2008R2 x64 sqlsvr2k8r2 v14
RightImage Windows 2008R2 x64 sqlsvr2k8r2ent v13.5
RightImage Windows 2008R2 x64 sqlsvr2k8r2ent v14
RightImage Windows 2008R2 x64 v13.4.12.2
RightImage Windows 2008R2 x64 v13.5
RightImage Windows 2008R2 x64 v14
RightImage Windows 2012 x64 iis8 v13.4.12.2
RightImage Windows 2012 x64 iis8 v13.5
RightImage Windows 2012 x64 iis8 v14
RightImage Windows 2012 x64 iis8 v5.8.8.12
RightImage Windows 2012 x64 sqlsvr2012 v13.5
RightImage Windows 2012 x64 sqlsvr2012 v14
RightImage Windows 2012 x64 sqlsvr2012ent v13.5
RightImage Windows 2012 x64 sqlsvr2012ent v14
RightImage Windows 2012 x64 v13.4.12.2
RightImage Windows 2012 x64 v13.5
RightImage Windows 2012 x64 v14
RightImage Windows 2012 x64 v5.8.8.12
Oracle Database 12.1.0.1 Enterprise Edition on Oracle Linux 6.4.0.0.0
Oracle Database 12.1.0.1 Standard Edition on Oracle Linux 6.4.0.0.0
Oracle Linux 6.4.0.0.0
Oracle WebLogic Server 12.1.2 on Oracle Linux 6.4.0.0.0
SharePoint Server 2013 Trial
Puppet Enterprise 3.2.1
SQL Server 2008 R2 SP2 Enterprise on Windows Server 2008 R2
SQL Server 2008 R2 SP2 Standard on Windows Server 2008 R2
SQL Server 2012 SP1 Enterprise on Windows Server 2012
SQL Server 2012 SP1 Enterprise on Windows Server 2008 R2
SQL Server 2012 SP1 Standard on Windows Server 2012
SQL Server 2012 SP1 Enterprise on Windows Server 2008 R2
SQL Server 2012 SP1 Enterprise on Windows Server 2012
SQL Server 2012 SP1 Standard on Windows Server 2008 R2
SQL Server 2012 SP1 Standard on Windows Server 2012
SQL Server 2012 SP1 Web on Windows Server 2008 R2
SQL Server 2008 R2 SP2 Enterprise on Windows Server 2008 R2
SQL Server 2008 R2 SP2 Enterprise on Windows Server 2008 R2
SQL Server 2008 R2 SP2 Enterprise on Windows Server 2008 R2
SQL Server 2008 R2 SP2 Standard on Windows Server 2008 R2
SQL Server 2008 R2 SP2 Standard on Windows Server 2008 R2
SQL Server 2008 R2 SP2 Standard on Windows Server 2008 R2
SQL Server 2008 R2 SP2 Web on Windows Server 2008 R2
SQL Server 2008 R2 SP2 Web on Windows Server 2008 R2
SQL Server 2008 R2 SP2 Web on Windows Server 2008 R2
SQL Server 2008 R2 SP2 Web on Windows Server 2008 R2
SQL Server 2012 SP1 for Data Warehousing on Windows Server 2012
SQL Server 2012 SP1 for Data Warehousing on Windows Server 2012
SQL Server 2012 SP1 for Data Warehousing on Windows Server 2012
SQL Server 2012 SP1 Enterprise on Windows Server 2008 R2
SQL Server 2012 SP1 Enterprise on Windows Server 2012
SQL Server 2012 SP1 Enterprise on Windows Server 2012
SQL Server 2012 SP1 Enterprise on Windows Server 2012
SQL Server 2012 SP1 Enterprise on Windows Server 2008 R2
SQL Server 2012 SP1 Standard on Windows Server 2008 R2
SQL Server 2012 SP1 Standard on Windows Server 2012
SQL Server 2012 SP1 Standard on Windows Server 2012
SQL Server 2012 SP1 Standard on Windows Server 2008 R2
SQL Server 2012 SP1 Standard on Windows Server 2008 R2
SQL Server 2012 SP1 Standard on Windows Server 2008 R2
SQL Server 2012 SP1 Web on Windows Server 2008 R2
SQL Server 2012 SP1 Web on Windows Server 2008 R2
SQL Server 2012 SP1 Web on Windows Server 2008 R2
SQL Server 2012 SP1 Web on Windows Server 2008 R2
SQL Server 2014 RTM DataWarehousing on Windows Server 2012 R2
SQL Server 2014 RTM Enterprise on Windows Server 2012 R2
SQL Server 2014 RTM Standard on Windows Server 2012 R2
SQL Server 2014 RTM Web on Windows Server 2012 R2
Windows Server RDSHwO13P on Windows Server 2012 R2
Windows Server Remote Desktop Session Host on Windows Server 2012 R2                      

it’s quite long.  Normally I will “filter” that command for the specific flavor of images I’m looking for.  To do that I use the following command: (replace “Windows” with whatever keyword you’re looking for in the label.)

( Get-AzureVMImage | where-object { $_.Label -like "Windows*" } ) | Format-Table -AutoSize -Property Label

In any case…  Let’s get back to the opic at hand.  instead of using the gallery “stock” images you can build/capture your own.  Let’s step through it.

1- Built your sample machine.

Build a machine using the OS you need.  For example “Windows Server 2012 R2 Datacenter, April 2014” from the gallery and configure it to fit the template you want to create.  Install IIS, install whatever app you need and once you’re done

2- Sysprep your newly configured machine.

Connect to your VM.  Once logged on with Administrative credentials, Open a Command Prompt window as an administrator.

Change the directory to %windir%\system32\sysprep, and then run sysprep.exe. The System Preparation Tool dialog box appears. In System Cleanup Action, select Enter System Out-of-Box Experience (OOBE) and make sure that Generalize is checked In Shutdown Options, select Shutdown and click OK.

  image

Sysprep will shuts down the virtual machine once it’s complete, which will changes the status of the machine in the Management Portal to Stopped.

image

3- Capture your image.

Click Virtual Machines, and then select the virtual machine you want to capture and on the command bar, click Capture.

image

The Capture an Image from a Virtual Machine dialog box appears.

image

In Image Name, type a name for the new image (something descriptive).  Click I have run Sysprep on the virtual machine to indicate that you have done this in the previous step.  Click the check mark to capture the image.

Please note that when you capture an image of a virtual machine, the machine is deleted. once the process is complete.

image

The new image will be available in the Gallery under Images. When you create a virtual machine you can use the image that you captured by clicking My Images on the Choose an Image page.

image

That way you can speed up deployment of specific workloads in Azure.

I hope this helps.  I’ll document the process of creating and uploading your own VHD images to use in the same manner tomorrow.  Until then… you can start by setting up an active Microsoft Azure subscription.  Use the Step-By-Step: Creating a Windows 2012 R2 Lab on Windows Azure for help on how to setup your lab.

Cheers!

clip_image011

Pierre Roman | Technology Evangelist
Twitter | Facebook | LinkedIn