Skip to main content

Azure Virtual Machines (Day 15 of 31)

List of all posts from this series:

Short Description 
On Microsoft Azure you have the ability to run, manage and use your own Virtual Machine. In this case you have full control to the OS and different configuration at that level. The hardware virtualization give you the possibility to install and run any kind of OS from Windows to different Linux distributions.

Main Features 
Not only Windows OS
Even if we are talking about a cloud solution from Microsoft, we have the ability to run different Linux distributions like Ubuntu or Suse. On top of this there are also other OS that can be used like Openlogic.
Custom VM Image
You have the ability to create your own Virtual Machine image and upload it. The custom image can contains not only the OS, but also the software that you need for your use case.
There is support for scaling from 1 or 2 VM to 500 or event 1000 Virtual Machines.
Per Minute billing
Because money are very important, the billing is per minute and not per hours. In this way you will pay only what you use, nothings more.
Load Balancing
There is an out of the box load balancer in front of Virtual Machine that can be used with success to distribute the load cross multiple virtual machines.
Intensive I/O Storage
With the new storage, based on SSDs, you can have a minimum latency (less than 1 millisecond) with 50.000 IOPS.
Large storage
The current infrastructure give us the possibility to have disks that can have in total 32TB of storage.
Pre-Configured VM Images
When you create a VM, you have the ability to use a pre-configured VM, where SharePoint, Oracle, SQLServer, Visual Studio is already installed.
Pay OS or software license on the fly
There are images with different configuration that allow you to use them without having the license of the software that is installed on them. This is possible because the cost of the software license is included in per minute billing.
Auto Scale
There are different ways to scale up or down automatically. For example you ca configure to scale up based on CPU level or at a specific time. Of course the scaling is not only in one way and you can configure rules that allow you to scale also down.
Because usually ITPros are responsible for Virtual Machine and the infrastructure, the configuration and management API is not only exposed as REST API, but it is also exposed as PowerShell commands.
Disaster Recovery Plan
All the content of VM is replicated automatically in a second data center from the same geographical region. In this way if something happens with the first data center the content is available on the second one.
Different tiers
There is a wide range of tiers configurations that can be used for Virtual Machines. From the small one to the one that are CPU intensive or memory intensive. Because of this you can start from 768MB of memory and go to 112GB of memory and 32 CPU cores.
Run the same image on Azure or on-premises
The same image can be run on Azure or on-premises. You even have the possibility to migrate an existing VM image from one environment to the other one.  

Custom images configuration 
When you need to create your own custom image with different configuration, you will need to manually create an image where you install all the software that you need.

Applicable Use Cases 
Below you can find 3 use cases when I would use VMs.
Migration to cloud
For existing legacy system, there is the possibility to migrate the existing VM to Azure without having to change the software that runs on them. In this way you can reduce the hosting costs and scale more easily without having to rewrite your systems.
Run custom software
If you have custom software to run, than Azure VMs can be the perfect solution for you. You can run a wide variety of OS and configurations on them.
Optimize Cost
If you need VM only for a limited time period, than this may be a good solution for you. When you don’t need to run VMs, you can keep only the image of them on Azure Storage and use it only when you need it.

Code Sample 

Pros and Cons 

  • Scalable
  • PowerShell support
  • Linux and Oracle support
  • Different hardware configuration based on you needs
  • Auto-Scale


When you are calculating  the costs of VM you should take into account:

  • Number of VMs and there configuration
  • Storage size
  • Outbound traffic
  • Licensing cost

Azure VMs are a great solution when you need a place to run and manage your own Virtual Machine.


Popular posts from this blog

How to check in AngularJS if a service was register or not

There are cases when you need to check in a service or a controller was register in AngularJS.
For example a valid use case is when you have the same implementation running on multiple application. In this case, you may want to intercept the HTTP provider and add a custom step there. This step don’t needs to run on all the application, only in the one where the service exist and register.
A solution for this case would be to have a flag in the configuration that specify this. In the core you would have an IF that would check the value of this flag.
Another solution is to check if a specific service was register in AngularJS or not. If the service was register that you would execute your own logic.
To check if a service was register or not in AngularJS container you need to call the ‘has’ method of ‘inhector’. It will return TRUE if the service was register.
if ($injector.has('httpInterceptorService')) { $httpProvider.interceptors.push('httpInterceptorService&#…

ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded

Today blog post will be started with the following error when running DB tests on the CI machine:
threw exception: System.InvalidOperationException: The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See for more information. at System.Data.Entity.Infrastructure.DependencyResolution.ProviderServicesFactory.GetInstance(String providerTypeName, String providerInvariantName) This error happened only on the Continuous Integration machine. On the devs machines, everything has fine. The classic problem – on my machine it’s working. The CI has the following configuration:

TeamCity.NET 4.51EF 6.0.2VS2013
It seems that there …

[Post-Event] Codecamp Conference Cluj-Napoca - Nov 19, 2016

Last day I was invited to another Codecamp Conference, that took place in Cluj-Napoca. Like other Codecamp Conferences, the event was very big, with more than 1.000 participants and 70 sessions. There were 10 tracks in parallel, so it was pretty hard to decide at  what session you want to join.
It was great to join this conference and I hope that you discovered something new during the conference.
At this event I talked about Azure IoT Hub and how we can use it to connect devices from the field. I had a lot of demos using Raspberry PI 3 and Simplelink SensorTag. Most of the samples were written in C++ and Node.JS and people were impressed that even if we are using Microsoft technologies, we are not limited to C# and .NET. World and Microsoft are changing so fast. Just looking and Azure IoT Hub and new features that were launched and I'm pressed (Jobs, Methods, Device Twin).
On backend my demos covered Stream Analytics, Event Hub, Azure Object Storage and DocumentDB.

What abo…