VMware ESXi Virtual Disk Type Conversion – Thin, Thick, and Eager Zeroed Guide
In a VMware virtualization environment, the three ESXi disk types mentioned in previous articles (such as Thick Provision Lazy Zeroed, Thick Provision Eager Zeroed, and Thin Provision) not only affect the virtual machine's Detailed Explanation of VMware ESXi Disk Provisioning Typesperformance, space consumption, and creation speedPerformance, space occupation, and creation speed, but also directly influencestorage resource planning and post-maintenance strategies.
However, in real-world operations, many administrators encounter these tricky situations:
• Initially selected the wrong disk type—When deploying, thin provisioning was used to save space, but in the production environment, write volumes were large, and performance fluctuations were obvious; or thick provisioning eager zeroed was used, which was slow to create and fully occupied storage, leading to insufficient space for new projects.
• Changes in business scenarios—Thin provisioned disks in the test environment need to be converted to thick provisioned for production; after enabling VMware Fault Tolerance or Multi-Writer features in the cluster, disks must be thick provisioned eager zeroed.
• Storage over-provisioning risk—Thin-provisioned disks suddenly run out of physical space during peak write times, causing virtual machine downtime.
• Pitfalls during expansion or migration—Online expansion of thick provisioned eager zeroed disks results in newly allocated space becoming thick provisioned lazy zeroed, affecting shared disk functionality.
The commonality of these issues is that all require disk type conversion. Below is a detailed analysis of how to convert disk types, including converting from thin provisioning to thick provisioning, or vice versa.
The operating steps are as follows:
I. Converting Thin Provision to Thick Provision
1. Confirm that the virtual disk type is currently Thin Provision
2. This virtual machine uses a thin-provisioned disk type, with 50 GB of storage allocated, but only 1.86 GB of storage space is actually occupied.
3. Click "Edit Settings"
4. Confirm which storage the current virtual machine files are in, and click the storage location name to enter the storage page
5. Find the virtual machine folder in the browse storage, and find the vmdk file to be converted, then click "Expand" above (if the expand option is grayed out, it means the current disk storage format is not Thin Provisioning or the virtual machine is not in a powered off state)
6. Confirm expansion
7. Wait for the expansion task to complete
8. Go back to the virtual machine summary page, the hard disk allocation is still 50 GB, but it has become Thick Provision Eager Zeroed, and the storage space occupied is 50 GB (occupies as much as allocated)
9. Open the SSH service of ESXi (the previous ESXi upgrade article, VMware ESXi complete upgrade steps illustrated how to open the SSH service), use the following command to query the virtual machine's vmid, where vm-name is replaced with the virtual machine's name
vim-cmd vmsvc/getallvms|grep -i vm-name
10. Copy and record the VMID obtained in the previous step, which is 523 here, then run the following command to reload the virtual machine's VMX file, replacing <VMid> with the actual VMid
vim-cmd vmsvc/reload VMid

II. Convert thick provision to thin provision
There are two ways to convert a thick provisioned disk to a thin provisioned disk: one is to use migration when there are multiple storage paths in the environment, and the other is to use cloning when there is only one storage path in the environment. Of course, cloning can also be used for conversion when there are multiple storage paths.
The following describes the operating steps for using both methods:
A. Use the migration function for conversion (when there are multiple storage paths)
1. Right-click the virtual machine name and click "Migrate"
2. Select "Change storage only" or "Change compute resource and storage"
3. Select the target storage path, and select "Thin Provision" as the virtual disk format.
(If "Configure per disk" is enabled, you can set different storage locations and disk formats for different disks)
4. Confirm the migration information and click Finish
5. After the migration is complete, return to the virtual machine summary page to see that the disk has been converted to thin provision, and the storage space occupied has also shrunk, becoming consumed as much as used.
B. Use the cloning function for conversion (when there is a single storage path)
1. Right-click the virtual machine and click "Clone" → "Clone to Virtual Machine"
2. Enter the virtual machine name and select the location
3. Select Compute Resource
4. Select the storage location and choose the virtual disk format as Thin Provision(Similar to migration, you can enable the per-disk configuration feature)
5. Select cloning options as needed
6. Confirm cloning information and click Finish
7. After the cloning is complete, return to the virtual machine summary page and confirm that the disk has been switched to thin provisioning, and the storage space has also been reduced, becoming 'use as much as occupied'.
The virtual disk format conversion is now complete!
No comments:
Post a Comment
Thank you for your comments.