VMware Communities
sakdnf
Contributor
Contributor

Changing Hard Disk Space

Hi

I have installed Windows 8 on Vmware Workstation with 60 GB hard disk capacity. But now I want to lower it to 40 GB capacity of hard disk? How can I do it?

Thank you very much.

 

Labels (2)
Reply
0 Kudos
4 Replies
scott28tt
VMware Employee
VMware Employee

Convert the VM to a new smaller sized VM.

 


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos
sakdnf
Contributor
Contributor

Scott

I want not to lose the VM then I can not remove/convert it to a new one. How can I reduce the capacity to 40GB by keeping the VM?

Reply
0 Kudos
scott28tt
VMware Employee
VMware Employee

The simplest approach is the one I mentioned, data in the existing disk would get copied across to the smaller disk of the new VM.

 


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos
bluefirestorm
Champion
Champion

Presumably you are using a pre-allocated virtual disk to reduce the amount of space occupied on the host. You can clone the existing 60GB virtual disk to a 40GB virtual disk. There are different ways of doing this.

Back up the VM (or at least the 60GB virtual disk), before doing this; just in case something goes haywire you still have a backup.

1 Shrink the primary volume inside Windows 8 VM using diskmgmt.msc
2 Boot up VM with gparted ISO and move all partitions so that all unused space is towards the end.
3 Add 40GB virtual disk to the VM.
4 Boot up VM with gparted ISO and use the Terminal to clone 60GB to 40GB using dd
5 Remove 40GB virtual disk, remove 60GB virtual disk, add in again the 40GB disk (this is so that the order in the virtual controller remains the same, imagine if it were a physical PC).
6 As the destination is smaller, there will likely be some errors in the partition tables, use gparted to do the appropriate repair.
7 Boot up Windows 8 VM with 40GB disk

Using gparted ISO and the dd is just one method. You can search other methods on how to clone. It doesn't have to be VMware VM virtual disks. Remember most methods that work for cloning physical storage/hard drives/SSDs should also apply for virtual disks. The difference also you attach/detach the virtual disk via configuration in the VMware UI instead of attaching/detaching cables on a physical PC.

Reply
0 Kudos