VMware

This Question is Answered

12 Replies Last post: Aug 18, 2009 5:58 AM by ozarkcanoer  

How to consolidate the 2Gb .vmdk files into one? posted: Aug 13, 2009 4:55 PM

Click to view ozarkcanoer's profile Enthusiast 32 posts since
Nov 21, 2007
I created a virtual machine from a physical Windows XP system by having the Converter on Windows read a True Image disk backup and it successfully created a virtual machine that copied to my iMac and I can run it with Fusion. But it created the VM with 20 physical .vmdk files all between 1G and just under 2Gb( myVM-s001.vmdk through myVM-s019.vmdk plus myVM.vmdk).

I'd like to get this into one .vmdk file. How can I do this on Mac OS X?

thanks
Click to view AndrewPainter's profile Hot Shot VMware Employees 158 posts since
Jun 29, 2009
Open up the settings for your virtual machine while it is powered off. Go into the Hard Disks tab then uncheck the part that says "Split into 2GB files". You'll also have the opportunity to Pre-allocate the disk space if you so choose. In order to make the changes from that menu you'd have to make sure that there are no snapshots for your virtual machine.
Click to view AndrewPainter's profile Hot Shot VMware Employees 158 posts since
Jun 29, 2009
Don't forget you'll have to delete any snapshots the virtual machine has. Click on the virtual machine so that it's highlighted then go to the virtual machine menu and choose snapshots. You'll want to uncheck "Only show my snapshots" which should be at the bottom. That should then display any snapshots you've taken and any snapshots taken with autoprotect. You should be able to delete them from that window.
Click to view WoodyZ's profile Guru vExpert 11,095 posts since
Apr 22, 2004
You cannot modify the hard disk if the Virtual Machine is suspended.
Click to view WoodyZ's profile Guru vExpert 11,095 posts since
Apr 22, 2004
AndrewPainter wrote: Don't forget you'll have to delete any snapshots the virtual machine has.

Are you sure about that... I just converted a split disk into a monolithic that had Snapshots although it was only the active disk (a Snapshot Disk) that got converted not the additional Snapshots or Base Disk although in general it's probably better to not do it with Snapshots.
Click to view AndrewPainter's profile Hot Shot VMware Employees 158 posts since
Jun 29, 2009
vdisk manager is stored in /Library/Application Support/VMware Fusion/ It's a terminal application so if you open up terminal and drag it into there and hit enter you'll be given the individual options. It's an advanced way of modifying your virtual machine. In your case it would convert the virtual disk into the format you specify. It actually creates another virtual machine with the same information inside so once complete you'd have two. The difficulty with that is that you'll have to have enough space left on your computer to make the new one. So for example in terminal if I input the following command it should create a new virtual machine with the same information but a monolithic disk instead of split into 2GB chunks. "/Library/Application Support/vmware-vdiskmanager -r /Users/username/Documents/Virtual\ Machines/Windows\ XP\ Professional/Windows\ XP\ Professional.vmdk -t 0 /Users/username/Documents/Virtual\ Machines/XP_Pro.vmdk"

That should create a single growable virtual disk inside your Virtual Machines folder. From there you can create a new virtual machine using an existing virtual disk and choose that disk.

The other way of doing that sort of thing would be to use vCenter Converter to create a new virtual machine from the disks.

Normally if you have a snapshot and enter the Hard Disks section all options will be greyed out and there will be a notification that says "These settings cannot be changed while the virtual machine has a snapshot. To make these changes, first delete all snapshots."

If you open up your .vmwarevm there will probably be snapshot files there that the virtual machine depends upon. Fusion can sometimes loose the record of the snapshots during an upgrade to a higher version of fusion if the virtual machine has snapshots.
Click to view AndrewPainter's profile Hot Shot VMware Employees 158 posts since
Jun 29, 2009
the -t 0 was what made it single growable. You should be able to check the hard disks section in settings for your virtual machine and it should have no checkmarks for pre allocated or 2GB.
Click to view RDPetruska's profile Guru User Moderators vExpert 15,910 posts since
Jan 11, 2005

ozarkcanoer wrote:Andrew,
the use of vmware-vdiskmanager went smoothly and I've now got a single .vmdk VM to use and it runs. Is there a way I can be sure that it is growable/shrinkable or is that a sure thing since I used the "-r" switch with vmware-vdiskmanager ?

thanks,
Larry


Realize that now if you ever want to defrag, shrink, or perform any other disk-changing operation on your virtual disk, you will need as much free disk space on your host as the maximum defined disk size for this disk; and you have made it infinitely harder to troubleshoot any disk corruption/repair issues. If you kept the 2GB-Split disk format, you would only ever need slightly more than 2 GB of free disk space on your host to perform defrag and shrink operations; and the disk descriptor information would be in a separate small text file which could easily be edited/modified/corrected if/when any issues arise. Make sure you keep a good backup.

VMware Beta Programs

Want to be Considered for Future Beta Programs?

Learn More

VMware Developer

Download SDKs, APIs, videos,
training, and more in the Developer community.

Learn More

Developer
Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld
Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

Only VMware ... Delivers Nexus 1000V

Ensure consistent, policy-based network capabilities to virtual machines across your data center.

Learn More

Communities