iPhone + iTunes + VirtualBox


As posted a few days ago, I configured my new corporate laptop. But iTunes was still missing (to sync my iPhone). I’m using iTunes to sync some Outlook content (contacts and agenda) and security podcasts (ok, and some MP3s too &59#;-).

Unfortunately, VirtualBox is known to be very sensitive regarding the USB devices management. Anyway, I successfully re-synced my iPhone on the new notebook. [Reminder: The native OS is Ubuntu and Windows XP is running as a VirtualBox guest]. Here is my procedure to re-sync the iPhone. Note that the iPhone support has been fixed in release 2.0.6 of VirtualBox!

First, backup your old iTunes library. Follow the procedure described in the documentation. Keep the DVD or CD in a safe place for later use. It’s a straight forward operation.

Then, configure the USB support on Ubuntu/VirtualBox. In my case (Ubuntu 8.10 – Intrepid), the USB support in VirtualBox was not working out of the box. A nice error message was displayed each time I started the guest:

Could not load the Host USB Proxy Service (VERR_FILE_NOT_FOUND). 
The service might be not installed on the host computer. 

I had to manually perform some changes. Edit the file /etc/init.d/mountdevsubfs.sh and add the following lines at the end of the do_start() function:

mkdir -p /dev/bus/usb/.usbfs
domount usbfs "" /dev/bus/usb/.usbfs usbfs \
ln -s .usbfs/devices /dev/bus/usb/devices
mount --rbind /dev/bus/usb /proc/bus/usb

The user running the VirtualBox guest must have read/write access to these file (check the permissions):

# /bin/ls -l /proc/bus/usb/*/*

Now, start VirtualBox and add the detected devices to your guest. Connect your iPhone (it should be detected at Linux level). You’re ready to boot your Windows XP guest. Once done, the detected USB devices should be available. Windows should detect your iPhone like a digital camera now.

Re-install iTunes and restore your data (with the DVDs/CDs created during the first step). Once the restore process done, iTunes will detect your iPhone and start a sync. iTunes will detect that the iPhone was previously sync’d with another computer and ask you a confirmation: You can choose to merge or replace the data. Choose the first option.

The backup + sync operations took longer than on a native Windows XP but it worked perfectly. Once the synchronization successfully completed, disconnect the iPhone in a safe way: first, disable the iPhone via the VirtualBox sub-menu (the tool bar below the guest window) then disconnect the USB cable. Yes, my iPhone calendar is up-to-date now!


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.