I have a vm with a 100GB pre-allocated hard disk that I like to shrink down to 20GB and change to a non pre-allocate disk. What is the best way to do this? I've tried the vmware-vdiskmanager but can't seem to figure out the right combination of switches it either tells me I can't do this or that the argument is missing or incorrect.
You can also use VMware Converter. It's free.
or still try this:
cmd cd C:\Program Files\VMware\VMware Workstation vmware-vdiskmanager.exe -r "C:\VM\myVM\beforeconversion.vmdk" -t 1 "C:\VM\myVM\afterconversion.vmdk" |
Why do you want to change the nominal size ?
If you convert to a split growing disk with vmware-vdiskmanager - there is no need to resize the vmdk.
Don't use Converter unless you are aware of the problems - in many scenarios it messes up drivers and may trigger a re-activation with MS
___________________________________
description of vmx-parameters:
Don't use Converter unless you are aware of the problems - in many scenarios it messes up drivers and may trigger a re-activation with MS
Many VM operations can trigger MS reactivation, that is a completely different topic.
I have never encountered "messed up drivers" with VMware Converted virtual systems, but I believe you that is possible.
Just consider someone installed a XP following defaults - if he now converts the disk with vdiskmanager from preallocated to sparse - the guest doesn't even notice it.
If he resizes with Converter - the guest is messed up - as drivers are changed to SCSI which is not what the user wanted.
___________________________________
description of vmx-parameters:
You have probably a good point here.
I have never converted XP with IDE virtual disks, I always used LSILogic SCSI disks to start with.
Thanks guys for your input. I was able to shrink and changed it from pre-allocated to expandable with the right combination of steps. In case you want to know how I did it.
Step 1. vmware-vdiskmanager -r old.vmdk -t 0 new.vmdk
Step 2. edit the vmx file to reflect the new.vmdk
Step 3. delete the old.vmdk disk and add the new.vmdk in the VM settings.
Step 4. shrink the VM via the vmtools.
It took about 3 hours in total.