Vim Cluster Vsan Vc Stretched Cluster System VSAN Vc Add Witness Host

Vim Cluster Vsan Vc Stretched Cluster System VSAN Vc Add Witness Host

Add a host as witness host to vSAN cluster to re-enable vSAN stretched cluster.

It is expected to be used in following scenarios: 1. Stretched cluster is disabled by VSANVcRemoveWitnessHost; 2. Replace original witness host with a new one, this should happen when old witness host is out of service, such as host is down or removed from vCenter inventory; This function doesn't change existing Fault Domain configuration, and please be sure the old witness host was gone or out of service, because replacing witness host will reduce redundancy. Relative to API VSANVcConvertToStretchedCluster , it only takes care of witness host reconfiguration, vSAN cluster must already be configured for stretched cluster.

Request
URI
POST
https://{api_host}/sdk/vim25/{release}/vsan/VimClusterVsanVcStretchedClusterSystem/{moId}/VSANVcAddWitnessHost
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 VimClusterVsanVcStretchedClusterSystem/{moId}.

string
release
Required

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


Request Body
VSANVcAddWitnessHostRequestType of type(s) application/json
Required
"VSANVcAddWitnessHostRequestType Object"
cluster
Required

The target vSAN cluster to add/replace witness host;

Required privileges: Host.Inventory.AddHostToCluster

witnessHost
Required

The witness host to be added into vSAN cluster. This host must be connected and managed by the same vCenter server, and cannot be a part of target cluster;

string
preferredFd
Required

The name of preferred Fault Domain;

diskMapping
Optional

The diskMapping to be created on witness host. If disk claim is configured as auto-mode on witness host, this parameter is not required.

boolean
metadataMode
Optional

True to indicate the host runs as metadata host instead of normal witness host. This is currently reserved by VMware internally to represent a different cluster type other than stretched cluster. Leave this unset for vSAN stretched cluster.

storagePoolSpec
Optional

The specification to add disks to vSAN storage pool. This parameter cannot be set together with diskMapping param.

Authentication
This operation uses the following authentication methods.
Responses
200

vim.Task

Returns MoRefTask of type(s) application/json
"MoRefTask Object"

500

InvalidState: If any host in target cluster is not connected to vCenter server;

InvalidArgument: If below issues exist: 1. target cluster doesn't enable vSAN; 2. witness host resides in target cluster; 3. neither IPv4 nor IPv6 is properly configured for vSAN traffic on all hosts in target cluster; 4. both diskMapping and storagePoolSpec are specified

NotEnoughLicenses: If any host in target cluster doesn't have vSAN stretched cluster license;

VsanFault: If any unexpected runtime fault is met.

Returns MethodFault of type(s) application/json
This response body class contains all of the following: InlineMethodFault0
"MethodFault Object"
faultCause
Optional

Fault which is the cause of this fault.

array of object
faultMessage
Optional

Message which has details about the error Message can also contain a key to message catalog which can be used to generate better localized messages.


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/sdk/vim25/{release}/vsan/VimClusterVsanVcStretchedClusterSystem/{moId}/VSANVcAddWitnessHost