none
How to copy files from Physical Host to Virtual Machine?

    Question

  • I have a Hyper-V Physical host with several 2003 virtual machines running on it. I want to be able to copy files/folders such as setup.exe's to the virtual machines from the physical host. The virtual machines are duplicates with other machines that are already running on the network so I can't attache these vm's to the production network for fear of duplicate IP's and such. I tried attaching the vm's to a Virtual "Internal" network and then assigned the VM an ip of 10.10.10.2 and then assigned the virtual nic on the physical host an ip of 10.10.10.1 . Now I can ping back and forth but I cannot connect to \\10.10.10.X\ShareName from either side.  When I try I get:

    "Network Error: Windows cannot access \\10.10.10.2\ShareName - The network path was not found"

    What am I missing here? Is there a easier way to move files between the Host and the VM?
    Friday, December 19, 2008 4:07 PM

Answers

  • Thanks again for your help. You got me thinking in the right direction and I figured it out. The VM I was trying to connect to is a ISA server and I had ISA Firewall rules blocking me. I added a rule to allow the traffic and all works perfectly no so I can copy files back and forth. Problem solved much appeciated.
    • Marked as answer by wewewewewew Friday, December 19, 2008 6:37 PM
    Friday, December 19, 2008 6:37 PM

All replies

  •  I can share with you what I did but I am not sure if it fits your requirements or not.


    On my host hyper-v server on the NIC that is used from my VMS, I added  an additional private address without a default gateway or DNS entries ( I used the 172..x.y.z private IP address range) and on the guest VM, I assigned an IP address within the same subnet (for example, host=172.16.0.1/255.255.255.0, guest1=172.16.0.2/255.255.255.0) and then I was able to connect to the host share using UNC path \\172.16.0.1\sharename

    hope this helps
    Friday, December 19, 2008 4:59 PM
  • I have virtual machines used for testing. There are times when fairly large datasets must be copied from a physical machine into a vm. By making an iso file from a folder containing all of the data, it is easy to attach the iso to a running vm. Futhermore, by using autorun, the iso can be made to initiate a file copy into the vm. This isn't always done because sometimes just having the data on the iso is sufficient.

    The creation of the iso and its attachment to the vm can be scripted.
    Friday, December 19, 2008 5:49 PM
    Moderator
  • Thanks for your response, your solution is exactly what I am trying to accomplish. However, it didn't work for me. I tried using your example exactly with same IP's and SubMask, but it still acts just like it did for me. I can ping 172.16.0.1 and 172.16.0.2 back and forth from either the Host or the VM but when I try \\172.16.0.1\share it fails. Must be something with file sharing or some other detail I am missing. Any other ideas where to look? Windows firewall is disabled.
    Friday, December 19, 2008 6:05 PM
  • Are your host and guests in the same active directory domain? Did you check the share and NTFS permissions?

    From the guest VM, connect to \\172.16.0.1 without the share name and see if you get any thing.

    Just for this purpose, try to disable the firewall on both the host and guest vms and see how it goes. if it works, we know it's a firewall issue and you can add exceptions in your firewall.

    I know this works because I've been doing it.
    Friday, December 19, 2008 6:17 PM
  • Thanks again for your help. You got me thinking in the right direction and I figured it out. The VM I was trying to connect to is a ISA server and I had ISA Firewall rules blocking me. I added a rule to allow the traffic and all works perfectly no so I can copy files back and forth. Problem solved much appeciated.
    • Marked as answer by wewewewewew Friday, December 19, 2008 6:37 PM
    Friday, December 19, 2008 6:37 PM