Mount and unmount a vVols datastore
Contributors
Suggest changes
You can mount a VMware Virtual Volumes (vVols) datastore to one or more additional hosts by using the Mount vVols Datastore dialog box. Mounting the datastore provides storage access to additional hosts. You can also unmount vVols datastore.
Use the following API to mount or unmount a vVols datastore. You need to pass x-auth for the API. You can generate this x-auth from the new API added under Auth in Swagger.
/virtualization/api/v1/auth/vcenter-login
PATCH /virtualization/api/v1/vcenters/{vcguid}/vvols/datastores/{moref}/hosts
Get vVol datastore moref from vCenter.
Request Body
{ "operation": "mount", "morefs": [ "host-7044" ], }
Examples:
-
Mount on additional host
Use the following API to mount on additional host:
/api/v1/vcenters/cdded9ad-6bsd-4c9e-b44g-691250bfe2df/vvols/datastores/datastore-24/hosts Request Body { "operation": "mount", "morefs": ["host-13"], }
-
Unmount on additional host
Use the following API to unmount on additional host:
/api/v1/vcenters/cdded9ad-6bsd-4c9e-b44g-691250bfe2df/vvols/datastores/datastore-24/hosts Request Body { "operation": "unmount", "morefs": ["host-13"], }