Link to home
Start Free TrialLog in
Avatar of s34n
s34n

asked on

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

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
Avatar of esalvador
esalvador

Do you still have the original .vmdk file?
Are you running vmware server version 2.0?
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
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.
ASKER CERTIFIED SOLUTION
Avatar of s34n
s34n

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
So what was the solution s34.
I would like to know how the answers here contributed or answered the question