Solved

VMWARE - Cannot open the disk '/vm/folder/win2k3.vmdk''... Failed to lock the file.

Posted on 2009-05-05
7
5,786 Views
Last Modified: 2012-05-06
Im having a bit of trouble with VMWARE (running on linux)

I sucessfully grew a partition from 4GB to 10GB using
vmware-vdiskmanager -x 10GB win2k3.vmdk

I logged into the virtual and i noticed I had 4GB C drive and 6 GB unallocated space... I then used DISKPART to extend the C Drive, but it said it couldnt extend the partition...

So i allocated the space and tried again... no joy

I then assigned a letter to the space... and now i cant log back into the virtual and the extension also failed!

So, what im now trying to do is add the vmdk to another fresh virtual, but its failing to run because it thinks the file is locked.


ive tried...
1. Searching for .lck and WRITELOCK files... but none exist
2. removing the vmdk from the system entirely so i can add it to a new virtual
3. copying the vmdk out fresh

none of these worked

any advice?

thanks

sean
0
Comment
Question by:s34n
7 Comments
 
LVL 1

Expert Comment

by:esalvador
ID: 24305260
Do you still have the original .vmdk file?
Are you running vmware server version 2.0?
0
 
LVL 4

Expert Comment

by:philtpaik
ID: 24306608
I had a similar problem with esx 3.5 after HA failed. My server still had the process open with that vmdk and I wasn't able to power it on at all.

Try running this command. Not sure if it works with 3i

ps -ef | grep "your vm name"

or just type ps-ef to see all the processes

if you can't read the files try typing ps-efw

add more w's as needed. ie: ps-efwww ... etc

Once you find it, kill it and you should be able to run it again....me thinks.

hope that helps
0
 
LVL 8

Expert Comment

by:markzz
ID: 24307437
You have 2 very defined issues.
1. the VMDK is locked by a process. either perform the ps -ef | grep "your vm name" as mentioned above, determine the process ID and kill the process or of course you can reboot the host. But you need to terminate the process that's holding on to your VMDK.
2. Your vmdk extention worked fine. But you can not diskpart extend a System or active partition in Windows 2003. 2008 works.. So forget this unless you want to use gpart or a thirdparty tool. My advice is forget all the thirdparty tools for manipulating the vmdk your C:\ drive lives on.
I would use the VMConverter (VMImporter) to import the guest session with the minimal disk size. Power it up and confirm it's working. Power it down and import it again but this time as a 10GB vmdk. This processs will expand the underlying NTFS file system for you. The down side is that if you previously had setup your disk starting sector (which we all should do) it will be lost and revert to the Microslop default.
At this point you'll be back at square1 with a functional guest with a 10GB System C:\ volume.
0
 
LVL 1

Accepted Solution

by:
s34n earned 0 total points
ID: 24648100
i couldnt get anything to work... in the end i just rebuild the VM from the ground up

thanks anyway
0
 
LVL 8

Expert Comment

by:markzz
ID: 24651248
So what was the solution s34.
I would like to know how the answers here contributed or answered the question
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Nowadays, Virtual Machines are used equally by small and large scale organizations. However the issue is that VMDK files are also prone to corruption. So, in this article we are looking at how to recover VMDK files from hard disk of host operating s…
This is an issue that we can get adding / removing permissions in the vCSA 6.0. We can also have issues searching for users / groups in the AD (using your identify sources). This is how one of the ways to handle this issues and fix it.
Teach the user how to use configure the vCenter Server storage filters Open vSphere Web Client:  Navigate to vCenter Server Advanced Settings: Add the four vCenter Server storage filters: Review the advanced settings: Modify the values of the four v…
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 …

708 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

13 Experts available now in Live!

Get 1:1 Help Now