PowerShell script exchange
Post Reply
Leo0601
Enthusiast
Posts: 88
Liked: 8 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by Leo0601 »

Hi Experts,

Getting this below error while we are trying to add vCenter FQDN instead of vCenter IP via powershell

The remote name could not be resolved : 'Veeam.Veeam12.VMware.net'

It was working as fine, and I was able to add the vCenter when I was passing the vCenter IP address. I am getting this error when I am trying to pass the FQDN name of the vCenter.

I just wanted to make sure. Is this expected scenario?

Code: Select all

Connect-VIServer -Server "vCenterIP" -User "Username" -Password "Password" -Force
Kindly, someone confirm me.

Thanks in advance.

Regards
Leo.
mjr.epicfail
Veeam Legend
Posts: 377
Liked: 113 times
Joined: Apr 22, 2022 12:14 pm
Full Name: Danny de Heer
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by mjr.epicfail » 1 person likes this post

Hi Leo,

This looks more like a vSphere question than a Veeam question.
Nonetheless, this should work, did you try to resolve the FQDN via powershell?
VMCE / Veeam Legend 2*
Leo0601
Enthusiast
Posts: 88
Liked: 8 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by Leo0601 »

@mjr.epicfail

Hello Expert,

Thanks for your reply.

Nothing wrong with vCenter end. I am able to resolve the FQDN. Its reachable and pinging. So I cannot check with VMware.

I am able to add the vCenter IP address via PowerShell instead of FDQN then its working fine without any issue.

I just wanted to know whether it was possible to add FQDN via PowerShell or not. If a Veeam expert like you confirms it, that would be great.

Could you please confirm me?

Code: Select all

Connect-VIServer -Server "Veeam.Veeam12.VMware.net" -User "administrator@vsphere.local" -Password "Welcome@123" -Force
Regards
Leo
mjr.epicfail
Veeam Legend
Posts: 377
Liked: 113 times
Joined: Apr 22, 2022 12:14 pm
Full Name: Danny de Heer
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by mjr.epicfail » 1 person likes this post

Hi Leo,

It was not meant for the vcenter end, just on the server you are trying the connection *FROM*.
I just checked the code and I can indeed login into vcenter with that codeline.

I really think there is a DNS issue on the "FROM" machine you are testing this on.
VMCE / Veeam Legend 2*
tyler.jurgens
Veeam Legend
Posts: 406
Liked: 231 times
Joined: Apr 11, 2023 1:18 pm
Full Name: Tyler Jurgens
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by tyler.jurgens » 2 people like this post

Leo0601 wrote: Nov 28, 2024 5:26 pm

Code: Select all

Connect-VIServer -Server "Veeam.Veeam12.VMware.net" -User "administrator@vsphere.local" -Password "Welcome@123" -Force
Where are you getting that FQDN from?

Code: Select all

Veeam.Veeam12.VMware.net

It doesn't look like a proper FQDN for a vCenter you own. VMware.net is owned by VMware (now Broadcom), so unless you work for them, this shouldn't be used. If you do work for Broadcom (*waves*) you probably have much better internal resources for connecting with VMware's PowerCLI than we do on the Veeam R&D Forums. :lol:

If you are using that FQDN internally:
a) You really shouldn't be
b) You would have some DNS server responding to vmware.net queries internal to your organization, but the system you are connecting from likely isn't resolving that FQDN against your internal DNS server. That's not an FQDN that resolves publicly, so unless the machine you are using to run that powershell code can run DNS lookups against your internal DNS server, this could never work.
c) See a).
Tyler Jurgens
Veeam Legend x3 | vExpert ** | VMCE | VCP 2020 | Tanzu Vanguard | VUG Canada Leader | VMUG Calgary Leader
Blog: https://explosive.cloud
Twitter: @Tyler_Jurgens BlueSky: @explosive.cloud
jhoughes
Veeam Vanguard
Posts: 282
Liked: 113 times
Joined: Apr 20, 2017 4:19 pm
Full Name: Joe Houghes
Location: Castle Rock, CO
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by jhoughes »

Leo0601 wrote: Nov 28, 2024 1:52 pm Hi Experts,

Getting this below error while we are trying to add vCenter FQDN instead of vCenter IP via powershell

The remote name could not be resolved : 'Veeam.Veeam12.VMware.net'

It was working as fine, and I was able to add the vCenter when I was passing the vCenter IP address. I am getting this error when I am trying to pass the FQDN name of the vCenter.

I just wanted to make sure. Is this expected scenario?

Code: Select all

Connect-VIServer -Server "vCenterIP" -User "Username" -Password "Password" -Force
Kindly, someone confirm me.

Thanks in advance.

Regards
Leo.
Are you intending to connect or the vCenter server from PowerCLI, and NOT the Veeam cmdlets?

Either way, I'd start with the advice of Tyler above.
Husband, Father, Solutions Architect, Geek | @DenverVMUG & @DenverPSUG leader | International Speaker | Veeam Vanguard | vExpert (PRO) | Cisco Champion
Leo0601
Enthusiast
Posts: 88
Liked: 8 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by Leo0601 »

@mjr.epicfail

First of all, I would like to apologize you for mentioning the wrong code.

