Solved

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

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

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

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

Will try to explain how to use the VMware feature TAGs in the VMs and create Veeam Backup Jobs using TAGs. Since this article is too long, I will create second article for the Veeam tasks.
In this article, I will show you HOW TO: Suppress Configuration Issues and Warnings Alert displayed in Summary status for ESXi 6.5 after enabling SSH or ESXi Shell.
Teach the user how to convert virtaul disk file formats and how to rename virtual machine files on datastores. Open vSphere Web Client: Review VM disk settings: Migrate VM to new datastore with a thick provisioned (lazy zeroed) disk format: Rename a…
Teach the user how to edit .vmx files to add advanced configuration options Open vSphere Web Client: Edit Settings for a VM: Choose VM Options -> Advanced: Add Configuration Parameters:

691 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