VMware vSphere

 View Only
  • 1.  Cant re-add vmdk.

    Posted Aug 10, 2016 07:27 PM

    I resized my data drive (a secondary virtual hard drive and when i tried to re-add it to my VM i get this message?  Please help!

    Failed to lock the file

    Cannot open the disk '/vmfs/volumes/5660c055-85ab0fea-4156-d067e5e66b6f/WDC/WDC_2.vmdk' or one of the snapshot disks it depends on.

    Failed to power on scsi0:1.

    Failed to add disk scsi0:1.



  • 2.  RE: Cant re-add vmdk.

    Posted Aug 10, 2016 09:15 PM

    When you say resized a data drive, can you be more specific, ie:

    Have you expanded a VMDK file?

    Have you expanded a datastore?

    Were thee snapshots on the VM before expanding?

    Please post a screenshot of the datastore, VM folder with all the VM's files

    Also post a screenshot of the VM's edit settings window

    What version of ESXi are you running?

    This will help us resolve your problem



  • 3.  RE: Cant re-add vmdk.

    Posted Aug 10, 2016 09:50 PM

    I had shrunk the VMDK. No i did not expand the datastore.  I am not  sue if there were snapshots.

    I am running esxi 6.0

    The first screen shot is the datastore where the data drive resides. The second is where the OS resides.(on a different datastore)

    I hope this helps.



  • 4.  RE: Cant re-add vmdk.

    Posted Aug 10, 2016 11:54 PM

    The timestamp of the ctk.vmdk is not fully readable but it looks like you have an automatic backuptool (Veeam or similar ...)
    that is actively monitoring all VMs or only those that are part of an active job.
    So I would check if any backup-appliance still has that vmdk mounted.
    Try to resolve that problem first.
    Remove the VM from inventory - close datastorebrowser.
    Check if other hosts still list that VM.
    Open diskmanagement inside the backup-appliance and check if your vmdk is listed.
    Check the VM-configuration if your vmdk is attached.
    Check the backuptool for active jobs and check if the VM is part of any.
    When you are sure there is no problem from that direction
    check the vmx-file of the powered off VM.
    If not already done remove the VM from inventory  and then doubleclick the vmx in winscp.
    Search for ctk-parameters and remove them.
    There should be one per vmdk and one global:

    ctkEnabled = "true"

    scsi0:0.ctkEnabled = "true"

    scsi0:1.ctkEnabled = "true"
    Next edit/check all vmdk descriptors that are referenced in the vmx-file.
    If version is not set to 1 and instead uses 2 or 3 assume that a backuptool uses change-block-tracking.
    version=3
    Search for

    # Change Tracking File

    changeTrackPath="whatever-ctk.vmdk"
    and delete both lines.
    Search for
    ddb.deletable = "true"

    and remove the line if it exists.
    If the vmx-file references snapshots open all descriptors that are listed and also follow the parentfile name hints.

    Save all vmdk-descriptor-files and the vmx.
    Seach in winscp for ctk-vmdk files and delete/ or rename them.
    None of the involved vmdks, vmx and vmsd-files should have active references to any ctk-files now.

    Via putty run lsof and grep for the vmdk-name.
    If lsof has no match - open Datastorebrowser again and re-add the VM to the inventory.
    Try to start now.
    If you still have problems try to power off the backup-appliance.

    DISCLAIMER: this instructions assume that you use Winscp embedded editor for all edits of VM-config-files.
    Never use Datastorebrowser while troubleshooting problems with VMs.


    Ulli



  • 5.  RE: Cant re-add vmdk.

    Posted Aug 11, 2016 03:22 AM

    I reviewed everything you had listed and still no luck. Would you be willing to remote into my system and take a look? I have teamviewer if that would work for you.   I appreciate your help as i am new to vmware.



  • 6.  RE: Cant re-add vmdk.

    Posted Aug 11, 2016 06:20 PM

    Call me via skype - we can then arrange a remote-session on short notice.
    Dont try emails ....

    Ulli



  • 7.  RE: Cant re-add vmdk.

    Posted Sep 29, 2016 08:58 PM

    I got it figured out thanks though!