sharesmanager.pl - Display or modify shares for memory, CPU and disk for specified virtual machines.
sharesmanager.pl --vmname <name of virtual machine> [options]
This VI Perl command-line utility provides an interface for modifying shares for memory, cpu and disk for specified virtual machine.
Required. The name of the source virtual machine. It is a mandatory field. The shares of the virtual machine specified here will be display and updated for different resources.
Optional. Value of memory share [Integral Value|low|normal|high]. The memory allocation share will be updated accordingly.
Optional. Value of cpu share [Integral Value|low|normal|high]. The cpu allocation share will be updated accordingly.
Optional. Value of disk share [Integral Value|low|normal|high]
Required if <disk> option is specified. Name of disk whose shares need to be updated.
Display Memory / CPU Share of Virtual Machine:
sharesmanager.pl --url <https://<IP Address>:<Port>/sdk/vimService>
--username user --password mypassword
--vmname VM123
Display Disk Share of Virtual Machine:
sharesmanager.pl --url <https://<IP Address>:<Port>/sdk/vimService>
--username user --password mypassword
--vmname VM123 --diskname "Hard Disk 1"
Update Memory Share to low of a Virtual Machine:
sharesmanager.pl --url <https://<IP Address>:<Port>/sdk/vimService>
--username user --password mypassword
--vmname VM123 --memory low
Update CPU Share to high of a Virtual Machine:
sharesmanager.pl --url <https://<IP Address>:<Port>>/sdk/vimService>
--username user --password mypassword
--vmname VM123 --cpu high
Update Disk Share to 100 of a Virtual Machine:
sharesmanager.pl --url <https://<IP Address>:<Port>/sdk/vimService>
--username user --password mypassword
--vmname VM123 --diskvalue 100
--diskname "Hard Disk 1"
All operations work with VMware VirtualCenter 2.0 or later.
All operations works with VMware ESX Server 3.0 or later.