Virtual App Import V App
Creates a new entity in this resource pool.
The import process consists of two steps:
- Create the VMs and/or vApps that make up the entity.
- Upload virtual disk contents.
In step 1, the client must wait for the server to create all inventory objects. It does that by monitoring the state property on the HttpNfcLease object returned from this call. When the server is done creating objects, the lease will change to the ready state, and step 2 begins. If an error occurs while the server is creating inventory objects, the lease will change to the error state, and the import process is aborted.
In step 2, the client uploads disk contents using the URLs provided in the info property of the lease. The client must call HttpNfcLeaseProgress on the lease periodically to keep the lease alive and report progress to the server. Failure to do so will cause the lease to time out, and the import process will be aborted.
When the client is done uploading disks, it completes the lease by calling HttpNfcLeaseComplete. The client can also abort the import process by calling HttpNfcLeaseAbort.
If the import process fails, is aborted, or times out, all created inventory objects are removed, including all virtual disks.
This operation only works if the folder's childType includes VirtualMachine.
Depending on the properties of the virtual machine bring imported, additional privileges may be required. See CreateVM_Task for a description of these privileges.
Required privileges: VApp.Import
The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId
, in this case VirtualApp/{moId}
.
The vSphere release schema. The current specification covers vSphere 8.0.3.0 APIs.
Show optional properties
{
"spec": {}
}
{
"spec": {
"_typeName": "string",
"entityConfig": {
"_typeName": "string",
"key": {
"_typeName": "string",
"type": "string",
"value": "string"
},
"tag": "string",
"startOrder": 0,
"startDelay": 0,
"waitingForGuest": false,
"startAction": "string",
"stopDelay": 0,
"stopAction": "string",
"destroyWithParent": false
},
"instantiationOst": {
"_typeName": "string",
"id": "string",
"type": "string",
"section": [
{
"_typeName": "string",
"lineNumber": 0,
"xml": "string"
}
],
"child": [
"OvfConsumerOstNode Object"
],
"entity": {
"_typeName": "string",
"type": "string",
"value": "string"
}
}
},
"folder": {
"_typeName": "string",
"type": "string",
"value": "string"
},
"host": {
"_typeName": "string",
"type": "string",
"value": "string"
}
}
An ImportSpec is used when importing VMs or vApps.
It can be built from scratch, or it can be generated from an OVF descriptor using the service interface OvfManager.
This class is the abstract base for VirtualMachineImportSpec and VirtualAppImportSpec. These three classes form a composite structure that allows us to contain arbitrarily complex entitites in a single ImportSpec.
a HttpNfcLease object which is used to drive the import session.
{
"_typeName": "string",
"type": "string",
"value": "string"
}
VmConfigFault: if a VM configSpec has incorrect values. Typically, a more specific subclass is thrown.
OutOfBounds: if Host.capability.maxSupportedVMs is exceeded.
FileAlreadyExists: if the requested cfgPath for the virtual machine's configuration file already exists.
FileFault: if there is a problem creating the virtual machine on disk. Typically, a more specific subclass, such as NoDiskSpace, will be thrown.
DuplicateName: if another virtual machine in the same folder already has the specified target name.
InvalidName: if the name is not a valid entity name.
NotSupported: if the virtual machine is being created within a folder whose childType property is not set to "VirtualMachine", a vApp is being imported into a resource pool that does not support nested resource pools, or a virtual machine is being imported into a resource pool and no folder is given.
InsufficientResourcesFault: if this operation would violate a resource usage policy.
InvalidDatastore: if the operation cannot be performed on the target datastores.
VmWwnConflict: if the WWN of the virtual machine has been used by other virtual machines.
{
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}