Azure / Azure/azure-cli-extensions
Cannot copy image from a region to another
- 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.8.`
**Errors:**
```
The command failed with an unexpected error. Here is the traceback:
Command '['/usr/bin/python3.6', '-m', 'azure.cli', 'snapshot', 'create', '--name', '_os_disk_snapshot', '--location', 'westus2', '--resource-group', '', '--source', 'https://.blob.core.windows.net//.vhd', '--source-storage-account-id', '/subscriptions//resourceGroups//providers/Microsoft.Storage/storageAccounts/, '--output', 'json', '--tags', 'created_by=image-copy-extension']' returned non-zero exit status 2.
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
raise ex
File "/usr/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/usr/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
result = cmd_copy(params)
File "/usr/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
return self.handler(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/home/developer/.azure/cliextensions/image-copy-extension/azext_imagecopy/custom.py", line 105, in imagecopy
run_cli_command(cli_cmd)
File "/home/developer/.azure/cliextensions/image-copy-extension/azext_imagecopy/cli_utils.py", line 45, in run_cli_command
raise ex
File "/home/developer/.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 "/usr/lib64/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/usr/lib64/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/usr/bin/python3.6', '-m', 'azure.cli', 'snapshot', 'create', '--name', '', '--source', 'https://.blob.core.windows.net//.vhd', '--source-storage-account-id', '/subscriptions//resourceGroups//providers/Microsoft.Storage/storageAccounts/', '--output', 'json', '--tags', 'created_by=image-copy-extension']' returned non-zero exit status 2.
```
## 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-resource-group {} --target-name {} --tags {} {} {} --temporary-resource-group-name {} --cleanup`
## Expected Behavior
## Environment Summary
```
Linux-3.10.0-693.11.6.el7.x86_64-x86_64-with-centos-7.4.1708-Core, CentOS Linux 7 (Core)
Python 3.6.7
Installer: PIP
azure-cli 2.30.0
Extensions:
image-copy-extension 0.2.8
```
## Additional Context
Contributor guide
Assessment
This issue has not been assessed yet.