Posts Tagged ‘VirtualBox’

VirtualBox and Multiple Monitors

Thursday, July 26th, 2012

As a SharePoint consultant, I really enjoy having a local copy of a full SharePoint server on my laptop. As I am patiently waiting for Windows 8 to release with Client Hyper-V, I’m continuing to use Oracle’s VirtualBox software to host my SharePoint development environments.

With my current engagement, I find myself in my client’s offices Monday through Thursday and at my office on Friday. At my office, I have an external monitor that I use in addition to my laptop’s screen. At my client’s offices, I just have my laptop’s screen to use. Whenever I’m able to have a secondary monitor connected, I like to use VirtualBox’s multiple monitor support to show my VM on both of my screens. VirtualBox achieves this look by opening two windows – each window meant to be maximized on one of the two monitors.

On Fridays I get to use two monitors with two VirtualBox windows. However, come Monday, I typically forget to reset the virtual machine back to one monitor. Even though I’m only using one monitor, VirtualBox still opens two windows for me! With only one monitor, this makes the VM very tough to use. The only remedy is to shut down the VM, reconfigure the setting, and restart the machine; a process that can be quite lengthy on a server with SharePoint 2010 and SQL installed!

I turned to PowerShell to help ease my Monday morning woes. I developed the script below and put a link in my Startup folder so that, each morning when I boot my laptop, all of my VirtualBox VMs will be automatically configured to use the number of monitors that I currently have connected to my laptop.

Fair warning – this was a quick script just for my personal use. While it should work for you, it does not have any error handling to report if things go awry. See the comments in the script for details.

VirtualBox Unidentified Network

Thursday, February 2nd, 2012

Thanks to Oisin Grehan and his Nivot Ink blog for providing the foundation of this post!
VMWare VMNET Adapters Triggering Public Profile for Windows Firewall


I use Oracle’s VirtualBox to run x64 SharePoint virtual machines from my laptop. I’ve also noticed an Unidentified Network in my Windows 7 list of networks. That is caused by VirtualBox’s Host-Only Network Adapter. It wasn’t harming anything at the time so I left it alone.

However, I later attempt to enable PowerShell remoting on my host laptop for work with SharePoint scripting. Upon doing so, I was greeted with the following error message while attempting the Enable-PSRemoting cmdlet:

Set-WSManQuickConfig : WinRM firewall exception will not work since one of the network connection types on this machine is set to Public. Change the network connection type to either Domain or Private and try again.

Another helpful error message! That seems easy enough; Windows makes it very easy to modify the settings for each individual network adapter to Private, Work, or Public depending on your personal preference. However, this is not the case with an unidentified network. With an unidentified network, Windows sticks to its Public settings and will not change it.

So can I now not enable PowerShell remoting since I can’t remove the Public designation of VirtualBox’s unidentified network? No! VirtualBox’s Host-Only network isn’t really a true network connection at all. It is an endpoint adapter. Kudos to Oisin Grehan for developing a nice PowerShell script that will solve the issue by telling Windows, via the registry, that the network adapter is an endpoint device and not a true external network connection. This will cause Windows to stop treating the VirtualBox Host-Only adapter as a network and thus remove the unidentified network (and its public designation) from my list of networks. Problem solved! I’ve modified Oisin’s script to account for VirtualBox’s Host-Only instead of VMware adapters.

Note: This script will need to be executed every time VirtualBox is updated because the update will replace the existing adapter and cause the settings in the registry to be lost.