Sorry it took me so long to reply. I've been working on this problem on & off at my paid internship.
The Host PC running Windows Server 2022 in a VM is connected to the client PC via a switch & there is no router between them. There is also no internet for any of the computers. I'm not sure if that is needed but my supervisor/teacher says it shouldn't matter.
The address for the DNS is 192.168.1.2. I made a new virtual switch called AD External to make sure it could bridge to the network on the host computer. Within the VM the network adapter is referred to as just Ethernet. I don't know if this is relevant, but I think it should be called AD External, but maybe it doesn't matter.
The host machine recognizes the virtual switch where it is called Ethernet (AD External). The host machine doesn't have any information for the IPv4 address. It is set to automatic. I checked the box that is says "validate upon exit". When it tries to validate it says that it can't find the problem. I'm not sure if that means there is a problem but it can't be found or there just isn't any problem.
I think the settings for the host machine's Ethernet (AD External) need to match the settings that are in its Ethernet adapter, but again I'm not sure. It occurred to me that I should try to ping the domain controller (a.com) within the VM, but even inside the VM it can't ping a.com.
So from what I can gather there is a problem with name resolution, but there shouldn't be because Service Manager says the DNS is online and has the address 192.168.1.2 which is what I enter for the preferred DNS server on every computer, virtual or otherwise.
The tutorial I was watching made it look so easy but I've been trying to figure out a solution for this problem for days now. If possible, maybe someone can point me to a tutorial where they do the exact same thing I'm attempting to do.