VMware Communities
steffi2
Contributor
Contributor

How to free space on Ubuntu vm?

So I've got an Ubuntu VM that's used 11.2 GB and has 63.8 GB available ie. total 75.1 GB

but

the vmdk file takes up 75.1 GB why?

How can I shrink it?

Reply
0 Kudos
11 Replies
WoodyZ
Immortal
Immortal

Have a look at the Collect vmware.log files section of Information Gathering for VMware Fusion and attach the vmware.log file to a reply post.

Reply
0 Kudos
admin
Immortal
Immortal

So I've got an Ubuntu VM that's used 11.2 GB and has 63.8 GB available ie. total 75.1 GB

but

the vmdk file takes up 75.1 GB why?

As for the "why", see the Disk Space section of Frequently Asked Questions about VMware Fusion

Reply
0 Kudos
steffi2
Contributor
Contributor

So what can you do to recover all this space in Ubuntu then? Is there VMWare Tools I can use inside the guest to do this?

I don't think there's any GUI is there?

right now if I do

sudo vmware-toolbox

a GUI shows up but I'm offered no partitions to shrink.

So does vmware-toolbox support Ext4 partition shrinking yet?

Reply
0 Kudos
continuum
Immortal
Immortal

if the vmdk is preallocated you can not shrink it

if nominal size = actual size you verly likely have a preallocated vmdk


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
steffi2
Contributor
Contributor

It is not preallocated

Reply
0 Kudos
WoodyZ
Immortal
Immortal

If you'd provide the information I asked for I'll give you concise, explicit and specific directions.

Reply
0 Kudos
steffi2
Contributor
Contributor

Yes I understand but I didn't want to do that until I'd exhausted my options.

I read that vmware-tools doesn't allow you to shrink Ext4 filesystems. That should be either true or false regardless of what my log files look like.

I manage to shrink my VM's using the zero fill trick and then used vmware-vdiskmanager -k and it definately worked for me.

So the only thing remaining is confirmation as to whether vmware-tools supports Ext4 shrinking or not.

Reply
0 Kudos
WoodyZ
Immortal
Immortal

Obvious it doesn't otherwise it would show what was available to shrink.

JSYK The reason I asked for the vmware.log file is it provides a clear picture of the technical details that you either didn't original include and or that were ambiguous.  As an example it would tell whether or not the disk was monolithic or sparse and where it was pre-allocated or not and whether the VM was running with snapshots, normal or AutoProtect.  This information provides all the information you didn't and enables giving you concise, explicit and specific directions without having to ask additional questions or providing if this then that directions for the different possible scenarios based on the actual states of the VM.

Not to worry I'll not try to help you again.

Reply
0 Kudos
continuum
Immortal
Immortal

http://vm-sickbay.com/2010/09/25/how-to-shrink-a-vmdk-with-ext4-or-other-unsupported-filesystems/


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
steffi2
Contributor
Contributor

Yes that is the approach I used.

apologies to WoodyZ I just didn't want to post the log just yet because it contains proprietory information.

Reply
0 Kudos
WoodyZ
Immortal
Immortal

There is no need to apologize nor am/was I looking for one. Smiley Happy

I have posted the information to use the dd and rm commands a number of times before and I would have done it here however based on the numeric values you posted in your OP it looked like you had a monolithic (pre-allocated) disk and they cannot be shrunk and as I previously said the vmware.log files provides all the information Users typically fail to convey and sorry but sometimes I just get tired having to ask a bunch of questions that I can get the answers faster and easier then the User can convey and then not waste time providing more information than is really necessary or relevant to the resolution of an issue.

As an example in the last few days I tried helping someone and the thread ended up going longer then necessary because the User did not do as I suggested in my second reply in that thread and had he it would have saved a tremendous amount of time, energy and effort on my part much less the Users so I have to admit I do not intend to go through that scenario again and if providing the vmware.log file in one way as it would have been in your case well lets just say if a User isn't willing to help themselves then neither am I.

The only information in the vmware.log file that might be objectionable to transmit would be the Host IP Address if it's a Public Address and I'd say nowadays most Users are behind a Router so it would be a Private Address and the other would be the Users real name.  That information could be easily and globally removed using the Find/Replace command in TextEdit before attaching the file.  So, just curious, other then that what else would you find objectionable to transmit in the vmware.log file?

Reply
0 Kudos