This command clones, from a Microsoft System Center Virtual Machine Manager template, a virtual machine that is currently shut down. You must execute the New-Clone commandlet on the host on which the System Center Virtual Machine Manager template library share exists.
CLI
New-Clone [-Mountpoint Mountpoint_location ] -VMMServer Server_name[-Template Template_name ] [-Server Server_name] [-BaseVMName Virtual_machine_name] [ -NumberofClones Number_of_clones] [-CloneInSameLUN True | False] [-JustCloneVHD True | False] [-JobGroup job_group] [-StartVM True | False]
Availability
Operational mode
Description
This command enables you to clone, from a Microsoft System Center Virtual Machine Manager template, a virtual machine that is shut down.
The following storage platforms are supported for the
New-clone command:
- 20xx
- 30xx
- 31xx
- 60xx
- NearStore R200
Parameters
- -Mountpoint | -mount mountpoint _location
- Specifies the mountpoint of the LUN that contains the virtual machine you want to connect to the Hyper-V host. This parameter is valid when -NumberofClones is 1. If you create more than one clone, the specified mountpoint is only used for the first clone.
- -VMMServer | -vmms server_name
- Specifies the name of the Microsoft System Center Virtual Machine Manager server on which the virtual machine template resides.
- -Template | -tn Template_name
- Specifies the name of the Microsoft System Center Virtual Machine Manager virtual machine template that you want to clone.
- -Server | -s Server_name
- Specifies the name of the Hyper-V server on which the cloned virtual machine will run. The default is the template host.
- -BaseVMName | -bv Virtual_machine_name
- Specifies the base name of the cloned virtual machine.
- -NumberofClones | -nc number_of_clones
- Specifies the number of clones that you want to create. The default is 1.
- -CloneInSameLUN | -csml True | False
- Specifies whether to locate all of the cloned virtual machines on the same LUN. The default is False, and cloned virtual machines are placed on different LUNs. This parameter is only valid with multiple clones. The first clone is always stored on a newly created LUN.
- -JustCloneVHD | -jcl True | False
- Specifies whether to only clone the VHDs of the virtual machine and not to create a cloned virtual machine. The default is False, when not specified. This parameter is only valid when creating one clone, so the number of clones must be 1 or not specified. You can mount cloned VHDs at a specified mountpoint or using the volume GUID on the desired server.
- -JobGroupjob_group
- Specifies the job GUID when submitting the virtual machine creation job to Microsoft System Center Virtual Machine Manager.
- -StartVM | -svm True | False
- Specifies whether you want to start the virtual machine or machines after creation. The default is False. This parameter is not valid when used with the JustCloneVHD parameter, and will be ignored.
Example
The following command gathers information on the virtual machine template called w2k3-x64-template1 from the System Center Virtual Machine Manager server SCCVMM1. The command uses this information to create 5 new virtual machines by cloning data to 5 different new LUNs on a Data ONTAP storage system. The virtual machines reside on the Hyper-V host vmhost12 and use the base virtual machine name finance-w2k3-oracle with an appendix of 0-4 for the cloned virtual machines. This commands also starts the virtual machines after creation.
New-Clone -server vmhost12 -Vmmserver SCVMM1 -Template w2k3-x64-template1 -NumberofClones 5 -BaseVMName finance-w2k3-oracle -StartVM