Skip to content

Commit 125b88e

Browse files
authored
Merge pull request #178779 from dagiro/Freshness10
Freshness10 - Troubleshoot issues with artifacts
2 parents 58b785c + 36e20b1 commit 125b88e

File tree

1 file changed

+26
-16
lines changed

1 file changed

+26
-16
lines changed

articles/devtest-labs/devtest-lab-troubleshoot-apply-artifacts.md

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
---
2-
title: Troubleshoot issues with artifacts
2+
title: Troubleshooting issues with artifacts
33
description: Learn how to troubleshoot issues that occur when applying artifacts in an Azure DevTest Labs virtual machine.
4-
ms.topic: how-to
5-
ms.date: 06/26/2020
4+
ms.topic: troubleshooting
5+
ms.date: 11/04/2021
66
ms.custom: devx-track-azurepowershell
77
---
88

99
# Troubleshoot issues when applying artifacts in an Azure DevTest Labs virtual machine
10+
1011
Applying artifacts on a virtual machine can fail for various reasons. This article guides you through some of the methods to help identify possible causes.
1112

12-
If you need more help at any point in this article, you can contact the Azure DevTest Labs (DTL) experts on the [MSDN Azure and Stack Overflow forums](https://azure.microsoft.com/support/forums/). Alternatively, you can file an Azure support incident. Go to the [Azure support site](https://azure.microsoft.com/support/options/) and select Get Support.
13+
If you need more help at any point in this article, you can contact the Azure DevTest Labs (DTL) experts on the [MSDN Azure and Stack Overflow forums](https://azure.microsoft.com/support/forums/). You can also file an Azure support incident. Go to the [Azure support site](https://azure.microsoft.com/support/options/) and select Get Support.
1314

1415
> [!NOTE]
1516
> This article applies to both Windows and non-Windows virtual machines. While there are some differences, they will be called out explicitly in this article.
@@ -50,18 +51,20 @@ An artifact appears to stop responding until a pre-defined timeout period expire
5051

5152
When an artifact appears to stop responding, first determine where it's stuck. An artifact can be blocked at any of the following steps during execution:
5253

53-
- **During the initial request**. DevTest Labs creates an Azure Resource Manager template to request the use of the Custom Script Extension (CSE). Therefore, behind the scenes, a resource group deployment is triggered. When an error at this level happens, you get details in the **Activity Logs** of the resource group for the VM in question.
54+
- **During the initial request**. DevTest Labs creates an Azure Resource Manager template to request the use of the Custom Script Extension (CSE). Behind the scenes, a resource group deployment is triggered. When an error at this level happens, you get details in the **Activity Logs** of the resource group for the VM in question.
5455
- You can access the activity log from the lab VM page navigation bar. When you select it, you see an entry for either **applying artifacts to virtual machine** (if the apply artifacts operation was triggered directly) or **Add or modify virtual machines** (if the applying artifacts operation was part of the VM creation process).
55-
- Look for errors under these entries. Sometimes, the error won't be tagged accordingly, and you'll have to investigate each entry.
56+
- Look for errors under these entries. Sometimes, the error won't be tagged, so you'll have to investigate each entry.
5657
- When investigating the details of each entry, make sure to review the contents of the JSON payload. You may see an error at the bottom of that document.
58+
5759
- **When trying to execute the artifact**. It could be because of networking or storage issues. See the respective section later in this article for details. It can also happen because of the way the script is authored. For example:
5860
- A PowerShell script has **mandatory parameters**, but one fails to pass a value to it, either because you allow the user to leave it blank, or because you don’t have a default value for the property in the artifactfile.json definition file. The script will stop responding because it's awaiting user input.
5961
- A PowerShell script **requires user input** as part of execution. Scripts must be written to work silently without requiring any user intervention.
60-
- **VM Agent takes long to be ready**. When the VM is first started, or when the custom script extension is first installed to serve the request to apply artifacts, the VM may require either upgrading the VM Agent or wait for the VM Agent to initialize. There may be services on which the VM Agent depends that are taking a long time to initialize. In such cases, see [Azure Virtual Machine Agent overview](../virtual-machines/extensions/agent-windows.md) for further troubleshooting.
62+
63+
- **VM Agent takes long to be ready**. When the VM first starts, or when the custom script extension first installs to serve the request to apply artifacts, the VM may require either upgrading the VM Agent or wait for the VM Agent to initialize. There may be services on which the VM Agent depends that are taking a long time to initialize. In such cases, see [Azure Virtual Machine Agent overview](../virtual-machines/extensions/agent-windows.md) for further troubleshooting.
6164

6265
### To verify if the artifact appears to stop responding because of the script
6366

64-
1. Log in to the virtual machine in question.
67+
1. Sign in to the virtual machine in question.
6568
2. Copy the script locally in the virtual machine or locate it on the virtual machine under `C:\Packages\Plugins\Microsoft.Compute.CustomScriptExtension\<version>`. It's the location where the artifact scripts are downloaded.
6669
3. Using an elevated command prompt, execute the script locally, providing the same parameter values used to cause the issue.
6770
4. Determine if the script suffers from any unwanted behavior. If so, either request an update to the artifact (if it is from the public repo); or, make the corrections yourself (if it is from your private repo).
@@ -72,10 +75,10 @@ When an artifact appears to stop responding, first determine where it's stuck. A
7275
> For information about writing your own artifacts, see [AUTHORING.md](https://github.com/Azure/azure-devtestlab/blob/master/Artifacts/AUTHORING.md) document.
7376
7477
### To verify if the artifact appears to stop responding because of the VM Agent:
75-
1. Log in to the virtual machine in question.
78+
1. Sign in to the virtual machine in question.
7679
2. Using File Explorer navigate to **C:\WindowsAzure\logs**.
7780
3. Locate and open file **WaAppAgent.log**.
78-
4. Look for entries that show when the VM Agent starts and when it is finishing initialization (that is, the first heartbeat is sent). Favor newer entries or specifically the ones around the time period for which you experience the issue.
81+
4. Look for entries that show when the VM Agent starts and when it's finishing initialization: the first sent heartbeat. Favor newer entries or specifically the ones around the time period for which you experience the issue.
7982

8083
```
8184
[00000006] [11/14/2019 05:52:13.44] [INFO] WindowsAzureGuestAgent starting. Version 2.7.41491.949
@@ -86,15 +89,15 @@ When an artifact appears to stop responding, first determine where it's stuck. A
8689
[00000006] [11/14/2019 06:02:33.43] [INFO] StateExecutor initialization completed.
8790
[00000020] [11/14/2019 06:02:33.43] [HEART] WindowsAzureGuestAgent Heartbeat.
8891
```
89-
In this example, you can see that the VM Agent start time took 10 minutes and 20 seconds because a heartbeat was sent. The cause in this case was the OOBE service taking a long time to start.
92+
In this example, the VM Agent start time took 10 minutes and 20 seconds because a heartbeat was sent. The cause in this case was the OOBE service taking a long time to start.
9093
9194
> [!TIP]
9295
> For general information about Azure extensions, see [Azure virtual machine extensions and features](../virtual-machines/extensions/overview.md).
9396
9497
## Storage errors
9598
DevTest Labs requires access to the lab’s storage account that is created to cache artifacts. When DevTest Labs applies an artifact, it will read the artifact configuration and its files from the configured repositories. By default, DevTest Labs configures access to the **public artifact repo**.
9699
97-
Depending on how a VM is configured, it may not have direct access to this repo. Therefore, by design, DevTest Labs caches the artifacts in a storage account that's created when the lab is first initialized.
100+
Depending on how a VM is configured, it may not have direct access to this repo. By design, DevTest Labs caches the artifacts in a storage account that's created when the lab first initializes.
98101
99102
If access to this storage account is blocked in any way, as when traffic is blocked from the VM to the Azure Storage service, you may see an error similar to the following one:
100103
@@ -106,7 +109,8 @@ The above error would appear in the **Deployment Message** section in the **Arti
106109

107110
### To ensure communication to the Azure Storage service isn't being blocked:
108111

109-
- **Check for added network security groups (NSG)**. It may be that a subscription policy was added where NSGs are automatically configured in all virtual networks. It would also affect the lab’s default virtual network, if used, or other virtual network configured in your lab, used for the creation of VMs.
112+
- **Check for added network security groups (NSG)**. It may be that a subscription policy was added where NSGs are automatically configured in all virtual networks. It would also affect the lab's default virtual network, if used, or other virtual network configured in your lab, used for the creation of VMs.
113+
110114
- **Check the default lab’s storage account** (that is, the first storage account created when the lab was created, whose name usually starts with the letter “a” and ends with a multi-digit number that is, a\<labname\>#).
111115
1. Navigate to the lab’s resource group.
112116
2. Locate the resource of type **storage account**, whose name matches the convention.
@@ -119,9 +123,15 @@ For more in-depth troubleshooting, see [Configure Azure Storage firewalls and vi
119123
> **Verify network security group rules**. Use [IP flow verify](../network-watcher/diagnose-vm-network-traffic-filtering-problem.md#use-ip-flow-verify) to confirm that a rule in a network security group is blocking traffic to or from a virtual machine. You can also review effective security group rules to ensure inbound **Allow** NSG rule exists. For more information, see [Using effective security rules to troubleshoot VM traffic flow](../virtual-network/diagnose-network-traffic-filter-problem.md).
120124
121125
## Other sources of error
122-
There are other less frequent possible sources of error. Make sure to evaluate each to see if it applies to your case. Here is one of them:
126+
There are other infrequent possible sources of error. Make sure to evaluate each to see if it applies to your case. Here's one of them:
123127

124-
- **Expired personal access token for the private repo**. When expired, the artifact wont get listed and any scripts that refer to artifacts from a repository with an expired private access token will fail accordingly.
128+
- **Expired personal access token for the private repo**. When expired, the artifact won't get listed and any scripts that refer to artifacts from the repository will fail.
125129

126130
## Next steps
127-
If none of these errors occurred and you still can’t apply artifacts, you can file an Azure support incident. Go to the [Azure support site](https://azure.microsoft.com/support/options/) and select **Get Support**.
131+
132+
If you don't see your problem here or you can't resolve your issue, try one of the following channels for support:
133+
134+
* Get answers from Azure experts through [Azure Forums](https://azure.microsoft.com/support/forums/).
135+
* Connect with [@AzureSupport](https://twitter.com/azuresupport), the official Microsoft Azure account for improving customer experience. Azure Support connects the Azure community to answers, support, and experts.
136+
* File an Azure support incident. Go to the [Azure support site](https://azure.microsoft.com/support/options/), and select **Get Support**.
137+

0 commit comments

Comments
 (0)