Azure / Azure/azure-cli-extensions
`az image copy - The command failed with an unexpected error
- Dominant language
- Python
- Stars
- 454
- Forks
- 1.7k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 64
Description
### **This is autogenerated. Please review and update as needed.**
## Describe the bug
**Command Name**
`az image copy
Extension Name: image-copy-extension. Version: 0.2.9.`
**Errors:**
```
The command failed with an unexpected error. Here is the traceback:
Command '['/usr/bin/../../opt/az/bin/python3', '-m', 'azure.cli', 'snapshot', 'create', '--name', 'CC-basegen2v2_os_disk_snapshot', '--location', 'westus2', '--resource-group', 'Intel_EDA', '--source', '/subscriptions/1d81cec7-7ded-4731-884e-90c5aa59c622/resourceGroups/Intel_EDA/providers/Microsoft.Compute/disks/azint-baseimggen2v1_OsDisk_1_7756cecd82874923bccb0760f3d0d02d', '--hyper-v-generation', 'V2', '--output', 'json', '--tags', 'created_by=image-copy-extension']' returned non-zero exit status 3.
Traceback (most recent call last):
File "/opt/az/lib/python3.8/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 658, in execute
raise ex
File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 721, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 692, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/home/giancarlo/.azure/cliextensions/image-copy-extension/azext_imagecopy/custom.py", line 108, in imagecopy
run_cli_command(cli_cmd)
File "/home/giancarlo/.azure/cliextensions/image-copy-extension/azext_imagecopy/cli_utils.py", line 45, in run_cli_command
raise ex
File "/home/giancarlo/.azure/cliextensions/image-copy-extension/azext_imagecopy/cli_utils.py", line 21, in run_cli_command
cmd_output = check_output(cmd, stderr=STDOUT, universal_newlines=True)
File "/opt/az/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/opt/az/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/../../opt/az/bin/python3', '-m', 'azure.cli', 'snapshot', 'create', '--name', 'CC-basegen2v2_os_disk_snapshot', '--location', 'westus2', '--resource-group', 'Intel_EDA', '--source', '/subscriptions/1d81cec7-7ded-4731-884e-90c5aa59c622/resourceGroups/Intel_EDA/providers/Microsoft.Compute/disks/azint-baseimggen2v1_OsDisk_1_7756cecd82874923bccb0760f3d0d02d', '--hyper-v-generation', 'V2', '--output', 'json', '--tags', 'created_by=image-copy-extension']' returned non-zero exit status 3.
```
## 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 image copy --source-resource-group {} --source-object-name {} --target-location {} --target-name {} --target-resource-group {} --cleanup`
## Expected Behavior
## Environment Summary
```
Linux-5.4.0-1072-azure-x86_64-with-glibc2.28 (Cloud Shell), Common Base Linux Delridge (quinault)
Python 3.8.12
Installer: DEB
azure-cli 2.34.1
Extensions:
image-copy-extension 0.2.9
ai-examples 0.2.5
ssh 1.0.0
Dependencies:
msal 1.16.0
azure-mgmt-resource 20.0.0
```
## Additional Context
Contributor guide
Assessment
This issue has not been assessed yet.