Solved

Shrinking the disk

Posted on 2013-10-27
17
427 Views
Last Modified: 2013-11-16
I have a vm in vmware provisioned as Thin Format.After some time the machine allocated up to 400 G and then i deleted some of 100 G but it is still getting 400 G .How can i shrink this thin formated disk.
The virtual machine hosted is having a Linux based OS.
0
Comment
Question by:kastro Abbasi
  • 8
  • 7
  • 2
17 Comments
 
LVL 5

Expert Comment

by:wynandkunkel
ID: 39603557
You would have to use VMware Converter to accomplish this.  In the disk section you can select the minimum size of the disk or you can manually type in the size you want, bearing in mind that you cannot go smaller that the space used in the disk.
0
 
LVL 118
ID: 39603645
Install VMware vCenter Converter Standalone 5.5 on the Virtual Machine and Create a V2V, and in the wizard specify the new size of the virtual disk you require, and whether you want a thick or thin disk.

Installing converter on the VM to be converted is Best Practice, as recommended by VMware.


see my EE Article, Step by Step Tutorial Instructions with Screenshots

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

HOW TO:  Synchronize changes when completing a P2V or V2V with VMware vCenter Converter Standalone 5.1

HOW TO: Improve the transfer rate of a Physical to Virtual (P2V), Virtual to Virtual Conversion (V2V) using VMware vCenter Converter Standalone 5.0
0
 

Author Comment

by:kastro Abbasi
ID: 39603647
you mean i have to move this vm to some other datastore ,as this is linux machine and many users are working on it.
please explain a little bit more
0
 
LVL 5

Expert Comment

by:wynandkunkel
ID: 39603655
Hi ayazabbasi,

You could "move" it to the same datastore as converter will create a copy of the machine.  This might just then take a little longer as the same datastore would be reading the old machine and writing the new machine at the same time.  

In my experience this is typically something that you should do after hours, or during "quiet time"...

Once the "conversion" has completed you could then delete the "old" copy.

There is no other VMware supported method of doing this.
0
 
LVL 118
ID: 39603656
If this is a Linux machine, what Linux distribution are you using?

Converter may not be comopatible or support your VM.

You will have to ensure, ALL Services are shutdown, and ALL users are logged out.

BUT first, what Linux Distribution?
0
 

Author Comment

by:kastro Abbasi
ID: 39603907
I am using suse enterprise linux on esxi 4.1.Is there no other way as by using vmkfstools

or any other way except converter
0
 
LVL 118

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE) earned 500 total points
ID: 39603921
I'm afraid VMware removed support for shrinking disks in the OS after 2.5/3.0.

You could also try a cloning tool to another disk of smaller size.

Converter 5.5 does support the following Linux Distros for conversion:-

SUSE Linux Enterprise Server 9.x (32-bit and 64-bit)
SUSE Linux Enterprise Server 10.x (32-bit and 64-bit)
SUSE Linux Enterprise Server 11.x (32-bit and 64-bit)
0
 

Author Comment

by:kastro Abbasi
ID: 39606813
Can i use the Magic parted to shrink my suse enterprise Linux
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 118
ID: 39606883
you can use partition utilities, the OS partition will change, but not the virtual disk (vmdk).
0
 

Author Comment

by:kastro Abbasi
ID: 39606953
so you mean by using the magic partition i ll shrink the os partition,then i have to use vmware converter to shrink the vmdk.
as the vmdk.
but now the vmdk size has reached to 1T and i dont have so much space to shift this vm of 1T by using vmware converter.so thats why i was using magic partition to shrink the os partition .so what do you suggest it will work or not
0
 

Author Comment

by:kastro Abbasi
ID: 39607067
I mean in first step i shrinked the linux partitions by using magic partition and what is the second step to shrink the vmdk size
0
 
LVL 118
ID: 39607100
Converter will shrink the partition and disk in a single procedure there is no need to use additional partition products.
0
 
LVL 118
ID: 39607103
Why has the size increased from 400GB to 1TB ?
0
 

Author Comment

by:kastro Abbasi
ID: 39607120
as first i was trying to use the dd utility to append the block with zeroes.it filled all the space .
0
 
LVL 118
ID: 39607150
So the disk is now 1TB
0
 

Author Comment

by:kastro Abbasi
ID: 39607764
yes it is having ITB size
0
 
LVL 118
ID: 39607966
What is the maximum size you have made the thin disk?

you will need to convert.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show you HOW TO: Create your first Windows Virtual Machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, the Windows OS we will install is Windows Server 2016.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Teach the user how to install log collectors and how to configure ESXi 5.5 for remote logging Open console session and mount vCenter Server installer: Install vSphere Core Dump Collector: Install vSphere Syslog Collector: Open vSphere Client: Config…
This video shows you how easy it is to boot from ISO images for virtual machines with the ISO images stored on a local datastore on the ESXi host.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now