I wanted to set up a Windows XP Guest, and have it share its files TO the host, using Windows networking (a.k.a. SMB, a.k.a. CIFS), via the VirtualBox NAT interface. (I'm using Portable-Virtualbox, and it supports ONLY the NAT adapter.) This IS possible. I've done it. Here's how.

  1. In the guest, assign its adapter the permanent address of 10.0.2.15.
  2. Give it a net mask of 255.255.255.0. (Otherwise, if you use 10.0.0.1 for your host loopback, you've got a problem.)
    • You can use another address, but you'll have to consistently substitute your other address EVERYWHERE I use this one.
  3. Create a Loopback adapter in the host.  (See http://www.kleinfelter.com/loopback-adapter-xp for de..tails.)
  4. Configure the Loopback adapter
    1. Enable Client for Microsoft Networks.
    2. Disable File and Printer Sharing for Microsoft Networks.
    3. Enable Interent Protocol (TCP/IP)
    4. Click on properties for TCP/IP
    5. Assign the address 10.0.0.1.
      • You can use another address, such as 192.168.2.2, but you'll have to consistently substitute your other address EVERYWHERE I use this one.
    6. From Advanced->WINS:
      1. Enable LMHosts Lookup
      2. Disable NetBIOS over TCP/IP
    7. Enter 9999 for the interface metric.
  5. Start VirtualBox and define the following port-forwarding rules for the NAT adapter
    1. 10.0.0.1, TCP port 135 to 10.0.2.15, same port
    2. 10.0.0.1, UDP port 135 to 10.0.2.15, same port
    3. 10.0.0.1, TCP port 136 to 10.0.2.15, same port
    4. 10.0.0.1, UDP port 136 to 10.0.2.15, same port
    5. 10.0.0.1, TCP port 137 to 10.0.2.15, same port
    6. 10.0.0.1, UDP port 137 to 10.0.2.15, same port
    7. 10.0.0.1, TCP port 138 to 10.0.2.15, same port
    8. 10.0.0.1, UDP port 138 to 10.0.2.15, same port
    9. 10.0.0.1, TCP port 139 to 10.0.2.15, same port
    10. 10.0.0.1, UDP port 139 to 10.0.2.15, same port
    11. 10.0.0.1, TCP port 445 to 10.0.2.15, same port
    12. 10.0.0.1, UDP port 445 to 10.0.2.15, same port
  6. Exit VirtualBox
  7. Reboot the host
  8. Start VirtualBox, and start your guest.
  9. Inside the guest, share your C-drive as "C".
  10. In the host, Start->Run, and enter \\10.0.0.1\C

Note: You can dispense with setting up the Loopback adapter, but it is awkward. Here’s how:

  1. Don't create a loopback adapter. (Or you can ignore the one you set up.)
  2. Set up the VirtualBox port forwarding as above, using "127.0.0.9" instead of "10.0.0.1"
  3. Instead of Start->Run with \\10.0.0.1, you'll use \\127.0.0.9, but BEFORE YOU DO SO
    • From a Command prompt, enter "net stop server"

You have to do this in order to disconnect the host’s SMB/CIFS (file server) protocol from 127.0.0.. When you used a virtual Loopback adapter (which you assigned to 10.0.0.1), you disconnected the file server protocol from the adapter when you followed the “Disable File and Printer Sharing for Microsoft Networks” instruction above. Since the 127... address range doesn’t show up in Network Connections as an adapter, you have to stop (or uninstall) the file sharing service.

Conveniently, once you’ve connected to the guest via 127.0.0.9, you can enter “net start server” and re-start file sharing on the host, without losing your connection to the guest.

Note: If you are using McAfee Host Intrusion Preventionon your host machine, here’s some extra steps to do before you Start->Run and \whatever:

  1. Right-click on the "M" in a shield in the Windows "notification" area.
  2. Select "Manage Features"
  3. Select "McAfee Host Intrusion Prevention"
  4. Select "Disable Firewall"

After you’ve connected to the guest, follow the instructions for disabling the firewall, but in the last step select “Restore Settings” instead of “Disable Firewall”