When you try to deploy a virtual machine in a Virtual SAN 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 Virtual SAN might fail for several reasons.

  • Virtual SAN 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, Virtual SAN 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.

    Virtual SAN 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.

Solution

  • Verify the state of the capacity devices in the cluster.
    1. In the vSphere Web Client, navigate to the Virtual SAN 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.