Here’s a quick how to add iSCSI send targets on all hosts in your VC

Connect-viserver vCenterServerFQDNorIP
$targets = "StorageTargetIP1", "StorageTargetIP2"
$ESXiHosts  = Get-VMHost
foreach ($esx in $ESXiHosts) {
  $hba = $esx | Get-VMHostHba -Type iScsi | Where {$_.Model -eq "iSCSI Software Adapter"}
  foreach ($target in $targets) {
     # Check to see if the SendTarget exist, if not add it
     if (Get-IScsiHbaTarget -IScsiHba $hba -Type Send | Where {$_.Address -cmatch $target}) {
        Write-Host "The target $target does exist on $esx" -ForegroundColor Green
     else {
        Write-Host "The target $target doesn't exist on $esx" -ForegroundColor Red
        Write-Host "Creating $target on $esx ..." -ForegroundColor Yellow
        New-IScsiHbaTarget -IScsiHba $hba -Address $target       

Now present the LUNs from storage and rescan all HBA to see the new storage on the hosts.

Get-VMHost | Get-VMHostStorage -RescanAllHba -RescanVmfs

Get command line access with SSH or ESXi Console as user root.

Then run the following commands to enable SNMP and configure SNMP v2 community, SysLocation and SysContact.

esxcli system snmp set -r
esxcli system snmp set -c esxsnmpusr
esxcli system snmp set -p 161
esxcli system snmp set -L "California, USA"
esxcli system snmp set -C
esxcli system snmp set -e yes

Finally run ‘get’ to confirm the configuration

esxcli system snmp get

   Communities: esxsnmpusr
   Enable: true
   Engineid: 00000000000000aaaaaa1000
   Hwsrc: indications
   Largestorage: true
   Loglevel: info
   Port: 161
   Syslocation: California, USA

That’s it, now open your favorite NMS software and start monitoring, at work I use Cisco Prime NAM, my choice at home is Observium

As you saw in the previous post, missing ntp configuration on one the vSphere hosts burnt me. I did not want to go through 30 some hosts manually, so decided to bulk update the ntp configuration on all my hosts. After a quick google search i found SnowVM blog post on this.

Here is the commands for my own quick reference.

Connect-VIServer vCenterServerFQDNorIP
Get-VMHost | Add-VMHostNtpServer NTPServerFQDNorIP
Get-VMHost | Get-VMHostFirewallException | where {$_.Name -eq "NTP client"} | Set-VMHostFirewallException -Enabled:$true
Get-VMHost | Get-VmHostService | Where-Object {$_.key -eq "ntpd"} | Start-VMHostService
Get-VMhost | Get-VmHostService | Where-Object {$_.key -eq "ntpd"} | Set-VMHostService -policy "automatic"

So I installed VMware vSphere Big Data Extensions using the OVF file and logged in management-server and installed the extension, enabled SSO and updated the certificate and tried connecting from vSphere webclient using BDE plugin to connect to the server, it fails with error

Please check the server has enabled SSO.

I found VMware KB 2060544, but not much help, I saw the same error in the log (/opt/serengeti/logs/serengeti.log) file, but re-enabling SSO or re-updating the certificate or rebooting the management-server did not help.

Then i noticed the timezone and then a light-bulb went “on” in my head, checked the VM time and it was off by a couple of hours, as the ESX host did not have ntp configured!!! rookie mistake :(.

Fixing ntp on host and rebooting the management server vm to allow it to sync up host time fixed the issue!

Just to clarify, this is not a post on how to configure apache/nginx to proxy requests to iPython notebook server or a backend proxy.

This is when you have a iPython notebook server running on your laptop/desktop behind a corporate/school proxy/firewall and any web requests needs to go through such proxy. On bash shell you just export the env variable like this and its taken care off. However for a iPython server the env variables are not inherited from user bash profile.

You have to modify the iPython notebook server env. Create a file named under your .ipython notebook server profile and add the following:

For example:

vi /.ipython/profile_myserver/startup/

and add

import sys,os,os.path

you confirm the env variables by running

%env in a cell and the output

{'CLICOLOR': '1',
 'GIT_PAGER': 'cat',
 'HOME': '/home/jay',
 'HTTP_PROXY': '',

Next try

import requests

If you get a response [200] then you are all set.