-
Notifications
You must be signed in to change notification settings - Fork 50
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
When creating a win2k8-r2 VM from the .kitchen.yml shown in the README, the vm never converges #14
Comments
👍 I see this with
|
I just tried this out myself and looks like the agent process that executes the PowerShell script doesn't have enough rights to do what it needs to configure WinRM, where a similar script does seem to on Win2012R2.
I confirmed the script was sent to the machine correctly:
I believe this to be expected as the waagent executes the script as the SYSTEM account rather than an account with an Administrative token. I'm guessing one sort of fix is to pass in the default credentials for the specified admin user and use Start-Process to start another powershell.exe process with the configuration script supplied... @andrewelizondo Any other ideas? How did you get this working for your customer as the waagent? |
I have a fix for this close to being pushed up today, stand by for testing @ricardolupo @binamov @andrewelizondo |
Just to update this thread, I tried a number of ways including setting up a scheduled task and running an elevated PowerShell session and neither of these ways worked on Windows 2008 R2. Back to the drawing board. I have a branch here if anyone can think of a workaround using the same approach: https://github.com/pendrica/kitchen-azurerm/tree/psh-execution-as-admin Otherwise it looks like we would have to do some KeyVault trickery with the driver to get things working correctly with Windows 2008. |
Hi, I've replaced few lines between line 297 and 313 and its working for me, currently when I provision a windows box the ps1 script works fine. I replaced version 1.4 with 1.7 and added to the settings section the name and the url of the PS1 script. ideally this would be arguments. def custom_script_extension_template(command) |
This is a great script, we should look at integrating it into the driver so there are no external dependencies on it. Can you let me know the source of this script so I can provide proper attribution? |
sure! its added already to the original post ;-) |
@msghaleb Sorry I meant the source of the .ps1 script - it looks like it is from here: https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 and is under a GPLv3 license. |
@sturartperston ah ok :-) yes you are right this is ansible script. but best would be if you can add 2 more paramerts so that the user can overwrite it with the default values of the once above. What do you think? I assume some other tools may need different scripts so you can give the user the choice. If he didn't supply anything will failover to this script. Again great work! |
This has been fixed by #44 - Windows 2008 converges are now possible! This will be available from Release 0.8.0 onwards. |
The text was updated successfully, but these errors were encountered: