When you create a virtual machine and more specifically its hard drive(s), you have the option of using dynamic or static provisioning.
However, as you'll see in the article below, dynamic provisioning can be a problem if you don't regularly monitor your datastore storage usage.
For this article, we have created a small 40 GB datastore.
For this article, we are going to create a new virtual machine on our small datastore.
To show you the problem this can cause, we are going to create a 50 GB virtual hard disk for this virtual machine, while the datastore is only 40 GB.
Since the default choice is "Thick provisioned", this doesn't work and VMware ESXi shows you this error :
Plain Text
The disk size specified is greater than the amount available in the datastore. You cannot overcommit disk space when using a thick provisioned disk. You must increase the datastore capacity, or reduce the disk size before proceeding.
With thick provisioned, the creation of this virtual machine will therefore be impossible.
On the other hand, with dynamic provisioning, VMware ESXi will let you create this machine, but warning you that your datastore may be full at some point and that this may crash the virtual machine.
In other words, the virtual machine(s) present on the affected datastore will stop working suddenly since VMware ESXi will no longer be able to write to this datastore.
Plain Text
The disk size specified is greater than the amount available in the datastore. Disk space overcommitment can consume all space in the datastore and could block the virtual machine. You should increase the datastore capacity, or reduce the disk size before proceeding.
If you are creating a single dynamically provisioned virtual machine, it can be easy to ensure that this problem doesn't appear. But, if you get into the habit of creating all of your virtual machines with this provisioning mode, you might end up with virtual machines that will stop working overnight. Especially since this sudden shutdown of these virtual machines can also cause problems in the guest operating system installed in each virtual machine. And it's even riskier with virtual machines serving as servers.
The summary of our virtual machine configuration appears and as you can see, VMware ESXi lets us create our 50 GB virtual machine on our 40 GB datastore.
We start our virtual machine.
We install the guest operating system in it and it goes without problem (for the moment).
As you can see, with Windows 10, we can use 49.3 GB on our 50 GB virtual hard drive.
Which means Windows 10 will think it can use 49.3GB on that hard drive.
We duplicate a large file several times in the virtual machine to quickly fill the virtual hard drive and Windows 10 lets us do it.
Indeed, for him, there is enough disk space available on this hard drive.
However, since the datastore is only 40 GB, Windows will not block writing to the hard drive soon enough and VMware ESXi will detect the problem (when it's too late).
Indeed, from now on, our database is full and there is not a single free byte left on it.
VMware ESXi is therefore forced to freeze (block) your virtual machine and it asks you what to do.
Plain Text
There is no more space for virtual disk "[vmdk virtual hard disk name]". You might be able to continue this session by freeing up disk space on the relevant volume, and clicking Retry. Click Cancel to terminate this session.
While this may allow you to regain access to your virtual machine by freeing up space on your datastore, expanding your datastore with an additional physical disk, or extending the VMFS partition onto a single physical disk, the service hosted (if any) on it will therefore be cut off instantly. In production, it will therefore already be too late.
Again, in the example below, this only concerns one virtual machine, but if several virtual machines are on the same datastore, they will all be frozen and therefore unusable for the moment.
If we look at the information in our small datastore, we can see that it's 100% used and that there are 0 bytes left.
If you can't make room on your datastore, you will have to click on "Cancel" to end the session.
Once you click on "Cancel", the console will appear like this.
But, you will see that the virtual machine has been powered off and not paused.
This means that the processes running in the virtual machine will have been abruptly terminated. This can be a problem with the programs that were running, but also with the guest operating system installed in the virtual machine.
If you try to start it, it may start to start for a few seconds.
But, the virtual machine will freeze again until you make room on your datastore.
Although dynamic provisioning can be useful to save storage space and/or to speed up the creation of the virtual hard disk in a test environment, this mode of provisioning can also create big problems in business if you exceed one day. the storage space available physically on your datastore, for example by storing large files from the guest operating system of your virtual machines.
The safest solution, therefore, is to use static provisioning to ensure that you will never exceed the storage space available on your datastore and to create smaller virtual hard disks at the start. Then, you just have to enlarge them later when you need more disk space for a particular virtual machine.
By the way, be aware that technically static provisioning also provides better performance.
If you ever expand the virtual hard disk of a virtual machine, remember to also expand the file system and partitions on it from the guest operating system to be able to use the storage space added to it.
To do this, refer to one of these pages :
VMware 4/21/2023
VMware 5/19/2023
VMware 5/5/2023
VMware 12/23/2022
Pinned content
Contact
® InformatiWeb-Pro.net - InformatiWeb.net 2008-2022 - © Lionel Eppe - All rights reserved.
Total or partial reproduction of this site is prohibited and constitutes an infringement punishable by articles L.335-2 and following of the intellectual property Code.
You must be logged in to post a comment