When you try to deploy a virtual machine in a vSAN cluster, the operation fails with an error that the virtual machine files cannot be created.

Problem

The operation for creating a virtual machine fails with an error status: Cannot complete file creation operation.

Cause

The deployment of a virtual machine on vSAN might fail for several reasons.

  • vSAN cannot allocate space for the virtual machine storage policies and virtual machine objects. Such a failure might occur if the datastore does not have enough usable capacity, for example, if a physical disk is temporarily disconnected from the host.

  • The virtual machine has very large virtual disks and the hosts in the cluster cannot provide storage for them based on the placement rules in the VM storage policy

    For example, if the Primary level of failures to tolerate in the VM storage policy is set to 1, vSAN must store two replicas of a virtual disk in the cluster, each replica on a different host. The datastore might have this space after aggregating the free space on all hosts in the cluster. However, no two hosts can be available in the cluster, each providing enough space to store a separate replica of the virtual disk.

    vSAN does not move components between hosts or disks groups to free space for a new replica, even though the cluster might contain enough space for provisioning the new virtual machine.

Procedure

Verify the state of the capacity devices in the cluster.
  1. In the vSphere Web Client, navigate to the vSAN cluster.
  2. On the Monitor tab, click vSAN and select Physical Disks.
  3. Examine the capacity and health status of the devices on the hosts in the cluster.