VI Workload Domain deployment fails at "Prepare ESXi Hosts for vSAN" with error "Invalid datastore format"
search cancel

VI Workload Domain deployment fails at "Prepare ESXi Hosts for vSAN" with error "Invalid datastore format"

book

Article ID: 439540

calendar_today

Updated On:

Products

VMware SDDC Manager / VCF Installer

Issue/Introduction

When deploying a VI Workload Domain in VMware Cloud Foundation (VCF), the deployment fails at the Prepare ESXi Hosts for vSAN task.

The domainmanager.log (located at /var/log/vmware/vcf/domainmanager/domainmanager.log on the SDDC Manager VM) contains an error similar to:

ERROR [vcf_dm,...] [c.v.e.s.c.c.v.vsphere.VcManagerBase,dm-exec-1] Task: (MOR:haTask--vim.FileManager.deleteFile-####) (Name:deleteFile) Entity: (Name:null) is failed
com.vmware.vim.binding.vim.fault.InvalidDatastore: Invalid datastore format 'datastore-name -vsan01'.

Environment

VCF 5.2.x

Cause

This issue occurs when the vSAN datastore name defined during the Workload Domain creation workflow contains invalid characters or formatting, specifically a trailing or leading space within the name string (e.g., 'datastore-name -vsan01' instead of 'datastore-name-vsan01'). The SDDC Manager and underlying vSphere APIs cannot validate or manage a datastore name containing these unexpected space characters.

Resolution

To resolve this issue, correct the datastore name in the deployment configuration and retry the workflow.

Step 1: Identify the Invalid Name

  1. Review the failure in the SDDC Manager Tasks view.
  2. Open the domainmanager.log (/var/log/vmware/vcf/domainmanager/) on the SDDC Manager.
  3. Search for the string Invalid datastore format.
  4. Note the exact name between the single quotes. Look closely for a space character (e.g., 'name -vsan').

 

Step 2: Correct the Configuration

  1. If you are using the SDDC Manager UI, restart the Workload Domain creation workflow and ensure the vSAN Datastore Name field does not contain any leading, trailing, or internal spaces that violate your naming convention.
  2. If using a JSON spec for deployment, locate the datastoreName field and remove the invalid space.

 

Step 3: Clean up ESXi Hosts (if necessary)

If the task partially succeeded on some hosts, they may have a stale vSAN configuration:

  1. Log in to the affected ESXi hosts via SSH.
  2. Run esxcli vsan cluster get to check for ghost cluster membership.
  3. If a cluster is present but inactive, run: esxcli vsan cluster leave

 

Step 4: Retry the Deployment

Return to the SDDC Manager UI and click Retry on the failed Workload Domain deployment task.