If, like me, you make your ESX / ESXi server passwords nice and complex you end up having to dig them out of a password safe every time you want to connect directly to one of them. Or you have an SSH connection manager of some sort perhaps. Even then, there will come a time when you want to connect directly and that 16 character, random, mixed case password just isn’t memorable enough for you to use it.
Luckily if you’re running vSphere 4.1 or later you can configure your hosts to use AD authentication. Hooray!
Obviously there are security implications to doing this. Each environment is different and any risks should be considered before implementing this.
So, let’s deal with the pre-requisites first. There are three of those:
- Time synchronisation – Your ESX / ESXi hosts must be synchronised to a time source and they should be in sync with the domain controllers in your AD domain. The authentication mechanisms in AD are very sensitive to time differences. Actually, that’s a delicate way to put it. It won’t work if the time is wrong.
- Name resolution – The ESX / ESXi hosts will use DNS to locate domain controllers for whichever domain you configure them to use. Therefore each host must have a working DNS configuration.
- An AD group – Sadly there is a limitation here. AD users that you wish to grant administrative access of your hosts to have to be a specific group in AD called “ESX Admins”. This is not obvious in the documentation however.
The same document then talks you through configuring each host. It’s fairly simple.
Just find the “Authentication Services” option on the “Configuration” tab for each host. By default it will look like this:
Click on the properties link to edit the “Authentication Services Settings”. In the windows that opens, select “Active Directory” as the service type. Then enter the FQDN of your AD domain into the domain field and click the “Join Domain” button.
All good unless you have a lot of hosts to work through. In which case, you might want to check out LucD’s very handy PowerCLI script to join hosts to an AD domain.
Michael is a Senior Consultant for Xtravirt. If it's got buttons or flashy lights on it then it'll probably be on his radar. When not "mending computers" (it's sometimes easier than explaining "cloud" to relatives), Michael provides essential education, entertainment and trampoline services to his two children.