In my previous article in this series, I explained that private clouds are subscription based (even if you aren’t requiring users to have a paid subscription) and that you will have to create one or more hosting plans that the users can subscribe to. The problem with the hosting plans that we have created is that they are basically just empty containers at this point. It would do a user little good to create a subscription because they can’t do anything after they subscribe. Needless to say, we need to change that by giving the users some resources that they can work with. This is where virtual machine templates come into play. We can associate virtual machine templates with a hosting plan so that the users who subscribe to the hosting plan will be able to create brand new virtual machines from the templates that are associated with the hosting plan.

To get started, go ahead and log into the Azure Pack administrative portal and click on the Plans container. When you do, you should see the hosting plan that you created in the previous article. Click on your hosting plan and you will be taken into the plan’s dashboard.

I talked briefly about the plan’s dashboard in the previous article in this series. As I mentioned, you can use the dashboard to view the number of plan subscribers and to configure various settings. For right now though, I want to focus on virtual machine templates. If you go to the Plan Services section and click on your virtual machine cloud, you will be taken to the configuration screen for the selected virtual machine cloud. This is the same place that you go to if you want to set usage limits for the virtual machine cloud.

If you scroll down toward the bottom of the screen, you will eventually come to a section called Templates. You should see a message telling you that there are no templates that are currently selected, as shown in Figure A.

Figure A: The list of templates is empty.

I will show you how to create and add a template in a moment, but before I do, I need to take just a second and talk about the Gallery. The Gallery is a collection of something called resource extensions. Resource extensions are an alternative to virtual machine templates. In other words, you have the option of making resource extensions available to your private cloud tenants through the gallery, which gives the tenants the ability to deploy virtual machines that are based on those resource extensions.

I strongly advise that you avoid using resource extensions (and the gallery) unless you have a compelling reason for doing so. Virtual machine templates are easier to work with and in my opinion are the preferred mechanism for allowing tenants to create virtual machines. So why is that? Well, Microsoft makes some resource extensions available for download. However, most of the available resource extensions are only useful for creating legacy virtual machines. If you want to create your own resource extensions you can certainly do so, but there is a pretty long list of tasks that you will have to complete and you will also need a degree of proficiency in Windows PowerShell.

Needless to say, resource extensions and the Azure Pack Gallery aren’t exactly my favorite thing to work with. That being the case, let’s create a VM template instead.

You can’t create a VM template directly through Azure Pack. VM Templates are created from within the Virtual Machine Manager console and are then exposed through Azure Pack. So with that said, go ahead and open up the Virtual Machine Manager console.

The process of creating a VM template is relatively straightforward. The whole process is wizard based and you can just click your way through the wizard. Having said that, there are three important things that you need to know about the template creation process before we jump right in.

First, the template must be created from either an existing virtual machine or from an existing template. If you don’t already have a VM template, then you will have no choice but to create the template from an existing virtual machine. Now here is the really important part. The template creation process will destroy the virtual machine from which it is created! As such, it is critically important that you never create a template from a production virtual machine. As a best practice, you should only create templates from purpose built model VMs.

So why is the VM destroyed during the template creation process? In order to build the VM template, Virtual Machine Manager has to run SYSPREP on the model virtual machine. This process randomizes the virtual machine by removing certain VM specific information. On a side note, when you are creating a model VM, you should avoid joining the VM to a domain. It’s also a good idea to go ahead and install any available patches before you begin the template creation process.

The second thing that you need to know is that where you store the template makes all the difference in the world. As you probably know, Virtual Machine Manager contains a built in library that is used to store reusable components. For instance, I use the library on my Virtual Machine Manager server to store VM templates and ISO files.

As you progress through the VM Template creation wizard, you will eventually come to a screen that asks you to select the library within which you want to save the VM template. While it might be tempting to select the default library and move on, doing so would be a mistake. Remember, Azure Pack is a portal into your private or hybrid cloud. When you create a cloud within Virtual Machine Manager, you are prompted to associate one or more libraries with the cloud. It is common for administrators to create a separate library for each cloud that they define. When you create a VM template, you must save the template to a library that is accessible from your private cloud. Otherwise, the template will not be accessible to Azure Pack within the cloud configuration screen that I showed you earlier.

The third thing that you need to know is that VM templates can have dependencies. Don’t get me wrong. A VM template is a standalone object. However, it is common for administrators to create sub-components that are referenced in the creation of VM templates and / or model VMs. Some of these sub components include guest OS profiles, application profiles, and hardware profiles. The use of profiles can help to ensure that VMs and VM templates are created in a consistent way and that they adhere to your internal requirements.

Conclusion

In this article, I have shown you where VM templates are linked to Azure Pack. I have also explained some of the more important points that you need to know prior to creating a VM template. In the next article, I will continue the discussion by walking you through the template creation process.

If you would like to read the other parts in this article series please go to:

Featured Links

Read Next

Brien Posey

Brien Posey is a freelance technology author and speaker with over two decades of IT experience. Prior to going freelance, Brien was a CIO for a national chain of hospitals and healthcare facilities. He has also served as a network engineer for the United States Department of Defense at Fort Knox. In addition, Brien has worked as a network administrator for some of the largest insurance companies in America. To date, Brien has received Microsoft’s MVP award numerous times in categories including Windows Server, IIS, Exchange Server, and File Systems / Storage. You can visit Brien’s Website at: www.brienposey.com.

Latest Podcast

Recommended

Follow Us

Getting Started With Azure Pack (Part 7)

TECHGENIX

TechGenix reaches millions of IT Professionals every month, and has set the standard for providing free technical content through its growing family of websites, empowering them with the answers and tools that are needed to set up, configure, maintain and enhance their networks.