Moving, Copying, and Linking Hyper-V files

The one function not currently well supported in Hyper-V is the movement and copying of VM and VHD files or virtual machines without using the Export / Import functionality.  While it is possible to manually move VHD files, the operation is tedious and complex.

At AIS, we have discovered the need for copying VHD files ranges from moving a large .VHD from a full hard drive to quickly supporting test bench copies from a gold disk image.  After the 10 or 12 manual updates of the VHD XML file, symbolic links, and security we decided it was time for a utility.

You can download and read the documentation from this link

The Windows .MSI installer is available for download via this link

image

8 thoughts on “Moving, Copying, and Linking Hyper-V files

  1. ArmgaSys

    RaStr,
    Thank you for the information and heads up. I’ll try and tackle the issues individually:

    Locked .XML files
    This is a great observation but is currently by design. The assumption (ah, the power word which always gets me into trouble) is the .VHDs to be moved or copied are not currently in an active or running state. Automagically stopping the service could result in any number of unexpected problems for the user. We are going to review this as a possible option for the next revision. We will also update the user manual to reflect the need to have the .VHD not be active or running.

    Links not having proper security
    We are going to review the 2008 R2 implementation to make sure there isn’t a latent problem in our implementation. The tool is currently designed to make the necessary security settings to the link automatically so it should be working as designed for you. One issue you may be encountering is UAC and a lack of elevated privileges. Have you tried running the tool using “run as administrator”?

    Releasing Source Code
    I’ll have to chew on that one for a bit… I hadn’t thought about it before and I honestly don’t know what my answer is.

  2. RaStr

    Hi, your tool is not working properly under Windows 2008 R2. The reason is that at first the Hyper-V Virtual Machine Management service has to be stopped otherwise the .xml files are locked and unaccessible by your tool (I do not know if that’s mentioned somewhere in the tool’s manual, but it would be great if the application itself would stop the vmms service when started and restart it when closed) but more importantly at second: the links created by the tool doesn’t have the proper security settings so they are inaccessible by the Hyper-V manager, the solution is described here: http://blogs.msdn.com/robertvi/archive/2008/12/19/howto-manually-add-a-vm-configuration-to-hyper-v.aspx . It would be nice if your tool could be updated accordingly, or the source code published so anyone else could apply the required changes.

  3. RaStr

    Hello, I have discovered now why it did not worked for me. The problem is that if the VM is running and/or Hyper-V Virtual Machine Management service (vmms) is running, the .xml files of already present VMs are “locked” and your tool displays just zeroes as Guid and Error as a status for those VMS. That’s why I always stopped the vmms service before starting you tool. But it looks like that the vmms has to be running when creating a new link to a newly added .xml file of a new VM, otherwise new VM SID is not created on the system so all security changes on VM’s files will fail and the new VM will not be working. So the conclusion is that the vmms has to be running when adding new VMs, but has to be stopped (together with all VMs you want manipulate) to allow modifications in the setup of existing VMs. The vmms has to be restarted when new VMs are added, otherwise the changes will not be reflected in the Hyper-V manager. Hope this information could help you to make your tool even better, i.e. it should properly detect that vmms and/or a given virtual machine are running and display then their name(s), guid(s) and status as “Running” (and of course those ones will be “read-only” in the tool), check the vmms status before new VM is added (to allow proper security setup) and possible integrate a feature for vmms restart from the tool so the changes performed in it will be applied in the Hyper-V Manager on exit, or refresh or just a special button press, etc. .

  4. keith winton

    trying to install in 2008 R2, but it keeps giving me an intall error, 2203, and won’t install.

    64-bit R2, current on all patches

  5. ArmgaSys

    Keith,
    2203 is almost always the result of a permissions or security issue. I would recommend checking the following:
    - Executing the installer as an administrator
    - You have full access to the MSI and the destination directories in Program Files (x86)
    - Anti-virus software is not interfering
    Good luck!

  6. Christian Thomasberg

    Hi,
    Just came across your tool but cannot download it. Is it not available anymore or is the link just broken?

  7. ArmgaSys Post author

    Christian,

    Thanks for the heads-up! Our recent upgrades did break this link. We have repaired the links and all should be working

Comments are closed.