Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There are many servers/hosts supporting many virtual machines on VMWare. Is there a way to automatically increase the disk space available on a VM say increase by 10%? How about sending messages (emails) to admins when it gets critical?

share|improve this question

migrated from Aug 26 '10 at 2:10

This question came from our site for professional and enthusiast programmers.

This is more appropriate for ServerFault. – Lèse majesté Aug 25 '10 at 14:58
VMWare is a company, not a product. Which VMWare product are we discussing here? An appropriate response would look quite different for ESX, VCenter, Workstation or Player. – Chris Thorpe Aug 26 '10 at 3:53

You should be able to use the VMWare Disk Manager to inrease the size of your image.

-x [GB|MB] Expands the virtual disk to the specified capacity. You must specify the new, larger size of the virtual disk in Gigabytes or Megabytes. You cannot change the size of a physical (raw) disk. Caution: Before running the virtual disk manager utility, you should back up your virtual disk files.

vmware-vdiskmanager -x 25GB image.vmdk

Expands the image 'image.vmdk' to 25GB. Note that you will have to allocate this space on the VM i.e. assign it to a partition. It will initially be free unpartitioned space I believe.

As far as sending warnings regarding free disk space, you'd have to rope in Quota on Linux or something similar on Windows to perform checks - alternatively you could write a simple Cron-job to do the same thing using the 'df', 'grep' and 'sendmail' commands - again in Linux. You'll have to figure out a Windows alternative for that one aswell.

share|improve this answer
In Linux/Unix warnings about disk space can easily be generated via SNMP, no need for shell scripts whatsoever. – Janne Pikkarainen Aug 26 '10 at 7:00
I've never considered creating more disk space when a VM needs it... But actually, It's a great Idea! – HTDutchy Jul 4 '11 at 6:33

You can achieve this in a Virtualcenter/vSphere environment by configuring the vms for Thin Provisioning. You then configure a very large disk max size for the vm, but it will only occupy the actively consumed space on the physical storage (e.g if you configured a 40Gb boot disk but are only consuming 6Gb within it, your actual consumed physical disk space is only 6Gb). In virtualcenter you then configure an alarm event on the storage pool, which will alert the admins via email if the free space dips below a % threshold.

Note that if you want a method that looks at the free space within the guest os' themselves, you may as well factor the whole virtual stack out of the equation and look at other tools - vc and esx don't provide tools for this.

share|improve this answer
He was asking for a solution to increase maximum disk space, Not how to do thin provisioning – HTDutchy Jul 4 '11 at 6:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.