I was creating some Virtual Machines in VMware Workstation 10 and didn’t realise I had selected the option to split the disks into 2gb files. Looking in the VM folder I could see loads of files as shown below.
What a mess!!!! I am transporting the Virtual Machines around so I want the disks in 1 file. Unfortunately VMware have not yet built anything in the GUI to do this so you have to use the command line.
I am using a 64bit Windows 8 machine so the paths etc could be slightly different for your machine.
First of all right click on the VM in workstation and click settings. Once this box appears click on the drive that you want to make into 1 file.
On the right hand side you will see the filename of the parent disk file. This being the first disk file. Make a note of this filename you will need it later on. Unfortunately it doesn’t tell you the path. So find out where this disk is located. By default they can be found in the configuration path.
You can find out the configuration path by clicking on the Vm on the left of the workstation screen and then below the preview window it will tell you.
In my example the disk is located in
E:\Virtual Machines\Templates\Template - 2008R2
Open an elevated command prompt and change directory to
C:\Program Files (x86)\VMware\VMware Workstation
Now to create 1 big disk type the following :-
vmware-vdiskmanager -r "E:\Virtual Machines\Templates\Template - 2008R2\Windows Server 2008 R2 x64.vmdk" -t 0 "E:\Virtual Machines\Templates\Template - 2008R2\New Disk.vmdk"
It will now clone the disk out to 1 big file.
In VMware Workstation 10 when running the VMware-vdiskmanager command you will get an error which is new to version 10.
VixDiskLib: Invalid configuration file parameter. Failed to read configuration file
However from looking around this error is a false alarm and the disk clone still completes and the disk is fine. However I would check your new disk thoroughly before deleting the old files.
Now you can attach the new disk and delete the old disk files..