-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deployment through ARM Template Fails: The specified argument 'NewDomain' was not recognized #127
Comments
If you run this with Server2012R2 does it work? |
Also for reference, here's what my DSC resource for my first domain looks like: { |
And here is my actual DSC file: configuration CreateFirstDC
} |
I got a different but similar error when I changed the SKU to 2012-R2-Datacenter. Going to take a look at the other two things you posted this weekend and see if I can figure out what I am doing wrong. |
Also, where are you getting the typeHandlerVersion of 2.9 from? When I look here: https://blogs.msdn.microsoft.com/powershell/2014/11/20/release-history-for-the-azure-dsc-extension/ the highest one listed is 2.20. Two separate things? |
Oh thanks for the catch, I think that's a typo. It's meant to be 2.19 but I'll update to 2.20. It's funny that that still works. Let me know where you get with this - I am struggling getting another DSC extension to work for adding a second domain controller to the domain. |
I messed around with this some more this morning and here is what I know. My DSC Configuration is exactly like yours. If I use extension 2.19 or 2.20 with Server 2016 and xADDomain version 2.14 or 2.13 I get the error referenced in the original post. If I try it with extension 2.19 or 2.20 with Server 2012 and xADDomain version 2.14 or 2.13 I get a different error (forgot to write it down and I don't remember). All the windows features get installed and the DNS on the NIC gets set to 127.0.0.1 The only thing that fails is the DC Promo. I am trying to use th domain name "Valhalla.com". That's the only thing I can think to change that I haven't done yet. Any other ideas? |
Your LCM settings are the same as mine and the actual dependencies are all the same? I had an issue with DC promo initially but I was using the xADWaitfordomain resource and that was failing - turned out I didn't need it. |
Yes. I re-ordered everything so it was in the same order as yours. I also had the xADWaitForDomain resource and got rid of it after seeing your Configuration. I will double check everything tonight and post it on here so you can take a look and see if I am missing something obvious since I've been staring at it so long. |
I attempted to deploy your DSC Configuration this morning, and I received the exact same error message I was getting with mine. So, I am not sure what you are doing to get yours to work. Ideas? |
My config from my GitHub? The only issue with that would be the way my
passwords are stored - in the parameters file you'll see that they are
referenced from a key vault that only I have access to, so you'd have to
edit that to use something else before deployment would work, but otherwise
it should. At least the master branch should; the other branches I'm using
to figure out adding another domain controller. I'm not really able to
look much at it though this weekend since I'm away and only have my phone.
Let me know if you need some help figuring out what to change to get my
stuff to deploy for you though and I'll try to check it out.
…On Fri, Nov 25, 2016, 12:09 PM Jacob Benson ***@***.***> wrote:
I attempted to deploy your DSC Configuration this morning, and I received
the exact same error message I was getting with mine. So, I am not sure
what you are doing to get yours to work. Ideas?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#127 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKLijZCq6taqUfF6lPeNLJAFBwNLejrHks5rByRjgaJpZM4K7L17>
.
|
Update: The domain did get built (the server shows up as a DC in AD) and I can login to the server using the domain\username that I specified in the ARM template. Server Manager doesn't think so, but I think that's a known thing that the GUI does when building a domain through DSC (please correct me if I am wrong). When I try to go through the "promote this server to a domain controller task' it comes back and says that it's already a DC. The error is non-terminating, which is nice, but I think it's clear at this point that something is broken somewhere. Relevant Event Logs: Job {E9BB262B-B323-11E6-A941-000D3A927748} : Message ID: Test.VerifyDcPromoCore.DCPromo.General.77,Microsoft.DirectoryServices.Deployment.PowerShell.Commands.InstallADDSForestCommand |
So in server manager it looks like it still needs you to promote the domain controller? I don't see that when deploying from my master template, but it's been like a week since I've used it so maybe something changed? I recently had to change the Ethernet adapter name because the alias changed from Ethernet to Ethernet 2 and I'm not sure why, but other than that everything's been solid. |
After much testing, I can definitively say that this is an issue only with the 2016-Datacenter SKU (both versions). It works fine with all 2012-R2-Datacenter SKUs. I tested both DSC extension version 2.19 and 2.20 |
Nice, well I am glad you got it working. Did you happen to figure out anything about how credentials are handled when they're pushed to a DSC config? I don't think the DSC config is actually using any credentials at all when standing up that first domain controller; I think it's using the first user's (local admin) account. The reason I think this is because now that I am working on adding a second domain controller, and wanting to use credentials to do so, I can't get the DSC config to work, except in the case that I use this in my DSC config: "configurationArguments": { Notice here I am not using any protected settings, and indeed if I replace that Pa$$w0rd with: "settings": { This fails every time, saying that the domain cannot be found. It does a domain check when you're adding a second domain controller to a domain, and for that it needs domain credentials. The first DC doesn't need domain credentials, since the domain doesn't exist yet. Do you have any ideas about this? I have been asking these kinds of questions for weeks around here and powershell.org but I haven't seen anything too helpful, and when I look at other people's examples, those supposedly work doing the same thing I am doing. |
Oh hey, it looks like there is a version 2.21 that we can use.. but I am not sure what difference the publisher of the extension makes. For instance, logged in with my Azure account added to powershell, I can run a Get-AzureVMAvailableExtension - which returns a lot of stuff. If we save that as like, $extensions, then $extensions.ExtensionName will show us there are several DSC extensions available. If we save that as a variable, so like "$dsc = $extensions | Where-Object -Property ExtensionName -EQ 'DSC' " then we can get all the versions available by using: $dsc.version - that returns six values: 2.20 We can save that as a variable too, to get the publisher of those extensions that are version 2.21 - Then $latest.publisher returns: And I am not sure what those are. Either way, I don't think it's going to help me. |
I got a second server to join my domain via ARM/DSC. If you want to continue this conversation hit me up on twitter @vhusker |
Hey I sent you a message there, but I also have a thread open on Powershell.org if you want to check it out - https://powershell.org/forums/topic/dsc-azure-templates-and-key-vaults/#post-59218 |
@vhusker This guy is using typehandlerversion 2.8 - https://blog.kloud.com.au/2016/01/11/easy-debugging-of-powershell-dsc-for-azure-virtual-machines/ |
Also, this is still applicable - https://blogs.msdn.microsoft.com/powershell/2014/11/20/release-history-for-the-azure-dsc-extension/ |
@vhusker @oradcliffe This may be the same issue as #73 (the original error message looks similar). |
Nice. That does look to be the same issue (with a much more technical explanation). I will try out my ARM template with Server 2016 and this version of the AD extension and let you know in the next couple of days. |
Tried my template just now with a Server 2016 DC and module version 2.16.0.0. The domain creation completed successfully, but every DSC Configuration for each of the 4 other servers all failed with the same error message: However, each of those servers joined the domain, and completed the rest of their DSC Configuration (firewall rules were set, IP addresses were assigned, etc). |
Just tested my ARM template with a 2012R2 DC, everything completed fine with no errors. |
@kwirkykat Thanks! I will give it a shot with 2016 and the new module version as soon as I can and update here. |
@vhusker Maybe xWaitForADDomain just needs to be able to retry more/longer? So far my experience with Active Directory on Server 2016 is that it seems to take a lot longer for everything to complete |
Interesting. I can test this some more I suppose. In the DSC Configs I have RetryCount=20 and RetryIntervalSec=30. |
I have the same issue as provided above. Did the test while increasing retryintervalsec to 60, but this doesn't change anything, still having the same issue: Error message xActivedirectory version: 2.16
|
@MathijsHofkens I think this is the same problem I was having, and it seemed to be a credential issue that I never resolved. Can you post your code? One way I was confirming that it was a credential issue was using a custom DSC resource:
You may need to modify that, but could you try that and see if that points you towards a cred issue as well? PS sorry about the formatting - I am terrible at this. |
I'm closing this as the initial issue was solved in PR #137 |
I am deploying a VM through an ARM Template using the DSC Extension. I am using the xADDomain resource to build the domain. When doing so the domain is built (and I can login as a domain user), but the deployment throws an error at the end and Server Manager still thinks that I need to promote the server to a DC. Server OS is 2016. xActiveDirectory Module Version is 2.14.0.0.
PSVersionTable:
Deployment Failure from Azure Portal:
Event Log Error:
DSC Extension in the ARM Template. Should also mention here that when I tried to use a parameter of type string for the domain name, it was failing to pass through to DSC and was throwing an error that the domain name was in an invalid format.:
DSC Configuration:
The text was updated successfully, but these errors were encountered: