Solved

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

Posted on 2009-05-05
7
5,789 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
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 rename, unmount, delete and upgrade VMFS datastores. Open vSphere Web Client: Rename VMFS and NFS datastores: Upgrade VMFS-3 volume to VMFS-5: Unmount VMFS datastore: Delete a VMFS datastore:
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…

910 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

24 Experts available now in Live!

Get 1:1 Help Now