简体   繁体   中英

Connecting between Azure VMs by name

I have two Azure Windows VMs on the same Vnet.

The second is a clone restored from a backup of the first, and I have changed its computer name, let's say I have called them vmOriginal (10.0.0.4) and vmClone (10.0.0.5).

I am testing communications between them using telnet to an open port on the other, as the simplest case.

This is successful in both directions using their local IP addresses.

vmOriginal can also telnet to vmClone by name.

But vmClone cannot telnet to vmOriginal by name (Could not open connection to the host, Connect failed).

How do I go about troubleshooting this?

Well this almost unbelievable. Turns out the problem was the Computer Name was too long (the ones I used above were for clarity only).

For Azure VMs, the computer name must actually be a maximum of 12 characters (even though Windows allows 15 when you set it in the Control Panel).

There is no warning about this from Azure.

For vNet DNS, Azure adds a domain to the computer names that is 51 characters long, which I guess represents the local vNet. It looks something like:

rifmvhdprmqxsebj4n0m6vnd2d.qx.internal.cloudapp.net

Adding the separator dot, there is only 12 spare characters allowed for the computer name.

Any longer than that, and the total expression will exceed the 64 character limit of DNS entries, meaning the computer will not be found in DNS and cannot be referenced by name on the network.

There is a feedback submission here which explains this exact situation, it's the only thing I found after hours of searching that put me on the right track.

https://feedback.azure.com/forums/216843-virtual-machines/suggestions/10197480-the-azure-vm-internal-dns-domain-names-are-too-lon

I don't understand why this problem isn't more widely known. Or better still, alerted in the Azure portal.

Or best of all, as the responder above points out, it should not be allowed to happen at all.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM