Solved

VM disk consolidation failed with error

Posted on 2016-09-05
27
29 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 9

Expert Comment

by:Richardson Porto
ID: 41784945
Do you use any backup solution like vSphere Data Protection to backup your virtual machines?
0
 
LVL 117
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
 
LVL 9

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 117
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 9

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 117
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 117
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 117
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 117
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 117
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 117
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 117
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 117
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 117
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 117
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 117
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

HOW TO: Upload an ISO image to a VMware datastore for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere Host Client, and checking its MD5 checksum signature is correct.  It's a good idea to compare checksums, because many installat…
Veeam Backup & Replication has added a new integration – Veeam Backup for Microsoft Office 365.  In this blog, we will discuss how you can benefit from Office 365 email backup with the Veeam’s new product and try to shed some light on the needs and …
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 video shows you how to use a vSphere client to connect to your ESX host as the root user. Demonstrates the basic connection of bypassing certification set up. Demonstrates how to access the traditional view to begin managing your virtual mac…

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now