vim_host_datastore

Host datastore lifecycle via SOAP.

Mounts and unmounts VMFS / NFS / NAS datastores on a single ESXi host. The REST /api/vcenter/datastore surface is read-only; for create/mount we go through HostDatastoreSystem.

Surfaces:

  • VMFS — create on a raw disk path: HostDatastoreSystem.CreateVmfsDatastore.

  • NFS / NAS — mount a remote share: HostDatastoreSystem.CreateNasDatastore.

  • Detach / UnmountRemoveDatastore.

  • RescanRescanAllHba.

saltext.vcf.clients.vim_host_datastore.list_(opts, host, profile=None)[source]

List all datastores mounted on host.

saltext.vcf.clients.vim_host_datastore.list_available_vmfs_disks(opts, host, profile=None)[source]

Return raw disk devices on host eligible for a new VMFS datastore.

saltext.vcf.clients.vim_host_datastore.create_vmfs(opts, host, name, device_path, vmfs_version=6, profile=None)[source]

Create a VMFS datastore on device_path on host. Synchronous (no task).

vmfs_version: 5 or 6 (vSphere 7+ defaults to 6).

saltext.vcf.clients.vim_host_datastore.mount_nfs(opts, host, name, remote_host, remote_path, access_mode='readWrite', type_='NFS', profile=None)[source]

Mount an NFS share on host and return the new datastore moid.

type_: NFS (v3, default) or NFS41. access_mode: readOnly or readWrite.

saltext.vcf.clients.vim_host_datastore.remove(opts, host, datastore, profile=None)[source]

Unmount / remove a datastore from host. Synchronous.

saltext.vcf.clients.vim_host_datastore.rescan_storage(opts, host, profile=None)[source]

Trigger RescanAllHba on host. Synchronous.