Windows/Unix development on Mac Part 1: Virtual Machines

September 17, 2016 09:29

A while back I took a hard look at virtual machines (VMs), but at the time they didn’t work very well, and I wasn’t really doing a lot of cross-platform development anyway.

Both of those have changed, so it’s time to reassess everything. And it looks like I may need to travel, so I want to end up with a portable development environment. So I’ve decided to get a MacPro laptop to be my primary development machine, run VMs on it to support Windows and the various flavors of Xnix, and move projects from local storage to the cloud. (I’ve been a Windows & Xnix guy forever, so Mac will be a new experience in many ways, I’m sure!)

My First Mac

I opted for a "refurbished" 17" MacPro laptop from Macs4U.com — 16g ram, 0.5T SSD. Apple doesn’t make 17" laptops at present (near as I can tell that’s because they’ve having trouble making 17" displays using their new Retina technology) but my eyeballs really benefit from the physically bigger screen.

My ‘new’ Mac has worked great except for one snag — the DVD drive doesn’t want to read disks. I called them up, "we test every drive before we ship it" — of course you do, but that doesn’t help me now. The drive on this machine doesn’t have a tray — you insert your CD/DVD into a slot. The friendly tech guy assures me these drives are really reliable, except that if the lens gets dirty you can’t clean them with a Q-Tip and alcohol like you can with tray drives. Of course I could send it back and what with transit time etc. I’m looking at being without it for a week. Ugh! Instead I’ve ordered a DVD drive cleaner disk from Amazon and we’ll hope that does the trick.

Windows on Mac

In terms of which VM to use to run Windows, there appear to be three main contenders:

  • Virtual Box: natively works with Vagrant (a virtual machine management tool — more about that presently)
  • Parallels: A VM provider whose primary focus is Windows on Mac. Reviews of running Windows on Mac almost universally say this is the way to go
  • VmWare: also well regarded.

I opted for Parallels for my Windows VM and so far it is working flawlessly.

Windows 7 (which I had on hand) installed fine, but I simply could not get Windows Update to work. (It would silently hang either at `checking for updates' or stay stuck at `0% downloaded'.) Groveling around the Internet, it seems that others are experiencing the same problems even with bare metal installs. I’ve come to the conclusion that Windows 7 is beginning to experience ‘end of life’ issues as Microsoft moves to retire it.

So I’ve installed Windows 10 Pro, a process that went without a hitch including Windows Update.

Xnix on Mac

The Mac kernel is apparently a BSD kernel modified for their particular requirements (particularly UI APIs), and a bash shell for it is available via Terminal. However, mucking around with those bits (updating things, ferinstance) does not seem like a good idea so I’ll be using a VM for Xnix development:

  • I can update my Xnix VM(s) to my hearts content while minimizing my chances of clobbering my OS.
  • I can use whatever flavor of Xnix best matches the project at hand.

Vagrant/VirtualBox does Xnix VMs very well. But it has its own complexity to it, which will be the subject of my next blog.

Also, by having Parallels for Windows and VirtualBox for everything else, it’s trivial to have a ‘permanent’ instance of Windows up while simultaneously running the Xnix instance du jour.

    Previous    Next