Skip to main content
Resource Center/Resource Pool/VM Instance Operations
POSTVM Instance OperationsSince 4.4.6SynchronousAuth Required

ParseOvf

ParseOvf

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

Body Fields

  • xmlBase64StringRequired

    The Base64-encoded OVF file.

  • systemTagsList

    Optional. The system tags.

  • userTagsList

    Optional. The user tags.

Responses

200 OK

On success, this API returns the following response structure.

  • successbooleanRequired

    操作是否成功。

  • errorErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, see error.

    • codeStringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

  • ovfInfoOvfInfoRequired

    See ovfInfo.

    • vmNameStringRequired

      The VM name.

    • disksListRequired

      See disks.

      • indexintRequired

        The disk number.

      • diskIdStringRequired

        The disk ID.

      • fileRefStringRequired

        The file reference.

      • fileNameStringRequired

        The image file name.

      • formatStringRequired

        The image file format.

      • populatedSizeLongRequired

        The image file size.

      • capacityLongRequired

        The disk capacity. Unit: byte.

    • networksListRequired

      See networks.

      • nameStringRequired

        The network name.

    • cpuOvfCpuInfoRequired

      See cpu.

      • instanceIdStringRequired

        The instance ID.

      • quantityIntegerRequired

        The number of CPU cores.

      • coresPerSocketIntegerRequired

        The number of cores per CPU.

    • memoryOvfMemoryInfoRequired

      See memory.

      • instanceIdStringRequired

        The instance ID.

      • quantityLongRequired

        The memory size. Unit: byte.

    • osOvfOSInfoRequired

      See os.

      • idIntegerRequired

        The OS ID.

      • versionStringRequired

        The OS version.

      • osTypeStringRequired

        The OS type.

      • descriptionStringRequired

        The OS description.

    • systemInfoOvfSystemInfoRequired

      See systemInfo.

      • virtualSystemTypeStringRequired

        The system type.

      • firmwareTypeStringRequired

        The firmware type.

    • nicsListRequired

      See nics.

      • networkNameStringRequired

        The network name.

      • nicModelStringRequired

        The NIC model.

      • nicNameStringRequired

        The NIC name.

      • autoAllocationBooleanRequired

        Indicates whether the NIC is auto allocated.

    • cdDriversListRequired

      See cdDrivers.

      • autoAllocationBooleanRequired

        Indicates whether the CD driver is auto allocated.

      • driverTypeStringRequired

        The driver type.

      • subTypeStringRequired

        The sub-type.

      • nameStringRequired

        The driver name.

    • volumesListRequired

      See volumes.

      • nameStringRequired

        The disk name.

      • diskIdStringRequired

        The disk ID.

      • driverTypeStringRequired

        The disk driver type.

Endpoint

POST/zstack/v1/ovf/parse

/zstack/v1/ovf/parse

Operation ID

ParseOvf

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/ovf/parse' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"xmlBase64":"<xmlBase64>","systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "ovfInfo": { "disks": [ { "index": 0.0, "diskId": "system", "fileRef": "file1", "fileName": "system.vmdk", "format": "vmdk", "populatedSize": 1.688600576E9, "capacity": 6.442450944E10 } ], "networks": [ { "name": "red-net" } ], "cpu": { "instanceId": "2", "quantity": 4.0, "coresPerSocket": 4.0 }, "memory": { "instanceId": "3", "quantity": 4.294967296E9 }, "vmName": "VM-1", "os": { "id": 107.0, "version": "7", "osType": "centos", "description": "CentOS 7" }, "systemInfo": { "virtualSystemType": "vmx-18" }, "nics": [ { "networkName": "red-net", "nicModel": "E1000", "nicName": "nic-1", "autoAllocation": true } ], "cdDrivers": [ { "autoAllocation": true, "driverType": "SATA", "subType": "vmware.cdrom.remotepassthrough", "name": "CD" } ], "volumes": [ { "name": "System Volume", "diskId": "system", "driverType": "IDE" } ] } }

Change History

This API has no change history records yet.

View all change history