Solved

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

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

Don't miss ATEN at NAB Show April 24-27!

Visit ATEN at NAB Show to learn how our "Seamlessly Entertaining" solutions deliver fast, precise video streaming without delays for the broadcasting and media environment. ATEN will showcase its 16x16 Modular Matrix Switch (VM1600) and KVM Over IP Solution (KE6900 series).

Question has a verified solution.

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

Suggested Solutions

In this article, I will show you HOW TO: Create your first Windows Virtual Machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, the Windows OS we will install is Windows Server 2016.
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
Teach the user how to install log collectors and how to configure ESXi 5.5 for remote logging Open console session and mount vCenter Server installer: Install vSphere Core Dump Collector: Install vSphere Syslog Collector: Open vSphere Client: Config…
This video shows you how to use a vSphere client to connect to your ESX host as the root user. Demonstrates the basic connection of bypassing certification set up. Demonstrates how to access the traditional view to begin managing your virtual mac…

733 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