none
Copy files from hyper-v server 2012 R2 to VM's

    Question

  • Hi,

    We have files (about 120GB) and would like to make a share folder in one of the VM so that all the VM's access that share.

    How to make available the 120GB content from :

    1)Host (hyper-V Server Core) to VM's

    2) one of the VM to other VM's .

    All the machines are in same network.

    Thanks

    Monday, December 23, 2013 6:41 PM

Answers

  • On the host, create a VHDX from within Disk Manager.  Create it to whatever size you need.  Initialize and format it and then copy the content to the VHDX file.  (If the contents you want to place on this disk already resides on a physical disk, there is an option to actually create the VHD from the hard disk - doing the copy for you.)

    After the copy of the data is completed to the VHDX file, dismount it from the host and mount it to the VM you want to act as a file server.  In the VM, install the File Server role and create the share(s) on the disk.


    .:|:.:|:. tim

    Monday, December 23, 2013 10:18 PM

All replies

  • On the host, create a VHDX from within Disk Manager.  Create it to whatever size you need.  Initialize and format it and then copy the content to the VHDX file.  (If the contents you want to place on this disk already resides on a physical disk, there is an option to actually create the VHD from the hard disk - doing the copy for you.)

    After the copy of the data is completed to the VHDX file, dismount it from the host and mount it to the VM you want to act as a file server.  In the VM, install the File Server role and create the share(s) on the disk.


    .:|:.:|:. tim

    Monday, December 23, 2013 10:18 PM
  • On the host, create a VHDX from within Disk Manager.  Create it to whatever size you need.  Initialize and format it and then copy the content to the VHDX file.

    We have the content on a USB hard disk (120GB content) . As it is a Hyper-V Server 2012 R2 ,how to create a VHDX  USB data .

    is it mandatory to make that server as file server ? or

    as all the vm's are in same network ,can we make a network share ? will this work ?

    Thanks .

    Tuesday, December 24, 2013 2:22 AM
  • VMs cannot use USB disks as pass-through disks, that is, attach them directly to the VM.  Besides, pass-through disks are not recommended.  But, you can create a VHD/VHDX from any disk that is available to the host.

    Technically, though it is not a recommended practice, you can put the USB drive on the Hyper-V host and set it up as a file server to create the required network shares.  If you create network shares on a server, you have made it into a file server, so I don't really understand your question about file server or network shares.  But this also has licensing ramifications, as the host now consumes one of the allowed operating system instances.  If doing this on Standard Edition, that means you would then have the right to run only a single Windows Server operating system in a VM.

    However, in your initial post, it sounds like you might be using Hyper-V Server (is that what you mean by "hyper-V Server Core" - technically there is no Hyper-V Server Core, as that implies there is something else, like Hyper-V Server GUI?).  If you are using Hyper-V Server, then, no, you cannot make the host a file server - that role is not available.  You would have to create the file server role as a VM, going back to the original suggestion of creating a VHD/VHDX file and assigning it to a VM to serve as a file server offering network shares.


    .:|:.:|:. tim

    Tuesday, December 24, 2013 3:08 PM
  • Ok Tim .... i will put in this way.

    we have around 160 GB in the External USB drive and would like to share or make available to all users,so that it can be accessible on the VM's.

    I connected the USB to the host(Hyper-V Server) machine and tried copying to one of the directories on the host machine using xcopy. After some progress ,the xcopy command failed with insufficient memory error. Is there any other way of doing it ?

    Thanks 



    • Edited by Suren424 Tuesday, December 24, 2013 10:14 PM
    Tuesday, December 24, 2013 4:19 PM
  • Wednesday, December 25, 2013 6:05 AM
    Moderator
  • Hi Suren424,

    According to your discription , my suggestion is :

    1. backup the USB disk to an "image" via using "windows server backup"

    2. create a fixed VHDX which is large enough to store all of the USB disk files .

    3. restore the "image" into the new VHDX.

    4. attach the VHDX to the VM you want .

    5. backup regularly

     

    Hope this helps

    Best Regards

    Elton Ji


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

    Thursday, December 26, 2013 5:57 AM
    Moderator
  • how to use transfer disk ?

    I connected the USB to the host machine ( hyper-v server) and connected to 5nine manager and able to see all the VM's .Now i would like to transfer the content in USB to one of the VM's. 

    I see the "Mount transfer disk" button/tab . is this the one to use ?

    Please let me know.

    Thanks .

    Thursday, December 26, 2013 5:03 PM
  • 1. backup the USB disk to an "image" via using "windows server backup".

    How to do this on a hyper-v server. USB drive is connected to the host machine ... stuck on how to proceed .

    Could you help me with any documentation or steps ?

    Thanks

    Thursday, December 26, 2013 5:05 PM
  • Using PowerShell or Hyper-V you can create a new virtual hard disk (recommend using the new vhdx format) and specify the hard drive as the source to be copied to the new virtual hard drive.  At that time, you can mount the virtual hard drive in a VM that is configured as a file share.

    Since you are using Hyper-V Server as the host, you will not be able to set it up as a file server.  You will have to set up the file service in a VM.

    Or, if you don't want to use PowerShell or Hyper-V to copy the contents to the new disk, you can use robocopy to copy the files.  I've generally had better luck with it than with xcopy.


    .:|:.:|:. tim

    Thursday, December 26, 2013 10:09 PM
  • Hi Suren,

    Install "windows server backup":

       In Server Manager, click Manage, and then click Add Roles and Features.

       Click Nextat each step in the wizard until you reach the Select featurespage.

       Check Windows Server Backup   

       Click Next, and then click Install.

        When the installation completes, click Close.

    Backup the USB disk:

         In server manager , click Tools --> windows server backup 
         In wbadmin , left pane Windows server backup -->Local backup  , in tool bar or right pane  "action" click backup once...

         In backup once wizard , click different options --> next -->custom-->add items--> slelect your USB drive --> next --> select a large enough free place for the "image" then finish the wizard and wait for completion.

     

    create a new VHDX :

         In server manager , click Tools --> computer management --> disk management , in tool bar click Action -->create VHD -->select  VHDX  and Fixed size then Browse virtual disk files and set the size(the size should equal or large than the USB disk size) -->OK-->right click the new VHD --> initialize disk -->OK -->right click the unallocated diskpart -->New Simple Volume --> just next and finish the wizard.

     

          Back into wbadmin , click Recover... on the right pane -->This server-->Next (select the proper backup time, cause of you just  have one backup  ...)-->volumes-->check the entry you can see -->select the new volume -->yes -->recover
          Dettach the NEW VHDX then attach it to the VM

     

    Hope this helps

    Best Regards

    Elton Ji


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.


    Friday, December 27, 2013 2:37 AM
    Moderator