Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VM disk consolidation failed with error

Posted on 2016-09-05
27
Medium Priority
?
57 Views
Last Modified: 2016-09-07
Unable to consolidate disk of VM. It's giving following error -

"Unable to access file <unspecified filename> since it is locked"

We are using VMware 5.0 version.
0
Comment
Question by:cbinayak
  • 13
  • 10
  • 3
  • +1
27 Comments
 
LVL 11

Expert Comment

by:Richardson Porto
ID: 41784945
Do you use any backup solution like vSphere Data Protection to backup your virtual machines?
0
 
LVL 124
ID: 41784973
can you provide screenshots of your datastore VM folder ?

can you also provide screenshots of your VM disk settings
0
 

Author Comment

by:cbinayak
ID: 41785008
We are using Symantec NetBackup.

Error Screenshot
Error
VM Datastore Screenshot
VM Datastore
VM Disk Settings Screenshot
VM Disk1VM Disk2
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 11

Assisted Solution

by:Richardson Porto
Richardson Porto earned 2000 total points
ID: 41785014
Take a look at the following VMware KB article: https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2017072 since looks like your backup solution is locking the file.
0
 
LVL 124
ID: 41785020
I need to see the disk settings.

Yes you have a snapshot....

Check that the Backup Job is still NOT IN USE and RUNNING.

and the current Symantec Appliance does not have the parent disk VM attached to it.
0
 

Author Comment

by:cbinayak
ID: 41785030
Will it be unlocked if I restart the VM?
0
 
LVL 11

Accepted Solution

by:
Richardson Porto earned 2000 total points
ID: 41785039
Which VM? Anyway, if you're talking about the VM with the backup solution, you should remove the virtual disks from backup appliance using the Remove from Virtual Machine. Only restart may not help.
0
 
LVL 124
ID: 41785040
No, you will need to turn off the Backup Appliance, and remove it (but not delete from disk)
0
 

Author Comment

by:cbinayak
ID: 41785123
Can you please help me about how to view "vmware.log" file? I want to get the locked file name.
0
 
LVL 124
ID: 41785171
did you look at the Backup Appliance ?

and check the disks attached to the Backup Appliance if any belong to this VM you cannot power on.

VMware.log is a text file, you can download and view using WinSCP.
0
 

Author Comment

by:cbinayak
ID: 41785184
Backup Appliance is not showing anything any locked file for this VM. However, our Backup Admin wants the name of the file that is locked so that he can do an advanced search in the Backup Appliance itself.

I am able to view the vmware.log file using vi editor. Please let me know where from I will get the locked file name.
0
 
LVL 124
ID: 41785189
The Backup Appliance WILL NOT show any locked file.

BUT does the appliance, have any disks attached to it, which do not belong to it!

the VMWARE.log file may not report on the locked file. search for the word "lock"

this could also be chasing a red hearing....and appliance may not be the device locking the file.

can you try the following:-

1. Take a new snapshot.
2. wait 1-2 minutes
3. select DELETE ALL....

does it create a new snapshot file, or remove the snapshots.

e.g. does it create a file -0006.vmdk

also is the name of the file currently -00005.vmdk in disk settings, I cannot see because you masked it out.
0
 

Author Comment

by:cbinayak
ID: 41785200
I migrated the vm to different host, took snapshot, waited 1-2 minutes, deleted all successfully. After that I tried to run Disk Consolidation but it fails with the same error.

I can see Hard Disk 1 is using "vmname_C-000006.vmdk" and Hard Disk 2 is using "vmname_E-000006.vmdk" but these two files are not there in the datastore.

The last two files that are there in the datastore are "vmname_C-000005.vmdk" and "vmname_E-000005.vmdk".
0
 
LVL 124
ID: 41785207
okay Consolidating and the method I asked you to do are the same, Consolidation is just VMware's easy method!

can you repeat...

1. Take a new snapshot.
2. wait 1-2 minutes
3. select DELETE ALL

but no running the consolidation process.

and check the datastore, any snapshots left ?

and what disks are in use ?

there is another method we can also try and thats CLONE.

