Extending a shared virtual disk into multiple VMs

I leave you this post because a client has asked me to do it on several occasions and so I leave it for you 😉 too If we need to expand a virtual hard drive (Vhd) that is shared across multiple virtual machines, typically for cluster use, we will remember that we have the SCSI controller in Bus Sharing and that the disk is created in Eager Zeroed! We will follow these steps to expand this album.

 

Therefore, the disk must be extended by command line indicating that the provisioning mode is Eager Zeroed because otherwise, the disc will be incorrectly expanded in Lazy Zeroed. We will turn off the VMs that have the disk connected and proceed to expand them.

 

expand-disk-bus-sharing-vmware-vdisk-01-Bujarra

We connect to an ESXi Shell and execute the following command, we'll extend an existing VMDK by forcing disk mode to Eager Zeroed, we must take into account that the size of the disk is the TOTAL, Not the enlargement we want.

[sourcecode language=”Plain”]vmfsktools -X tamaño_gbG -d eagerzeroedthick /vmfs/volumes/DISCO/path/disco.vmdk[/SourceCode]

 

expand-disk-bus-sharing-vmware-vdisk-02-Bujarra

We'll wait until you've finished formatting the disk expansion.

 

expand-disk-bus-sharing-vmware-vdisk-03-Bujarra

We delete it from the inventory of the corresponding VMs with “Remove from Virtual Machine” but first we will note what disk ID it has, Which parent company does it belong to?, the Mode and of course the path to look for him again. “OK”.

 

expand-disk-bus-sharing-vmware-vdisk-04-Bujarra

We add the album again, We look for it and configure it as we noted in the previous step. Subsequently, we can turn on the first VM and extend the partition corresponding to that virtual hard disk (be Linux, Windows…) and we will end up turning on the rest of the nodes. Honestly it can be done in some more way, but for me this is the most 'traditional', since if the disk is extended from the GUI and a vMotion Datastore is made as soon as it is finished, the disc is recreated on another LUN.

 

Recommended Posts

Author

nheobug@bujarra.com
Autor del blog Bujarra.com Cualquier necesidad que tengas, Do not hesitate to contact me, I will try to help you whenever I can, Sharing is living ;) . Enjoy documents!!!

Raspberry Pi - Facial recognition

17 de October de 2016