File Sharing between HOST (win xp) and GUEST (Win 95)

Discussion in 'Virtual PC' started by Josh, Feb 3, 2004.

  1. Josh

    Josh Guest

    Hello. Do I need a network card to setup file-sharing
    between the OS's stated above or is it a virtual network?
    If so where can I find instructions on how to set it up?
    Thanks in advance :)
     
    Josh, Feb 3, 2004
    #1
    1. Advertisements

  2. Hi,

    You don't need a network card in the host to do file sharing. You can use
    the Loopback adapter:
    http://support.microsoft.com/support/kb/articles/Q236/8/69.ASP

    --
    --Jonathan Maltz [Microsoft MVP - Windows Server]
    http://www.visualwin.com - A Windows Server 2003 visual, step-by-step
    tutorial site :)
    http://vpc.visualwin.com - Does <insert OS name> work on VPC 2004? Find out
    here
    Only reply by newsgroup. I do not do technical support via email. Any
    emails I have not authorized are deleted before I see them.
     
    Jonathan Maltz [MS-MVP], Feb 3, 2004
    #2
    1. Advertisements

  3. Jonathan,

    Me again :) Does that mean I can move files between VMs using the Loopback
    Adapter rather than a CD or such?

    TIA

    Carl

     
    Carl M. Thomas, Feb 3, 2004
    #3
  4. You could always just use the shared folders feature of Virtual PC- if all
    you want to do is copy some files back and forward.

    --
    Cheers,
    Benjamin Armstrong
    ======================
    Virtual PC Program Manager

    This posting is provided "AS IS" with no warranties, and confers no rights.
    You assume all risk for your use.
     
    Benjamin Armstrong [MSFT], Feb 3, 2004
    #4
  5. Yes, and if your guest is Windows (or DOS) then you can use folder sharing
    so you can move files using the VPC onto any folder on your host by moving
    it onto the shared folders' drive letter(s)

    --
    --Jonathan Maltz [Microsoft MVP - Windows Server]
    http://www.visualwin.com - A Windows Server 2003 visual, step-by-step
    tutorial site :)
    http://vpc.visualwin.com - Does <insert OS name> work on VPC 2004? Find out
    here
    Only reply by newsgroup. I do not do technical support via email. Any
    emails I have not authorized are deleted before I see them.


     
    Jonathan Maltz [MS-MVP], Feb 4, 2004
    #5
  6. Benjamin

    Half true - I do use it, but I can't copy files from the host to the guest
    through a shared folder. Only from the guest to the host. Otherwise I
    wouldn't be looking for an alternative. I get an error message stating that
    the parameter is wrong (?). I also can't open a file on the host and save
    it on the guest. Same apparent problem.

    If anybody knows what's wrong, please let me know - save me some hassle.

    BTW - the host is WinXP Pro and the guest is Longhorn.

    TIA

    Carl
     
    Carl M. Thomas, Feb 4, 2004
    #6
  7. Jonathan,

    I'll copy to you the message I just sent to Benjamin who also suggested the
    shared folder approach.

    "Benjamin

    Half true - I do use it, but I can't copy files from the host to the guest
    through a shared folder. Only from the guest to the host. Otherwise I
    wouldn't be looking for an alternative. I get an error message stating that
    the parameter is wrong (?). I also can't open a file on the host and save
    it on the guest. Same apparent problem.

    If anybody knows what's wrong, please let me know - save me some hassle.

    BTW - the host is WinXP Pro and the guest is Longhorn.

    TIA

    Carl"

    Would be nice to do the simple thing - I started out with the shared folder
    approach and still use it one way. But for small files, and such, I've used
    a floppy. I have some bigger things I want to move to the guest, but can't
    do so through a shared folder.

    If you have any ideas, I'm reading :)

    Carl

     
    Carl M. Thomas, Feb 4, 2004
    #7
  8. Hi,

    If it weren't Longhorn, you could drag and drop from the host onto a Windows
    guest. Longhorn's got bugs, it's alpha. Unfortunately, there isn't
    anything anyone can do about that, as it is expected (and the odds of
    Microsoft releasing updated additions for an OS that will change so much
    before its RTM are _very_ low)

    --
    --Jonathan Maltz [Microsoft MVP - Windows Server]
    http://www.visualwin.com - A Windows Server 2003 visual, step-by-step
    tutorial site :)
    http://vpc.visualwin.com - Does <insert OS name> work on VPC 2004? Find out
    here
    Only reply by newsgroup. I do not do technical support via email. Any
    emails I have not authorized are deleted before I see them.


     
    Jonathan Maltz [MS-MVP], Feb 5, 2004
    #8
  9. Understand. Actually, it's cleaner than I thought it would be. I had hopes
    there were an easy way to fix this, but if it's inherent right now, I'll
    just need to work around it. That's why my interest in the Loopback
    Adapter. Looks like a tradeoff, but an option.

    Thanks for the help.

    Carl

     
    Carl M. Thomas, Feb 6, 2004
    #9
  10. Josh

    pml Guest

    To use loopback adapter you install it as a network adapter on the host,
    assign an IP address to it (suggested IP address on host: 192.168.0.1 mask
    255.255.255.0; to make it easier to enable Internet Connection Sharing later
    if desired). Then on each guest, you select the loopback adapter instead of
    your physical adapter or "NAT" (you might have to look on the network
    properties/bindings on the loopback adapter if it is not avalible for VPC ie
    the virtual switch driver). Inside the guests (in the OS), you configure
    networking as usual; using drivers for the DEC/Intel/Tulip 21140 adapter.
    This way you will have local networking capabilities on your machine.

    Some notes:
    On the guest, *always* use the 21140 LAN adapter to connect to the "virtual"
    network (ie loopback adapter on the host). Do not use a loopback adapter on
    the *guest(s)* (it is technically possible but will accomplish nothing
    useful in this case), or try to install drivers for the physical network
    adapter on the host (eg 3C905), the guest will not find any network adapter
    other than the emulated 21140.

    Unless you install a DHCP server or activate Internet Connection Sharing on
    the host, you will have to assign IP addresses manually (well not entirely
    true, they might get 169.254.x.x ("linklocal") addresses if guest OS
    supports it, but assigning addresses manually make the guests boot faster
    and will in general work better).

    When connecting from the guest to the host, use the address 192.168.0.1 (ie
    the adress you have assigned to the loopback adapter on the host). Do not
    use an IP address that is assigned to another interface on the host, such as
    172.20.113.42; there might be routing issues (eg default gateway on guestes)
    or the IP address on the host might be unavailible (temporarily unbound from
    the host) if network cable on the host is unplugged.

    When using network for file sharing purposes betwen host and guest(s) you
    will have to administer usernames and passwords; a typical example: You boot
    the host, login as "administrator" (with one password), start a guest, login
    as "administrator" (with another password). In this case, you will have to,
    in some manner, authenticate to the other "PC" and ensure you are specifying
    a password, otherwise you will get a "Bad username or password" error
    message if the passwords are different, sometimes even without the
    opportuniity to supply username/password. Note that the host and guest(s)
    do *not* share user authication data, the user databases are separate;
    unless both host and guest(s) are members of the same domain (unlikely - if
    you are using the physical host computer "on the road" the domain
    authentication may not work; and with VPC 2004 the host shouldn't be a
    domain controller since it's unsupported to install VPC 2004 on a server OS
    version.) Try to use either same (local) usernames+passwords on host and
    guest(s), or use different usernames (ie if logged in as "ThisUser" on the
    host make sure there is no user named "ThisUser" on any guest, to avoid an
    implicit "autologin" attempt, which would fail). Also note that in windows
    XP, you cannot connect to a network resource and authenticate without
    password; eg your local host user does not require a password, you have a
    user account on a guest also without password but you cannot connect anyway,
    this is a configurable security policy setting in XP.


     
    pml, Feb 7, 2004
    #10
  11. Sounds like to do use the Loopback Adapter, I have to give up a perfectly
    fine connection to the outside world from the VM. This discussion does
    bring to mind some more alternatives. The host connects to another machine
    in my office through a wireless connection. I guess I could deposit the
    stuff I want to move to the guest onto there and then move them to the
    guest. Might also be easier to ftp the stuff through a Website I maintain
    for our Corvette Club. Those sound simple compared to using the Loopback
    Adapter :)

    For all and sundry, another observation about copying from host shared
    folder to guest. At least in Longhorn's case. A ZIP file in a shared
    folder can be opened by the Longhorn Windows Explorer. Further, the files
    inside can be extracted into a guest folder. They can also be copied out
    into a guest folder by drag and drop. Go figure.

    Thanks

    Carl

     
    Carl M. Thomas, Feb 7, 2004
    #11
  12. Josh

    pml Guest

    If the physical network adapter on the host works for you, you dont have to
    install the loopback adapter. However, there is still some issues when using
    networking for file sharing between host and guest(s) such as authentication
    (usernames and passwords).

    The loopback adapter is a solution when you wan to have a "real" network
    between host and guest(s) and

    * the host has no physical network adapter
    * the host's physical network adapter is not fully
    compatible with VPC
    - Typical example: You can communicate from
    guest to Internet but not from guest to host
    (problem for a few wireless adapters)
    * you want to have an isolated network, eg for
    testing a DHCP server in a corporate environment
    * you often detach the host computer from the
    physical network (eg laptop on the road)
    * at home where host connects to ISP using a
    "modem" solution or you only have one
    computer and no "broadband firewall" box.

    When you have installed the loopback adapter you will have connectivity to
    the outside world by activating "Internet Connection Sharing".

    Why not to use the builtin NAT: It does not allow communication from host to
    guest and that it doesn't work well with all protocols.
     
    pml, Feb 7, 2004
    #12
  13. I guess I'm not sure what you're saying, so let me parse it a bit:
    Right now I have file sharing disabled on both real systems. I use LapLink
    for moving things around. I may be being overcautious. There is a NAT in
    the DSL modem and one in the Wireless router. So maybe I need to understand
    file sharing better; I'll look it up. We're far enough away (>500 ft) from
    anybody that I really don't worry about somebody coming in through the
    wireless link.
    If I read this correctly, I don't need to use the loopback adapter (?)
    Interestingly enough, I connect the machine VPC is inatalled on to the modem
    through an Intel ethernet adapter and the other machine on the network
    through a USB link. It;s an older 11 MHz wireless system, but it has full
    100 MHz ethernet connectors as well. I guess I could connect the host
    through a USB wireless adapter (like I originally had it connected), but
    since it's my prime machine, I hate to give up the speed. Since VPC is not
    USB compatable, it's the only option that separates the two.
    I don't understand this point. I can connect out with both the host and
    guest simultaneously now through the ethernet adapter and have run different
    Web sessions this way, downloading on the host, for example, while searching
    a site with the guest. There is some slowdown as cycles are used, but I've
    hit no conflict yet between them that I can detect. Is there some advantage
    I'm missing to doing it with connection sharing? Where do I enable
    connection sharing - on the host? guest?, both?
    I don't understand what this is saying at all. Do I really need a third
    NAT? Why would I not want communication from host to guest? That's what
    I'm
    trying to get. Which protocols does it work with?

    Need unconfusing (?) :)

    Thanx,

    Carl
     
    Carl M. Thomas, Feb 8, 2004
    #13
  14. Josh

    pml Guest

    File sharing (using windows networking) is a way to move files between host
    and guest(s), an alternative to using "shared folders", eg when you from the
    host want to acess files on the guest or the guest OS does not support the
    "shared folders" functionality that you need. If you only want to be able to
    connect from the host to the guest, you don't have to enable file sharing on
    the host (but the host must at least have a Windows networking
    client/"workstation service" installed, which it is in most instances), but
    on the guest you need to activate file sharing and share a folder.
    VPC is not USB compatible in the way that guests can use the devices
    connected to USB "natively" using hardware drivers installed in the guest OS
    (example: you have a windows 98-only digital camera so you would want to
    install a guest windows 98 that would be using the camera; this is not
    possible), but the guest may indirectly be able to use the USB devices
    connected to the host; an USB network adapter may work using the network
    drivers on the host, but the guest will *always* see it as an 21140 ethernet
    network adapter. (In practice the USB network adapter could be unable to
    work in "promiscuous mode" yielding it less useful with VPC, and using a
    real ethernet adapter would probably give better performance and stability.)
    If you only use the physical network adapter on the host (you are not using
    the loopback adapter at all), or you want to have a completely isolated
    network (for the purpose of only sharing files between host and guest and
    *not* accessing internet or other physical computers from the guest) you
    don't need to activate internet connection sharing.


    To activate Internet Connection Sharing

    On the *host*:
    After you have installed the microsoft loopback adapter driver, go to
    network properties of the computer. Right-click the physical adapter, and
    select the "Advanced" tab. There you now have a checkbox "Allow others to
    use the internet connection of this computer". Check that box and press OK.
    If you have assigned an IP address to the loopback adapter you may now get a
    popup box saying that the IP address of the other adapter (=loopback
    adapter) has changed to 192.168.0.1.

    On the *guest(s)*:
    In general you don't need to do anything on the guest(s), with one
    exception: If you have assigned IP addresses on the guest(s) manually you
    should either set the guest use DHCP or or to assign an address in the range
    192.168.0.2 -- 192.168.0.254, mask 255.255.255.0, default gateway
    192.168.0.1, and manually enter the DNS server that you use. (Using DHCP is
    recommended unless you run a server such as a DHCP server on the guest, and
    therefore need a static IP number.)

    If you enable internet connection sharing, this will make the guest(s) able
    to access internet resources outside of the host as well as other machines
    on your network that your host computer can communicate with; with some
    limitation because the internet connection sharing is a NAT solution.
    "NAT/Shared networking" is an option in VPC that allows basic surfing from
    the guest(s) using NAT. It's basically a simpiler solution that looks a bit
    like the loopback+internet connection sharing solution but without
    possibility for the host to connect to the guest(s). I just mentioned it for
    completeness, it wouldn't work for you as a "reversed shared folder"
    replacement.

    The NAT/Shared Networking option *only* works for tcp/ip.

    The loopback adapter+ICS works for (theoretically) any protocol (eg tcp/ip,
    ipx) between host and guest(s) but only for tcp/ip for communication outside
    of your physical machine.
    An idea is:
    Using loopback adapter will enable you to communicate between host and
    guest(s) (if this is your problem with you current setup).
    Using Internet Connection Sharing, enabled on your host, will enable your
    guest(s) to communicate with other computers (the same computers that your
    host can communicate with).


    If you have problems to communicate with your second physical machine using
    windows networking, you might want to consider some other option, eg install
    an ftp server on your second machine. There is an ftp server included with
    "professional" and "server" version OS:es but is has to be actively selected
    under "add/remove windows components".

    Security considerations with ftp: usually data and usernames/passwords sent
    over ftp are in clear text; and if you run your ftp server in anonymous mode
    only (recommended) you should use a virtual directory with a strange name,
    eg Gjdj23Dd and not "incoming" as the upload directory if your ftp server is
    accessible from outside to prevent it from being "hijacked" (used for
    "warez" or someone creates hard-to-remove files such as "com1.txt"). Use a
    virtual directory; directories created under ftproot marked as hidden will
    show up using a "ls -a" ("show hidden files" option in an ftp client).
    Share only a "file transfer directory" using ftp and do not store sensitive
    information there (move away files from there as soon as they are
    transfered).
     
    pml, Feb 8, 2004
    #14
  15. OK - I think I'm getting it. Gotta ponder a while. I've tended to take a
    minimalist approach to a LAN. The second machine runs Win2K and can be dual
    booted into Win98 if needed (old games that won't run on WinXP or Win2K or
    in some of the pseudo-DOS shells, etc.). I've used the two to test ASP.NET
    stuff and some .NET Remoting successfully with them trading client/server
    roles and each running IIS.

    I assume if I do nothing else, I may be able to ping and do client/server
    testing from the VPC session since it would have the same IP address WinXP?
    That is if I can enable IIS (is it there?) in Longhorn - gotta see. At
    least I should be able to use the Win2K machine as a server. Comments?

    I'll also check into enabling the file sharing between the two machines
    before I complicate life with the VPC and/or Loopback Adapter.

    Thanks for your help - I may be back again when/if I get into trouble :)

    Carl
     
    Carl M. Thomas, Feb 8, 2004
    #15
  16. I found a sneakier, easier way of getting the job done that I want as long
    as the file size is not to big.. ZIP it up, attach the directory it's in
    temporarily as a shared directory, unzip and extract the desired file(s)
    into a Longhorn directory, close the ZIP file, and detach the shared
    directory. Lo and behold! Mission accomplished. I've even used a drag
    and drop extract with no problems, so it's interesting that Longhorn won't
    let a direct copy or drag and drop happen (?)

    Carl
     
    Carl M. Thomas, Feb 12, 2004
    #16
  17. Josh

    Steve Jain Guest

    Why? Longhorn is an Alpha OS, its years away from shipping, so why
    should it be fully functional and robust at this stage?

    Steve Jain, Microsoft MVP for Virtual PC for Windows
    Website: http://www.essjae.com
     
    Steve Jain, Feb 12, 2004
    #17
  18. Now, Steve, you can't tell me you've lived such a long and jaded life that
    you don't find little quirks like this interesting :) Everyday is a new
    learning experience and that't what keeps life interesting.

    Carl
     
    Carl M. Thomas, Feb 13, 2004
    #18
  19. Josh

    Steve Jain Guest

    LOL.

    I haven't lived that long, but I am too jaded sometimes ;-)

    Steve Jain, Microsoft MVP for Virtual PC for Windows
    Website: http://www.essjae.com
     
    Steve Jain, Feb 13, 2004
    #19
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.