Archive for the ‘Scripting’ Category
Posted by Marek.Z on 15 January 2013
Another basic command, but may be useful in stateless environments with no local disk usable for a diagnostic partition. Here is a quick how-to.
- Connect to your host through SSH or open the DCUI.
- Setup the VMkernel interface, remote server IP address and port: # esxcli system coredump network set -v vmk0 -i 10.10.10.10 -o 6500
- Enable the remote dump collector host: # esxcli system coredump network set -e true
- Verify the settings: # esxcli system coredump network get
- Logout.
Done!
Verify if the ports are open on the firewall though vSphere Client or vSphere Web Client. This could of course be applied to the host through the Host Profiles. One more thing, ESXi Dump Collector is not supported on vSphere distributed switches (at the time of this writing).
Cheers!
- Marek.Z
Posted in Dump Collector, ESXCLI, ESXi 5, ESXi 5.1, VMware, vSphere 5 | Tagged: configure, Dump Collector, esxcli, esxi 5, ESXi 5.1, how to, setup, VMware | Leave a Comment »
Posted by Marek.Z on 8 January 2013
Another basic command, but essential for health monitoring of your hosts when using a Syslog Server. Here is a quick how-to.
- Connect to your host through SSH or open the DCUI.
- Setup the target Syslog Server and place logs in an unique subdirectory: # esxcli system syslog config set
--logdir-unique true --loghost=udp://10.10.10.10:514
- Open the ports for Syslog on the firewall: # esxcli network firewall ruleset set –e true –r syslog
- Apply the configuration with: # esxcli system syslog reload
- Verify the configuration with: # esxcli system syslog config get
- Logout.
Note: mind the double dashes in step 2.
Done!
Verify if the ports are open on the firewall though vSphere Client or vSphere Web Client. If the syslog settings are not reflected in the Advanced Settings of the host after you configure them, they will be visible after a reboot.
Cheers!
- Marek.Z
Posted in ESXCLI, ESXi 5, ESXi 5.1, How To, VMware | Tagged: configure, esxcli, ESXi 5.0, ESXi 5.1, how to, setup, syslog | Leave a Comment »
Posted by Marek.Z on 24 December 2012
This is really basics stuff, but here is a quick how to.
- Connect to your host through SSH or open the DCUI.
- Setup the target SNMP server, port and community string: # esxcli system snmp set –t <ip_or_fqdn>@/<community_string>
- Enable SNMP: # esxcli system snmp set –e yes
- Logout.
Done!
Verify the snmpd service is running and check if the ports are open on the host though vSphere Client or vSphere Web Client.
Please note that the esxcli system snmp namespace is available from vSphere CLI version 5.1.
Cheers!
- Marek.Z
Posted in ESXCLI, ESXi 5, ESXi 5.1, How To, VMware, vSphere | Tagged: esxcli, ESXi 5.0, ESXi 5.1, how to, setup, snmp | 2 Comments »
Posted by Marek.Z on 21 December 2012
Another quick post about ESXCLI basics. Here is a procedure how to quickly recover the Management Network functionality on your ESXi host.
- First, login through iLO or iDRAC or iRMC, whatever remote management solution your server is equipped with.
- Press F2 on Direct Console UI, provide the root password and enable ESXi Shell via Troubleshooting Options.
- Press ALT+F1 and log in.
- List vmkernel interfaces: # esxcli network ip interface list
- Remove vmkernel interface(s): # esxcli network ip interface remove –i vmkX (where X is the vmk# you want to remove)
- List portgroups: # esxcli network vswitch standard portgroup list
- Remove Management Network portgroup: # esxcli network vswitch standard portgroup remove –p ‘Management Network’ –v vSwitchX (where X is the vSwitch number)
- Remove vmnics: # esxcli network vswitch standard uplink remove –u vmnicX –v vSwitchX (where X is the uplink number and vSwitch number)
- Add new Management Network portgroup: # esxcli network vswitch standard portgroup add –p ‘Management Network’ –v vSwitchX
- Add new vmkernel interface: # esxcli network ip interface add –i vmk0 –p ‘Management Network’ –m 1500
- Configure the new vmkernel interface: # esxcli network ip interface ipv4 set –i vmk0 –I <IP_address> -N <Network_Mask> -t static
- Add vmnics: # esxcli network vswitch standard uplink add –u vmic0 –v vSwitch0
- Next, type: # exit
- Press ALT+F2 to return to DCUI and login if necessary.
- Disable ESXi Shell.
- Restart the Management Network.
- Logout.
Done!
Reconnect the host to vCenter Server to finalize the configuration.
Cheers!
- Marek.Z
Posted in ESXCLI, ESXi 5, ESXi 5.1, VMware | Tagged: esxcli, ESXi 5.0, ESXi 5.1, Management Network, recovery | Leave a Comment »
Posted by Marek.Z on 20 December 2012
A quick blog post on how to install a custom CIM provider on an ESXi 5.x host.
In this example I will use an Emulex vib CIM provider for ESXi which is necessary if you using Emulex OneCommand vCenter plug-in in your environment.
- First, enable SSH on the host.
- Upload the vib to the tmp directory on the ESXi host.
- Login to host via SSH and execute the following command: # esxcli software vib install –v /tmp/Emulex-Corporation_bootbank_emulex-cim-provider_3.6.12.1-01.vib
--no-sig-check
- Reboot the host.
Done!
Cheers!
- Marek.Z
Posted in ESXCLI, ESXi 5, ESXi 5.1, VMware | Tagged: cim provider, esxcli, ESXi, install | Leave a Comment »