You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/devtest-labs/devtest-lab-troubleshoot-apply-artifacts.md
+14-18Lines changed: 14 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -55,23 +55,23 @@ An artifact can appear to stop responding until a pre-defined timeout period exp
55
55
56
56
### Inspect the Activity logs
57
57
58
-
DevTest Labs creates and deploys an Azure Resource Manager (ARM) template that requests use of the Custom Script Extension (CSE). An error at this level shows up in the **Activity logs** for the VM's resource group.
58
+
DevTest Labs creates and deploys an Azure Resource Manager (ARM) template that requests use of the Custom Script Extension (CSE). An error at this level shows up in the **Activity logs** for the subscription and for the VM's resource group.
59
59
60
-
When you access the **Activity log**, you see an entry for either **Applying artifacts to virtual machine**, if applying the artifact was triggered directly, or **Add or modify virtual machines**, if the artifact was being applied as part of the VM creation process. Look for errors under these entries. Sometimes, the error won't be tagged, so you have to investigate each entry.
60
+
If an artifact failed to install, inspect the **Activity log** entries for either **Create or Update Virtual Machine Extension**, if you applied the artifact directly, or **Create or Update Virtual Machine**, if the artifact was being applied as part of VM creation. Look for failures under these entries. Sometimes you have to expand the entry to see the failure.
61
61
62
-
When investigating the details of each entry, make sure to review the contents of the JSON payload. You might see an error at the bottom of the JSON document.
62
+
Select the failed entry to see the error details. On the failure page, select **JSON** to review the contents of the JSON payload. You can see the error at the end of the JSON document.
63
63
64
64
### Investigate the private artifact repository and lab storage account
65
65
66
-
When DevTest Labs applies an artifact, it reads the artifact configuration and files from configured repositories. By default, DevTest Labs has access to the DevTest Labs [public Artifact repository](https://github.com/Azure/azure-devtestlab/tree/master/Artifacts). You can also configure a lab to access a private repository for custom artifacts. If a custom artifact fails to install, make sure the personal access token (PAT) for the private repository hasn't expired. If the PAT is expired, the artifact won't get listed, and any scripts that refer to artifacts from that repository will fail.
66
+
When DevTest Labs applies an artifact, it reads the artifact configuration and files from connected repositories. By default, DevTest Labs has access to the DevTest Labs [public Artifact repository](https://github.com/Azure/azure-devtestlab/tree/master/Artifacts). You can also connect a lab to a private repository to access custom artifacts. If a custom artifact fails to install, make sure the personal access token (PAT) for the private repository hasn't expired. If the PAT is expired, the artifact won't be listed, and any scripts that refer to artifacts from that repository will fail.
67
67
68
68
Depending on configuration, lab VMs might not have direct access to the artifact repository. DevTest Labs caches the artifacts in a storage account that's created when the lab first initializes. If access to this storage account is blocked, such as when traffic is blocked from the VM to the Azure Storage service, you might see an error similar to this:
69
69
70
70
```shell
71
71
CSE Error: Failed to download all specified files. Exiting. Exception: Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (403) Forbidden. ---> System.Net.WebException: The remote server returned an error: (403) Forbidden.
72
72
```
73
73
74
-
This error appears in the **Deployment Message** section in the **Artifact results** page under **Manage artifacts**. The error also appears in the **Activity log** of the VM's resource group.
74
+
This error appears in the **Activity log** of the VM's resource group.
75
75
76
76
To troubleshoot connectivity issues to the Azure Storage account:
77
77
@@ -90,17 +90,15 @@ For in-depth troubleshooting, see [Configure Azure Storage firewalls and virtual
90
90
91
91
## Troubleshoot artifact failures from the lab VM
92
92
93
-
You can connect to the lab VM where the artifact failed and investigate the issue there.
93
+
You can connect to the lab VM where the artifact failed, and investigate the issue there.
94
94
95
95
### Inspect the Custom Script Extension log file
96
96
97
-
1.Sign in to the VM associated with the artifact you want to diagnose.
97
+
1.Go to *C:\\Packages\\Plugins\\Microsoft.Compute.CustomScriptExtension\\1.10.12\\Status\\*, where *1.10.12* is the Azure Custom Script Extension version number.
98
98
99
-
1. Go to *C:\\Packages\\Plugins\\Microsoft.Compute.CustomScriptExtension\\\*1.9*\\Status, where *1.9* is the Azure Custom Script Extension version number.
99
+

100
100
101
-

102
-
103
-
1. Open and inspect the *\*.status* file.
101
+
1. Open and inspect the *STATUS* file to view the error.
104
102
105
103
For instructions on finding the log files on a **Linux** VM, see [Use the Azure Custom Script Extension Version 2 with Linux virtual machines](/azure/virtual-machines/extensions/custom-script-linux#troubleshooting)
106
104
@@ -112,7 +110,6 @@ When the VM first starts, or when the CSE first installs to serve the request to
112
110
113
111
To verify if the artifact appeared to stop responding because of the VM Agent:
114
112
115
-
1. Sign in to the VM.
116
113
1. Using File Explorer, navigate to *C:\\WindowsAzure\\logs*.
117
114
1. Open the file *WaAppAgent.log*.
118
115
1. Look for entries that show the VM Agent starting, finishing initialization, and the first sent heartbeat, around the time you experienced the artifact issue.
@@ -141,16 +138,15 @@ The artifact installation could fail because of the way the artifact installatio
141
138
142
139
To troubleshoot whether the script is causing the artifact to appear to stop responding:
143
140
144
-
1. Sign in to the VM where the artifact installation failed.
145
-
1. Copy the script to the VM, or locate it on the VM under the artifact script download location, *C:\\Packages\\Plugins\\Microsoft.Compute.CustomScriptExtension\\\<version>*.
141
+
1. Copy the script to the VM, or locate it on the VM in the artifact script download location, *C:\\Packages\\Plugins\\Microsoft.Compute.CustomScriptExtension\\1.10.12\\Downloads*.
146
142
1. Using an administrative command prompt, run the script on the VM, providing the same parameter values that caused the issue.
147
-
1. Determine if the script shows any unwanted behavior. If so, request an update or correct the script.
148
-
149
-
> [!NOTE]
150
-
> To ensure that failures are correctly identified and explained, it's important that the artifact has the proper structure. For information about how to correctly construct an artifact, see [Create custom artifacts](devtest-lab-artifact-author.md). For an example of a properly structured artifact, see the [Test parameter types](https://github.com/Azure/azure-devtestlab/tree/master/Artifacts/windows-test-paramtypes) artifact.
143
+
1. Determine if the script shows any unwanted behavior. If so, request an update, or correct the script.
151
144
152
145
> [!TIP]
153
146
> You can submit proposed script corrections for artifacts hosted in the DevTest Labs [public repository](https://github.com/Azure/azure-devtestlab/tree/master/Artifacts). For details, see the **Contributions** section in the [README](https://github.com/Azure/azure-devtestlab/blob/master/Artifacts/README.md) document.
147
+
148
+
> [!NOTE]
149
+
> To correctly identify and explain failures, a custom artifact needs to have the proper structure. For information about how to correctly construct an artifact, see [Create custom artifacts](devtest-lab-artifact-author.md). For an example of a properly structured artifact, see the [Test parameter types](https://github.com/Azure/azure-devtestlab/tree/master/Artifacts/windows-test-paramtypes) artifact.
154
150
>
155
151
> For more information about writing and correcting artifact scripts, see [AUTHORING](https://github.com/Azure/azure-devtestlab/blob/master/Artifacts/AUTHORING.md).
0 commit comments