VMware Communities
Thanut_J
Contributor
Contributor
Jump to solution

Urgently!! Unable to open file .vmdk One of the disks in this virtual machine is already in use by a virtual machine or by a snapshot.

Hi Expert,

Last night I took snapshot to my vmware workstation when I use it this morning I got the error message


Unable to open file "E:\Backup_SAP VM\_SAP VM\Windows Server 2008 R2 x64-000009.vmdk":

One of the disks in this virtual machine is already in use by a virtual machine or by a snapshot.

Then I found solution to fix this problem as below link

Unable to open .vmdk file. One of the disks in this virtual machine is already in use by a virtual m...

  1. cd /d "C:\Program Files (x86)\VMware\VMware Workstation" 
  2. cd /d D:\win2k3 
  3. md Clone 
  4. C:vmware-vdiskmanager.exe -r "Windows Server 2003 Enterprise Edition-000002.vmdk" -t 0 "Clone\Windows Server 2003 Enterprise Edition.vmdk" 

For step 4 I got error message as  attached file.

Please help me for this case because I have a lot of configure in this VM and I have to present it as master project of master degree on next Monday.

Thank you.

0 Kudos
1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

This looks like what I expected (hoped) to see.

What I would recommend now is to clone the virtual disk (this will also consolidate the snapshots). This can be done using the vmware-vdiskmanager command line utility.

Assuming you still have some free disk space, run the following command from within the folder which contains the .vmdk files.

vmware-vdiskmanager.exe -r "Windows Server 2008 R2 x64-000007.vmdk" -t 1 "SAP-VM.vmdk"

Note that you may need to enter the command with its full path, i.e. "C:\Program Files (x86)\VMware\VMware Workstation\vmware-vdiskmanager.exe" ...

Instead of just using a file name as the destination, you can also use specify the full path e.g. "D:\_SAP VM\SAP-VM.vmdk"

Once cloning is done, you, need to replace the VM's virtual disk (either in the VM's settings, or directly in its .vmx file) with the newly cloned one.

If everything works as expected, the next step is to delete old/obsolete files to free up disk space.

André

View solution in original post

0 Kudos
11 Replies
a_p_
Leadership
Leadership
Jump to solution

Welcome to the Community,

Please run dir *.* /oen > filelist.txt in the VM's folders. Then compress/zip the below mentioned files, and attach the resulting .zip archive to a reply post.

Files needed: filelist.txt, all descriptor/header .vmdk files (the ones with only a few hundred bytes in size), .vmx, .vmsd, *.log

André

0 Kudos
Thanut_J
Contributor
Contributor
Jump to solution

Hi Andre

Thanks you for your kindness.

Please see your request as attached file.

Please let me know if you need any further information.

Regards,

Thanut

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

This is very confusing.

According to the file contents the VM's files are located on two drives/partitions "D:\_SAP VM" as well as "E:\_SAP VM", but the error message you posted now shows "E:\Backup_SAP VM\_SAP VM"!?

According to the vmware.log, only ...-000007.vmdk, ...-000009.vmdk, ...-000004.vmdk, and the base virtual disk are in use. However the the CID chains (CID/parentCID) are do not contain the correct vealues.

Please explain what exactly was done with the VM in the past few days.

André

0 Kudos
Thanut_J
Contributor
Contributor
Jump to solution

‌Dear André

I'm sorry for my mistake that make you confuse

Actually, VM file is located on 😧 drive but this morning after I found the error messages

I copied VM folder from D:\_SAP VM to E:\Backup_SAP VM\_SAP VM to fix this problem

SO I when I fix it I fix on drive E, due to I don't want to effect with the original file.

The error messages I got is from drive E

Moreover the first error message that I got from this morning is not this message.

It is "VM can't find file and let us to browse file" so I browse file in drive D

P.s.  Now, can I do anything ?

Thanut

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

  • What did you do so far, except for copying the files to the backup folder?
  • According to the latest vmware.log file, some of the VM's .vmdk files are stored in "E:\_SAP VM". Please double-check, and if there are any .vmdk files, attach their .vmdk descriptor files to a reply post.
  • Since you have copied (backed up) the VM's files to the backup folder, shouldn't we focus on fixing the original VM?

André

0 Kudos
Thanut_J
Contributor
Contributor
Jump to solution

Hi Andre'

Thank you very much for fast response

  • What did you do so far, except for copying the files to the backup folder?

  >> On 15th October, I have add Disk (SSD is D:\_SAP VM) in my laptop and I copied VM folder from local disk (Hard Disk is E:\_SAP VM) to SSD

