convert multiple .vmdk file into a single .vdi file

This post is aimed at converting split vmdk files (myfile.vmdk & multiple myfile-s000X.vmdk files) into a single .vdi file.

Split .vmdk files are often performed to keep each file under a 2 Gb size so that entire Virtual Machine can be spread over multiple files compatible with VFAT system.

Since I don’t use VFAT and prefer using virtualbox rather than vmware, I decided to convert my split .vmdk files into a single .vdi counterpart.

Before going any further, ensure your split .vmdk files are real split files and not snapshots. Name of split files end with “-s000X.vmdk” where X is an increasing number and a single file .vmdk without this suffix must be present too.
If your file suffix is of the form  “-000001.vmdk” then it’s not a split file, it’s simply a snapshot.

Here are the steps:

  • we need to download vmware-server from http://www.vmware.com/download/ to get access to vmware-vdiskmanager utility
    note1: we simply need to download it, NOT to install it
    note2: you can download either .rmp || .tar.gz file
  • once downloaded, extract and locate library folder (‘lib’) + vmware-vdiskmanager script (under /bin).
  • copy vmware-vdiskmanager to your desktop and grant execution rights (sudo chmod o+x vmware-vdisk*)
  • in the directory where you put vmware-vdisk* program, create a folder called ‘libdir’ (sudo mkdir libdir) and move here extracted ‘lib’ folder (ensure it’s the folder containing “libcrypto.so.xxx”
  • from within this folder, execute: “vmware-vdiskmanager -r <path_to_your_multiple_vmdk_files>/myfile.vmdk -t 2 mysinglefile.vmdk”
  • hit Enter, compression begin (quite resource intensive process).

At this point you should endup with a single .vmdk file.
Recent versions of virtualbox (>= v2.2) are fully compatible with .vmdk format => you might stop here.

In case you still want a .vdi file, next step is to convert .vdmk into raw data (.bin – not compressed => can require a lot of space) and then convert it to .vdi format using “vboxmanage convertfromraw”.

These steps are explained in this post: convert .vhd (virtualpc) file to .vdi (virtualbox) format
It assumes a .vhd format as source, but process is almost identical when source file is in .vmdk format.

sources

One Comment Trackback URL | Comments RSS

  1. artickl Says:

    root@gfm-vmx1:/home/vbox/VMWare/FreePBX# ./vmware-vdiskmanager -r FreePBX-000001.vmdk -t 0 FreePBX-merged.vmdk
    VixDiskLib: Failed to load libvixDiskLibVim.so : Error = libvixDiskLibVim.so: cannot open shared object file: No such file or directory.Creating disk ‘FreePBX-merged.vmdk’

    If “vmware-vdiskmanager -r /myfile.vmdk -t 2 mysinglefile.vmdk” giving error such:
    “VixDiskLib: Failed to load libvixDiskLibVim.so : Error = libvixDiskLibVim.so: cannot open shared object file: No such file or directory.Creating disk ‘mysinglefile.vmdk'”, then try to run:
    “LD_LIBRARY_PATH= vmware-vdiskmanager -r /myfile.vmdk -t 2 mysinglefile.vmdk”

Post a Comment

Your email is never published nor shared. You're allow to say what you want...