Azure Virtual Machines – Benefits of developing in the Cloud

It’s now over a year since I started developing on Azure Virtual Machines and while it’s not cheap (more on this later), it’s hard for me to go back and develop locally on physical machines. In this post, I’ll go over the advantages of owning and developing on a Virtual Machine hosted in the cloud.

  1. Connect (and develop) from any machine

    As long as you have a decent internet connection (who doesn’t these days), you can connect to your VM from any machine. You are no longer tied to that one single laptop that you have to carry around because that’s where all your dev tools are installed. Also, a programmer’s laptop is typically heavy and bulky. However, having a VM means you can choose the lightest laptop there is on the market and not compromise on the specs of your development environment.

    When I’m at home, I connect to my VM. When I’m at work, I connect to the same VM. When I’m travelling and suddenly having to do some work (freelancers out there will be able relate), I connect. When I’m having to all of a sudden demo something to a friend/colleague/potential client, I connect. This is the kind of flexibility that all software developers / freelancers need to have.

  2. Setting up a dev machine is incredibly fast

    When I started my career in software development, in those days, setting up a machine for a new developer in a company takes anywhere between 2 days to almost a week. You hit jackpot if you’re up and running on the second day. These days it probably still takes a full day or two to be up and running but with virtual machines in the cloud (at least in Azure), getting a new machine takes around 5-10 mins. You can even choose from a long list of developer images, including ones that have Visual Studio and/or SQL pre-installed.

    At some point, I even owned five VM’s because I had to run some tests where I had to virtually be on different regions across the globe. So I quickly spun VM’s hosted in the UK, US, Australia, etc. Getting rid of these VM’s is also very easy and fast, all done through the Azure portal.

  3. Scaling is effortless

    Need to change the size of your machine’s physical memory? How about extra storage? These are very common requests and so usually, with a physical machine, the process can be quite painful; from the visits to the company’s internal IT team, to the ordering, delivery and installation of new hardware, not mentioning any compatibility limitations of the machine.

    With an Azure virtual machine, scaling is very easy and fast. These are all done through the Azure portal. All you have to do is select the size you want and the changes are provisioned within 5-10 mins.

  4. You get First Class download and upload speeds

    When I first ran a speed test in my Azure virtual machine, I couldn’t believe the numbers. At home, for what I pay for, I generally get about 60/4 Mbps download/upload speed. But on my Azure VM, at the time of writing, I get up to 500 Mbps for both download and upload. That’s more than eight times what I pay for!

  5. You can acquire a static IP address

    This might not be useful for a lot of people, but some of my freelance clients have strict firewall rules in place that they have a whitelist of IP addresses that can get access into their network. When I was onboarded, I had to provide my home ISP static IP address to be able to access important stuff. However, whenever I am not at home (and therefore my public IP is changed), I couldn’t get into my client’s network. So I have to either wait til I’m back home, or request for the temporary IP to be whitelisted. If you’re someone like myself who’s always on the go, the public IP would always change. I can’t annoy clients by having to request to whitelist my IP address every time I’m connected to a different internet provider.

    With an Azure VM, you can select to have a static IP address. In my case, when I started using the Azure virtual machines, it didn’t matter where I was, home or not, because my virtual machine’s IP address is whitelisted, access is no longer a problem.

  6. Disks can be detached and restored on another machine

    Which means, you can either connect your OS or Data disk with all your files to another Virtual machine, or download and restore it on a physical machine. This would probably not be used a lot, but at some point I had to connect the main OS disk of an old virtual machine to a new one, where I made it a secondary disk because of all the important files it had. I was then able to delete the old Virtual Machine and not be worried by the files it has. Note that a disk in Azure is separate to a virtual machine.

  7. Backups are easily configured

    Again, this all just takes a few clicks on the portal to configure. I can sleep at night knowing that if my VM doesn’t start the next morning, I can easily just restore it to the last backup I have. So before you get lost in the coding, remember to set up your virtual machine’s backup configuration.

There are, however, things you need to watch out for:

  1. It is not cheap. There are however things you can do to minimise the bill:
    • Turn off your virtual machine if it’s not in use. It’s like an electricity bill, the more you consume, the higher the bill.
    • Setup auto-shutdown rules. I have my VM’s set to shut down at 6pm just incase I forget to shut it down.
    • Delete Virtual machines that are no longer relevant. Even if they are not running, you pay for the disks they use.
    • Sign-up for the “Developer-Program-Benefit” subscription. It gives you a free $40 monthly credit for the first 12 months.
    • Remember, it’s tax-deductible! So go ahead and include these bills in your annual income tax return 🙂
    • For a strict 9am-6pm weekday usage of 4-core 28gb RAM 285gb storage VM, you’d be paying around $177/monthly or $2,124 yearly. That is nothing for an enterprise company, but does take a bit from a personal pocket! Check out Azure’s pricing calculator here.
  2. When it doesn’t start or you can’t connect to the VM. Before you get discouraged and really you shouldn’t, let me tell you that this has happened to me only about 5-6 times in the past year for the pretty much 365 days of usage. Here are some tips and tricks you can try:
    • Check the Boot diagnostics log thru the Portal – it shows a screenshot of what your VM is displaying on the screen and usually explains why you can’t connect
    • Redeploy your virtual machine – separate post here on how to do so. This has almost always fixed the issue for me.
    • Log a support ticket with Azure – their customer service is pretty good!

 

Discover more from Nicola Ayan

Subscribe now to keep reading and get access to the full archive.

Continue reading