The dpmhv-setSysprepProperties command lets you create a virtual disk image.
This command has the following format:
dpmhv-setSysprepProperties -host hostname -vm vmname|-vmid vmguid|-jobref job [-computerName computerName] [-ip4addr ip4addr] [-ip4dhcp ip4dhcpInt] [-ip4mask ip4mask] [-ip4gw ip4gw] [-ip4metric ip4metric] [-ip4dns ip4dns] [-disableAdmin] [-adminPass adminPW] [-autoLogon alcnt] [-duplicatorString dupstr] [-timeZone timezone] [-productKey key] [-userName UserName] [-organization orgname>] [-domain domname] [-domainAdmin domad] [-domainAdminPass dompw] [-workgroup wgname] [-adminUser adminUser] [-adminUserPass adminUserPW] [-custom custom]
Specifies the name of the Hyper-V server host.
Default: $$HVHost
Specifies the name of the VM.
Specifies the unique ID of the VM.
Specifies the job ID of an asynchronous job.
Note: Upon the complete execution of asynchronous job, Hyper-V holds the job information for few minutes (five) only, beyond which it becomes invalid.
(Optional) Specifies the name of the computer. Support for this parameter requires an image using Sysprep tool. This option is invalid for asynchronous execution of the command.
Default: Null
(Optional) Specifies the static IPv4 address that you want to assign to an interface of the VM. To set an IP address for a specific interface, the IP address is prefixed with known interface name and '#' as separator. For example,
-ip4addr "Local Area Connection#192.168.1.200". If the template image has more than one network adaptor, the IP address is assigned to the first interface. This option is invalid for asynchronous execution of the command.
Default: ""
(Optional) Specifies an option to turn on DHCP of a particular interface of the VM. You can also specify the interface name for this option. For example,
-ip4dhcp "Local Area Connection." If the template image has more than one network adaptor, DHCP is turned on for the first interface. This option is invalid for asynchronous execution of the command.
Default: local
(Optional) Specifies the subnet mask that you want to assign for the VM. This option is used with
-ip4ddr option. If an interface name is specified in the
-ip4addr option, same interface name must be used in this option. Support for this parameter requires a Windows image created using Sysprep tool. This option is invalid for asynchronous execution of the command.
Default: ""
(Optional) Specifies the option to set the gateway for VM. This option is used with -ip4ddr option. Support for this parameter requires a Windows image created using Sysprep tool. This option is invalid for asynchronous execution of command.
Note: If an interface name is specified in the
-ip4addr option, same interface name must be used in this option.
Default: ""
(Optional) Specifies the interface metric that you want to set for the VM. This option is used with -ip4ddr option. If an interface name is specified in the
-ip4addr option, same interface name must be used in this option. Support for this parameter requires a Windows image created using Sysprep tool. This option is invalid for asynchronous execution of command.
Default: 1
(Optional) Specifies the DNS server that you want to set for the VM. This option is used with -ip4ddr option. If an interface name is specified in the
-ip4addr option, same interface name must be used in this option. Support for this parameter requires a Windows image created using Sysprep tool. This option is invalid for asynchronous execution of command.
Default: ""
(Optional) Specifies an option to disable default administrator account for the VM. Support for this parameter requires a Windows image created using Sysprep tool. This option is invalid for asynchronous execution of command.
(Optional) This option is used to set the default administrator account password for the VM. Support for this parameter requires a Windows image created using Sysprep tool. This parameter is ignored in asynchronous execution.
Note: To set this option successfully, set the Windows Server 2003 administrator password which is created using Sysprep tool as empty.
Default: Null
(Optional) Specifies an option to set the number of accounts that you want to create to log in automatically with default administrator account. The accounts are created after the completion of Sysprep process. hyperv_sp_dupstr. Support for this parameter requires a Windows image created using Sysprep tool. This option is invalid for asynchronous execution of command.
Default:
-1
(Optional) Specifies the name of the system duplicator that you want to set in the registry of the VM. Support for this parameter requires a Windows image created using Sysprep tool. This option is invalid for asynchronous execution of command.
Default: Null
(Optional) Specifies the time zone used by the VM that are created using the template. Support for this parameter requires a Windows image created using Sysprep tool. This option is invalid for asynchronous execution of command.
Default:
-1
(Optional) Specifies the Windows product activation key for the VM. Support for this parameter requires a Windows image created using Sysprep tool. This option is invalid for asynchronous execution of command.
Default: Null
(Optional) Specifies the user name of the Windows inside the VM is licensed to. Support for this parameter requires a Windows image created using Sysprep tool. This option is invalid for asynchronous execution of command.
Default: Null
(Optional) Specifies the organization the Windows copy inside the VM is licensed to. Support for this parameter requires a Windows image created using Sysprep tool. This option is invalid for asynchronous execution of command.
Default: Null
(Optional) Specifies the domain name for the VM. Support for this parameter requires a Windows image created using Sysprep tool. This option is invalid for asynchronous execution of command. Domain and workgroup specifications are mutually exclusive.
Default: Null
(Optional) Specifies the user account as Domain Administrator that you want to create in the domain. Support for this parameter requires a Windows image created using Sysprep tool. This option is invalid for asynchronous execution of command.
Default: Null
(Optional) Specifies the password for Domain Administrator user account that you want to create in the domain. Support for this parameter requires a Windows image created using Sysprep tool. This option is invalid for asynchronous execution of command.
Default: Null
(Optional) Specifies the workgroup that you want to create for the VM. Support for this parameter requires a Windows image created using Sysprep tool. Domain and workgroup specifications are mutually exclusive. This option is invalid for asynchronous execution of command.
Default: Null
(Optional) Specifies the administrator user name that you want to create as a part of the default Administrators group. Support for this parameter requires a Windows image created using Sysprep tool. This option is invalid for asynchronous execution of command.
Default: Null
(Optional) Specifies the password of the administrator user account that you want to create as a part of the default Administrators group. Support for this parameter requires a Windows image created using Sysprep tool. This option is invalid for asynchronous execution of command.
Default: Null
(Optional) Specifies the list of comma-separated custom commands that you want to execute at the end of Sysprep process. This parameter requires Windows image of Sysprep. This parameter is ignored in asynchronous execution.
Default: Null
The dpmhv-setSysprepProperties command returns an empty string when it is executed synchronously. If executed asynchronously, a string representing job ID is passed to dpmhv-getJobErrorInfo, dpmhv-getJobInfo, or dpmhv-getJobStatus. If an error occurs during execution, an exception is reported.
Example: Create a Virtual Disk
This example creates a dynamic virtual 2GB disk.
dpmhv-createVirtDisk -host hvserver -path C:\VMDisks\hdd.vhd -type dynamic -sizeGB 2
Copyright © 2013 CA. All rights reserved. |
|