vRealize Automation 包括可以用来为链接克隆蓝图提供其他控制的自定义属性。

与链接克隆蓝图配合使用时,需要某些 vRealize Automation 自定义属性。

表 1. 链接克隆蓝图的自定义属性

自定义属性

描述

VirtualMachine.DiskN.Storage

Specifies the datastore on which to place the machine disk N, for example DATASTORE01. This property is also used to add a single datastore to a linked clone blueprint. N is the index (starting at 0) of the volume to assign. Enter the name of the datastore to assign to the volume. This is the datastore name as it appears in the Storage Path on the Edit Compute Resource page. Disk numbering must be sequential.

VirtualMachine.DiskN.StorageReservationPolicy

Specifies the storage reservation policy to use to find storage for disk N. Also assigns the named storage reservation policy to a volume. To use this property, substitute the volume number for N in the property name and specify a storage reservation policy name as the value. This property is equivalent to the storage reservation policy name specified on the blueprint. Disk numbering must be sequential. This property is valid for all Virtual and vCloud reservations. This property is not valid for Physical, Amazon, or OpenStack reservations.

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.

MaximumProvisionedMachines

指定一个虚拟机快照的最大链接克隆数。默认值为“无限制”。

Linux.ExternalScript.Name

指定 Linux 客户机代理在安装操作系统之后运行的可选自定义脚本的名称,例如,config.sh。对于从模板中克隆的、安装 Linux 代理的 Linux 计算机,此属性可用。

如果指定外部脚本,则还必须使用 Linux.ExternalScript.LocationTypeLinux.ExternalScript.Path 属性定义其位置。

Linux.ExternalScript.LocationType

指定在 Linux.ExternalScript.Name 属性中命名的自定义脚本的位置类型。此类型可以是 local 或 nfs。

此外,您还必须使用 Linux.ExternalScript.Path 属性指定脚本位置。如果位置类型为 nfs,请仍使用 Linux.ExternalScript.Server 属性。

Linux.ExternalScript.Server

指定在 Linux.ExternalScript.Name 中命名的 Linux 外部自定义脚本所处的 NFS 服务器的名称,例如,lab-ad.lab.local。

Linux.ExternalScript.Path

在 NFS 服务器上指定 Linux 自定义脚本的本地路径或 Linux 自定义的导出路径。该值必须以正斜线开头且不得包括文件名,例如,/scripts/linux/config.sh

如果已安装客户机代理来自定义克隆计算机,则可以比其他用户更频繁地使用自定义属性。

表 2. 用于通过客户机代理自定义克隆计算机的自定义属性

自定义属性

描述

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