vCenter not using SMTP smarthost but DNS

The other day I had scheduled a task for a VM and I wanted to get an email notification about the status of that job. So I configured the notification.

But the next morning I didn’t find a confirmation email in my inbox. Strange!

So I checked the email settings of vCenter and everything looked ok. The mailserver was configured and the sender address. So what could prevent the email from sending?

I checked /var/log/vmware/vpxd.log and found out that it was trying to send email to the mail host that came from the MX record for the domain I used for the recipient. But that was the public mail server and for obvious reasons not reachable from within the LAN. But why did vCenter used the MX record found in DNS? I specified a mail server so please vCenter, use it…

The solution was to edit the file submit.cf.

  1. Go to /etc/mail and edit the file submit.cf
  2. Look for these lines:
    #"Smart" relay host (may be null)
    DS
  3. After the “DS”, enter the FQDN of the smart host you want to use.
    #"Smart" relay host (may be null)
    DS mailserver.domain.com
  4. Restart sendmail with this command:
    systemctl restart sendmail.service

Allign SDRS Thresholds and Datastore Usage on Disk Alarms

Last week I was monitoring a relatively large vSphere cluster with several host clusters and datastore clusters. I saw a couple of datastore warnings related to the datastore usage. There were two or three datastores that were more than 75% utilized.

Strange, because other datastores in the same datastore cluster had more than plenty of free space. So why didn’t SDRS kick in to distribute the files more evenly?

The reason for this is that the default warning threshold for the alarm is 75%. However, the default space utilization ratio threshold for SDRS is 80%.

So SDRS only kicks in when the utilization is more than 80%. But by then, the alarm for the datastore usage is already triggered.

My solution for this ‘problem’ was to align both thresholds at 75%. If for some reason SDRS cannot move files to another datastore and it gets even fuller there is still the alarm alert that is set at 85%.