Storage Pod Add Standalone Host Task

Storage Pod Add Standalone Host Task

Creates a new single-host compute resource.

The name provided can be an IP address, such as 192.168.0.120, or a string, such as esx120. If a name is specified, a DNS lookup is used to resolve it to a fully-qualified name, such as esx120.vmware.com. If the DNS lookup fails, the string is stored as specified.

Licenses for the host are allocated when making the first connection to the host. This is because the license needed typically depends on the type of host and the number of CPUs.

In addition to the Host.Inventory.AddStandaloneHost privilege, it requires System.View privilege on the VM folder that the VMs of the host will be placed on.

Required privileges: Host.Inventory.AddStandaloneHost

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/StoragePod/{moId}/AddStandaloneHost_Task
COPY
Path Parameters
string
moId
Required

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 StoragePod/{moId}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.


Request Body
AddStandaloneHostRequestType of type(s) application/json
Required
{
    "spec": {
        "hostName": "string",
        "port": 0,
        "sslThumbprint": "string",
        "userName": "string",
        "password": "string",
        "vmFolder": {
            "type": "string",
            "value": "string"
        },
        "force": false,
        "vimAccountName": "string",
        "vimAccountPassword": "string",
        "managementIp": "string",
        "lockdownMode": "string",
        "hostGateway": {
            "gatewayType": "string",
            "gatewayId": "string",
            "trustVerificationToken": "string",
            "hostAuthParams": [
                {
                    "_typeName": "string",
                    "key": "string",
                    "value": "string"
                }
            ]
        }
    },
    "compResSpec": {
        "vmSwapPlacement": "string",
        "spbmEnabled": false,
        "defaultHardwareVersionKey": "string",
        "desiredSoftwareSpec": {
            "baseImageSpec": {
                "version": "string"
            },
            "vendorAddOnSpec": {
                "name": "string",
                "version": "string"
            },
            "components": [
                {
                    "_typeName": "string",
                    "name": "string",
                    "version": "string"
                }
            ]
        },
        "maximumHardwareVersionKey": "string",
        "enableConfigManager": false
    },
    "addConnected": false,
    "license": "string"
}
spec
Required

Specifies the parameters needed to add a single host.

This includes a small set of optional information about the host configuration. This allows the network and datastore configuration of the host to be synchronized with the naming conventions of the datacenter, as well as the configuration of a vim account (the username/password for the virtual machine files that is created on disk).

compResSpec
Optional

Changes to apply to the compute resource configuration.

boolean
addConnected
Required

Flag to specify whether or not the host should be connected as soon as it is added. The host will not be added if a connection attempt is made and fails.

string
license
Optional

Provide a licenseKey or licenseKeyType. See LicenseManager

Authentication
This operation uses the following authentication methods.
Responses
200

This method returns a Task object with which to monitor the operation. The info.result property in the Task contains the newly added ComputeResource upon success.

Returns MoRefTask of type(s) application/json
This response body class contains all of the following: MoRefExtensibleManagedObject
{
    "_typeName": "string",
    "type": "string",
    "value": "string"
}

500

InvalidLogin: if authentication with the host fails.

InvalidArgument: if an argument is specified incorrectly.

AlreadyBeingManaged: if the host is already being managed by a vCenter server. If the host is being managed by a different vCenter server, this can be overridden by the "force" flag in the connection specification.

NotEnoughLicenses: if there are not enough licenses to add the host.

NoHost: if the host cannot be contacted.

NotSupported: if the host is being added to a folder whose childType property does not contain "ComputeResource".

NotSupportedHost: if the host is running a software version that is not supported.

AgentInstallFailed: if there is an error installing the vCenter agent on the new host.

AlreadyConnected: if addConnected is true and the host is already connected to vCenter.

HostConnectFault: if an error occurred when attempting to connect to a host. Typically, a more specific subclass, such as AlreadyBeingManaged, is thrown.

SSLVerifyFault: if the host certificate could not be authenticated

DuplicateName: if another host in the same folder has the name.

NoPermission: if there are crypto keys to be sent to the host, but the user does not have Cryptographer.RegisterHost privilege on the Folder.

Returns VimFault of type(s) application/json
This response body class contains all of the following: MethodFault
{
    "_typeName": "string",
    "faultCause": "MethodFault Object",
    "faultMessage": [
        {
            "_typeName": "string",
            "key": "string",
            "arg": [
                {
                    "_typeName": "string",
                    "key": "string",
                    "value": {
                        "_typeName": "string"
                    }
                }
            ],
            "message": "string"
        }
    ]
}