?
Solved

Remove lock from vmware disk

Posted on 2014-04-23
7
Medium Priority
?
2,414 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 123
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
What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

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

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE^2) earned 2000 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

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.

Question has a verified solution.

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

This article outlines why you need to choose a backup solution that protects your entire environment – including your VMware ESXi and Microsoft Hyper-V virtualization hosts – not just your virtual machines.
Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
Teach the user how to delpoy the vCenter Server Appliance and how to configure its network settings Deploy OVF: Open VM console and configure networking:
Teach the user how to configure vSphere clusters to support the VMware FT feature Open vSphere Web Client: Verify vSphere HA is enabled: Verify netowrking for vMotion and FT Logging is in place or create it: Turn On FT for a virtual machine: Verify …
Suggested Courses

765 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