-   Linux - Networking (
-   -   VirtualBox: I want to share files between Fedora 9 host and Windows XP guest. (

Iltbreg 10-21-2008 04:04 PM

VirtualBox: I want to share files between Fedora 9 host and Windows XP guest.
Hi everyone!

I am right now experimenting the joys of VirtualBox 2.0.2 and I must say that I am not disappointed as I prefer it over VMware. I run Fedora 9 on my laptop and used VBox to install a guest Windows XP. Everything works just great except for one detail: I can't manage to bridge the two OS for sharing files.

On XP, I can access internet without problem and I set up a network connection for sharing files with the host(back with VMware, it's all I did and it worked).
On Fedora 9, samba is installed and I supposed it is set up properly since, as I said, it worked back when I was using VMware (Server) and I haven't changed anything.

The thing is that it seems Fedora is able to see XP but they can't communicate. For example, when I go to Placces > Network > Windows Network (I have F9 with Gnome), my XP machine is there but I get nothing when I double-click on it. Something tells me that this problem must be simple to solve.

In case that can be useful, here are some information:
from F9:

# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1B:24:58:5E:55 
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::21b:24ff:fe58:5e55/64 Scope:Link
          RX packets:200683 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30485 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:69067460 (65.8 MiB)  TX bytes:4515672 (4.3 MiB)

lo        Link encap:Local Loopback 
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:10798 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10798 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1490992 (1.4 MiB)  TX bytes:1490992 (1.4 MiB)

from XP:

C:\Documents and Settings\User>ipconfig

Windows IP Configuration

Ethernet adapter Local Area Connection:
        Connection-specific DNS Suffix . :
        IP Address . . . . . . . . . . . :
        Subnet Mask. . . . . . . . . . . :
        Default Gateway. . . . . . . . . :

On the first look, I thought that there could be some sort of mismatch between the IP addresses as I find XP's is a bizarre one. But I know little about networking so I prefer asking instead of attempting doing something stupid. I would greatly appreciate your help.

Thank you for your time

pwc101 10-21-2008 04:15 PM

You can add a share to the virtual machine which you can map as a network drive. You'll have to have installed the Guest Additions for XP. It's most concisely explained in the user manual in chapter 4.6 (Folder sharing) page 61 (

Originally Posted by VirtualBox User Manual
4.6 Folder sharing
Shared folders allow you to access files of your host system from within the guest
system, much like ordinary shares on Windows networks would – except that shared
folders do not need a networking setup. Shared folders must physically reside on
the host and are then shared with the guest; sharing is accomplished using a special
service on the host and a file system driver for the guest, both of which are provided
by VirtualBox.

In order to use this feature, the VirtualBox Guest Additions have to be installed.
Note however that Shared Folders are only supported with Windows (2000 or newer)
guests and Linux guests.

To share a host folder with a virtual machine in VirtualBox, you must specify the
path of that folder and choose for it a “share name” that the guest can use to access it.
Hence, first create the shared folder on the host; then, within the guest, connect to it.
There are several ways in which shared folders can be set up for a particular virtual

• In the graphical user interface of a running virtual machine, you can select
“Shared folders” from the “Devices” menu, or click on the folder icon on the
status bar in the bottom right corner of the virtual machine window.
• If a virtual machine is not currently running, you can configure shared folders in
each virtual machine’s “Settings” dialog.
• From the command line, you can create shared folders using the the VBoxManage
command line interface; see chapter 8, VBoxManage reference, page 98. The
command is as follows:

VBoxManage sharedfolder add "VM name" -name "sharename"
-hostpath "C:\test"

There are two types of shares:

1. VM shares which are only available to the VM for which they have been defined;
2. transient VM shares, which can be added and removed at runtime and do not
persist after a VM has stopped; for these, add the -transient option to the
above command line.

Shared folders have read/write access to the files at the host path by default. To
restrict the guest to have read-only access, create a read-only shared folder. This can
either be achieved using the GUI or by appending the parameter -readonly when
creating the shared folder with VBoxManage.

Then, you can mount the shared folder from inside a VM the same way as you would
mount an ordinary network share:

• In a Windows guest, starting with VirtualBox 1.5.0, shared folders are
browseable and are therefore visible in Windows Explorer. So, to attach the
host’s shared folder to your Windows guest, open Windows Explorer and look
for it under “My Networking Places” -> “Entire Network” -> “VirtualBox Shared
Folders”. By right-clicking on a shared folder and selecting “Map network drive”
from the menu that pops up, you can assign a drive letter to that shared folder.

Alternatively, on the Windows command line, use the following:

net use x: \\vboxsvr\sharename

While vboxsvr is a fixed name (note that vboxsrv would also work), replace
“x:“ with the drive letter that you want to use for the share, and sharename
with the share name specified with VBoxManage.

Iltbreg 10-21-2008 05:05 PM

Hey, thanks for the quick reply pwc101!

I knew the solution would be quite simple but I didn't expect it to be that simple. VBox definitely is a great product. I should have looked for that manual before. Now I'll go sit in a corner for a few hours to teach myself to pay more attention.

Thank you very much for your help.

pwc101 10-21-2008 05:16 PM


Originally Posted by Iltbreg (Post 3318059)
VBox definitely is a great product.

Yup, it's pretty useful :)

Glad you've got it fixed.

Quakeboy02 10-21-2008 05:18 PM

Hey pwc101, any chance you could look at this thread of mine. The thing keeps changing:

pwc101 10-22-2008 05:03 AM

I've never had any problems like that getting the networking running. I've only ever bridged a network interface on a Windows host, so can't help with that, I'm afraid. Usually, the networking Just Works (TM). Also, I use the binary, non-open source version.

All times are GMT -5. The time now is 11:25 PM.