Setting up your Cross Platform VM Environment (WP, Win8, Xamarin)

I am not going to lie, I have always been a Windows guy. There is just something about OSX and iOS that really bothered me. It as more of a feeling than specifics, but this means that I have always ran Windows on a PC. I never had to worry about VMs or complex cases. To be honest everything was perfect, I had VS 2013, Genymotion (android emulator), Windows Phone, Windows 8, and then for iOS I just used Xamarin.iOS and it’s VS integration to debug to a Mac nearby. I didn’t really have to interface with it at all. However, that has all changed as now my main device is this beautiful Mac Book Pro Retina with super specs (16 GB RAM, 512GB SSD, latest i7) and I love it. Well I love the hardware, still trying to get used to OSX. Anyways, I demo a lot and I still love developing inside of VS. Luckily, I can do all of this on the same machine using VMs, either VMWare or Parallels. Each have their own perks, price, and features, but they both seem to be great products for $60. However I did run into some hard times setting up my VM environment to get these following goals met:

  1. Windows 8.1
  2. Windows Phone SDK + Emulator (hyperv)
  3. Xamarin.iOS & Xamarin.Android
  4. Genymotion for Android emulator(virtual box)

The biggest issue here is that running VS + Xamarin is completely fine and easy to setup, however setting up awesome emulators is not. The main reason is that it requires nested virtualization. Each product has their own ways of dealing with it, but they aren’t easy to get setup.

Parallels:

To be honest this was pretty easy to get setup for the WP emulator. They have an easy to follow KB article to follow. Ensure that you make the VM have 2 processors and then you must manually setup each WP emulator to only have 1!! This is important as it can lead to crashes if you don’t (and I saw many crashes of the VM). The setup of Parallels with Windows was really simple, the only thing that bothers me is it tries to integrate to deeply with the host OSX with shared folders and apps. You can turn it all off, but you can just tell that there is too much going on.

VMWare:

After contacting VMWare via Twitter they sent me their KB article on how to set up hyper-v inside the VM. No matter what I did I could never get the WP SDK to install the WP emulators. I have always liked VMWare and the latest version is really nice. I like the setup process, settings screens and how it handles the integration with the host OSX. It feels more a self contained application running which I appreciate.

What about Genymotion?

In each VM platform to enable Genymotion it would require you to disable HyperV, reboot, and then run it. This would kill you WP emulator and is a pain to manage when trying to debug. Another option is to run Genymotion on your Mac and then Tunnel the connection from PC to mac, or in my case I find it easy to just share the code folder on the VM with my Mac, open it in Xamarin Studio and debug and run on the Mac. So this happens to work just fine with VMWare, however Parallels has a bug that VirtualBox can not run side by side with it. It will kill Parallels. So if you have a fast MAC the x86 android emulator is your next best step as it isn’t horrible.

Verdict:

I get the question of what is better between VMWare and Parallels and what should be used. If you need to do Windows Phone development then I recommend Parallels. I happen to actually like how VMWare looks and feels though so hopefully they will catch up. They aren’t that expensive so having them both installed isn’t so bad.