actual code which I am trying to add is below.

Code: Select all

Add-VBRvCenter -Name "Veeam.Veeam12.VMware.net" -User "administrator@vsphere.local" -Password "Welcome@123" -Force
Thanks much for the reply. Yes, you are right. Its related with the DNS.

I found the issue and fixed it.

There is a host file which is present in all the windows server.

Path: C:\Windows\System32\drivers\etc

In that host file we have to add the FQDN of the vCenter and save it.

Then we can able to add the vCenter.

I given thumbs-up for your replies. Thanks again.
Leo0601
Enthusiast
Posts: 88
Liked: 8 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by Leo0601 »

@tyler.jurgens

Hi Tyler,

There is no problem with the FQDN.

Thats fine.

Thanks for the explanation. As you mentioned, Its related to the DNS only.

I found the issue and fixed it.

I gave like for your reply.
Leo0601
Enthusiast
Posts: 88
Liked: 8 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by Leo0601 »

@jhoughes

I am sorry for the wrong code.

Below is my code. I found the issue and fixed it.

Code: Select all

Add-VBRvCenter -Name "Veeam.Veeam12.VMware.net" -User "administrator@vsphere.local" -Password "Welcome@123" -Force
Thanks much for the quick response.
tyler.jurgens
Veeam Legend
Posts: 406
Liked: 231 times
Joined: Apr 11, 2023 1:18 pm
Full Name: Tyler Jurgens
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by tyler.jurgens » 5 people like this post

Leo0601 wrote: Nov 28, 2024 10:13 pm There is no problem with the FQDN.
I think we're going to need to agree to disagree on that one. You should never be using a FQDN for a valid TLD that you do not own. No good can ever come from it.
Tyler Jurgens
Veeam Legend x3 | vExpert ** | VMCE | VCP 2020 | Tanzu Vanguard | VUG Canada Leader | VMUG Calgary Leader
Blog: https://explosive.cloud
Twitter: @Tyler_Jurgens BlueSky: @explosive.cloud
mjr.epicfail
Veeam Legend
Posts: 377
Liked: 113 times
Joined: Apr 22, 2022 12:14 pm
Full Name: Danny de Heer
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by mjr.epicfail » 2 people like this post

I was operating under the notion that these were replacement items (masking the real fqdn and user and pass).
But if it isn't, then yes, DO NOT USE INVALID FQDN's.
VMCE / Veeam Legend 2*
Leo0601
Enthusiast
Posts: 88
Liked: 8 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by Leo0601 »

Hi Experts,

As you guys mentioned, it was a DNS issue.

That was a miss from our end. Which we havent added FDQN in the windows host file earlier (C:\Windows\System32\drivers\etc)

After I added, everything was working as expected.

Regards
Leo.
Andreas Neufert
VP, Product Management
Posts: 7076
Liked: 1510 times
Joined: May 04, 2011 8:36 am
Full Name: Andreas Neufert
Location: Germany
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by Andreas Neufert » 3 people like this post

Please allow me to add some comments here.
DNS is key to operate the solution correctly. In case of VMware servers the following need to be set correctly (in DNS service that you use or on the hosts file).

1) Set Host and domain name correctly in the vcenter appliance. Do NOT use another DNS name to connect to the vcenter, instead use the configured one and ensure that DNS resolve this address. Otherwise you will have all kind of trouble down the road with certificates and SSO.
2) Even when the hosts where added by IP address to the vcenter, you need to configure the hostname and domain name for each host correctly and ensure that DNS can resolve this address. This is key as even if you add the hosts by IP to the vcenter, many APIs ignore this and ask for the FQDN as configured in the hosts. Pass through authentication and so on depend on it. Of cause we have done workarounds but in general processing is faster if DNS is configured correctly. As well many VMware services depend on DNS.

In total the hosts and vcenter FQDN names need to be resolved on the following servers:
vcenter
hosts
Veeam Backup Server
Veeam Console Computer (if you install the console separately)
Veeam Proxy Server (if you use additional ones)

It does not matter for Veeam if it is set in local hosts file or in the DNS server system itself. As well Veeam does not care if you misuse a public DNS record internally, as long as all DNS lookups from the Veeam system points to the right server. That said, the internal certificate trust chain would be a bit harder to maintain with this and you could run into issue when the DNS is not configured correctly on systems that log into vcenter for management. For security reasons I would not configure it in a way that the certificate would have to be accepted as trusted whenever someone logs into vcenter. Configure it correctly please.

Ensure as well that reverse lookup points as well to the right FQDNs !!!
HiHoItsOffToWorkWeGo
Enthusiast
Posts: 48
Liked: 2 times
Joined: Jan 20, 2021 1:06 pm
Full Name: Mark Fellensiek
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by HiHoItsOffToWorkWeGo »

As there was no support case ID provided with the original question I was surprised that any assistance was provided at all.
username because using Nutanix Mine with Veeam
mjr.epicfail
Veeam Legend
Posts: 377
Liked: 113 times
Joined: Apr 22, 2022 12:14 pm
Full Name: Danny de Heer
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by mjr.epicfail »

I'm not working for Veeam so I don't have this requirement ;-)
VMCE / Veeam Legend 2*
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests