question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

az lab vm apply-artifacts error read artifact.json

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

When i try to apply an artifact on my vm the exception occour. Command Name az lab vm apply-artifacts

Errors:

Unable to build a model: Cannot deserialize as [ArtifactParameterProperties] an object of type <class 'dict'>, DeserializationError: Cannot deserialize as [ArtifactParameterProperties] an object of type <class 'dict'>
Traceback (most recent call last):
pip-install-z6h9b3s8\msrest\msrest\serialization.py, ln 578, in body
pip-install-z6h9b3s8\msrest\msrest\serialization.py, ln 1324, in _deserialize
pip-install-z6h9b3s8\msrest\msrest\serialization.py, ln 1333, in _deserialize
...
msrest.exceptions.SerializationError: Unable to build a model: Cannot deserialize as [ArtifactParameterProperties] an object of type <class 'dict'>, DeserializationError: Cannot deserialize as [ArtifactParameterProperties] an object of type <class 'dict'>

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here… az lab artifact list --artifact-source-name $artifactRepo.name --resource-group $resourceEnv.resourceGroup --lab-name $devtestName --query “[?name==‘windows-chocolatey’]”

the output is my artifact.json

and i try to run this : az lab vm apply-artifacts --artifacts “@artifacts.json” --lab-name $devtestName --name VMlab01 --resource-group $resourceEnv.resourceGroup

The file is in current folder and is a valid json file

Expected Behavior

Environment Summary

Windows-10-10.0.18362-SP0
Python 3.6.6
Installer: MSI

azure-cli 2.4.0 *

Additional Context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
leovmscommented, May 1, 2020

@EwertonJordao, the query you are doing is to fetch the artifact definition. It is not good to generate an artifacts.json file content.

Here’s a sample artifacts.json file content to install Google Chrome using the windows-chocolatey artifact from the Public Repo.

UPDATE: Added missing double quotes for boolean values.

[
  {
    "artifactId": "/artifactSources/public repo/artifacts/windows-chocolatey",
    "parameters": [
      {
        "name": "packages",
        "value": "googlechrome"
      },
      {
        "name": "allowEmptyChecksums",
        "value": "true"
      },
      {
        "name": "ignoreChecksums",
        "value": "false"
      }
    ]
  }
]
1reaction
tanmayeekamathcommented, Apr 30, 2020

Hello @EwertonJordao, Thanks for reaching out. We are investigating this on our end. Will get back to you once I have an update.

Tanmayee

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot artifact application - Azure DevTest Labs
Navigate to the Artifacts page for the lab VM to make sure the VM is ready for ... You can see the error...
Read more >
How to apply-artifact "Run PowerShell" for ... - Stack Overflow
Apply artifacts to a virtual machine in Azure DevTest Lab. az lab vm apply-artifacts --artifacts '@artifacts.json' --lab-name MyLab --name ...
Read more >
https://raw.githubusercontent.com/petehauge/DTL-VM...
Checking for the presence of the Az module, brings it into memory which ... to parse the resource Id, so let's do the...
Read more >
How to Create Your Custom Artifacts for DevTest Labs
Most of the time when we use an Azure Devtest Lab it to Test our own application. This means that will need to...
Read more >
How to apply-artifact "Run PowerShell" for azure devtest lab ...
Apply artifacts to a virtual machine in Azure DevTest Lab. az lab vm apply-artifacts --artifacts '@artifacts.json' --lab-name MyLab --name MyVirtualMachine ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found