I have a fairly unique machine I develop on. I run Ubuntu as my host environment, and run development and office work off of virtual machines through VirtualBox with Windows 7. You may thinks it is a bit crazy but it has some real advantages if you have the patience to work through some of the nuances.
Ubuntu runs around 400 megs of RAM for the host, which compared to Windows 7 is insanely low; it’s quick, light, and stable. My virtual machines perform extremely well on the excess RAM (4 to 8 gigs) per VM and I readily create snapshots whenever installing new software or backing up my system(s). Additionally, I can run dedicated servers as VM’s to test enterprise applications without involving our internal networking resources until we’re ready to deploy to a test/staging environment.
With all of this being said, there are a few things that can drive you crazy; namely, Windows Phone 7 and Zune.
WP7 in VirtualBox
There are several articles on the Internet which discuss how VirtualBox and USB devices work, but here is the cliff-notes version:
USB devices can only be used by either the host or a client VM at any one time. Therefore, to use a USB device (such as WP7), you need to enable it from the VirtualBox Devices drop down (Devices > USB Devices > Unknown Device). Most likely, your device will be displayed as an Unknown Device.
Go ahead and select the device so that it now displays a checkbox next to the device. This should be enough to auto-start the Windows device driver installation which will most likely fail. You can open Device Manager to view the driver which should now be labeled USB Composite Device.
The reason this has failed is because by default, VirtualBox does not enable USB 2.0 (EHCI) Controller. You can enable this by opening the Settings for the VM you would like to connect your WP7 to, and selecting the USB tab on the left side. This will allow you to check the appropriate checkbox as seen in the following screenshot:
If you start the VM from this point you will most likely see the following error:
No worries, we simply need to install the Oracle VM VirtualBox Extension Pack to enable USB 2.0 support. I did pause to wonder why you have the ability to select Enable 2.0 USB within the out of the box application, yet it fails at the point of running the VM. It seems this warning could occur as soon as you select the checkbox or simply include the extension pack installation when selecting the checkbox to begin with. Regardless, you can download the extension pack from Oracle (http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html which should look similar to the following screenshot.)
After downloading, simply double click the file and you should receive the following prompt:
Once you have finished installing, run the VM and select the USB device again. This time, Windows will auto-install the device driver properly and you should receive the following success screen:
This may also auto-load Zune and attempt to sync your data for this VM. After completion you should be able to manage content on your phone just as you would a physical installation. Have fun, even busy coders need a bit of music to get through the day!
8 thoughts on “Running Zune and WP7 on VirtualBox”
OMG! Thanks! That was bothering the crap out of me!
Exactly what I was looking for. I have the same setup (Ubuntu running various Linux and Windows 7 virtuals for work), and this worked like a charm.
THANKS A LOT!!!!!!!!
Really, it’s been driving me crazy before i read your post. i’m also developing in a VM and that’s what i need.
Have you tried installing Windows Phone updates through Zune running in the VirtualBoxed Windows? I remember having some problems when I previously tried Nokia Suite to update an older Symbian phone (probably because it appeared as a new usb device or so), so wondering if WP is any different.
I have the same setup except my virtual box runs Windows Xp SP3. Zune and the WP drivers are installed and Zune recognizes the device. The only thing I can’t do is update the Phone OS (it fails to uptade every time).