CLONING the VM, will merge all current snapshots, and create a new VM without snapshots, and then you can continue to use this new VM.

BUT, if there is a lock on the parent vmdk, this is what is causing the issue. and either you will need to find the process causing the lock, or reboot the host, hosting the VM,
0
 

Author Comment

by:cbinayak
ID: 41785230
I did DELETE ALL after taking snapshots but all snapshot files are there in the datastore.

Now, the disks are pointing to _000007.vmdk which is there in the datastore.
0
 
LVL 124
ID: 41785248
Okay, parent vmdk is locked.

hence delete-all snapshots and consolidation will not work it will fail, and just add another snapshot.

did you try CLONE ?

otherwise you will need to fine and remote the lock on parent vmdk.
0
 

Author Comment

by:cbinayak
ID: 41785259
I didn't try Clone. Will it resolve the issue if I clone the VM?

Do you mean to remove the lock on the parent vmdk? How to do that?
0
 
LVL 124
ID: 41785289
If you can CLONE the VM, the resulting VM will be free of snapshots, BUT if there is a lock on the parent VMDK, the CLONE will fail.

finding locks is often difficult.

see these Vmware KBs to assist you

Investigating virtual machine file locks on ESXi/ESX (10051)

Finding the lock owners of a VMDK or file on a VMFS datastore in VMware ESXi 5.5 P05 (2110152)
0
 
LVL 1

Expert Comment

by:specialist Mohamed
ID: 41786939
Hello cbinayak,

How many ESXi hosts do we have ?

Can you try to migrate this VM to other hosts one by one and try to consolidate them on all hosts and check if that works ?

Not sure if VMKFSTOOLS works with 5.0. If it does, can you try the command below on all the VMDK files and help me with the output please ?
Take a putty to the ESXi host where the VM runs and change directory (CD) to VM's working directory and run the command below.

For example:
vmkfstools -D xxxxxxxx-000001.vmdk
vmkfstools -D xxxxxxxx-000002.vmdk
vmkfstools -D xxxxxxxx-000003.vmdk
vmkfstools -D xxxxxxxx-000004.vmdk
vmkfstools -D xxxxxxxx-000005.vmdk

Looking forward to hearing back.
0
 

Author Comment

by:cbinayak
ID: 41787246
I executed all commands. None of them is showing the owner of the respective disk.
vmkfstools Output
0
 
LVL 124
ID: 41787318
yes, this is often the problem, resulting in a restart of the Host.

and you are certain it's not locked by the Backup Appliance ?
0
 

Author Comment

by:cbinayak
ID: 41787338
I've asked backup team to look into this matter more deeply. In the meantime will restarting the ESXi host resolve this issue? I am asking this because I heard that backup of VM happens through ESXi host.
0
 
LVL 124
ID: 41787377
If the lock is by another process, and not the appliance, it should clear.

no backups will occur if the host is restarted.
0
 

Author Closing Comment

by:cbinayak
ID: 41787548
It was Backup Server which locked the disk. Unlocking it resolved the issue.
0
 
LVL 124
ID: 41787565
glad you resolved your issue and now your Backup team understands how the Symantec Appliance works!

despite initial reports of no VM disk attached!
0
 
LVL 124
ID: 41787566
Glad it's all resolved and your Backup Team know what to look for in the future despite reports of no VM disk attached!
0
 
LVL 124
ID: 41787567
Glad it's all resolved and your Backup Team know what to look for in the future despite reports of no VM disk attached!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When converting a physical machine to a virtual machine using VMware vCenter Converter Standalone or vCenter Converter Enterprise, if an adapter type is not selected during the initial customization the resulting virtual machine may contain an IDE d…
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
Teach the user how to install and configure the vCenter Orchestrator virtual appliance Open vSphere Web Client: Deploy vCenter Orchestrator virtual appliance OVA file: Verify vCenter Orchestrator virtual appliance boots successfully: Connect to the …
This Micro Tutorial steps you through the configuration steps to configure your ESXi host Management Network settings and test the management network, ensure the host is recognized by the DNS Server, configure a new password, and the troubleshooting…

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question