A replicated virtual machine using multiple datastores fails to start with the vCenter Server error: .vmdk file is locked
search cancel

A replicated virtual machine using multiple datastores fails to start with the vCenter Server error: .vmdk file is locked

book

Article ID: 310911

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction


Symptoms:
  • A replicated virtual machine using multiple datastores fails to start
  • You see the vCenter Server message:

    .vmdk file is locked


Environment

VMware ESX 4.0.x
VMware ESXi 4.1.x Installable
VMware ESXi 4.1.x Embedded
VMware ESXi 4.0.x Embedded
VMware ESXi 4.0.x Installable
VMware ESX 4.1.x

Cause

This issue can be occur in two scenarios:

  • One of the LUNs and its .vmdk were not replicated, so a placeholder hard disk filename is showing in vSphere Client. In Edit Settings in vSphere Client, hard disk 2 looked like the Hard Disk 1 on the main datastore of the virtual machine.

  • The datastore of a LUN that was replicated and resignatured has a different UUID and the *.vmx file still points to the old datastore UUID. As a result, a placeholder hard disk file name shows up in vSphere Client and in Edit Settings, hard disk 4 looks like hard disk 3 on the main datastore of the virtual machine.
Several LUNs formatted with VMFS have been replicated on the same array or from one array to another. Upon presenting LUNs to a new host, the host detected LUNs as snapshots so they were resignatured via Add Storage in vCenter Server.

Resolution

To resolve the first scenario:
  1. From the inventory of the virtual machine, remove all virtual hard disks that have a duplicate name of disks in the main datastore associated with the virtual machine.
  2. Create a new virtual hard disk in the new datastore while maintaining the old SCSI node ID.

To resolve the second scenario:

  1. From the inventory of the virtual machine, remove virtual hard disks that have a duplicate name of disks in the main datastore associated with the virtual machine.
  2. Re-add the existing virtual hard disks from a new, replicated datastore while maintaining the old SCSI node ID.