vRealize Automation ゲスト エージェントをクローン作成用のテンプレートまたは WinPE にインストールした場合、マシンが完全に展開された後にカスタム プロパティを使用して、プロビジョニングされたマシンのゲスト OS 内でカスタム スクリプトを実行できます。

表 1. ゲスト エージェントを使用してプロビジョニングされたマシンをカスタマイズするためのカスタム プロパティ
カスタム プロパティ 説明
VirtualMachine.Admin.AddOwnerToAdmins

Set to True (default) to add the machine’s owner, as specified by the VirtualMachine.Admin.Owner property, to the local administrators group on the machine.

This property is not available for provisioning by cloning.

VirtualMachine.Admin.AllowLogin

Set to True (default) to add the machine owner to the local remote desktop users group, as specified by the VirtualMachine.Admin.Owner property.

VirtualMachine.Admin.UseGuestAgent

If the guest agent is installed as a service on a template for cloning, set to True on the machine blueprint to enable the guest agent service on machines cloned from that template. When the machine is started, the guest agent service is started. Set to False to disable the guest agent. If set to False, the enhanced clone workfow will not use the guest agent for guest operating system tasks, reducing its functionality to VMwareCloneWorkflow. If not specified or set to anything other than False, the enhanced clone workflow sends work items to the guest agent.

VirtualMachine.DiskN.Active

Set to True (default) to specify that the machine's disk N is active. Set to False to specify that the machine's disk N is not active.

VirtualMachine.DiskN.Size

Defines the size in GB of disk N. For example, to give a size of 150 GB to a disk G, define the custom property VirtualMachine.Disk0.Size and enter a value of 150. Disk numbering must be sequential. By default a machine has one disk referred to by VirtualMachine.Disk0.Size, where size is specified by the storage value on the blueprint from which the machine is provisioned. The storage value on the blueprint user interface overwrites the value in the VirtualMachine.Disk0.Size property. The VirtualMachine.Disk0.Size property is not available as a custom property because of its relationship with the storage option on the blueprint. More disks can be added by specifying VirtualMachine.Disk1.Size, VirtualMachine.Disk2.Size and so on. VirtualMachine.Admin.TotalDiskUsage always represents the total of the .DiskN.Size properties plus the VMware.Memory.Reservation size allocation.

VirtualMachine.DiskN.Label

Specifies the label for a machine’s disk N. The disk label maximum is 32 characters. Disk numbering must be sequential. When used with a guest agent, specifies the label of a machine's disk N inside the guest operating system.

VirtualMachine.DiskN.Letter

Specifies the drive letter or mount point of a machine’s disk N. The default is C. For example, to specify the letter D for Disk 1, define the custom property as VirtualMachine.Disk1.Letter and enter the value D. Disk numbering must be sequential. When used in conjunction with a guest agent, this value specifies the drive letter or mount point under which an additional disk N is mounted by the guest agent in the guest operating system.

VirtualMachine.Admin.CustomizeGuestOSDelay

Specifies the time to wait after customization is complete and before starting the guest operating system customization. The value must be in HH:MM:SS format. If the value is not set, the default value is one minute (00:01:00). If you choose not to include this custom property, provisioning can fail if the virtual machine reboots before guest agent work items are completed, causing provisioning to fail.

VirtualMachine.Customize.WaitComplete

Set to True to prevent the provisioning workflow from sending work items to the guest agent until all customizations are complete.

VirtualMachine.SoftwareN.Name

Specifies the descriptive name of a software application N or script to install or run during provisioning. This is an optional and information-only property. It serves no real function for the enhanced clone workflow or the guest agent but it is useful for a custom software selection in a user interface or for software use reporting.

VirtualMachine.SoftwareN.ScriptPath

Specifies the full path to an application's install script. The path must be a valid absolute path as seen by the guest operating system and must include the name of the script filename.

You can pass custom property values as parameters to the script by inserting {CustomPropertyName} in the path string. For example, if you have a custom property named ActivationKey whose value is 1234, the script path is D:\InstallApp.bat –key {ActivationKey}. The guest agent runs the command D:\InstallApp.bat –key 1234. Your script file can then be programmed to accept and use this value.

Insert {Owner} to pass the machine owner name to the script.

You can also pass custom property values as parameters to the script by inserting {YourCustomProperty} in the path string. For example, entering the value \\vra-scripts.mycompany.com\scripts\changeIP.bat runs the changeIP.bat script from a shared location, but entering the value \\vra-scripts.mycompany.com\scripts\changeIP.bat {VirtualMachine.Network0.Address} runs the changeIP script but also passes the value of the VirtualMachine.Network0.Address property to the script as a parameter.

VirtualMachine.ScriptPath.Decrypt

Allows vRealize Automation to obtain an encrypted string that is passed as a properly formatted VirtualMachine.SoftwareN.ScriptPath custom property statement to the gugent command line.

You can provide an encrypted string, such as your password, as a custom property in a command-line argument. This allows you to store encrypted information that the guest agent can decrypt and understand as a valid command-line argument. For example, the VirtualMachine.Software0.ScriptPath = c:\dosomething.bat password custom property string is not secure as it contains an actual password.

To encrypt the password, you can create a vRealize Automation custom property, for example MyPassword = password, and enable encryption by selecting the available check box. The guest agent decrypts the [MyPassword] entry to the value in the custom property MyPassword and runs the script as c:\dosomething.bat password.
  • Create custom property MyPassword = password where password is the value of your actual password. Enable encryption by selecting the available check box.
  • Set custom property VirtualMachine.ScriptPath.Decrypt as VirtualMachine.ScriptPath.Decrypt = true.
  • Set custom property VirtualMachine.Software0.ScriptPath as VirtualMachine.Software0.ScriptPath = c:\dosomething.bat [MyPassword].

If you set VirtualMachine.ScriptPath.Decrypt to false, or do not create the VirtualMachine.ScriptPath.Decrypt custom property, then the string inside the square brackets ( [ and ]) is not decrypted.

VirtualMachine.SoftwareN.ISOName

Specifies the path and filename of the ISO file relative to the datastore root. The format is /folder_name/subfolder_name/file_name.iso. If a value is not specified, the ISO is not mounted.

VirtualMachine.SoftwareN.ISOLocation

Specifies the storage path that contains the ISO image file to be used by the application or script. Format the path as it appears on the host reservation, for example netapp-1:it_nfs_1. If a value is not specified, the ISO is not mounted.