Freigeben über


Copying Virtual Machines..

I've just been asked how to copy virtual machines from one PC/Server to another.  It depends!

If the virtual machines are never going to be connected to the network, you just copy the vhd & vmc files.  If however the virtual machines are going to be on a network (workgroup or domain connected) you need to do this:

Create your first (master) virtual machine.  Install Windows (from Volume Licensed media) and any applications you need into it (including the Virtual PC/Server Additions),  Test it, to make sure it's what you want.  Then you take the contents of the DEPLOY.CAB file from the Windows CD (\support\tools) and put them into a folder called C:\SYSPREP.

Run Setup Manager (setupmgr.exe - you just put it into c:\sysprep) and create a new Sysprep setup answer file for the Windows product you're copying.  Select the "Yes, fully automate the installation" option and continue through the wizard answering all the relevant questions (Name, Organisation, Display Settings, Time Zone, Product Key, Administrator Password, Network Settings, Workgroup or Domain, Account details used to join domain if necessary, etc, etc).  You have to answer the Computername question - this process can automatically generate computernames for you, but this is what I do:

Call the computer FRED.  When Setup Manager finishes you have just created a file called sysprep.inf (you need to click Cancel to close setup manager - there is no Finish button).  Open sysprep.inf in notepad.  Find the line that says computername=FRED and change it to read computername="" (you now have an answerfile that will automate the entire setup process, but will stop and ask for a computername).

Next step is to run SYSPREP.  This will remove the local Security Identifiers (SIDs) from the machine and put it into a state such that at next reboot it will run a mini-setup and use the answerfile you have just created (sysprep.inf).

Turn off the virtual machine and copy the vhd & vmc files.

Next time you turn one of these virtual machines on, it will run setup and stop at the computername question.  Everything else will be automated, including joining the domain and each instance of it will be unique.

Have fun,

Dave.

Comments