Running MacOS using Virtual Box in Azure


Last week Microsoft finally released their new Azure Virtual Machine series Dv3 and Ev3, besides being based on the latest Intel hardware, these machine are also running Windows Server 2016 as the host OS which supports nested virtualization. Why is that interesting you might ask? Well, it is interesting because now it is possible to run hyper visors inside an Azure VM. To me as a developer that is pretty cool, because now I can actually create a development machine in the cloud, install hyper-v on it and run my mobile emulators or even use docker for Windows, which is dependent on Hyper-V. Furthermore, as I’m going to show in this blog post, I can also install an open source Hypervisor like VirtualBox and use that to emulate a Mac, of course that can also be done on a local machine, but the benefit of running it in the cloud is that it can be online 24×7 which is great if you need a build or test server. (Beware that Apple licensing is probably not going to approve of this, but let’s save that concern for another day).

So what do you need:

This is all it takes to get MacOS up and running on Azure using nested virtualization and Virtual Box. If you are planning to do a lot of work on MacOS, I can recommend using a machine with SSD. Also note that the image linked to is not the latest version of Sierra, so you will have to run an update after the installation. If someone can point me to a public downloadable image of a more recent version please let me know in the comments.