Solved

Remove lock from vmware disk

Posted on 2014-04-23
7
1,965 Views
Last Modified: 2016-10-27
I am by no means a VMWare expert. I am just learning this software and need a bit of help. Since i am just learning, if answering could you walk me thru step by step thru the troubleshooting??? I am using the vmware vsphere client 5.0

The issue that i am having is that i removed a disk from a VM and although i thought i had all data off of it apparently i missed a couple of files so i need to mount this disk to another VM. I have already migrated the VM that the disk was attached to to another host. whenever i try to mount this disk up to another VM i get the error:

"Unable to access file since it is locked."

i tried to add the disk into another VM and received the same error. Is this a way to remove this lock or some sort of workaround that would allow me to retrieve the files that i need from this disk?
0
Comment
Question by:eagle3344
[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
  • 4
  • 3
7 Comments
 
LVL 120
ID: 40018104
Okay, can you check firstly the virtual disk is not a snapshots disk.

see my EE Article for that


Also a couple of things to check

1. It's not still attached to a power up Virtual Machine? (check all VM properties).

2. You do not use any third party backup Appliances, e.g. Acronis, Veeam, VDR/VDR and the disk is attached to this VM.

3. if none of the above, you will need to login via SSH remotely or at the console, and start running command as the console.

Part 5: HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 5.1 (ESXi 5.1)

see here


Locked Files is a common issues, and as a last resort, OFTEN it's required to REBOOT/Restart the ESXi Server.
0
 

Author Comment

by:eagle3344
ID: 40018172
hi andrew...thanks for the help.

i do use VEEAM and on my vsphere client i went into "datastores and datastore clusters" and looked at that drive and my VEEAM server is attached to it under the "Virtual Machines" tab.

two questions (and forgive me for the newbie questions here): does that mean that that VM is locking my file and if so do i simple shut down that server and add the drive to a new VM?
0
 

Author Comment

by:eagle3344
ID: 40018257
Andrew...i just read your snapshot article, very informative and easy to understand. Thank you.

I am doing some investigating hard disk 3 of my VEEAM server is pointing to the exact same disk and file that i couldn't gain exclusive access to. Can i simply shutdown that VEEAM server VM and remove that disk (not delete) and add it to another VM?
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
LVL 120
ID: 40018287
Okay, it's likely that the Backup Job is either in progress or has failed.

So either Stop the Job, Cancel the Job.

Shutdown the VM, and then remove the disks manually from the VM (remove from the VM not from disk option).

This is causing the lock, because it's attached to a powered on VM!

Can i simply shutdown that VEEAM server VM and remove that disk (not delete) and add it to another VM?

YES
0
 

Author Comment

by:eagle3344
ID: 40019215
OK, so i came in tonight and shut down the VM that was showing that it was using that disk. i removed the disk from within "edit settings" however within storage views of that VM i continued to see that disk being utilized. i went to "datastores and data clusters" and i highlight the disk that i am working with and i click the "storage views" tab under there and i see that VM again. i rebooted the host to see if that would release this, but it did not. is there a way to tell if this is indeed the cause of the lock on that file and if so other than the hard disks being apart of the configuration where else would this VM be using this disk?
0
 
LVL 120

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE^2) earned 500 total points
ID: 40019370
Rebooting the server will FREE all locks.

But if you power up all the VMs, and a VM has that disk added it will lock the disk.

So either Power off all the VMs, also check all the VMs for the disk.

You should then be able to remove the disk.

otherwise you will have to use the find the lock procedure, but if you have rebooted, and all VMs are off, there should be no lock.
0
 

Author Closing Comment

by:eagle3344
ID: 40027195
Powered down the VM and found the disk that was still attached and was able to remove it once it was powered down. Powered VM back up and lock was removed. Thanks so much for the help, Andrew.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Hypervisor 1 U 10 62
Centos 6.5 Install On VMware Workstation 12 Problem 46 81
VMware - ESXi Cost and features? 2 77
patch update 11 58
Adoption of Microsoft’s Enterprise Mobility and Security solution and Office 365 will re-order the File Sync and Share market Microsoft has stated that its Enterprise Mobility + Security (EMS) is the fastest growing product in the history of the …
A new Acronis survey shows people often have conflicting thoughts about data protection.
Teach the user how to use vSphere Update Manager to update the VMware Tools and virtual machine hardware version Open vSphere Client: Review manual processes for updating VMware Tools and virtual hardware versions: Create a new baseline group in vSp…
This Micro Tutorial walks you through using a remote console to access a server and install ESXi 5.1. This example is showing remote access and installation using a Dell server. The hypervisor is the very first component of your virtual infrastructu…

756 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