When you create a VM, there’s a step that lets you specify the disk capacity. Due to the limitation of FAT32, you may split virtual disk into multiple files to make each file smaller than 4 GB.
However, multiple VMDK files may lead to poor performance of VM once they occupy large space of disk. To improve performance, you may want to merge multiple VMDK files into one disk.
How to merge VMDK files into a single file
If you want to merge several VMDK files into a single VMDK file, you need to install Virtual Disk Manager (vmware-vdiskmanager) first. It is a utility that you can use it to create, manage, and modify virtual disk files from the command line.
You can use Virtual Disk Manager with virtual disks created under VMware Workstation 5 or higher, VMware Fusion, VMware Player, VMware ESX/ESXi server, etc.
Some of these platforms come with this file, while some do not have it. If you are using VMware Workstation or VMware Fusion, you can find it easily in your virtual machine software folder, but if you are using VMware Player, you can install this utility first in VMware website.
After ensuring you installed the vdiskmanager.exe, the remain steps are roughly the same. As examples, I will explain how to merge multiple VMDK files into one in some different situations.
Merge multiple VMDK files in VMware Workstation/Fusion
If you are using VMware Workstation or VMware Fusion, it is easy to access VMware-vdiskmanager and use it to merge source disks into a new single disk. Before you merge VMDK files, you should backup the virtual machine first.
Tips: If you want to open VMDK files on VMware Workstation, you can mount a VMDK file to a virtual machine.
How to merge VMDK files into a single file:
1. Shut down the VM, and find the location of split VMDK files.
2. Find the VMware Workstation file and locate the vmware-vdiskmanager.exe on this folder, then do the following steps:
☛ Copy the path: C:\Program Files (x86)\VMware\VMware Workstation\vmware-vdiskmanager.exe
☛ Copy the source disk of VM: G:\Windows 10 x64.vmdk (original source file)
☛ Create a new destination folder for the new single file: G:\newimage\newimage.vmdk (destination file)
3. Open command prompt, then enter the command, for example:
“C:\Program Files (x86)\VMware\VMware Workstation\vmware-vdiskmanager.exe” -r “G:\Windows 10 x64.vmdk” -t 0 “G:\newimage\newimage.vmdk”
4. You can check the status, and the new single VMDK file will be created in the destination folder when it finishes to convert the multiple VMDK files.
5. After the new VMDK file is created, please move the original files into other directory, and rename the new VMDK file as the original one “Windows 10 x64.vmdk”
Now you finish the process to merge multiple VMDKs into a single file in Workstation. Please choose to use an existing virtual disk (using the new single VMDK file) to create a virtual machine.
Merge multiple VMDK files into one in VMware Player
If you are using VMware Player, you may find that VMware Player do not come with vdiskmanager. So, you should download it first in VMware website and refer to the following steps to combine VMDK files into one.
How to merge multiple VMDKs step by step:
1. Click here to start download vdiskmanager.
2. Unzip and rename 1023856-vdiskmanager-windows-7.0.1.exe into vmware-vdiskmanager.exe.
3. Copy or move to the directory where VMware Player is installed.
⊹ If you see the denied notice while copying, click Continue.
⊹ After successful copy, right click the vdiskmanager >> Properties >> Unblock >> Apply.
4. Now, open the command prompt and enter this command as before:
☛”C:\Program Files (x86)\VMware\VMware Player\vmware-vdiskmanager.exe” -r “C:\temp\Win2012R2\Windows Server 2012.mdk” -t 0 “C:\temp\Win2012R2_New\Win2012R2_New.vmdk”
5. Then you will get a combined single VMDK file in VMware Player.
Some users may be confused about command line and worry about human errors to cause data loss when merging VMDK files, and some users find that the virtual disk is not bootable after merging. It’s necessary to backup your virtual disk first before merging multiple VMDK files.
Q: What happens if I delete VMDK files?
A: If you delete them, you will lose your VM data and corrupt your VM. Unless you have no longer need them, please do not delete them.
Q: How to split one VMDK file into several VMDK files?
A: The procedures are similar to the process of merging multiple VMDK files, pay attention to changing -t 0 into -t 1.
Shut down the VM >> open a command prompt in Windows >> C:\Program Files (x86)\VMware\VMware Workstation\vmware-vdiskmanager.exe -r sourceDisk.vmdk -t 1 destinationDisk.vmdk