Previous Topic: dpmhyperv CreateVM Command--Create a New VMNext Topic: dpmhyperv CreateVMFromTemplate Command--Create a VM from a Template


dpmhyperv CreateVMFromTemplate Command--Create a VM from a SCVMM Server Template

The dpmhyperv CreateVMFromTemplate command creates a VM from an SCVMM server template.

This command has the following format:

dpmhyperv CreateTemplateFromVM
[-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]
[-adminPass admin_password] 
[-productKey product_key] 
[-userName user_name] 
[-organization org_name] 
[-domain domain_name] 
[-domainAdmin domain_admin_login] 
[-domainAdminPass domain_admin_password] 
[-adminUser admin_username] 
[-startVM start_vm] 
{-memory memory_size] 
[cpuSocketCount total_CPU_socket] 
[-scvmmHost scvmm_host] 
[-scvmmHardwareProf scvmm_hardware_profile] 
[-scvmmGuestOSProf scvmm_guest_os_profile] 
[-auto_deploy autodeploy]
[-async] 
[-pre] 
[-post]
[-locale iso639value]
-ws_user username

(Optional) Specifies the CA Virtual Assurance user name.

-ws_password password

(Optional) Specifies the CA Virtual Assurance user password.

-ws_encrypted_password

(Optional) Indicates whether the CA Virtual Assurance password is encrypted.

-prompt {yes|no}

(Optional) Specifies whether you are prompted for the user name and password.

-hypervHost hostname

Specifies the name of the Hyper-V host.

-vm vm_name

Specifies the VM name.

-template template_name

Defines the name of the new template.

-dest destination_path

(Optional) Specifies the destination path where the template is created.

-computerName computer_name

(Optional) Specifies the computer name of the VM.

-ip4addr ip4addr

(Optional) Specifies the static IPv4 address that you want to assign to the VM interface.

-ip4dhcp ip4dhcp

(Optional) Specifies whether to use DHCP.

Default: local

-ip4dhcpInt ip4dhcpInt

(Optional) Specifies the DHCP address.

-ip4mask network_mask

(Optional) Specifies the subnet mask that you want to assign to the VM. Use this option with the -ip4ddr option.

-ip4gw gateway_address

(Optional) Specifies the option to set the gateway for the VM. Use this option with the -ip4ddr option.

-ip4metric ip_metric

(Optional) Specifies the interface metric that you want to set for the VM. Use this option with the -ip4ddr option.

-ip4dns dnsserver_ip

(Optional) Specifies the DNS server for the VM. Use this option with the -ip4ddr option.

-adminPass admin_password

(Optional) Specifies the default administrator password for the VM.

-productKey product_key

(Optional) Specifies the Windows product activation key for the VM.

-userName user_name

(Optional) Specifies the user name of the Windows in the VM.

-organization org_name

(Optional) Specifies the organization name of the Windows OS in the VM.

-domain domain_name

(Optional) Specifies the domain name of the VM.

-domainAdmin domain_admin_login

(Optional) Specifies the domain administrator login.

-domainAdminPass domain_admin_password

(Optional) Specifies the password for the domain administrator account. This option is invalid for the asynchronous mode.

-adminUser admin_username

(Optional) Specifies the user name that is the member of the default Administrators group.

-startVM start_vm

(Optional) Indicates whether to start the VM.

-memory memory_size

(Optional) Defines the size of the memory in bytes.

-cpuSocketCount total_CPU_socket

(Optional) Specifies the number of processor sockets in the VM.

-scvmmHost scvmm_hostname

(Optional) Specifies the name of the SCVMM server host.

-scvmmHardwareProf scvmm_hardware_profile

(Optional) Specifies the name of the SCVMM defined hardware profile.

-scvmmGuestOSProf scvmm_guest_os_profile

(Optional) Specifies the name of the SCVMM defined guest operating system profile.

-autodeploy autodeploy

(Optional) Indicates automatic deployment.

-async

(Optional) Runs the command in the asynchronous mode.

-pre

(Optional) Generates an event before the operation is complete.

-post

(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.

-locale iso639value

(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 Server Template

This example creates the VM, "NewVM" using the standalone template, "Win2kSysPrepped."

dpmhyperv createVMFromTemplate -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