Hi All,
Im writing an automated script for handling disk replacment on ESXi, in case if disk failure. We are using vSphere 5.1 with all hosts in lockdown mode, and therefor SSH & direct access to the host are blocked.
I found out that when replacing a disk with a blank disk or one with unsupported partiton format, it is needed to use partedUtil to assigne new label (msdos).
I was wondering if there is way of doing so with official CLI (esxcli or other command) that i can run from a remote machine.
Regards,
Dori
Hi all,
We created a new VIB that adds a plugin to the esxcli command (attached).
(NOTE - the vib was created for "community"acceptance level)
the plugin will install 2 files on the system - esxcli XML file plugin (see link below on how to create one) & a warrper script that runs partedUtil and return the output, pasrsed into excpeted XML structer (esxcli command require it).
Then i packed it as a VIB and instlled it on the esxi. After i restared the ESXi i can run partedUtil command using esxcli:
And this is what happen when i run it:
# esxcli parted cmd -q 'getptbl /vmfs/devices/disks/mpx.vmhba32:C0:T0:L0:8'
unknown
36 255 63 585696
I used this post on how to create the esxcli plugin:
http://www.v-front.de/2013/01/how-to-write-your-own-esxcli-plugin.html#uds-search-results
I used this documantion on how to pack it into a VIB:
http://www.virtuallyghetto.com/2012/09/creating-custom-vibs-for-esxi-50-51.html