Check if there is only 1 esx host

(cherry picked from commit 17ae93a6ad82ad25a9bfca1fbee2504eb8885cc9)