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

vRO – Creating a test copy of your appliance

Recently I was investigating the migration of an external vRealize Orchestrator instance to an embedded instance inside vRealize Automation. But for testing purposes I didn’t want to use the production appliances… So I had to create a test vRA and vRO appliance.

I started with vRO. The control Center has the option to export and import the configuration. At first the import didn’t work because of insufficient memory. But after increasing the available memory and importing the configuration from my production appliance, I still was missing important stuff like workflows.

For some reason I didn’t think of the obvious solution: get the files from the production appliance and import them in the test environment. This gave me an EXACT copy. So the next step was to change the host name and the IP configuration.

I started the imported VM (disconnect the nic) and logged on to the console. Then I ran this command:

/opt/vmware/share/vami/vami_config_net

This will let you change the hostname (option 3) and to change the IP address (option 6).

Shutdown the appliance, connect the nic and start it up again. Now you have a copy of your production vRO appliance to work with. I didn’t test it but this might also work with vRA.