Freigeben über


Creating a Cloud Workstation with Azure

Just a quick one - I had an idea the other day about how I could work at home, on any device but using all my apps & other goodness I normally need a laptop for (read: that don’t work on a tablet). I often work at home and often I can’t be bothered to drag the laptop home - I want to have a workstation that would work with even my Surface RT machine for example, and with all my legacy/dev apps ready-to-go too.

Well the answer was pretty straightforward of course – create an “in-cloud” workstation and use connect to it via remote-desktop on pretty much anything that has a remote-desktop client.

But not just that though, I want of course want the Azure 99.9% uptime so it’s really all about creating an epic workstation of two workstations should one drop offline temporarily and syncing the data between them so no single machine has all my files. Overkill? Sure, but the point is we can.

Build Awesome Workstation Machine Template

Before anything though it’s worth creating a virtual machine template with all the stuff I want on for my desktop work – just like I would for a SharePoint server. I installed Win8 + Office + developer-tools + stuff, generalised the image, then uploaded it to Azure as a template. That way I can spin up a new machine with all my stuff on very quickly if I want.

First an important note though; Windows client (8 or 10 or any other version for that matter) isn’t supported in Azure so don’t expect any help if it goes wrong. I’m doing it this way instead of with WinServer just because it’s more convenient to get a client setup running and I like the Windows client backgrounds more :)

Side note: I’ve found that Windows client needs a pre-created local admin account for Azure, so add one too.

Azure

Azure

Once done & sysprepped, I upload to Azure with the old Add-AzureVhd & Add-AzureVMImage. This I’ll then use to spin-up 2 machines in the same availability-zone.

To be fair, I could just have one single VM but just because I can, I want near 100% uptime always so I’m going the hardcore route.

 

Create Azure VMs + Cloud Stuff

Once I’ve got my workstation template ready, now I’m ready to create my 1st machine instance.

Azure

Without standard tier machines you can’t “load balance” of course.

Create a new availability set for both machines so that always there’s one of them online.

Azure

For the 2nd machine, we just need to add it to the new cloud-services & availability-set. There you go – guaranteed 99.95% uptime. Again, someone overkill and probably unnecessary entirely but, well, it’s fun to play.

Azure

Next, wait for the machines to provision & start-up so you can finish the configuration.

Complete Setup on VMs

Last thing to do is add the VMs to the corporate domain, login and get OneDrive for Business syncing my local files again. That way no matter which machine I’m on, I’ll always be using the same data.

Login to your new VMs as the local account you created in the template:

Azure

Configure VMs

Next up we need to configure them for the corporate domain. This only works if your AD infrastructure has been setup to integrate with the real internet or you have VPNs into your private network of course.

Join the machine to the domain then add your real corporate account to local admins group. Restart.

Azure

If you’re doubling up as I am, do the same domain setup on both machines & add your domain account as a local admin, and you’re nearly done. Login as corporate user; open Outlook and whatever else you normally use ready to go for when you need it.

Azure

Optional for Cloud-Desktop Expert-Mode: Load-Balance Remote Desktop

Once everything’s ready on the two machines, the only thing left to do load-balance remote desktop between the two for high-availability remote-desktop capabilities (and yes, to some extent I’m just playing here).

Edit the remote-desktop endpoint on one machine to be load-balanced then add the other machine to the load-balancer too (use affinity so you don’t get randomly thrown around machines) and you can access one or the other as a logical machine.

Azure

Amusingly, this will mean that remote-desktop connections are TCP switched between the two if lost so if your connection goes down, you might find yourself staring at the other client when it comes back up! But well, at least we have 99.95% uptime.

Indeed, this random machine switching is just a test of how cloudy your desktop setup is; with Exchange + OneDrive for Business + Team Foundation Server everything should be synchronised perfectly anyway right?!

Azure 

The finished product – tada!

Wrap-Up

99% of the time you’ll only need one machine and it’s likely the cost of running x2 VMs will outweigh the small amount of uptime you’ll lose without the availability setup, but it was fun to show what’s possible at least. The main takeaway here is Azure can make a nice virtual-desktop host if you want

And now of course I can access my work stuff from my tablet!

Cheers,

Sam Betts

Comments

  • Anonymous
    April 08, 2015
    The comment has been removed
  • Anonymous
    April 08, 2015
    Hey Phil; thanks for the clarification. Not being a lawyer, legal talk isn't exactly my speciality but yeah; nothing is "guaranteed" guaranteed presumably for any service if you put it in those terms :) The point really is just that without availability sets, your uptime will for sure suffer from expected outages (patching) and more likely to suffer from unexpected outages. Cheers! // Sam