2
votes

I was able to take a snapshot of OS Disk of VM1 and create a disk out of it. I have swapped with the VM1 OS Disk for learning purpose. I'm aware we can also create a new VM out of this snapshot as well.

There is another way to create a blob storage with VHD file and create a managed OS disk by selecting OS type as Windows/linux and then swap with VM1 OS Disk.

There is also a way to create an image by selecting same VHD file and create a completely new VM out of it.

I want to understand in detail the difference between Image, VHD and Snapshot.

  1. Is Image = VHD bundled with OS.
  2. Does VHD contain OS?
  3. Is Snapshot a VDH at a point of time?
  4. Does Snapshot contains OS as well?

Thank you very much in advance.

1
@CharlesXu No. I have already read that answer and it helped to some extent. I'm really unclear of the difference between 3 terms. I think Snapshot is same as VHD but at a given point of time and VHD is a initial snapshot of disk. Also, I'm unclear that if we take a snapshot of azure OS disk does it include OS as well? What about VHD does it capture OS as well? - PrudhviB
@PrudhviB the question isn't specific to Azure. It applies to all VM products. Image is the source you create your VM from. It can have more than one virtual disk files. In Hyper-V, those files have the VHD extension. In VMWare, it's vmdk. When a VM runs you can create a snapshot of its current state, which would allow you to turn it off and go back to that state. You can also copy the snapshot to another machine and start your VM in the same state. - Panagiotis Kanavos
@PanagiotisKanavos Thank you very much. That clarified my doubts. - PrudhviB

1 Answers

1
votes

Well, if the existing issue does not answer solve the question. I would show you something that I understand about the three things via answer the four questions.

Is Image = VHD bundled with OS.

I think it's not. The image can contain the OS disk and the data disk. So you can treat it as a thing that contains multiple VHD files. And the OS disk is the must-have for the image.

Does VHD contain OS?

No, VHD is a format of a file that contains a virtual hard disk used by Microsoft Windows Virtual PC. The hard disk can be the OS disk or the data disk, but not both.

Is Snapshot a VHD at a point of time?

Yes, the snapshot is a full, read-only copy of a virtual hard drive (VHD).

Does Snapshot contains OS as well?

Perhaps. If the snapshot is a copy of the OS disk, of course, it contains the OS disk. But if the snapshot is a copy of the data disk, then it doesn't. You can tread snapshot the same as the VHD file in a special moment.