Introduction To Azure VM Image And VHD (Azure Deep Dive) - Chapter 2

In my last post we discussed about Creating Azure Virtual Machine. Now apart from the basics of this post we will start some advanced topics of Azure Virtual Machines.

Check out my previous post here:

If you are new to your business solution then you would probably start from scratch, but what if you already have your solution up and running. It would be a nightmare and lots of work to the manpower at your enterprise. This is the thing that Azure don’t want you to do. In this post we will briefly discuss managing your existing solution to prepare it for scaling it to Azure.

Difference between VHD and Image

There is a lot of confusion going around with the difference between Virtual Hard Disk (VHD) and Image. Let me break it down.

  • Virtual Hard Disk (VHD)

    As the name says, VHD is a virtual space for storing your data or system for your Virtual Machines. VM uses VHD to store data in it. It is just like bucket where you store your data.

  • Image: It captures all the data that virtual machine will include. All the data, disks system is stored in image. Even the OS is captured in image by specialized method.

Now that we know about image, let’s talk about generalized and specialized images.

Generalized Images

Generalized images are like template for your VM. You create a proper template for VM, then create instances of VMs with the template you create. You can create VM-A, VM-B or multiple clusters of VM from same image with generalized images. The VM you create from Azure Marketplace are all the generalized images created by Azure. Generalizing system is same like resetting machine identifiers and preparing it for reuse in another system.

Specialized Images

Specialized images are like golden edition of your system. It is just like a snapshot of your current system. Creating VMs from specialized images creates an exact copy of your existing system in Azure. It is just like creating a copy of your system from the time when you created a snapshot of it.

Generalizing your on premises VM

Now we know about generalized and specialized images. Today let’s see how to prepare a generalized image of your VM on premise. I have a Windows Server 2012 VM running in Hyper-V. First of all let’s connect to it.

Step 1: Login to your system.

Step 2: Open a command prompt window as an administrator. Change the directory to %windir%\system32\sysprep, and then run sysprep.exe.

run sysprep

Step 3: In the System Preparation Tool, select Enter System Out of Box Experience (OOBE) and make sure that Generalize is checked.

Generalize is checked

Step 4: In Shutdown Options, select Shutdown and click OK.

Sysprep

Sysprep will generalize your system and create an image from it.

That is all for today. We will continue it with next chapter 2.2 where we will upload it in cloud to prepare VM from it.

Up Next
    Ebook Download
    View all
    Learn
    View all