June 4, 2009

Sharing Folders on VirtualBox

Most of the times, we need to share files and folders from our home machine to the virtual machine. To do this, follow the following steps:

  1. On the main VirtualBox window, click the Devices menu then select Shared Folders.
  2. Click the button at the upper right of the Shared Folders dialog box to add a shared folder. For example, share the /home/username/SharedFolder.
  3. Browse the path to the folder you would like to share.
  4. Type in a folder name for it (like SharedFolder) then click the OK button.
  5. Click the OK button in the Shared folders dialog box.
  6. Go to the virtual OS. On a Windows virtual OS, click the Start button then click Run.
  7. Type in cmd to open up the command-line terminal.
  8. Type net use x: \\vboxsvr\SharedFolder where SharedFolder is the name of the shared folder and x: is the drive name you want to assign to the shared folder.
  9. Press the Enter key and then exit the command prompt. After the above steps, you will see the shared folder as a network drive under My Computer.