VmSpec

Defines the attributes for creating a virtual machine. An instance of this class is passed to resource.createInstance(), resource.createTemplate(), resource.clone().

Constructor

VmSpec(GridObjectInfo): Constructs a default VmSpec.

Methods

Summary:

setAutoprep(Dictionary autoprep)

Set facts for preparing the new VM.

setHost(String host)

Set facts for preparing the new VM.

setNewName(String name)

Sets the name of the VM to be created.

setRepository(String repository)

Sets the name of a repository for creating the VM if required by the provisioning adapter.

setUseAutoprep(boolean value)

Sets whether to use the autoprep facts on the resource for creating the new VM.

Examples

VmSpec here is used for creating a clone on a named host from a template resource:

      resource = getMatrix().getGridObject(TYPE_RESOURCE,"myTemplate")      spec = VmSpec()      spec.setNewName("newvm")      spec.setHost('vmhost-qa')      resource.clone(spec)

See Also