How to change a VM from split across multiple .vmdk files to a single one or two?

29,005

The best way to join split vmdk's is via the vmware-vdiskmanager utility. For example,

vmware-vdiskmanager.exe -r first-of-many.vmdk -t 0 Merged.vmdk

-r specifies the target disk, -t specifies the kind of disk that will be created.

In this case, 0 creates a grow-able disk in a single file. This command should leave the original split vmdk's in place, so that you can verify everything is functioning properly with the newly created disk.

See http://www.vmware.com/pdf/VirtualDiskManager.pdf for documentation.

The vmdk's themselves do not represent individual partitions. If you're looking to have a separate vmdk for the OS swap space and storage, you need to create them on separate virtual disks. In other words, swap space has a 1GB virtual hard drive to itself.

Share:
29,005
coffee
Author by

coffee

Updated on September 18, 2022

Comments

  • coffee
    coffee almost 2 years

    I have a VM with 3 partitions. One main one, one for swap space, one for storage. However, there are dozens of .vmdk files. Some of those .vmdk files are very large (over 1 GB), but the majority are just over 1 MB.

    I want to change this, so that there are only a few .vmdk files. Ideally, I would like one .vmdk file for the main OS + swap space, and one for storage. Is this possible? How would I do it?

    • TessellatingHeckler
      TessellatingHeckler almost 13 years
      Are they snapshots? Are they all current and in use? I don't know how it got into that state, but how about using VMWare Converter to clone it into a new virtual machine, and choose to make fewer disk files during the clone process? (Use thick provisioned disks, and don't check "make a file per partition" and you will get one vmdk with all partitions in it, at least).
    • Timothy
      Timothy almost 13 years
      They're in this state because coffee probably selected the 2GB split files option when creating the virtual disk.
    • user48838
      user48838 almost 13 years
      Furthermore, the 2GB split file option was to address/work with the 2GB FAT-16 partition size limitation (as well as other older file systems).
  • XåpplI'-I0llwlg'I  -
    XåpplI'-I0llwlg'I - over 11 years
    Yep, and VMware's Disk Manager is not a separate install. On Windows you can find it at the installation directory of VMware i.e. C:\Program Files\VMware\VMware Workstation. Just thought I'd mention that.
  • cbednarski
    cbednarski about 11 years
    And on OSX /Applications/VMware Fusion.app/Contents/Library/vmware-vdiskmanager
  • David L Napier
    David L Napier over 7 years
    Since I can't comment, adding this to answer. If you've installed vmware workstation on a linux distro, you can find vmware-vdiskmanager at /usr/bin/vmware-vdiskmanager.