none
Copy virtual Machine and Rename

    Question

  • We have a VM that has been exported, and then imported again as a copied as a virtual machine. We have put this machine on a separate virtual switch. We want to rename the virtual machine without losing the connection of the original VM to the domain. Can anyone recommend a way to do this?
    Thursday, March 02, 2017 4:11 PM

All replies

  • What is the operating system of the copied VM?  If it is Windows, simply log in and change the name of the new system.  However, you should be aware that the method you used is not a supported method to clone a machine.

    Not really clear on what you are trying to do, so I may have missed your end goal.  Maybe a more complete explanation of what you are trying to do instead of how you are trying to do it would help.


    . : | : . : | : . tim

    Thursday, March 02, 2017 8:17 PM
  • The closest way to supported would be to:

    1. Leave the copy disconnected from the network.
    2. Power it on.
    3. Log in, preferably with local credentials.
    4. Disjoin it from the domain.
    5. Sysprep it with /generalize /oobe /reboot /mode:vm.
    6. Rename it.
    7. Reconnect it to the network.
    8. Join to the domain with the new name if desired.

    That should prevent most lingering issues. Some software doesn't like it but you know that you won't have any strange AD issues.


    Eric Siron
    Altaro Hyper-V Blog
    I am an independent contributor, not an Altaro employee. I accept all responsibility for the content of my posts. You accept all responsibility for any actions that you take based on the content of my posts.

    Thursday, March 02, 2017 8:39 PM
  • I will end up following Eric's answer since this is just a test environment and will not be used for production, as long as I can be sure I don't break AD in some way I should be able to scrape by.

    I am using Server 2008 R2 VM's on a Server 2012 R2 host. We have a accounting environment we are trying to clone and create a test environment for an upgrade to our accounting software.

    What would be a supported method of cloning a VM? What is the proper use for the Export/Import features?

    Thursday, March 09, 2017 10:30 PM
  • Eric provided the supported way for cloning a VM - sysprep.

    Export/import is for making copies of VMs for backup or testing purposes, but you need to be aware of the problems.  Export is no longer needed in many situations.  You can import directly from the original files when using 2012 R2 Hyper-V.  Import does not change the security identifiers (SIDs) from the original machine, and in an AD environment, you cannot have two machines with the same SIDs.  That is where the sysprep comes into play.  It ensures new SIDs when the new machine is deployed.  Even if you aren't working in an AD environment, when you import a machine, you need to realize that it is a mirror copy of the original machine.  That means it has the same network configuration and system name, so both the original and the clone can't be on the network at the same time.  At a minimum you need to change the name and IP (and maybe MAC address) of the clone, but there are still situations where you can run into issues with SIDs.  That is why Microsoft supports sysprep as the only supported method for cloning.


    . : | : . : | : . tim

    Friday, March 10, 2017 2:37 PM

  • Hi,
    Are there any updates?
    You could mark the reply as answer if it is helpful.
    Best Regards,
    Leo

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, March 16, 2017 7:09 AM
    Moderator