VMware Cloud Community
seangadson
Contributor
Contributor

Deploy OVF From Content Library using api

Hello,

I am trying to deploy the NSX-T ovf file from the content library using the vCenter API CallPOST https://{server}/rest/com/vmware/vcenter/ovf/library-item/id:{ovf_library_item_id}?~action=deploy.  What I have done is use the filter method to extract all of the params and configs needed to deploy the ovf file.  But I am getting the error below:

{

  "value": {

    "error": {

      "warnings": [],

      "information": [],

      "errors": [

        {

"category": "SERVER",

"error": {

"@class": "com.vmware.vapi.std.errors.invalid_argument",

"messages": [

{

"args": [

""

],

"default_message": "An invalid argument \"\" was specified.",

"id": "com.vmware.vdcs.util.invalid_argument"

}

]

}

        }

      ]

    },

    "succeeded": false

  }

}

I am looking for a bit of help to understand where the invalid argument is in the payload below:

{

"target": {

"host_id": "host-85",

"resource_pool_id": "resgroup-8"

},

"deployment_spec": {

"default_datastore_id": "datastore-86",

"name": "SeanTest",

"storage_provisioning": "thin",

"accept_all_EULA": true,

"additional_parameters": [

{

"@class": "com.vmware.vcenter.ovf.property_params",

"properties": [

{

"id": "nsx_passwd_0",

"value": "{password}"

},

{

"id": "nsx_cli_passwd_0",

"value": "{password}"

},

{

"id": "nsx_cli_audit_passwd_0",

"value": "{password}"

},

{

"id": "nsx_cli_username",

"value": "admin"

},

{

"id": "nsx_cli_audit_username",

"value": "audit"

},

{

"id": "nsx_hostname",

"value": "nsx-manager-02.{domain_name}"

},

{

"id": "nsx_role",

"value": "NSX Manager"

},

{

"id": "nsx_gateway_0",

"value": "10.2.2.1"

},

{

"id": "nsx_ip_0",

"value": "10.2.2.22"

},

{

"id": "nsx_netmask_0",

"value": "255.255.255.0"

},

{

"id": "nsx_dns1_0",

"value": "{dns_server}"

},

{

"id": "nsx_domain_0",

"value": "{domain_name}"

}

],

"type": "PropertyParams"

},

{

"@class": "com.vmware.vcenter.ovf.ip_allocation_params",

"type": "IpAllocationParams",

"ip_allocation_policy": "STATIC_MANUAL",

"ip_protocol": "IPV4"

},

{

"@class": "com.vmware.vcenter.ovf.deployment_option_params",

"selected_key": "extra_small",

"type": "DeploymentOptionParams"

},

{

"@class": "com.vmware.vcenter.ovf.extra_config_params",

"include_keys": [

"time.synchronize.tools.startup",

"ethernet1.rxDataRingEnabled",

"isolation.tools.vmxDnDVersionGet.disable",

"RemoteDisplay.maxConnections",

"time.synchronize.restore",

"time.synchronize.shrink",

"isolation.tools.diskShrink.disable",

"isolation.tools.memSchedFakeSampleStats.disable",

"ethernet3.rxDataRingEnabled",

"ethernet0.rxDataRingEnabled",

"isolation.tools.guestDnDVersionSet.disable",

"isolation.tools.unityActive.disable",

"ethernet2.rxDataRingEnabled",

"time.synchronize.continue",

"time.synchronize.resume.disk",

"isolation.tools.diskWiper.disable"

],

"type": "ExtraConfigParams"

}

],

"network_mappings": [

{

"key": "Network 1",

"value": "network-87"

}

]

}

}

0 Kudos
0 Replies