Using your iPhone with Virtualbox isn't as simple as plugging it in once your virtual machine is running. You have to be using the correct version of Virtualbox, as the open-source edition does not have USB support. Once you have the right version of Virtualbox, you need the Virtualbox Extension Pack.
If you downloaded Virtualbox from the Virtualbox website, you're good to go. If you're using a Linux machine and downloaded Virtualbox for your repositories, you've probably downloaded the Open-Source Edition, or OSE. This version does not have USB support. Any virtual machines you created with the OSE will work with closed-source version of Virtualbox. Once you uninstall the OSE, install the version of Virtualbox you downloaded from the website. When you open it, your virtual machines will be there.
Virtualbox Extension Pack
The Extensions Pack for Virtualbox allows you to use USB devices. First download the file, called "Oracle_VM_VirtualBox_Extension_Pack-4.1.6-74713.vbox-extpack", from the Virtualbox website. Then open up Virtualbox and open "Preferences" from the File menu. Go to Extensions and add the extensions file. If you're using Ubuntu, you'll need to go one step further and add your user account to the "vboxusers" group. Open the System Settings from the launcher, then go to "Users and Groups." Once there, click "Manage Groups." Reboot your system.
Setting Up USB
Plug your iPhone into your computer and open up Virtualbox. Choose the machine that you want to use your iPhone with and open up the machine settings. In the left pane click the option "USB." Make sure that "Enable USB Controller" and "Enable USB 2.0 (EHCI) Controller" are both selected. Click the "Add" button on the right side of the window, which looks like a USB plug with a green plus sign, and select the iPhone. Click "OK" to close settings.
Using Your iPhone
Once you've set up the USB, start your virtual machine. In the Title bar, you will see the "Devices" menu; click this and go to "USB Devices." Select your iPhone to mount it to your virtual machine. Once mounted, you can use the iPhone as you would if you were using your native OS. You can install iTunes so long as your virtual machine is running a compatible operating system, either Windows or OS X.