then, I use VM folder in SSD from now on and I have no more configure parameter at VM in SSD folder

  • According to the latest vmware.log file, some of the VM's .vmdk files are stored in "E:\_SAP VM". Please double-check, and if there are any .vmdk files, attach their .vmdk descriptor files to a reply posdt.

>> in Drive 😧 there is no file. But I have attached file for drive E: to you. Please kindly verify.

As you said, I found 3 .vmdk files that open from Drive E:

E:\_SAP VM\Windows Server 2008 R2 x64-000009.vmdk

E:\_SAP VM\Windows Server 2008 R2 x64-000004.vmdk

E:\_SAP VM\Windows Server 2008 R2 x64.vmdk

Sorry to tell you VM in E:\_SAP VM,  I have also change ParentID in file "Windows Server 2008 R2 x64-000010.vmdk" this morning >> this step I try to go back to the old state before I use SSD.

What Can I do for these ??

  • Since you have copied (backed up) the VM's files to the backup folder, shouldn't we focus on fixing the original VM?

>> For Backup folder this morning, I just back up for fix this problem only, but I still want to use the original VM which stored in 😧 for my Master Project

If I can resolve problem in backup file, I wil use the same solution in the original VM folder.

Or, Do you think what should I do ??

Thank you

Thanut.

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

Please follow the below steps:

  • create a new folder on a disk with sufficient free disk space
  • copy 😧\_SAP VM\Windows Server 2008 R2 x64-000007.vmdk as well as its associated -s###.vmdk files to this folder
  • copy E:\_SAP VM\Windows Server 2008 R2 x64-000009.vmdk as well as its associated -s###.vmdk files to this folder
  • copy E:\_SAP VM\Windows Server 2008 R2 x64-000004.vmdk as well as its associated -s###.vmdk files to this folder
  • copy E:\_SAP VM\Windows Server 2008 R2 x64.vmdk as well as its associated -s###.vmdk files to this folder
  • compress/zip the .vmdk descriptor files and attach the .zip file to a reply post so I can check/fix them

Once the descriptor files have been verified/fixed, you should be able to clone the virtual disk.

André

0 Kudos
Thanut_J
Contributor
Contributor
Jump to solution

Hi Andre'

Thank you for your help

I have attached file as your request in this reply. I'm not sure this is what you want. If not, Please suggest again.

Thanut

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

This looks like what I expected (hoped) to see.

What I would recommend now is to clone the virtual disk (this will also consolidate the snapshots). This can be done using the vmware-vdiskmanager command line utility.

Assuming you still have some free disk space, run the following command from within the folder which contains the .vmdk files.

vmware-vdiskmanager.exe -r "Windows Server 2008 R2 x64-000007.vmdk" -t 1 "SAP-VM.vmdk"

Note that you may need to enter the command with its full path, i.e. "C:\Program Files (x86)\VMware\VMware Workstation\vmware-vdiskmanager.exe" ...

Instead of just using a file name as the destination, you can also use specify the full path e.g. "D:\_SAP VM\SAP-VM.vmdk"

Once cloning is done, you, need to replace the VM's virtual disk (either in the VM's settings, or directly in its .vmx file) with the newly cloned one.

If everything works as expected, the next step is to delete old/obsolete files to free up disk space.

André

0 Kudos
Thanut_J
Contributor
Contributor
Jump to solution

Hi Andre,

I have finished cloning VMDK file by command line "C:\Program Files (x86)\VMware\VMware Workstation\vmware-vdiskmanager.exe" -r "Windows Server 2008 R2 x64-000007.vmdk" -t 1 "D:\SAP-VM.vmdk" then I have Move SAP-VM.vmdk as well as its associated -s###.vmdk files into D:\_SAP VM.


What I have to do next?  such as "Change parameter in .vmx file" "change CID PID in .vmdk descriptor file?" Please explain me.

Also I have attached more information of D:\_SAP VM for you.

Thank you for your kindness.

Thanut

0 Kudos
Thanut_J
Contributor
Contributor
Jump to solution

Hi Andre,

Now D:\_SAP VM have 3 file type

1. vmx (change "scsi0:0.fileName parameter from Windows Server 2008 R2 x64-000006.vmdk" to "SAP-VM.vmdk")

2. vmdk (SAP-VM.vmdk files cloned as well as its associated -sXX.vmdk)

3. vmxf

It's work now !!! I can do my project further.

Thank you very much for your help.

Thanut

0 Kudos