Azure / aksArc

# Welcome to the Azure Kubernetes Service on Azure Stack HCI repo This is where the AKS-HCI team will track features and issues with AKS-HCI. We will monitor this repo in order to engage with our community and discuss questions, customer scenarios, or feature requests. Checkout our projects tab to see the roadmap for AKS-HCI!
MIT License
109 stars 45 forks source link

[BUG] Deploy the VM with PowerShell section fails when deploying the "Deploy ARM Template" with error:- Error message: "The DSC Extension failed to execute: Error unpacking 'akshcihost.zip'; verify this is a valid ZIP package." #275

Open KRISHNA-VKS opened 1 year ago

KRISHNA-VKS commented 1 year ago

Describe the bug [BUG] Deploy the VM with PowerShell section fails when deploying the "Deploy ARM Template" with error:- Error message: "The DSC Extension failed to execute: Error unpacking 'akshcihost.zip'; verify this is a valid ZIP package."

To Reproduce Steps to reproduce the behavior:

  1. Windows VM with OS Windows server 2022 running inside Azure. Go to 'https://learn.microsoft.com/en-us/azure/aks/hybrid/aks-hci-evaluation-guide-1'
  2. select the approach to deploy "Option 2 - Create the VM with PowerShell"
  3. The URL (https://raw.githubusercontent.com/Azure/aks-hci/october_eval/eval/json/akshcihost.json) is incorrect its moved to (https://raw.githubusercontent.com/Azure/aks-hci/eval/json/akshcihost.json). Need to Update the documentation.
  4. Execute the step "New-AzResourceGroupDeployment -ResourceGroupName $rgName -Name $deploymentName -TemplateUri "https://raw.githubusercontent.com/Azure/aks-hci/eval/json/akshcihost.json" -virtualMachineName $vmName -virtualMachineSize $vmSize -virtualMachineGeneration $vmGeneration -domainName $domainName -dataDiskType $dataDiskType -dataDiskSize $dataDiskSize -adminUsername $adminUsername -adminPassword $adminPassword -enableDHCP $enableDHCP -customRdpPort $customRdpPort -autoShutdownStatus $autoShutdownStatus -autoShutdownTime $autoShutdownTime -autoShutdownTimeZone $autoShutdownTimeZone -alreadyHaveAWindowsServerLicense $existingWindowsServerLicense -Verbose"
  5. See error New-AzResourceGroupDeployment : 4:17:21 PM - The deployment 'AksHciDeploy_11-25-150025' failed with error(s). Showing 1 out of 1 error(s). Status Message: VM has reported a failure when processing extension 'ConfigureAksHciHost'. Error message: "The DSC Extension failed to execute: Error unpacking 'akshcihost.zip'; verify this is a valid ZIP package. Error details: Exception calling ".ctor" with "3" argument(s): "End of Central Directory record could not be found.". More information about the failure can be found in the logs located under 'C:\WindowsAzure\Logs\Plugins\Microsoft.Powershell.DSC\2.83.2.0' on the VM." More information on troubleshooting is available at https://aka.ms/VMExtensionDSCWindowsTroubleshoot (Code:VMExtensionProvisioningError) CorrelationId: dbbf1cc9-5c4c-481f-b01d-7159e55c31b5 At line:1 char:1
    • New-AzResourceGroupDeployment -ResourceGroupName $rgName -Name $deplo ...
    • CategoryInfo : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
    • FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDep loymentCmdlet

Extensive logs indicate:- "message": "[2022-11-27 12:39:16Z] Extension request for sequence number 0 attempting to create lock.0 mutex\r\n[2022-11-27 12:39:16Z] Attempting to grab mutex DscExtensionHandler_Lock for sequence number 0\r\n[2022-11-27 12:39:16Z] Acquired lock for extension instance for sequence number 0\r\n[2022-11-27 12:39:16Z] Attempting to acquire extension lock\r\n[2022-11-27 12:39:16Z] Attempting to grab mutex DscExtensionHandler_Lock\r\n[2022-11-27 12:39:16Z] Acquired lock for extension\r\n[2022-11-27 12:39:16Z] lock does not exist: begin processing\r\n[2022-11-27 12:39:16Z] Starting DSC Extension ...\r\n[2022-11-27 12:39:16Z] Getting handler execution status HKLM:\SOFTWARE\Microsoft\Azure\DSC\2.83.2.0\Status ...\r\n[2022-11-27 12:39:17Z] Loading VM agent telemetry assemblies ...\r\n[2022-11-27 12:39:17Z] [ERROR] while enabling MDS telemetry... [MDS Telemetry] C:\WindowsAzure\GuestAgent_2.7.41491.1071_2022-11-25_102523\WindowsAzureEventSource.dll does not exist ...\r\n[2022-11-27 12:39:17Z] [ERROR] Error unpacking 'akshcihost.zip'; verify this is a valid ZIP package.\nError details: Exception calling \".ctor\" with \"3\" argument(s): \"End of Central Directory record could not be found.\"\r\n[2022-11-27 12:39:17Z] {\r\n \"Exception\": {\r\n \"Message\": \"Error unpacking \u0027akshcihost.zip\u0027; verify this is a valid ZIP package.\nError details: Exception calling \\".ctor\\" with \\"3\\" argument(s): \\"End of Central Directory record could not be found.\\"\",\r\n \"Data\": {\r\n \"Code\": 52\r\n },\r\n \"InnerException\": null,\r\n \"TargetSite\": null,\r\n \"StackTrace\": null,\r\n \"HelpLink\": null,\r\n \"Source\": null,\r\n \"HResult\": -2146233088\r\n },\r\n \"TargetObject\": null,\r\n \"CategoryInfo\": {\r\n \"Category\": 0,\r\n \"Activity\": \"\",\r\n \"Reason\": \"Exception\",\r\n \"TargetName\": \"\",\r\n \"TargetType\": \"\"\r\n },\r\n \"FullyQualifiedErrorId\": \"DscHandlerTerminatingError\",\r\n \"ErrorDetails\": null,\r\n \"InvocationInfo\": {\r\n \"MyCommand\": null,\r\n \"BoundParameters\": {\r\n\r\n },\r\n \"UnboundArguments\": [\r\n\r\n ],\r\n \"ScriptLineNumber\": 376,\r\n \"OffsetInLine\": 25,\r\n \"HistoryId\": -1,\r\n \"ScriptName\": \"C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.83.2.0\\bin\\DscExtensionHandler.psm1\",\r\n \"Line\": \" throw (New-HandlerTerminatingError -Code $DSC_Status.InstallError -Message $executionStatus.ErrorMessage) \r\n\",\r\n \"PositionMessage\": \"At C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.83.2.0\\bin\\DscExtensionHandler.psm1:376 char:25\r\n+ ... throw (New-HandlerTerminatingError -Code $DSC_Status.Inst ...\r\n+ ~~~~~~~~~~~~~\",\r\n \"PSScriptRoot\": \"C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.83.2.0\\bin\",\r\n \"PSCommandPath\": \"C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.83.2.0\\bin\\DscExtensionHandler.psm1\",\r\n \"InvocationName\": \"\",\r\n \"PipelineLength\": 0,\r\n \"PipelinePosition\": 0,\r\n \"ExpectingInput\": false,\r\n \"CommandOrigin\": 1,\r\n \"DisplayScriptPosition\": null\r\n },\r\n \"ScriptStackTrace\": \"at \u003cScriptBlock\u003e, C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.83.2.0\\bin\\DscExtensionHandler.psm1: line 376\r\nat Invoke-DscExtensionSingleInstance, C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.83.2.0\\bin\\DscExtensionHandler.psm1: line 990\r\nat Invoke-DscExtension, C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.83.2.0\\bin\\DscExtensionHandler.psm1: line 204\r\nat \u003cScriptBlock\u003e, C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.83.2.0\\bin\\enable.ps1: line 42\r\nat \u003cScriptBlock\u003e, \u003cNo file\u003e: line 1\",\r\n \"PipelineIterationInfo\": [\r\n\r\n ]\r\n}\r\n[2022-11-27 12:39:17Z] Settings handler status to 'error' (C:\Packages\Plugins\Microsoft.Powershell.DSC\2.83.2.0\Status\0.status)"

Expected behavior Expect the deployment of the ARM Template to be succeeded state.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Operating system:Windows Publisher:MicrosoftWindowsServer Offer:WindowsServer Plan:2022-datacenter-g2 VM generation:V2 VM architecture:x64

Additional context Add any other context about the problem here.

Collect log files

Alternatives tried:-

unlocked the file permissions. Again tried execution, failed again. Created a new zip out of https://github.com/Azure/aks-hybrid/tree/main/eval/dsc using the Windows Send to Zip option, tried again- failed.