Bind TrueNAS VM on ESXi to AD

I’ve got a new Scale VM on ESXi, but even though I can ping the IPs, FQDNs and hostnames of all my AD DCs, I get an error stating:

ads_connect: No logon servers are currently available to service the logon request. Didn't find the ldap server!

I’m sure it’s something I’m just overlooking, but I’m at a loss.

For some extra context, this was a bare-metal instance, which I changed to a VM; it was working on the old instance, and I haven’t changed any back-end networking or configs.

I also have the two DCs set up as the DNS servers in Networking (and only those DCs, not the gateway)

And here’s the whole error stack:

Error: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/plugins/activedirectory.py", line 441, in do_update
    domain_info = await self.domain_info(new['domainname'])
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 179, in nf
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 49, in nf
    res = await f(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/plugins/activedirectory.py", line 745, in domain_info
    raise CallError(netads.stderr.decode())
middlewared.service_exception.CallError: [EFAULT] ads_connect: No logon servers are currently available to service the logon request.
Didn't find the ldap server!


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 509, in run
    await self.future
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 554, in __run_body
    rv = await self.method(*args)
         ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 179, in nf
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 49, in nf
    res = await f(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/plugins/activedirectory.py", line 443, in do_update
    raise ValidationError('activedirectory.domainname', e.errmsg)
middlewared.service_exception.ValidationError: [EINVAL] activedirectory.domainname: ads_connect: No logon servers are currently available to service the logon request.
Didn't find the ldap server!

Solution was to temporarily add host entry to /etc/hosts.