VMware Communities
fwRoller
Contributor
Contributor
Jump to solution

Shrink Ubuntu Server 7.10

In an Ubuntu Server 7.10 virtual machine I've installed VMware Tools but do not now how to shrink the disks since there is not GUI in which to run the VMware Tools interface. Is there a way to shrink the disks from the command line? I prefer to not install a GUI as I want to keep this virtual machine compact. Any ideas?

0 Kudos
1 Solution

Accepted Solutions
admin
Immortal
Immortal
Jump to solution

Just to check, this is a sparse disk without snapshots, right?

I believe you can manually shrink a disk by filling up free space with zeros, then running vmware-vdiskmanager in shrink mode on the virtual disk. I'm not sure what the program Richard linked to does, but I would expect that it does the first part and possibly trigger the second.

View solution in original post

0 Kudos
6 Replies
rcardona2k
Immortal
Immortal
Jump to solution

There's no VMware supported way I know to shrink from the command-line in Linux, the gui way is using vmware-toolbox. You can use a third-party tool from Ken Kato at: vmshrink for Linux

I tested briefly and appears to run. I didn't check to see if my how much the disk shrank.

admin
Immortal
Immortal
Jump to solution

Just to check, this is a sparse disk without snapshots, right?

I believe you can manually shrink a disk by filling up free space with zeros, then running vmware-vdiskmanager in shrink mode on the virtual disk. I'm not sure what the program Richard linked to does, but I would expect that it does the first part and possibly trigger the second.

0 Kudos
fwRoller
Contributor
Contributor
Jump to solution

Thank you!

0 Kudos
rcardona2k
Immortal
Immortal
Jump to solution

I believe you can manually shrink a disk by filling up free space with zeros, then running vmware-vdiskmanager in shrink mode on the virtual disk.

Eric,

Correct me if I'm wrong, the shrink option (-k) is not available for the OS X version of vmware-vdiskmanager. The last time I checked it's still available in VMware Server and Workstation. So if the shrink action isn't initiated in the guest your options are limited.

0 Kudos
admin
Immortal
Immortal
Jump to solution

Hmm, you seem to be right. Not sure why Fusion's vmware-vdiskmanager is missing the shrink option, I'll try to remember to ask about that.

0 Kudos
fwRoller
Contributor
Contributor
Jump to solution

Will you please request that it be added back into the Fusion product? Thanks.

0 Kudos