Clone-VPG
Clones the virtual machines in the VPG in the recovery site.
Syntax
Clone [-ZVMIP] <String> [-ZVMPort] <Int32> [-Username] <String> [-Password] <String> [-VirtualProtectionGroup] <String> [[-Checkpoint] <CheckPoint>] [[-CheckpointDateTime] <DateTime>] [[-CheckpointID] <UInt64>] [-Datastore] <String> [-Wait <int32>] [<Common&RiskParameters>] |
Description
The Clone-VPG clones the virtual machines in the specified VPG in the recovery site. When the Zerto Virtual Manager is paired with multiple sites the VPG can be from any of these paired sites, as long as they were either protected or recovered to the site of the Zerto Virtual Manager where the cmdlet is run.
Parameters
[-ZVMIP] <String>
The IP address of the machine where the Zerto Virtual Manager is installed that is used to process the cmdlet.
Required? | True |
Position? | 1 or named |
Default Value | None |
Accept Wildcard Characters? | False |
[-ZVMPort] <Int32>
The HTTP port used for inbound communication with the Zerto Virtual Manager for APIs and cmdlets, specified during the installation. The default port recommended during installation is 9080.
Required? | True |
Position? | 2 or named |
Default Value | None |
Accept Wildcard Characters? | False |
[-Username] <String>
A username defined in the users.txt file in the Zerto Virtual Replication installation folder, for the Zerto Virtual Manager where the cmdlet is run.
Required? | True |
Position? | 3 or named |
Default Value | None |
Accept Wildcard Characters? | False |
[-Password] <String>
The password for the specified username, in the users.txt file in the Zerto Virtual Replication installation folder, for the Zerto Virtual Manager where the cmdlet is run, encrypted using SHA-1.
Required? | True |
Position? | 4 or named |
Default Value | None |
Accept Wildcard Characters? | False |
[-VirtualProtectionGroup] <String>
The name of the VPG to which to clone. The value specified is case-sensitive.
Required? | True |
Position? | 5 or named |
Default Value | None |
Accept Wildcard Characters? | False |
[[-Checkpoint] Zerto.Zvm.Common.CheckPoint]
The checkpoint object which is used to create the clone to. This object is returned by the Get-Checkpoints cmdlet. You must specify one of: Checkpoint, CheckpointDateTime, CheckpointID.
Required? | False |
Position? | 6 or named |
Default Value | None |
Accept Wildcard Characters? | False |
[[-CheckpointDateTime] <DateTime>]
The checkpoint date and time which is used to create the failover test machines to. The format is DD/MM/YYYY hh:mm:ss AM/PM. If there is no exact match for the specified time, a value within one second of the specified time is used, otherwise an error is returned. This value is part of the object returned by the Get-Checkpoints cmdlet. You must specify one of: Checkpoint, CheckpointDateTime, CheckpointID.
Required? | False |
Position? | 7 or named |
Default Value | None |
Accept Wildcard Characters? | False |
[[-CheckpointID] <UInt64>]
The checkpoint ID which is used to create the failover test machines to. This value is part of the object returned by the Get-Checkpoints cmdlet. You must specify one of: Checkpoint, CheckpointDateTime, CheckpointID.
Required? | False |
Position? | 8 or named |
Default Value | None |
Accept Wildcard Characters? | False |
[-datastore] string
The name of the storage used for the recovery.
Required? | True |
Position? | 9 or named |
Default Value | None |
Accept Wildcard Characters? | False |
[-Wait <Int32>]
The number of seconds to wait before timing out.
Required? | False |
Position? | Named |
Default Value | None |
Accept Wildcard Characters? | False |
<Common&RiskParameters>
This cmdlet supports the parameters described in
Optional PowerShell Parameters.
Inputs and Outputs
The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet returns.
Inputs | None. |
Outputs | Clone-VPG returns the task identifier for the command and the site identifier where the VPG is defined. |
Note: The Clone-VPG cmdlet must be used in conjunction with the Get-Checkpoints cmdlet. See the example below.
See Also
Example 1
PS C:\Windows\SysWOW64\WindowsPowerShell\v1.0> $cp_list = Get-CheckPoints 182.24.123.123 9080 -Username usr -Password pswd -VirtualProtectionGroup ’Back Office’ PS C:\Windows\SysWOW64\WindowsPowerShell\v1.0> $last_cp = $cp_list[$cp_list.Count-1] PS C:\Windows\SysWOW64\WindowsPowerShell\v1.0> Clone-VPG 182.24.123.123 9080 -Username usr -Password pswd -VirtualProtectionGroup ’Back Office’ -Checkpoint $last_cp -Datastore ds1 |
The list of checkpoints for the Back Office VPG is retrieved and then the last checkpoint taken for the clone. The Back Office VPG is cloned using the last checkpoint from the list and using the ds1 storage. The Zerto Virtual Manager site used to process the cmdlet runs on IP 182.24.123.123 and port 9080.
The cmdlet returns the command task identifier and site identifier. For example:
Identifier SiteId ---------- ------ ab1b3c1b-fc94-4a1f-a42d-eb57b40526e0 d2da8a37-68f0-4464-a70c-abb19683fd01 |