My VirtuaBox Setup

I am a computer science major, which means I write a lot of computer code. I need to be able to write programs for a wide variety of platforms (Windows, Mac, iOS, Android, etc) and wanted to do it from one machine. The only option was to get a Mac since only on a Mac can you write Mac and iOS software, but also you can write Windows and Android software as well.

At first I tried running Windows in Bootcamp, which lets you run Windows just like you would on a regular Windows laptop or you can choose to run Mac each time you reboot. The experience was not great. Performance wasn't what I had expected. My battery life was literally cut in half. The screen resolution didn't fit very well on my Retina Display Macbook. I just didn't like it. Plus I had to have doubles of all my software in both operating systems.

I erased the Windows installation and reinstalled it in VirtualBox. If you don't know what virtual machines are, there are plenty of descriptions online. Suffice it to say that it makes a whole operating system run inside of another operating system as if it were just another program. It worked beautifully. Ironically it worked better to run Windows inside of MacOS than to run it by itself. (Since it is running in both cases, I blame the drivers Apple supplies, it is the only non-common denominator I can think of.)

I have had a number of my classmates ask me about my setup. Us tech guys can figure out pretty quickly just from a glance at the screen when something is set up differently. So here is how I set up my virtual machine.

First, I use VirtualBox from Oracle, mainly because it is free and it works. I created a virtual machine in VirtualBox and gave it 2 GB of RAM. Then I installed Windows 8 from an ISO I got from my school. Pretty standard virtual machine stuff to this point.

After I had Windows installed and running I turned on Bidirectional Clip Sharing in the Devices menu. This will synchronize the clipboard between both the host operating system (MacOS) and the guest (Windows). That way when I hit Copy in one of them I can just hit Paste in the other, like I wasn't using two operating systems. Since my web browser is in the Host and my code is in the Guest this comes in handy.

I also set up a shared folder in VirtualBox. This creates what the Guest OS thinks is a network shared drive but is really just a folder in the Host OS. I can drag and drop files between them like this. Pretty slick.

The last setting was in MacOS itself. I mentioned I have a MacBook Pro with retina display. Apple retina displays (on iOS as well and OS X) create sharper images by doubling the number of pixels in each direction but not the size of the objects. So if there were 10 pixels to display an object (like a character of text) there are now 20. This makes the text look more like a printed page and less like a bunch of pixels. The problem is that VirtualBox doesn't support retina display (or HiDPI) mode, so for each pixel it tries to display the graphics card has to scale the image to the screen. This takes more time and introduces a lot of lag, especially in more graphics heavy applications on the Guest OS.

I solved the issue by using a MacOS app called QuickRes. It allows you to force the Mac to display a certain number of pixels, including disabling the HiDPI mode. With HiDPI disabled I could then run Windows with no problem. I even discovered that I like my text much smaller than the default settings allowed but was possible with QuickRes, though my friends and school and my wife complain about how small everything is.

Hope this helps some of you. Let me know if you have any questions, and I might answer them soon. I am trying to check this more often.

Edit: Aug. 2, 2014.
I just found another setting that makes life better running Windows on my Mac. In the mouse settings turn off "Enhance Precision". This setting slows the mouse cursor down more when the mouse is moving slowly, so it is moving less on the screen for every inch you move the mouse. Mac OS does this as well, so to have Windows and Mac OS doing it at the same time makes the mouse feel weird.

Comments

Popular Posts