Skip to content

Commit 6789bcf

Browse files
author
craigcaseyMSFT
committed
added new file, including images and links to new file, plus updataed TOC
1 parent 9229941 commit 6789bcf

8 files changed

+81
-14
lines changed

articles/devtest-lab/TOC.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@
4242
## Manage reusable templates
4343
### [Add a Git repository for artifacts and templates](devtest-lab-add-artifact-repo.md)
4444
### [Use a resource manager template](devtest-lab-use-resource-manager-template.md)
45-
### [Create custom artifacts](devtest-lab-artifact-author.md)
45+
### Manage artifacts
46+
#### [Create custom artifacts](devtest-lab-artifact-author.md)
47+
#### [Diagnose artifact failures](devtest-lab-troubleshoot-artifact-failure.md)
4648
### [Manage formulas](devtest-lab-manage-formulas.md)
4749

4850
## Manage virtual networks

articles/devtest-lab/devtest-lab-add-artifact-repo.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,5 @@ When you create a VM, you'll be able to verify that the artifacts or templates a
9898
[!INCLUDE [devtest-lab-try-it-out](../../includes/devtest-lab-try-it-out.md)]
9999

100100
### Related blog posts
101-
* [How to troubleshoot failing Artifacts in AzureDevTestLabs](http://www.visualstudiogeeks.com/blog/DevOps/How-to-troubleshoot-failing-artifacts-in-AzureDevTestLabs)
101+
* [How to troubleshoot failing Artifacts in Azure DevTest Labs](devtest-lab-troubleshoot-artifact-failure.md)
102102
* [Join a VM to existing AD Domain using ARM template in Azure Dev Test Lab](http://www.visualstudiogeeks.com/blog/DevOps/Join-a-VM-to-existing-AD-domain-using-ARM-template-AzureDevTestLabs)

articles/devtest-lab/devtest-lab-artifact-author.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ ms.author: tarcher
2323
>
2424
2525
## Overview
26-
**Artifacts** are used to deploy and configure your application after a VM is provisioned. An artifact consists of an artifact definition file and other script files that are stored in a folder in a git repository. Artifact definition files consist of JSON and expressions that you can use to specify what you want to install on a VM. For example, you can define the name of artifact, command to run, and parameters that are made available when the command is run. You can refer to other script files within the artifact definition file by name.
26+
**Artifacts** are used to deploy and configure your application after a VM is provisioned. An artifact consists of an artifact definition file and other script files that are stored in a folder in a git repository. Artifact definition files consist of JSON and expressions that you can use to specify what you want to install on a VM. For example, you can define the name of an artifact, command to run, and parameters that are made available when the command is run. You can refer to other script files within the artifact definition file by name.
2727

2828
## Artifact definition file format
2929
The following example shows the sections that make up the basic structure of a definition file.
3030

3131
{
32-
"$schema": "https://raw.githubusercontent.com/Azure/azure-devtestlab/master/schemas/2015-01-01/dtlArtifacts.json",
32+
"$schema": "https://raw.githubusercontent.com/Azure/azure-devtestlab/master/schemas/2016-11-28/dtlArtifacts.json",
3333
"title": "",
3434
"description": "",
3535
"iconUri": "",
@@ -59,7 +59,7 @@ The following example shows the sections that make up the basic structure of a d
5959
### Artifact parameters
6060
In the parameters section of the definition file, you specify which values a user can input when installing an artifact. You can refer to these values in the artifact install command.
6161

62-
You define parameters will the following structure.
62+
You define parameters with the following structure.
6363

6464
"parameters": {
6565
"<parameterName>": {
@@ -85,7 +85,7 @@ The allowed types are:
8585
## Artifact expressions and functions
8686
You can use expression and functions to construct the artifact install command.
8787
Expressions are enclosed with brackets ([ and ]), and are evaluated when the artifact is installed. Expressions can appear anywhere in a JSON string value and always return another JSON value. If you need to use a literal string that starts with a bracket [, you must use two brackets [[.
88-
Typically, you use expressions with functions to construct a value. Just like in JavaScript, function calls are formatted as functionName(arg1,arg2,arg3)
88+
Typically, you use expressions with functions to construct a value. Just like in JavaScript, function calls are formatted as functionName(arg1,arg2,arg3).
8989

9090
The following list shows common functions.
9191

@@ -95,19 +95,19 @@ The following list shows common functions.
9595
The following example shows how to use expression and functions to construct a value.
9696

9797
runCommand": {
98-
"commandToExecute": "[concat('powershell.exe -File startChocolatey.ps1'
98+
"commandToExecute": "[concat('powershell.exe -ExecutionPolicy bypass \"& ./startChocolatey.ps1'
9999
, ' -RawPackagesList ', parameters('packages')
100100
, ' -Username ', parameters('installUsername')
101101
, ' -Password ', parameters('installPassword'))]"
102102
}
103103

104104
## Create a custom artifact
105-
Create your custom artifact by following steps below:
105+
Create your custom artifact by following the steps below:
106106

107107
1. Install a JSON editor - You will need a JSON editor to work with artifact definition files. We recommend using [Visual Studio Code](https://code.visualstudio.com/), which is available for Windows, Linux and OS X.
108-
2. Get a sample artifactfile.json - Check out the artifacts created by Azure DevTest Labs team at our [GitHub repository](https://github.com/Azure/azure-devtestlab) where we have created a rich library of artifacts that will help you create your own artifacts. Download an artifact definition file and make changes to it to create your own artifacts.
108+
2. Get a sample artifactfile.json - Check out the artifacts created by Azure DevTest Labs team at our [GitHub repository](https://github.com/Azure/azure-devtestlab), where we have created a rich library of artifacts that will help you create your own artifacts. Download an artifact definition file and make changes to it to create your own artifacts.
109109
3. Make use of IntelliSense - Leverage IntelliSense to see valid elements that can be used to construct an artifact definition file. You can also see the different options for values of an element. For example, IntelliSense show you the two choices of Windows or Linux when editing the **targetOsType** element.
110-
4. Store the artifact in a git repository
110+
4. Store the artifact in a [git repository](devtest-lab-add-artifact-repo.md).
111111

112112
1. Create a separate directory for each artifact where the directory name is the same as the artifact name.
113113
2. Store the artifact definition file (artifactfile.json) in the directory you created.
@@ -116,12 +116,12 @@ Create your custom artifact by following steps below:
116116
Here is an example of how an artifact folder might look:
117117

118118
![Artifact git repo example](./media/devtest-lab-artifact-author/git-repo.png)
119-
5. Add the artifacts repository to the lab - Refer to the article, [Add a Git artifact repository to a lab](devtest-lab-add-artifact-repo.md).
119+
5. Add the artifacts repository to the lab - Refer to the article, [Add a Git repository for artifacts and templates](devtest-lab-add-artifact-repo.md).
120120

121121
[!INCLUDE [devtest-lab-try-it-out](../../includes/devtest-lab-try-it-out.md)]
122122

123-
## Related blog posts
124-
* [How to troubleshoot failing Artifacts in AzureDevTestLabs](http://www.visualstudiogeeks.com/blog/DevOps/How-to-troubleshoot-failing-artifacts-in-AzureDevTestLabs)
123+
## Related articles
124+
* [How to diagnose artifact failures in DevTest Labs](devtest-lab-troubleshoot-artifact-failure.md)
125125
* [Join a VM to existing AD Domain using ARM template in Azure Dev Test Lab](http://www.visualstudiogeeks.com/blog/DevOps/Join-a-VM-to-existing-AD-domain-using-ARM-template-AzureDevTestLabs)
126126

127127
## Next steps

articles/devtest-lab/devtest-lab-faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ A Microsoft account is what you use for almost everything you do with Microsoft
246246
>
247247
248248
### My artifact failed during VM creation. How do I troubleshoot it?
249-
Refer to the blog post, [How to troubleshoot failing Artifacts in AzureDevTestLabs](http://www.visualstudiogeeks.com/blog/DevOps/How-to-troubleshoot-failing-artifacts-in-AzureDevTestLabs) – written by one of our MVPs – to learn how to obtain logs regarding your failed artifact.
249+
Refer to [How to diagnose artifact failures in DevTest Labs](devtest-lab-troubleshoot-artifact-failure.md) to learn how to obtain logs regarding your failed artifact.
250250

251251
### Why isn't my existing virtual network saving properly?
252252
One possibility is that your virtual network name contains periods. If so, try removing the periods or replacing them with hyphens, and then try saving the virtual network again.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: Diagnose artifact failures in DevTest Labs VM | Microsoft Docs
3+
description: Learn how to troubleshoot artifact failures in DevTest Labs
4+
services: devtest-lab,virtual-machines
5+
documentationcenter: na
6+
author: tomarcher
7+
manager: douge
8+
editor: ''
9+
10+
ms.assetid: 115e0086-3293-4adf-8738-9f639f31f918
11+
ms.service: devtest-lab
12+
ms.workload: na
13+
ms.tgt_pltfrm: na
14+
ms.devlang: na
15+
ms.topic: article
16+
ms.date: 08/18/2017
17+
ms.author: tarcher
18+
19+
---
20+
# Diagnose artifact failures in the lab
21+
After you have created an artifact, you can check to see if it succeeded or failed. Artifact logs in DevTest Labs provide information you can use to diagnose an artifact failure. There are a couple different ways you can view the artifact log information for a Windows VM.
22+
23+
> [!NOTE]
24+
> To ensure that failures are correctly identified and explained, it is important that the artifact definition file is properly structured. For information about how to correctly construct an artifact definition file, see [Create custom artifacts](devtest-lab-artifact-author.md). And to see an example of a properly structured file, checkout this [artifact JSON file](https://github.com/Azure/azure-devtestlab/blob/master/Artifacts/windows-test-paramtypes/artifactfile.json).
25+
26+
## Troubleshoot artifact failures using the Azure portal
27+
To use the Azure portal to diagnose failures during artifact creation, follow these steps:
28+
29+
1) From the list of resources, select your lab.
30+
1) Choose the Windows VM that includes the artifact you want to investigate.
31+
1) In the main blade under **GENERAL**, choose **Artifacts**.
32+
33+
A list of artifacts associated with that VM appears, indicating the name of the artifact and its status.
34+
35+
![Artifact git repo example](./media/devtest-lab-troubleshoot-artifact-failure/devtest-lab-artifacts-failure.png)
36+
37+
1) Choose an artifact that shows a status of **Failed**.
38+
39+
This opens the artifact and shows an extension message that includes details about the failure of the artifact.
40+
41+
![Artifact git repo example](./media/devtest-lab-troubleshoot-artifact-failure/devtest-lab-artifact-error.png)
42+
43+
44+
## Troubleshoot artifact failures from within the VM
45+
To view the artifact logs from within the virtual machine, follow these steps:
46+
47+
1) Log in to the VM that contains the artifact you want to diagnose.
48+
1) Navigate to C:\Packages\Plugins\Microsoft.Compute.CustomScriptExtension\1.9\Status where "1.9 is the CSE version number.
49+
50+
![Artifact git repo example](./media/devtest-lab-troubleshoot-artifact-failure/devtest-lab-artifact-error-vm-status.png)
51+
52+
53+
1) Open the **status** file to view information that will help diagnose artifact failures for that VM.
54+
55+
56+
57+
58+
[!INCLUDE [devtest-lab-try-it-out](../../includes/devtest-lab-try-it-out.md)]
59+
60+
## Related blog posts
61+
* [Join a VM to existing AD Domain using ARM template in Azure Dev Test Lab](http://www.visualstudiogeeks.com/blog/DevOps/Join-a-VM-to-existing-AD-domain-using-ARM-template-AzureDevTestLabs)
62+
63+
## Next steps
64+
* Learn how to [add a Git repository to a lab](devtest-lab-add-artifact-repo.md).
65+

0 commit comments

Comments
 (0)