Migration Service (Plus)

The V2V Migration Service is a separate feature module. To use this feature, you need to purchase both the Base License and the Plus License of V2V Migration Service. The Plus License cannot be used independently.


AddV2VConversionHost

API Request

URLs
POST zstack/v1/v2v-conversion-hosts
Headers
Authorization: OAuth the-session-uuid
Body
{   "params": {     "name": "V2V-Converter-01",     "description": "to convert vm from foreign hypervisor",     "type": "VMWARE",     "hostUuid": "fc2971a1a5943bdda6733feecfb26861",     "storagePath": "/path/to/large/directory/"   },   "systemTags": [],   "userTags": [] }
Note: In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X POST -d '{"params":{"name":"V2V-Converter-01","description":"to convert vm from foreign hypervisor","type":"VMWARE","hostUuid":"fc2971a1a5943bdda6733feecfb26861","storagePath":"/path/to/large/directory/"}}' http://localhost:8080/zstack/v1/v2v-conversion-hosts
Request Parameters
Name Type Location Description Optional Value Starting Version
name String body (contained in the params structure) The resource name. 3.0.1
description String body (contained in the params structure) Optional. The detailed description of the resource. 3.0.1
type String body (contained in the params structure) The type of the V2V conversion host.
  • VMWARE
3.0.1
hostUuid String body (contained in the params structure) The host UUID. 3.0.1
storagePath String body (contained in the params structure) The image storage path of the V2V migration. 3.0.1
resourceUuid String body (contained in the params structure) Optional. The resource UUID. 3.0.1
tagUuids List body (contained in the params structure) Optional. The tag UUID list. 3.4.0
systemTags List body Optional. The system tags. 3.0.1
userTags List body Optional. The user tags. 3.0.1
Note:
  • When you add a V2V conversion host in ZStack Cloud, you can specify the CIDR for the V2V migration network by adding the networkcidr option to SystemTags. The SystemTag is passed by using the networkcidr parameter.
    • Format of the networkcidr option: conversion::network::cidr::{netcidr}
    • Example: conversion::network::cidr::{10.0.0.1/24}.

API Response

Sample Response
{   "inventory": {     "uuid": "c6ac169863173a9bb5742974d731a242",     "name": "V2V-Converter-01",     "description": "to convert vm from foreign hypervisor",     "type": "VMWARE",     "hostUuid": "dcffe404cd0336a5817bfba0e56117ac",     "storagePath": "/path/to/large/directory/",     "state": "Enabled"   } }
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 3.0.1
inventory V2VConversionHostInventory See inventory. 3.0.1
#error
Name Type Description Starting Version
code String The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. 3.0.1
description String The brief description of the error. 3.0.1
details String The details about the error. 3.0.1
elaboration String The reserved field. Default value: null. 3.0.1
opaque LinkedHashMap The reserved field. Default value: null. 3.0.1
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 3.0.1
#inventory
Name Type Description Starting Version
uuid String The resource UUID. 3.0.1
name String The resource name. 3.0.1
description String The detailed description of the resource. 3.0.1
type String The type. 3.0.1
hostUuid String The host UUID. 3.0.1
storagePath String The image storage path of the V2V migration. 3.0.1
state String The state. 3.0.1
createDate Timestamp The creation date. 3.0.1
lastOpDate Timestamp The last operation date. 3.0.1

#

SDK Sample

Java SDK
AddV2VConversionHostAction action = new AddV2VConversionHostAction(); action.name = "V2V-Converter-01"; action.description = "to convert vm from foreign hypervisor"; action.type = "VMWARE"; action.hostUuid = "fc2971a1a5943bdda6733feecfb26861"; action.storagePath = "/path/to/large/directory/"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; AddV2VConversionHostAction.Result res = action.call();
Python SDK
AddV2VConversionHostAction action = AddV2VConversionHostAction() action.name = "V2V-Converter-01" action.description = "to convert vm from foreign hypervisor" action.type = "VMWARE" action.hostUuid = "fc2971a1a5943bdda6733feecfb26861" action.storagePath = "/path/to/large/directory/" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" AddV2VConversionHostAction.Result res = action.call()

ChangeV2VConversionHostState

API Request

URLs
PUT zstack/v1/v2v-conversion-hosts/{uuid}/actions
Headers
Authorization: OAuth the-session-uuid
Body
{   "changeV2VConversionHostState": {     "stateEvent": "disable"   },   "systemTags": [],   "userTags": [] }
Note: In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X PUT -d '{"changeV2VConversionHostState":{"stateEvent":"disable"}}' http://localhost:8080/zstack/v1/v2v-conversion-hosts/99c4cb23248e37aeb54037578aaa120f/actions
Request Parameters
Name Type Location Description Optional Value Starting Version
uuid String url The resource UUID. 3.0.1
stateEvent String body (contained in the changeV2VConversionHostState structure) The state event.
  • enable
  • disable
3.0.1
systemTags List body Optional. The system tags. 3.0.1
userTags List body Optional. The user tags. 3.0.1

API Response

Sample Response
{   "inventory": {     "uuid": "ac5f6b519b86352faa5e1d94ad5461d8",     "name": "new-name",     "description": "new description",     "type": "VMWARE",     "hostUuid": "d5d8d26dfc913c9aa8f220a238b9e0bb",     "storagePath": "/path/to/large/directory/",     "state": "Disabled"   } }
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 3.0.1
inventory V2VConversionHostInventory See inventory. 3.0.1
#error
Name Type Description Starting Version
code String The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. 3.0.1
description String The brief description of the error. 3.0.1
details String The details about the error. 3.0.1
elaboration String The reserved field. Default value: null. 3.0.1
opaque LinkedHashMap The reserved field. Default value: null. 3.0.1
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 3.0.1
# inventory
Name Type Description Starting Version
uuid String The resource UUID. 3.0.1
name String The resource name. 3.0.1
description String The detailed description of the resource. 3.0.1
type String The type. 3.0.1
hostUuid String The host UUID. 3.0.1
storagePath String The image storage path of the V2V migration. 3.0.1
state String The state. 3.0.1
createDate Timestamp The creation date. 3.0.1
lastOpDate Timestamp The last operation date. 3.0.1

SDK Sample

Java SDK
ChangeV2VConversionHostStateAction action = new ChangeV2VConversionHostStateAction(); action.uuid = "99c4cb23248e37aeb54037578aaa120f"; action.stateEvent = "disable"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; ChangeV2VConversionHostStateAction.Result res = action.call();
Python SDK
ChangeV2VConversionHostStateAction action = ChangeV2VConversionHostStateAction() action.uuid = "99c4cb23248e37aeb54037578aaa120f" action.stateEvent = "disable" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" ChangeV2VConversionHostStateAction.Result res = action.call()




Archives

Download Document Archives

Back to Top

Download

Already filled the basic info?Click here.

Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

An email with a verification code will be sent to you. Make sure the address you provided is valid and correct.

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Download

Not filled the basic info yet? Click here.

Invalid email address or mobile number.
同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
ZStack Training and Certification
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
Request Trial
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder. After receiving the email, click the URL to download the documentation.

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder.
Or click on the URL below. (For Internet Explorer, right-click the URL and save it.)

Thank you for using ZStack products and services.

Submit successfully.

We'll connect soon.

Thank you for using ZStack products and services.