RemoteCLI: Difference between revisions

From vwiki
Jump to navigation Jump to search
(Added vicfg-snmp)
m (→‎vihostupdate: Typo fixes)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
== vicfg-cfgbackup ==
vicfg-cfgbackup.pl -s --server esx --username root --password pass esx.cfg
<code> vicfg-cfgbackup </code> Allows the config of an ESXi server to be backed up to a binary config file.  Use <code> -l </code> option to load a config back onto an ESX.
== vicfg-snmp ==
== vicfg-snmp ==
  vicfg-snmp.pl --server esx --username root --password pass --show
  vicfg-snmp.pl --server esx --username root --password pass --show


<code> vicfg-snmp </code> Enables management of the ESXi SNMP agent
<code> vicfg-snmp </code> Enables management of the ESXi SNMP agent.  Changes take effect immediately, there's no need to restart the service (suspect its probably done by the script anyway)
 
To add a read-only (SNMP Get) community use
vicfg-snmp.pl --server esx --username root --password pass -c community
 
To set trap destinations use
vicfg-snmp.pl --server esx --username root --password pass -t trap-rxer1/community,trap-rxer2/community
 
To enable the service (use -D to disable)
vicfg-snmp.pl --server esx --username root --password pass -E
 
Be aware that for full fat ESX hosts you don't get anything back, config should be done via the Service Console's <code> /etc/snmp/snmpd.conf </code> config file


== vicfg-volume ==
== vicfg-volume ==
  vicfg-volume.pl --server esx --username root --password pass --list
  vicfg-volume.pl --server esx --username root --password pass --list


<code> vicfg-volume </code> Provides an alternative for vSphere to using LVM.enableresignature option in VI3  
<code> vicfg-volume </code> Provides an alternative for vSphere to using LVM.enableresignature option in VI3
 
== vihostupdate ==
vihostupdate.pl --server esx --username root --password pass -b C:\path\to\bundle.zip -s
 
To scan for an update...
vihostupdate.pl --server esx --username root --password pass -b C:\path\to\bundle.zip -s
 
To install an update (ESX must be in maintenance mode)...
vihostupdate.pl --server esx --username root --password pass -b C:\path\to\bundle.zip -i
 
== vmware-cmd ==
vmware-cmd.pl -l --server esx --username root --password pass
vmware-cmd.pl <vm cfg> <vm operation> --server esx --username root --password pass
 
<code> vmware-cmd </code> Performs similar operations as is available from ESX command line
 
List all VM's registered to the ESX...
vmware-cmd.pl --server esx --username root --password pass -l
 
So to start a VM registered on a particular ESX...
vmware-cmd.pl /vmfs/volumes/path/to/server.vmx start --server esx --username root --password pass
 
To register a VM...
vmware-cmd.pl --server esx --username root --password pass -s register /vmfs/volumes/path/to/server.vmx
 
To unregister a VM...
vmware-cmd.pl --server esx --username root --password pass -s unregister /vmfs/volumes/path/to/server.vmx


[[Category:VMware]]
[[Category:VMware]]

Latest revision as of 09:43, 30 July 2012

vicfg-cfgbackup

vicfg-cfgbackup.pl -s --server esx --username root --password pass esx.cfg

vicfg-cfgbackup Allows the config of an ESXi server to be backed up to a binary config file. Use -l option to load a config back onto an ESX.

vicfg-snmp

vicfg-snmp.pl --server esx --username root --password pass --show

vicfg-snmp Enables management of the ESXi SNMP agent. Changes take effect immediately, there's no need to restart the service (suspect its probably done by the script anyway)

To add a read-only (SNMP Get) community use

vicfg-snmp.pl --server esx --username root --password pass -c community

To set trap destinations use

vicfg-snmp.pl --server esx --username root --password pass -t trap-rxer1/community,trap-rxer2/community

To enable the service (use -D to disable)

vicfg-snmp.pl --server esx --username root --password pass -E

Be aware that for full fat ESX hosts you don't get anything back, config should be done via the Service Console's /etc/snmp/snmpd.conf config file

vicfg-volume

vicfg-volume.pl --server esx --username root --password pass --list

vicfg-volume Provides an alternative for vSphere to using LVM.enableresignature option in VI3

vihostupdate

vihostupdate.pl --server esx --username root --password pass -b C:\path\to\bundle.zip -s

To scan for an update...

vihostupdate.pl --server esx --username root --password pass -b C:\path\to\bundle.zip -s

To install an update (ESX must be in maintenance mode)...

vihostupdate.pl --server esx --username root --password pass -b C:\path\to\bundle.zip -i

vmware-cmd

vmware-cmd.pl -l --server esx --username root --password pass
vmware-cmd.pl <vm cfg> <vm operation> --server esx --username root --password pass

vmware-cmd Performs similar operations as is available from ESX command line

List all VM's registered to the ESX...

vmware-cmd.pl --server esx --username root --password pass -l

So to start a VM registered on a particular ESX...

vmware-cmd.pl /vmfs/volumes/path/to/server.vmx start --server esx --username root --password pass

To register a VM...

vmware-cmd.pl --server esx --username root --password pass -s register /vmfs/volumes/path/to/server.vmx

To unregister a VM...

vmware-cmd.pl --server esx --username root --password pass -s unregister /vmfs/volumes/path/to/server.vmx