Disabling File Service
You can disable vSAN File Service using the vSphere Client. Navigate to the vSAN cluster and click Configure > vSAN > Services. On the File Service row, click Disable.
Here is an example of how to disable vSAN File Service using the vSAN Management API. This example is based on the code in the vsanfssamples.py sample file located under the Python sample code directory.
# Disable file service print("Disabling file service") fileServiceConfig = vim.vsan.FileServiceConfig(enabled=False) clusterSpec = vim.vsan.ReconfigSpec(fileServiceConfig=fileServiceConfig) vsanTask = vccs.ReconfigureEx(cluster, clusterSpec) vcTask = vsanapiutils.ConvertVsanTaskToVcTask(vsanTask, si._stub) vsanapiutils.WaitForTasks([vcTask], si) if vcTask.info.state != 'success': print("Failed to disable file service with error: %s" % vcTask.info.error) return -1 print("Disabled file service successfully")