Skip to main content
Resource Center/Resource Pool/VM Instance Operations
PUTVM Instance OperationsSince 4.1.0SynchronousAuth Required

SetVmClockTrack

SetVmClockTrack

Execution Availability

Try It Out

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

Path Parameters

Request Inputs

Path Parameters

  • uuidStringRequired

    The resource UUID.

Body Fields

  • setvmclocktrackObjectRequired

    setvmclocktrack request body object.

    • trackStringRequired

      No description provided.

    • syncAfterVMResumeBoolean

      Optional. Specifies whether to sync time when VM instances resume running.

    • intervalInSecondsInteger

      Optional. The interval of time sync.

  • systemTagsList

    Optional. The system tags.

  • userTagsList

    Optional. The user tags.

Responses

200 OK

On success, this API returns the following response structure.

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

  • inventoryVmInstanceInventoryRequired

    See inventory.

    • uuidStringRequired

      The resource UUID.

    • nameStringRequired

      The resource name.

    • descriptionString

      Optional. The detailed description of the resource.

    • zoneUuidStringRequired

      The zone UUID.

    • clusterUuidStringRequired

      The cluster UUID.

    • imageUuidStringRequired

      The image UUID.

    • hostUuidStringRequired

      The host UUID.

    • lastHostUuidStringRequired

      最近一次主机UUID。

    • instanceOfferingUuidStringRequired

      The instance offering UUID.

    • rootVolumeUuidStringRequired

      The root volume UUID.

    • platformStringRequired

      平台。

    • defaultL3NetworkUuidStringRequired

      No description provided.

    • typeStringRequired

      类型。

    • hypervisorTypeStringRequired

      No description provided.

    • memorySizeLongRequired

      内存大小。

    • cpuNumIntegerRequired

      No description provided.

    • cpuSpeedLongRequired

      No description provided.

    • allocatorStrategyStringRequired

      No description provided.

    • createDateTimestampRequired

      The creation time.

    • lastOpDateTimestampRequired

      The last update time.

    • stateStringRequired

      当前状态。

    • vmNicsListRequired

      See vmNics.

      • uuidStringRequired

        The resource UUID.

      • vmInstanceUuidStringRequired

        The VM UUID.

      • l3NetworkUuidStringRequired

        The L3 network UUID.

      • ipStringRequired

        The cluster UUID.

      • macStringRequired

        The image UUID.

      • hypervisorTypeStringRequired

        The host UUID.

      • netmaskStringRequired

        子网掩码

      • gatewayStringRequired

        The instance offering UUID.

      • metaDataStringRequired

        The root volume UUID.

      • ipVersionIntegerRequired

        The cluster UUID.

      • deviceIdIntegerRequired

        The image UUID.

      • typeStringRequired

        The host UUID.

      • createDateTimestampRequired

        The creation time.

      • lastOpDateTimestampRequired

        The last update time.

      • usedIpsListRequired

        See usedIps.

        • uuidStringRequired

          The resource UUID.

        • ipRangeUuidStringRequired

          The IP range UUID.

        • l3NetworkUuidStringRequired

          The L3 network UUID.

        • ipVersionIntegerRequired

          The IP version.

        • ipStringRequired

          The IP address.

        • netmaskStringRequired

          The netmask.

        • gatewayStringRequired

          The gateway.

        • usedForStringRequired

          已使用用于。

        • ipInLonglongRequired

          No description provided.

        • vmNicUuidStringRequired

          The VM NIC UUID.

        • createDateTimestampRequired

          The creation time.

        • lastOpDateTimestampRequired

          The last update time.

    • allVolumesListRequired

      See allVolumes.

      • uuidStringRequired

        The resource UUID.

      • nameStringRequired

        The resource name.

      • descriptionString

        Optional. The detailed description of the resource.

      • primaryStorageUuidStringRequired

        The primary storage UUID.

      • vmInstanceUuidStringRequired

        The VM UUID.

      • diskOfferingUuidStringRequired

        The disk offering UUID.

      • rootImageUuidStringRequired

        The root volume image UUID.

      • installPathStringRequired

        The installation path of the volume on the primary storage.

      • typeStringRequired

        The volume type.

      • formatStringRequired

        The volume type.

      • sizeLongRequired

        The volume size.

      • actualSizeLongRequired

        The actual size of the volume.

      • deviceIdIntegerRequired

        设备ID。

      • stateStringRequired

        Indicates whether the disk is enabled.

      • statusStringRequired

        The volume status.

      • createDateTimestampRequired

        The creation time.

      • lastOpDateTimestampRequired

        The last update time.

      • isShareableBooleanRequired

        Indicates whether the volume is a shared volume.

      • volumeQosStringRequired

        The volume QoS, for example, total=1048576

Endpoint

PUT/zstack/v1/vm-instances/{uuid}/actions

/zstack/v1/vm-instances/{uuid}/actions

Operation ID

SetVmClockTrack

Permalink

Request Example

curl -X PUT 'http://{host}/zstack/v1/vm-instances/{uuid}/actions' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"setvmclocktrack":{"track":"<track>","syncAfterVMResume":true,"intervalInSeconds":1},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "uuid": "19d64f55a9723e59849c0f9357a0dded", "name": "Test-VM", "description": "web server VM", "zoneUuid": "553326a3b554380ca4e4b2976efa4df5", "clusterUuid": "c9a8ba243c5a3d59b144e4e1ace143a2", "imageUuid": "e4297acdd9b43e3f9b7a8ec74211a3f2", "hostUuid": "f841ef12962037369ea4d8f3ba4c9c28", "lastHostUuid": "3b6273ea6b1a384584178e11f05bf1f0", "instanceOfferingUuid": "9ce1349c65ff3c80a423267837f5f34e", "rootVolumeUuid": "5319e0ae2b483949bf25b059a674dbc8", "platform": "Linux", "defaultL3NetworkUuid": "c715b758cd843ac997ccdfbbcc9097cc", "type": "UserVm", "hypervisorType": "KVM", "memorySize": 8.589934592E9, "cpuNum": 1.0, "allocatorStrategy": "LastHostPreferredAllocatorStrategy", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM", "state": "Stopped", "vmNics": [ { "uuid": "8585080b6b5236a5875e8162c062e551", "vmInstanceUuid": "19d64f55a9723e59849c0f9357a0dded", "usedIpUuid": "c0bbe89468fa3b2aa6dc4e8aaa6df3f7", "l3NetworkUuid": "c715b758cd843ac997ccdfbbcc9097cc", "ip": "192.168.1.10", "mac": "00:0c:29:bd:99:fc", "hypervisorType": "KVM", "netmask": "255.255.255.0", "gateway": "192.168.1.1", "deviceId": 0.0, "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM" } ], "allVolumes": [ { "uuid": "5319e0ae2b483949bf25b059a674dbc8", "name": "Root-Volume-For-VM-19d64f55a9723e59849c0f9357a0dded", "primaryStorageUuid": "0e4e3cf961873074b8b3eca3bc693ece", "vmInstanceUuid": "19d64f55a9723e59849c0f9357a0dded", "diskOfferingUuid": "f1b95ad6d26e336e8809764ec2936fd2", "rootImageUuid": "e4297acdd9b43e3f9b7a8ec74211a3f2", "installPath": "/Cloud_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-5319e0ae2b483949bf25b059a674dbc8/5319e0ae2b483949bf25b059a674dbc8.qcow2", "type": "Root", "format": "qcow2", "size": 1.073741824E11, "actualSize": 2.147483648E10, "deviceId": 0.0, "state": "Enabled", "status": "Ready", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM" } ] } }

Change History

This API has no change history records yet.

View all change history