How to reduce hard disk size in VM in VMWare

sglee
sglee used Ask the Experts™
on
vSphere ClientHi,

  I have a VM on a 4TB Datastore. By mistake, I created VM with 3TB of space and I need to reduce it to 2TB, but I can't.  

  I downloaded vCenter Converter Standalone V5.5.   I can find many links that explains how to do it using vCenter Converter, but I need step by step instructions as to how to use vCenter Converter to reduce the size of hard disk in a VM.
 
  Currently I have two Hosts (Production -192.168.1.2 and Backup - 192.168.1.5). Production host has 500GB space available on the datastore. Both Hosts are controlled by vSphere Client.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Billy RothSr Windchill Consultant

Commented:
This may not be ideal, but if the disk is dynamic/thin in vsphere, you could simply shrink the partition in the vm client to 2TB using disk manager, and it would never use more than that.
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
Okay, if you want to use "VMware Converter 5.5" the first you need to do, is install on the VM to be converted, to create a V2V.

My EE Article contains videos, I've created for EE Members

HOW TO:  P2V, V2V for FREE - VMware vCenter Converter Standalone 5.5

HOW TO: FAQ VMware P2V Troubleshooting

let me know when done.

or you can use this article

HOW TO: Shrink a VMware Virtual Machine Disk (VMDK) in 15 minutes

Author

Commented:
Andy,
 
 Can you give me step by step instructions as to how to do this instead of links please?
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
1. Install "VMware Converter 5.5" on the VM to be converted, to create a V2V.

Post back, when done.

Author

Commented:
Installed and looking at VMWare vCenter Converter Standalone window.
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
What is the OS which needs converting?

Author

Commented:
W2008 Std 64bit.
VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017
Commented:
Here are you step by step instructions,

1. Click Convert Machine

2. Powered-on machine

3. Select the This Local Machine Radio Button

4. Followed by Next

5. Leave Destination type as Default - VMware Infrastructure virtual machine

6. type vCenter server FQDN or IP Address

7. enter username and password for vCenter

8. Followed by next

9. Enter name for VM in the Inventory, this must be unique and different (it's not the OS hostname!) (e.g. just add a 1, e.g. VM1 (you can change later!)

10. Select a folder for VM

11. Select a host and cluster

12. Select a datastore (with space)

13. I would recommend vm version 8.0 (or same as current VM!)

14. Followed By Next

15. This is the Summary Page, this is where you change the SIZE!!!!

16. At the Top Data to Copy:- Click Edit

17. Select the Destination Drop Down, you will see options Max Size, Min Size, and Type in a Size.

18. Type in the Required Size!

19. Re-check Summary

20. Hit Finish, it will submit job, and wait for copy!

21. If all goes well, you will end up with a new VM, of the correct Size in the Inventory.

22. Turn off this VM,

23. Power-up new VM.

24. Job Done.

25. Archive/Backup old VM.

26. Remove old VM.

27. Rename new V2Ved VM in Inventory correct name!

Author

Commented:
I followed up to Step 20 and it started copying now.
This process essentially is "Clone" or "Migrate" with hard disk re-size option.
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
It's actually a Disk Clone with Re-Configure. (which includes, disk/partition alteration)

Author

Commented:
Boot ErrorAfter successful copy to production host, I turned off the original VM in backup host and turned on the VM "Backup1" and I got this error.
I checked the CDROM and it was empty, so I assigned W2008 64bit ISO file.
But I still get this error.

If this is due to a hardware change, should I migrate this back to the backup Host now the hard drive size has been adjusted?
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
The V2V, has not completyed successfully.

Author

Commented:
I am re-doing it and this time, I am using staying with same HOST and DATASTORE.
Let's see how it works.

Author

Commented:
It worked. So I should have stayed within the same host and datastore.
One problem that I noticed is that I need to activate the OS again.
When I moved the VM from one host to another, I did not have to.
But when you go thru a conversion which is essentially creating a duplicate VM, it make sense that the system will require activation again.
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
datastore and host changed should not cause any issues.

Conversion can cause RE-Activation, because the machine is being converted, and disk serial number has probably changed.

Author

Commented:
Conversion - DataStore Selection"datastore and host changed should not cause any issues." -->
If that is the case then, perhaps first time when I tried, I took default settings which are both checkboxes checked for (1) Ignore page file and hibernation file  (2) Create optimized partition layout.
But 2nd time, I unchecked them as seen above.
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
I followed the very same instructions here, because I noted those instructions, as I did it, and had no issues with the V2V I created.

Author

Commented:
VM - My ComputerVM Disk MgmtAndy,
  This V2V is successful, but it comes with one problem: having to activate the OS again.
  You also have an article "HOW TO: Shrink a VMware Virtual Machine Disk (VMDK) in 15 minutes".
  As you see in the screenshots above, I allocated 3TB into this VM by mistake and since I can't create a partition no bigger than 2TB, 1GB is being wasted and that is the reason I wanted to shrink the hard disk space (3TB) that I assigned to this VM.

  Having said that, if I follow your article "HOW TO: Shrink a VMware Virtual Machine Disk (VMDK) in 15 minutes", would I be able to free up that 1TB being not recognized by Windows OS?
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
By nature of conversion, it's likely to cause a re-activation. Because you are really creating a "new computer".

Yes, if you chop off the 1TB not being used by Windows, it will be available to the datastore again.

follow my EE Article.

HOW TO: Shrink a VMware Virtual Machine Disk (VMDK) in 15 minutes

Author

Commented:
I have decided to simply erase the VM and re-create a new VM with 2TB partition.
Thank you for your help.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial