martedì 25 giugno 2013

VMware: Merge multiple vmdks into a single vmdk

When importing VMs from Player/Workstation to ESXi sometimes occurr that original vmdk files are separated into multiple vmdks.

This is because vmdks of a fixed small size are sometimes choosen by user creating guest VM in VMware Player/Workstation due to their better transportability respect to a single vmdk of a bigger size.

To merge multiple vmdks into a single vmdk file we need to use Virtual Disk Manager wich comes with VMware Workstation or can be downloaded separately.

If you have VMware Workstation you can find Virtual Disk Manager under:

C:\Program Files\VMware\VMware Workstation

or you can download it as part of vSphere 5.0 Virtual Disk Development Kit.

So, let's merge our vmdks using command promtp and calling for vmware-vdiskmanager.exe.

This is the synthax:

vmware-vdiskmanager.exe -r first.vmdk -t 0 merged.vmdk

where:

-r <sourcediskname>

-t <0|1|2|3>

0 — to create a growable virtual disk contained in a single virtual disk file

1 — to create a growable virtual disk split into 2GB files

2 — to create a preallocated virtual disk contained in a single virtual disk file

3 — to create a preallocated virtual disk split into 2GB files


Here you find more informations about Virtual Disk Manager options while the full manual can be found here.

That's all, happy merging!!

2 commenti:

  1. How to merge second disk.
    vmware-vdiskmanager.exe -r second.vmdk -t 0 merged.vmdk
    while merging second disk file, error comes “Failed to convert disk: The file already exists (0xc).”
    It doesnt expand destination file.. Need help.

    RispondiElimina
  2. u have to delete merged.vmdk if it exists in the folder. VM automatically creates those.

    RispondiElimina