I have created an CNAME alias record (PublicShare) for one of our servers (KWT-SRV01) in Windows Server DNS. Unfortunately i am unable to use it in powershell "-path" attribute. For example,
this works just fine
New-vm -ComputerName KUW-SRV04 -MemoryStartupBytes 1GB -NoVHD -Generation 2 -Name TEST123 -Path "\\KWT-SRV01\Test\"
but when using the Alias name, i get the following error
New-vm -ComputerName KUW-SRV04 -MemoryStartupBytes 1GB -NoVHD -Generation 2 -Name TEST123 -Path "\\Publicshare\Test\"
New-VM : Failed to create a new virtual machine.
What am i missing?
Note:
I am issuing the above commands from another separate server (KWT-SRV05)
Please look here for Option 2 https://docs.microsoft.com/en-us/archive/blogs/josebda/multiple-names-for-one-computer-consolidate-your-smb-file-servers-without-breaking-unc-paths
The problem is that client, when using Kerberos Auth (by default for domain shares) checks server for its name to avoid authenticating to wrong/fake server, and server responds with different name, because server does not know about alternative names.
After you apply secondary name:
Actually this explanation is completely incorrect technically, but in fact this is better to understand like that, instead of deep diving into Kerberos.