Solved

VM disk consolidation failed with error

Posted on 2016-09-05
27
37 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 13
  • 10
  • 3
  • +1
27 Comments
 
LVL 10

Expert Comment

by:Richardson Porto
ID: 41784945
Do you use any backup solution like vSphere Data Protection to backup your virtual machines?
0
 
LVL 120
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
Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

 
LVL 10

Assisted Solution

by:Richardson Porto
Richardson Porto earned 500 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 120
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 10

Accepted Solution

by:
Richardson Porto earned 500 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 120
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 120
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 120
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 120
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 120
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 120
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 120
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 120
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 120
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 120
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 120
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

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

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

In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
In this article, I will show you HOW TO: Create your first Windows Virtual Machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, the Windows OS we will install is Windows Server 2016.
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 …
Teach the user how to install log collectors and how to configure ESXi 5.5 for remote logging Open console session and mount vCenter Server installer: Install vSphere Core Dump Collector: Install vSphere Syslog Collector: Open vSphere Client: Config…

738 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