The dpmhyperv CreateVMFromTemplateEx command creates a VM from a standalone Hyper-V server template.
This command has the following format:
dpmhyperv CreateTemplateFromVMEx [-ws_user username] [-ws_password password] [-ws_encrypted_password] [-prompt {yes|no}] -hypervHost hostname -vmname vm_name -template template_name [-dest destination] [-computerName computer_Name] [-ip4addr ip4addr] [-ip4dhcp ip4dhcp] [-ip4dhcpInt ip4dhcpInt] [-ip4mask ip4mask] [-ip4gw ip4gw] [-ip4metric ip4metric] [-ip4dns ip4dns] [-disableAdmin] [-adminPass admin_password] [-autoLogon autologon] [-duplicatorString dupicate_String] [-timeZone timezone] [-productKey product_key] [-userName user_name] [-organization org_name] [-domain domain_name] [-domainAdmin domain_admin_login] [-domainAdminPass domain_admin_password] [-workgroup workgroup_name] [-adminUser admin_username] [-adminUserPass admin_password] [adminGroup admin_group_name] [-startVM start_vm] [-custom custom] [-memory memory_size] [cpuSocketCount total_CPU_socket] [-cpuidLimit cpu_id_limit] [-cpufeatlimit cpu_feat_limit] [-cpuReserve cpu_reserve] [-cpuLimit max_CPU_usage] [-cpuWeight cpu_wieight] [-startAction {none|auto|always}] [-startDelay start_delay_secs] [-stopAction {save|off|shutdown}] [-recoveryAction {none,restart,revert}] [-scvmmHost scvmm_host] [-scvmmHardwareProf scvmm_hardware_profile] [-scvmmGuestOSProf scvmm_guest_os_profile] [-async] [-pre] [-post] [-locale iso639value]
(Optional) Specifies the CA Server Automation user name.
(Optional) Specifies the CA Server Automation user password.
(Optional) Indicates whether the CA Server Automation password is encrypted.
(Optional) Specifies whether you are prompted for the user name and password.
Specifies the name of the Hyper-V host.
Specifies the VM name.
Defines the name of the new template.
(Optional) Specifies the destination path where the template is created.
(Optional) Specifies the name of the computer.
(Optional) Specifies the static IPv4 address that you want to assign to the VM interface.
(Optional) Specifies whether to use DHCP.
Default: local
(Optional) Specifies the DHCP address.
(Optional) Specifies the subnet mask that you want to assign to the VM. Use this option with the -ip4ddr option.
(Optional) Specifies the option to set the gateway for the VM. Use this option with the -ip4ddr option.
(Optional) Specifies the interface metric that you want to set for the VM. Use this option with the -ip4ddr option.
(Optional) Specifies the DNS server for the VM. Use this option with the -ip4ddr option.
(Optional) Specifies an option to disable default administrator account for the VM.
(Optional) Specifies the default administrator password for the VM.
(Optional) Specifies the option to set the number of accounts that automatically log on with the default administrator account Sysprep process is complete.
(Optional) Specifies the name of the system duplicator to set in the VM registry.
(Optional) Specifies the time zone used by the VM that are created using the template.
(Optional) Specifies the Windows product activation key for the VM.
(Optional) Specifies the user name of the Windows in the VM.
(Optional) Specifies the organization name of the Windows in the VM.
(Optional) Specifies the domain name of the VM.
(Optional) Specifies the domain administrator login.
(Optional) Specifies the password for the domain administrator account. This option is invalid for the asynchronous mode.
(Optional) Specifies the workgroup of the VM. This option is invalid for the asynchronous mode.
(Optional) Specifies the user name that is the member of the default Administrators group.
(Optional) Specifies the password of the default Administrators group.
(Optional) Specifies the group name of the administrator.
(Optional) Indicates whether to start the VM.
(Optional) Specifies the list of comma-separated custom commands that are executed at the end of the Sysprep process.
(Optional) Defines the size of the memory in bytes.
(Optional) Specifies the number of processor sockets in the VM.
(Optional) Indicates whether the processor must limit the maximum CPUID value.
(Optional) Indicates whether the VM must limit the CPU features exposed to the operating system.
(Optional) Specifies the amount of CPU resources that are reserved for use by the VM.
(Optional) Specifies the maximum amount of CPU resources that the VM can consume.
(Optional) Specifies the relative weight of the virtual machine from 1 to 10000.
(Optional) Specifies the action to perform on the VM after the Hyper-V host starts up. Options include the following:
Performs no action.
Starts the VM automatically if it was running before the Hyper-V host was shut down.
Starts the VM every time Hyper-V starts.
(Optional) Specifies the delay in seconds to start the VM after the Hyper-V host starts up.
(Optional) Specifies the action to perform on the VM before the Hyper-V host shuts down. Options include the following:
Suspends the VM.
Turns off the VM.
Shuts down the VM.
(Optional) Specifies the action to perform on the VM after the Hyper-V host restarts after an unexpected shutdown. Options include the following:
Performs no action.
Restarts the VM.
Returns to the last snapshot.
(Optional) Specifies the name of the SCVMM server host.
(Optional) Specifies the name of the SCVMM defined hardware profile.
(Optional) Specifies the name of the SCVMM defined guest operating system profile.
(Optional) Runs the command in the asynchronous mode.
(Optional) Generates an event before the operation is complete.
(Optional) Generates an event after the operation is complete.
Note: If you are not using the -async mode, the following parameters are ignored: memory, cpuSocketCount, cpuidLimit, cpufeatlimit, cpuReserve, cpuLimit, cpuWeight, startAction, startDelay, stopAction, and recoveryAction.
(Optional) Specifies an IS0 639_3166 combination to override the default English output, for example, fr_FR for French. To use the locale of the command prompt, specify "native".
Example: Create a VM from a Standalone Hyper-V Server Template
This example creates the VM, "NewVM" using the template, "Win2kSysPrepped."
dpmhyperv -createVMFromTemplateEx -ws_user dcaadmin -ws_password #test# -hypervHost hvserver -vm NewVM -dest c:\VMs\NewBox -template Win2k3SysPrepped -ip4addr 127.0.0.1 -ip4mask 255.255.255.0 -ip4gw 127.0.0.1 -ip4dns 127.0.0.1 -computerName NewBox
Copyright © 2013 CA. All rights reserved. |
|