I would like to shed light on two main concepts of Azure Virtual Machines:
- VM Role (PaaS)
- VM (IaaS)
I was very much confused, while learning about provisioning VM on Azure environment.
But later I learned that the purpose of both VM Role and VM (IaaS) are the same. But, in concept and use, they are different.
VM Role: VM role is a kind of role in the Azure platform which helps to maintain service packs, patches, updates and applications already installed, to Windows Azure automatically.
The Windows Azure Cloud Services introduces three roles:
- Worker Role
Worker Roles are designed for fast provisioning and de-provisioning of your cloud applications. We can specify one or more VMs using the Service Management API. It can be done using the <Instances Count=n/> field in the Service Configuration file. It would always be better to make 2 instances. Because, while swapping applications by the App fabric (due to technical or load balancing issues), it will ensure zero down time for you.
It can start our code.
Correctly patched operating system image: one that was created, patched and maintained by Microsoft.
Copy the VM to the host and boot it.
Obtain an external virtual IP address and DNS name.
- Web Role
The web's role is a little bit different than worker role. It can configure IIS and Run the application on IIS.
- VM Role
The VM Role is responsible for provisioning VM and maintaining update patches, software updates etc.
We can use a VM Role in the case of:
- Long-Running Setup: If the application requires a long-running setup.
- Error-Prone Application: Application in which you expect more errors/risks while installing it.
VM(IaaS) : These are literally VMs as we understood then from the On-Premise running in the Azure Microsoft Data Center.
Here, it will not maintain the OS automatically. In other words, we provide for the updating of software patches etc. It will take only 15-16 minutes to reboot the VM. Also while moving the VM by the app fabric the state of the VM (state full) is maintained. So, it behaves just like a VM in our own On-Premise environment.
Advantages of VM over VM role:
- VM is durable.
- IaaS VMs is that you can take just about any on-premises application, whether it makes changes to the local file system or not (even if the OS is one of the supported Linux distributions) and deploy it to the cloud for a few cents per hour.
- Provisioning time will be increased.
- Automatic OS/software updates will be there in the (IaaS) VM.