-
Notifications
You must be signed in to change notification settings - Fork 603
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
Issue with creating image when other artifacts have been used #251
Comments
This is a real blocker now. Our ImageFactory is no longer working. |
Hi Greg - Is this likely to be fixed by the PR you recently submitted? |
No - I'm trying to resolve it, and only have a nasty hack at the moment. |
I am totally blocked by this now. When I try to apply the sysprep artifact, I get the following error: Multiple VMExtensions per handler not supported for OS type 'Windows'. VMExtension 'customScriptArtifact-183362431' with handler 'Microsoft.Compute.CustomScriptExtension' already added or specified in input. |
Hi Greg- I am working on a repro for your issue right now, as far as your initial question you should be able to get the name from within the virtual machine. |
Thanks - I'll try to run through my scenario. I think the issue is due to the fact I'm using the Azure File Copy task in VSTS. This task enables WinRm automatically and it achieves that through a custom script extension. Logs from VSTS
I also think the sysprep task uses the WinRMCustomScriptExtension, so when it tries to apply, it fails. I am using Windows 2016. I am applying the sysprep artifact through powershell |
I will reach out to the team that owns the Azure File Copy task and talk to them about cleaning up their custom script extension after it has completed running. You can try running the powershell command that removes the custom script extension from the machine. It would look something like this |
We will be closing this issue. Please reopen if you are still seeing this error. |
I am still seeing this error. |
Let me re-open the issue. We'll investigate further. |
@adstep, can you please provide steps to repro? We sysprep from Azure Portal. Are you using scripts to do this? If so, can you please share so we can troubleshoot further? |
@adstep, closing this issue due to inactivity. If you wish to re-open the issue, please do so and provide the required steps to reproduce. |
I am deploying a VM with a number of artifacts. I am then trying to create an image of the VM. When I do that, another artifact is attempted to run which syspreps the VM. That artifact fails with the error:
I have read up on this and found the following workaround:
https://blogs.technet.microsoft.com/meamcs/2016/01/30/run-two-powershell-scripts-on-a-same-vm-through-custom-script-extension-at-different-stage-of-deployment-in-arm/
This article suggests that I run the following command:
This is fine and I can work this into my workflow, but my question is:
How do I know what the $customscriptname parameter should be to pass into the command above?
I am using this in the context of the ImageFactory, so it's not just a case of manually looking up the extension that was used and then removing it. It needs to be automatable. In this case, the only extension applied to the VM is named: WinRMCustomScriptExtension
The text was updated successfully, but these errors were encountered: