Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 169668

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

$
0
0

I don't think you can really improve performance much without replacing hardware, i.e. faster disks or an SSD. Anyway, for now let's clean up the data disk. Before I provide the steps, let me recommend a change in the virtual disk format. Currently you are using the monolithic format (i.e. a single large .vmdk file). What I would suggest is to convert this into the 2GB split file format while cloning it. This will produce 152 .vmdk files with a maximum size of 2GB instead of a single one, but will allow you growing the virtual disk if needed as well as compacting/shrinking it without requiring a huge amount of additional temporary disk space, which you don't have. The difference in the cloning command will be "-t 1" (2GB growable) rather than "-t 0" (monolithic).

What we will do is basically to copy (only) the snapshot .vmdk file to the external disk, check its integrity, run the cloning and - once everything works as expected - do some cleanup. I assume you didn't make any changes to the VM, e.g. additional snapshots!? So let's start.

gracefully shut down the VM (don't suspend)
close VMware Workstation or at least the VM's tab
connect the external drive (For simplicity I will use drive letter X: for it in the following steps)
create a new folder on the external drive "win2k32"
copy "Windows Server 2003 Enterprise Edition2-000001.vmdk" to the new "X:\win2k32" folder

The following steps to ensure integrity of the copied file are optional (but recommended)

Get md5.exe from MD5: Command Line Message Digest Utility, generate the checksum for the original and the copied .vmdk file and ensure they match. Before running md5 for the copied file, gracefully disconnect the USB drive and then re-connect it to clear the cache. Only continue if both checksums match!

delete the original file "E:\win2k32\Windows Server 2003 Enterprise Edition2-000001.vmdk"
open a command prompt
cd /d "C:\Program Files (x86)\VMware\VMware Workstation"
cd /d X:\win2k32
C:vmware-vdiskmanager.exe -r "Windows Server 2003 Enterprise Edition2-000001.vmdk" -t 1 "E:\win2k32\W2K3EE-Data.vmdk"

Once the cloning is done, edit the .vmx file and replace

scsi0:1.fileName = "E:\win2k32\Windows Server 2003 Enterprise Edition2-000001.vmdk"

with

scsi0:1.fileName = "E:\win2k32\W2K3EE-Data.vmdk"

If your VM powers on and works as expected, you may cleanup/delete the folowing files:

  • "X:\win2k32\Windows Server 2003 Enterprise Edition2-000001.vmdk"
  • "E:\win2k32\Windows Server 2003 Enterprise Edition-Snapshot1.vmem"
  • "E:\win2k32\Windows Server 2003 Enterprise Edition-Snapshot1.vmsn"
  • "E:\win2k32\Windows Server 2003 Enterprise Edition.vmxf"
  • "E:\win2k32\Windows Server 2003 Enterprise Edition2"

 

André


Viewing all articles
Browse latest Browse all 169668

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>