The dpmvc-clone command lets you clone a VM.
This command has the following format:
dpmvc-clone {-template_name templatename | -cloned_from vmname} {-datacenter_name datacentername | -vc vcenterservername} -vm_name vmname -esx_host_name esxhostname -datacenter_name datacentername -data_store_name datastorename -compute_resource_name name -resource_pool_name resourcepool -spec_name specificationname [-auto_deploy value] [-deploy_template templatename] [-network_connection "nic=sequence_number,network_name=name,ip_address=ip_address,def_gateway=default_gateway,alt_gateway=alt_gateway,subnet_mask=subnet_mask[,win_dns_server=wins_dns_server,win_alt_dns=wins_alt_dns,wins_primary=wins_primary,wins_secondary=wins_secondary"]] [-global_dns_search_suffix suffix1[,suffix2,suffix3,…]] [-linux_domain_name domain_name] [-linux_dns_servers primary_dns=value,secondary_dns=value,tertiary_dns=value] [-create_disk MB,datastorename,controller] [-modify_disk key, datastorename] [-set_memory number] [-set_cpu number] -vm_os_username username [-vm_os_password password] [-auth_file authorizationfilename] [-auth_comp componentID] [-scalability_server scalabilityservername]
Specifies the data center where the VM is located.
Specifies the vCenter Server where the VM is located.
Specifies the cluster or VMware ESX host where the VM is created.
Specifies the VMware ESX server where the VM resides.
Specifies the name of the data store where the new VM is located.
Specifies the VM.
Specifies the name of the resource pool from which you want to select the VM for cloning.
(Optional) Specifies the name of the specification you want to use for the cloned virtual machine.
Specifies whether CA Server Automation agents are deployed automatically. Options include the following:
Deploys CA Server Automation agents automatically.
Prevents CA Server Automation agents from being deployed automatically.
Default: no
(Optional) Specifies the name of the generic template created in CA Server Automation.
Note: Do not confuse this template with the templates created and managed by VMware vCenter.
Windows:
(Optional) Creates network connections for a VM. This parameter can be specified multiple times. Sequence number is the integer value starting with one (1) that identifies the network connection. The full set of parameters must be enclosed in parentheses if it includes any spaces. All values except nic, network_name, ip_address, def_gateway and subnet_mask; can be reset by entering the name without a value (for example, "nic=123,alt_gateway=").
Linux:
(Optional) Creates one or more network connections. This parameter can be specified multiple times. The sequence number is the integer value starting with one (1) that identifies the network connection. The full set of parameters must be enclosed in parentheses if it contains any spaces. Only alt_gateway can be reset by entering the name without a value (for example, "nic=123,alt_gateway=").
Linux:
Specifies one or more DNS search suffixes.
Windows:
(Optional) Specifies one or more DNS search suffixes.
Linux:
(Optional) Specifies the domain name for a Linux VM.
Linux:
(Optional) Specifies the IP addresses of DNS servers for a Linux VM. One or more of the values can be omitted (for example, primary_dns=123.123.123.13,secondary_dns=,tertiary_dns=123.123.123.15) to unset the value.
(Optional) Creates one or more additional hard drives. This parameter can be specified multiple times.
Defines the size in megabytes of the hard drive.
Specifies the name of the data store for this hard drive. Currently only one data store is supported per VM.
Specifies the controller key for this hard drive.
(Optional) Specifies the data store where the hard drive resides. Can be specified multiple times.
Specifies an existing disk.
Specifies the name of the data store that this disk moves to.
(Optional) Defines the amount of memory in megabytes (MB) for the cloned VM. This value overrides the value specified in the template.
(Optional) Define the number of CPUs for the cloned VM. This value overrides the value specified in the template.
Specifies the user for the cloned VM. This user name is also used for authentication when you auto-deploy the image.
Windows: Must be the user name defined in the customization specification.
Linux: Must be the user name defined in the template.
(Optional) Specifies the password for the user for the cloned VM. This password is also used for authentication when you auto-deploy the image.
Windows: Must be the same password defined in the customization specification.
Linux: Must be the same password defined in the template.
(Optional) Specifies the full path name of the authorization file to use to retrieve the encrypted password. This file contains the CA Server Automation administrator credentials that were generated using the dpmutil set auth command. When this option is not specified, the default authorization file is used.
(Optional) Specifies a component ID that you can use to group hosts and users.
Specifies the name of the template you want to use for the cloned virtual machine. This parameter replaces -vm_name_cloned_from and you cannot specify both together.
Specifies the name of the virtual machine to use as a template for the cloned virtual machine. This parameter replaces -template_name and you cannot specify both together.
Specifies the name of the resource pool from which you want to select the VM for cloning.
(Optional) Specifies the CA ITCM scalability server for software distribution.
(Optional) Specifies the name of the specification you want to use for the cloned virtual machine.
Specifies the cluster or VMware ESX host where the VM is created.
Example: Clone a VM using Global Credentials
This example creates a VM, "testvm01" using the template "BaseW2k3" on the data center, Specifies VAS/MyCity. When the clone operation is complete, CA Server Automation agents are automatically deployed.
dpmvc-clone -vm_name testvm01 -template_name Templates/BaseW2k3 -auto_deploy yes -spec_name w2k3_spec_01 -datacenter_name VAS/MyCity -datastore_name storage1 -compute_resource_name VPMCluster/ClusterServerA -vm_os_username administrator -vm_os_password testpassword
Example: Clone a VM using Authorization File and Component
This example creates a VM, "testvm01" using the template "BaseW2k3" on the data center, VAS/MyCity. When the clone operation is complete, CA Server Automation agents are automatically deployed.
dpmvc-clone -vm_name testvm01 -template_name Templates/BaseW2k3 -auto_deploy yes -spec_name w2k3_spec_01 -datacenter_name Specifies VAS/MyCity -datastore_name storage1 -compute_resource_name VPMCluster/ClusterServerA -vm_os_username administrator -vm_os_password testpassword -auth_file c:\localauth.dat -auth_comp Imaging
Example: Clone a VM using Global Credentials and Create 2 CPUs
This example creates a VM, "testvm01" using the template "BaseW2k3" on the data center, VAS/MyCity and creates 2 CPUs for the VM. When the clone operation is complete, CA Server Automation agents are automatically deployed.
dpmvc-clone -vm_name testvm01 -template_name Templates/BaseW2k3 -auto_deploy yes -spec_name w2k3_spec_01 -datacenter_name VAS/MyCity -datastore_name storage1 -compute_resource_name VPMCluster/ClusterServerA -vm_os_username administrator -vm_os_password testpassword -set_cpu 2
Example: Clone a VM using Default Authorization File and Set Memory to 4096 MB
This example creates a VM, "testvm01" using the template "BaseW2k3" on the data center, VAS/MyCity and sets the memory to 4096. When the clone operation is complete, CA Server Automation agents are automatically deployed.
dpmvc-clone -vm_name testvm01 -template_name Templates/BaseW2k3 -auto_deploy yes -spec_name w2k3_spec_01 -datacenter_name VAS/MyCity -datastore_name storage1 -compute_resource_name VPMCluster/ClusterServerA -vm_os_username administrator -vm_os_password testpassword -set_memory 4096
Example: Clone a VM using Default Authorization File and Create Two Hard Disks
This example creates a VM, "testvm01" using the template "BaseW2k3" on the data center, VAS/MyCity and creates two hard disks for data store storage1. When the clone operation is complete, CA Server Automation agents are automatically deployed.
dpmvc-clone -vm_name testvm01 -template_name Templates/BaseW2k3 -auto_deploy yes -spec_name w2k3_spec_01 -datacenter_name VAS/MyCity -datastore_name storage1 -compute_resource_name VASCluster/ClusterServerA -vm_os_username administrator -vm_os_password testpassword -create_disk 10000,storage1,1000 -create_disk 10000,storage1,2001
Example: Clone a VM and Create a Network Connection
This example creates a VM, "testvm01", a network connection using the template "BaseW2k3" on the data center, VAS/MyCity, and sets the initial values. When the clone operation is complete, CA Server Automation agents are automatically deployed.
dpmvc-clone -vm_name testvm01 -template_name Templates/BaseW2k3 -auto_deploy yes -spec_name w2k3_spec_01 -datacenter_name VAS/MyCity -datastore_name storage1 -compute_resource_name VASCluster/ClusterServerA -vm_os_username administrator -vm_os_password testpassword -network_connection "nic=1,network_name=VM Network,ip_address=123.321.5.22,def_gatewat=123.321.1.108,subnet_mask=255.255.255.0,win_dns_server=123.321.42.1,win_alt_dns=123.321.3.101,wins_primary=123.321.3.3"
Example: Clone a VM using Default Authorization File from a Powered off VM
This example creates a VM, "testvm01" using VM “testvm02” in place of a template on the data center, VAS/MyCity. When the clone operation is complete, CA Server Automation agents are automatically deployed.
dpmvc-clone -datacenter_name "VAS/MyCity" -vm_name testvm01 -datastore_name storage1 -esx_host_name vc1.ca.com -resource_pool_name Resources/DPMTest -compute_resource_name DPMCluster/ussdCluster -vm_name_cloned_from testvm02 -auto_deploy yes -spec_name w2k3_spec_01 -vm_os_username administrator -vm_os_password mypassword
Example: Clone a VM using Default Authorization File and Modify an Existing Hard Disk
This example creates a VM, "testvm01" using the template "BaseW2k3" on the data center, VAS/MyCity and creates two hard disks for data store storage1. When the clone operation is complete, CA Server Automation agents are automatically deployed.
dpmvc-clone -vm_name testvm01 -template_name Templates/BaseW2k3 -auto_deploy yes -spec_name w2k3_spec_01 -datacenter_name VAS/MyCity -datastore_name storage1 -compute_resource_name VPMCluster/ClusterServerA -vm_os_username administrator -vm_os_password testpassword -create_disk 10000,storage1,1000 -modify_disk 2000,storage2
Copyright © 2013 CA. All rights reserved. |
|