Backup of VM restored on vSAN datastore fails. VM snapshot creation also fails.
search cancel

Backup of VM restored on vSAN datastore fails. VM snapshot creation also fails.

book

Article ID: 422278

calendar_today

Updated On:

Products

VMware vSAN

Issue/Introduction

Symptoms:

  • Snapshot creation for VM which was recently recovered fails with the error: "A specified parameter was not correct: spec.deviceChange.device. An error occurred while taking a snapshot: One of the parameters supplied is invalid. An error occurred while saving snapshot file "/vmfs/volumes/vsan:################-################/########-####-####-####-############/<vm_name>.vmsn". An error occurred while saving the snapshot: One of the parameters supplied is invalid."

Environment

VMware vSAN 7.x

VMware vSAN 8.x

Cause

  • The reason why the VM snapshot creation (and thus the backup) fails is due to the VM's vmdks do not have any backing vSAN object.

  • This can be validated by verifying the contents of the VM's vmdk file, it would point to a "-flat.vmdk" data file, instead of a vSAN object:

    # Extent description
    RW 419430400 FLAT "<vm_name>-flat.vmdk" 0
  • VMs which have their disks on vSAN datastore will not have the "-flat.vmdk" datafile, instead it uses the vSAN vdisk object to store the data.
    For example, here is the contents of a VM's disk descriptor file where the vmdk is backed by a vSAN vdisk object:

    # Extent description
    RW 83886080 VMFS "vsan://################-###############/cee23366-e2f6-####-0c23-############"

  •  "-flat.vmdk" on vSAN datastore is not supported and VM disk operations such as snapshot creation, disk expansion and so on would fail.

Resolution

To resolve this issue:

  1. Storage vMotion the affected VM from the vSAN datastore to a VMFS or NFS datastore.

  2. If the Storage vMotion task fails with the VM powered ON: Power OFF the VM, Compute vMotion the VM to another host, and then Storage vMotion the VM to another host.

  3. Once the VM is on the VMFS/NFS datastore, proceed to Storage vMotion the VM back to the vSAN datastore.

On Storage vMotion of the VM back to the vSAN datastore, the backing object for the vmdk will be created.

Post this VM's snapshot creation and backup will be successful.

Additional Information

For more information of Flat VMDK on vSAN, refer this KB.