VirtualBox and Multiple Monitors

Recently I had to debug a Windows issue that only ocurred on secondary monitors (that is, in a multiple monitor setup).  Although I had two monitors, my actual development environment was a virtual machine in VirtualBox.  Moreover, for testing I would need many monitors to be able to check for such things as negative coordinates, for example when a monitor is placed to the left of your primary.  (By the way, if you never knew, you can go to your Windows 7 display settings and drag monitors to the left, right, and even above your primary monitor).

Of course, the reason I use virtualization is so I do not have to install stuff on my local machine, So I was thinking “Gee, wouldn’t it be awesome if VirtualBox actually supported multiple monitors?”.  Well amazingly, after hunting around a bit for the VM settings it turns out that you can simulate as many monitors as memory permits!

Monitor Count - up to 64!!

“Monitor Count” setting – up to 64!!

To edit the VM settings it must first be off.  Then select the machine from the left-side machine list and either click the “Settings” gear in the menu bar or right-click on the machine name and choose “Settings”.  Under the “Display” settings there is a “Monitor Count” slider bar that allows you to set multiple monitors (see image).  Note that there is a “Video Memory” slider above the “Monitor Count” – as you increase the number of monitors you will have to increase the amount of video memory dedicated to the VM.

Just like multiple monitors!  Except with windows...

Just like multiple monitors! Except with windows…

When you restart the VM the added monitors will appear as additional VirtualBox windows.  In Windows go to the Display settings to assign the positions of the monitors.  The windows will behave just like physical monitors, in that when you move an open window or your mouse off screen it will move to the appropriate “monitor” (VirtualBox window).  Since the additional monitors are just added windows, you can actually have more VM “monitors” than the amount of real monitors you have.

In VirtualBox you can make a machine go fullscreen (either from the menu or by using Ctrl-F).  With mutiple VM monitors you can make individual windows go fullscreen on specific real monitors, or have them all go fullscreen and basically replace your monitors with the VM.  Be aware, though, that you cannot go fullscreen if you have more VM monitors than physical, even though you are only trying to make one VM monitor go fullscreen (I am not sure if this applies if you have say 3 VM monitors and 2 real monitors and want to just make one VM monitor go fullscren – I have to check that).

– brs

VirtualBox 4.2.6 with Extension Pack
Host: Windows 7 Professional x64
VM Guest: Windows 7 Professional x64 (also tested with Windows XP Professional)


Tags: , ,

%d bloggers like this: