8 Replies Latest reply on Jan 21, 2013 1:31 AM by Tadziz

    [SOLVED] Shrink disk size

    Tadziz Novice

      Hello,

        I have problem with disk size. accidentally i increased wrong VHD size from 50 GB to 100 GB. As you can see in the image, extra 50 GB still is not is use and i want ask how can i restore this empty space to vmware datastorage that this partition would be only 50 GB. Can i do this with vCenter or i need other tools. Thanks for answers.storage.png

        • 2. Re: Shrink disk size
          Tadziz Novice

          I will try it and write how it worked for me. Thx

          • 3. Re: Shrink disk size
            Tadziz Novice

            i need more help. So the situation.

            as i told i have VM with increased disk size C and it also has additional disk D witk MS SQL databases. i want to do like this.

            1. using vmvare converted convert ONLY C drive and shrink it to 50 GB.

            2. attach NEW shrinked vmdk to OLD VM.

            3. Start VM and see that everything is ok

            Questions:

            1. Will it work ?

            2. will it still have D disk with MS SQL databases in it ?

             

            Thanks,

               Tadas

            • 4. Re: Shrink disk size
              aravinds3107 Master

              In the VMware Converter while doing the conversion during the disk section, Select the volume based cloning and adjust the disk which you need to shrink and leave the disk untouched.

               

              Converter will create a new VM with new disk which will have both C and D, Once the conversion is complete power ON the VM and test. When testing is completed Power OFF the old VM

              • 5. Re: Shrink disk size
                timrondeau Novice

                This will work but would require a little bit of naming and moving things around to get it done unless you have different clusters to work with.  When you run converter against the VM you will have to give it a name.  You wont be able to give it the same name but you could make something like computername-tmp.  You would basically want to do it in the following order.

                 

                1. Use converter to convert the machine into a new machine named computername-tmp.

                2. Once that is completed power off your virtual machine. 

                3. You would then move the virtual disk from the new machine over to your old machine. 

                4. Remove your old virtual disk for your C drive in the settings and add a new drive pointing to the existing storage and the new C drive virtual disk.

                 

                My recommendation would be to just clone the entire machine but that also depends on the size of your data drive.  If your data drive is very large then I could understand why you would not want to clone a drive that really doesnt need changes performed on it.  If however it is small then i would just save the time and little headache from moving and renaming and just convert the machine into a clone.  Rename your old machine first to something like computername-old and then use converter to make a new "clone" of the machine with the updated drive sizes. 

                1 person found this helpful
                • 6. Re: Shrink disk size
                  Tadziz Novice

                  My second D drive is not large, but it is on SSD RAID and here are no space left on it to put a clone. @timrondeau I think your answer will help me. I will let you on Monday know how it was for me , because i'm plannig to do all this stuff at saturday evening when no one will be using our servers.

                  • 7. Re: Shrink disk size
                    timrondeau Novice

                    Yes definately let me know how it goes.  Also while I do not know the size or configuration of your environment you could clone the machine using converter to an entirely new datastore or even another cluster that has the space.   There are many different methods you could use which are all dependent on your setup and environment but there are other approaches you could take as well. 

                     

                    So give it a try as you were saying and let me know how it goes and if you need more help I would be happy to assist in any way that I can. 

                    • 8. Re: Shrink disk size
                      Tadziz Novice

                      I solved this problem. First i renamed OLD VM, and converted it to NEW VM to a different data storage both data disks C and D. After that i moved OLD VM's D drive out on SSD data storage and moved NEW VM's D drive to SSD storage using vCenter Migration tool.

                      In this link you can see how to use vCenter MIgration Tool, to move disks.

                      http://ict-freak.nl/2011/04/01/storage-vmotion-only-one-hard-disk-to-another-datastore-in-vsphere/

                       

                      Thanks for help. My problem Solved

                         Tadas