[JIRA] (JENKINS-59522) Takes long time to deploy custom extentions only for windows 10 custome managed image

0 views
Skip to first unread message

faizi62@hotmail.com (JIRA)

unread,
Sep 25, 2019, 4:06:03 AM9/25/19
to jenkinsc...@googlegroups.com
Muhammad Faizan ul haq created an issue
 
Jenkins / Bug JENKINS-59522
Takes long time to deploy custom extentions only for windows 10 custome managed image
Issue Type: Bug Bug
Assignee: Azure DevOps
Components: azure-vm-agents-plugin
Created: 2019-09-25 08:05
Environment: Jenkins 2.176.1
Azure vm plugin 1.2.1 and 1.2.2
Priority: Critical Critical
Reporter: Muhammad Faizan ul haq

Hi,

We are using Custom Managed image based on Windows 10 RS5 for one of our cloud configuration. 

It was working fine but since last week it has started to show us the problems. 

Sometimes it takes more than 25 minutes to spin up one agent while all other agents (which are Windows server, windows server core or ubuntu16 custom manged images) come up in 2 to 4 minutes. 

I have created new Windows 10 RS3 and Rs5 images but  nothing seems to help. It still takes 15/17 minutes to spin up an agent. When I see at "deployments" progress in Azure, It is obvious that the most time is taken while installing the "custom extentions" The VM is created in 3 minutes and can be logged in to, but the deployment of custom extentions takes 10 or more minutes. What could be the possible reason  ?

I tried with version 1.1.1 too but with no apparant success. Any clues ?

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

faizi62@hotmail.com (JIRA)

unread,
Sep 25, 2019, 5:42:03 AM9/25/19
to jenkinsc...@googlegroups.com
Muhammad Faizan ul haq commented on Bug JENKINS-59522
 
Re: Takes long time to deploy custom extentions only for windows 10 custome managed image

If the Custom Managed Image has "windows test mode" enabled, the deployment takes 25 minutes and then fails with an error: 

{ "status": "Canceled", "error": { "code": "ResourceDeploymentFailure", "message": "The resource operation completed with terminal provisioning state 'Canceled'.", "details": [

{ "code": "OperationPreempted", "message": "The operation has been preempted by a more recent operation." }

] } }

faizi62@hotmail.com (JIRA)

unread,
Sep 25, 2019, 8:50:03 AM9/25/19
to jenkinsc...@googlegroups.com

I created a fresh image using packer, using the following code: 

{
"builders": [{
"type": "azure-arm",

"client_id": "",
"client_secret": "",
"tenant_id": "",
"subscription_id": "",

"managed_image_resource_group_name": "",
"managed_image_name": "",
"os_type": "Windows",
"image_publisher": "MicrosoftWindowsDesktop",
"image_offer": "Windows-10",
"image_sku": "RS5-PRO",
"communicator": "winrm",
"winrm_use_ssl": true,
"winrm_insecure": true,
"winrm_timeout": "5m",
"winrm_username": "packer",
"azure_tags":

{ "dept": "", "task": "" }

,
"location": "North Europe",
"vm_size": "Standard_DS2_v2"
}],
"provisioners": [

{ "type": "powershell", "inline": [ "Set-Service RdAgent -StartupType Disabled", "Set-Service WindowsAzureTelemetryService -StartupType Disabled", "Set-Service WindowsAzureGuestAgent -StartupType Disabled", "remove-itemproperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\SysPrepExternal\\Generalize' -Name '*'", "if( Test-Path $Env:SystemRoot\\windows\\system32\\Sysprep\\unattend.xml )\{ rm $Env:SystemRoot\\windows\\system32\\Sysprep\\unattend.xml -Force}

",
"& $env:SystemRoot\\System32\\Sysprep
Sysprep.exe /oobe /generalize /quiet /quit",
"while($true) { $imageState = Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup
State | Select ImageState; if($imageState.ImageState -ne 'IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE')

{ Write-Output $imageState.ImageState; Start-Sleep -s 10 }

else { break } }"
]

}]
}
~

and it took 9 minutes for deployment. Kindly suggest if we are doing something wrong. this is only for windows-10 Desktop

nilesh@systenics.net (JIRA)

unread,
Nov 7, 2019, 7:08:02 AM11/7/19
to jenkinsc...@googlegroups.com

Even we are facing the issue when custom image is taking longer time to load in Jenkins.

faizi62@hotmail.com (JIRA)

unread,
Nov 8, 2019, 3:45:02 PM11/8/19
to jenkinsc...@googlegroups.com

I realized that only custom extension was taking longer time and the thing that is done in "custom extension" is the installation of SSH daemon. We pre installed the image with ssh and exclude the ssh installation in cloud config. 

jieshe@microsoft.com (JIRA)

unread,
Nov 12, 2019, 4:11:02 AM11/12/19
to jenkinsc...@googlegroups.com

jieshe@microsoft.com (JIRA)

unread,
Nov 12, 2019, 4:14:02 AM11/12/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages