To convert multiple VMDKs into a single file, I used the following command (LinuxVM.vmdk is the name of the first VMDK file - i.e. the one attached to the VM):
$ vmware-vdiskmanager -r LinuxVM.vmdk -t 0 LinuxVMSingleDisk.vmdk
Note that vmware-vdiskmanager is bundled as part of VMware Workstation. I couldn’t locate that as a separate download, so I ended up downloading the trial version of Workstation.
The above operation takes a while, but not too long. It shows its progress as it completes.
Next, I had to modify the VM settings so that it would use the new disk. I couldn’t find this option in the GUI, so I had to modify the vmx file manually (use an appropriate editor on a Windows system):
$ vi LinuxVM.vmx
I modified the scsi0:0.fileName property to point to the new disk:
scsi0:0.fileName = "LinuxVMSingleDisk.vmdk"
Next, I double checked the VM settings in the GUI to check if the disk had changed, and then booted it up to confirm everything is fine. I then deleted all the old, multiple vmdk files.
The Motivation for Doing This
I’d been using a few heavy applications in my VM: an HTTP server, an Application Server behind it running a couple of large applications, and a database. When doing intensive work, my hard disk would make grinding noises and my Ubuntu host would suddenly exit to the login screen. I’d lose all data in my current session, though oddly, some background applications would continue to run.
So I decided to implement VMware’s suggestion to use a single file for better performance:

Did it really work? The host did crash once, but that was when another heavy application was running on the host itself. In my entirely subjective assessment, I do think there’s been an improvement in performance - though I still need to be a little careful with certain applications.
Check Out Our Other Articles too!
- A Quick Tutorial to Set Up an NFS Server on Windows
- Attacking a Weird Java Error: java.lang.ClassFormatError: Invalid pc in line number table
- How to enable Java in Chrome and Firefox on Ubuntu
- Configuration Settings and Shortcuts for Unity Desktop in Ubuntu 11.10 (Oneiric Ocelot) - Efficiency Boosters

Comments
Hi can you please shed some
Hi can you please shed some more light on what LinuxVM.vmdk is and is LinuxVMSingleDisk.vmdk created by you? If not, how did you get the file?
Iam a beginner to linux, but would like to know if theres anything corresponding to this I could do in windows as well.
I downloaded vmware and the following files are present in my folder-
nuxeo.vmx
system-s001.vmdk
system-s002.vmdk
system-s003.vmdk
system-s004.vmdk
system-s005.vmdk
system-s006.vmdk
and
system.vmdk
Not sure how to proceed. Kindly help.
LinuxVM.vmdk corresponds to
LinuxVM.vmdkcorresponds to the first part of the multi-part disk. In your case, it issystem.vmdk.LinuxVMSingleDisk.vmdkis the name I gave to the new virtual disk I created. You could name itsystem-single-disk.vmdk, or any other name you wish :)The conversion command should be the same on Windows. You can use any text file editor instead of vi to edit the vmx file.
Virtualization
Interesting ... Need to try it ...
A little more needed to handle snapshots.
If you have snapshots in your virtual machine you will need to also edit the snapshot files (one per snapshot).
If your VM is named "System" as in the response above, you look for files that have names like:
System-Snapshot1.vmsn
System-Snapshot2.vmsn
etc., one per snapshot, incrementing numerically.
Each will have an entry like the .vmx file:
scsi0:0.fileName = "System-000001.vmdk" (in Snapshot 1)
scsi0:0.fileName = "System-000002.vmdk" (in Snapshot 2)
Each snapshot will have a set of vmdk files, and there will be the "normal" set of vmdk files which correspond to the current state of the machine since the last snapshot.
Using the same conversion tool you can create single-file .vmdk files for each of the snapshots and the current state. Assuming our VM is at f:\VM\System, and that we have two snapshots plus current state, and we want to put our converted files at G:\NewVM\System, we run the following commands to convert existing files and move existing .vmx/.vmsn files to the new location:
% vmware-vdiskmanager -r F:\VM\System\System.vmdk -t 0 G:\NewVM\System\System.vmdk
% vmware-vdiskmanager -r F:\VM\System\System-000001.vmdk -t 0 G:\NewVM\System\System-000001.vmdk
% vmware-vdiskmanager -r F:\VM\System\System-000002.vmdk -t 0 G:\NewVM\System\System-000002.vmdk
% copy F:\VM\System\*.vmx G:\NewVM\System
% copy F:\VM\System\*.vmsn G:\NewVM\System
% copy F:\VM\System\*.vmsd G:\NewVM\System
You may also have to copy the "cache" subdirectory....
Converted 3 virtual servers win2003, ubuntu8.04, ubuntu12.04
Thank you so much for posting this information!
In an emergency situation where we lost our monster linux server on a Friday afternoon, that hosted 2 virtual servers, the only thing available was a beefy windows 8 pro dell desktop 8gb memory, 1tb drive and i7cpu. Amazingly we restored the two servers and cloned the dead linux server as a third vm on this. Everything was very fast for about a month, then started to bog down. The virtual drives were split into many many dynamic sized pieces and I could see when things bogged it was trying to update over 100 of these mini disk files at once. I converted the drives to single, pre-allocated virtual drive files (.vmdk) and we're back to full speed again.
Workstation 9 on Windows 8 Professional... I'm into linux, but this is working very well and we'll probably grab another Windows 8 pc as a backup.
Cheers,
Jeff
multiple vmdk in a single file.
I am using VMware 9.0 while installation file are spited into multiple but virtual BOX treated as a single VHD.
Add new comment