Attempt to copy image fails
See original GitHub issue- If the issue is to do with Azure CLI 2.0 in-particular, create an issue here at Azure/azure-cli
Extension name (the extension in question)
image-copy-extension
Description of issue (in as much detail as possible)
The command doesn’t work at all. I’m following your tutorial here: https://www.microsoft.com/developerblog/2018/02/15/copy-custom-vm-images-on-azure/
Here’s the command I ran: az image copy --source-resource-group se-training-lab --source-object-name hc-training-workstation-2019-05-30 --target-location uksouth --target-resource-group “emea-training-lab” --cleanup
And here’s the error message:
Getting os disk id of the source vm/image
Creating source snapshot
command failed: ['/opt/az/bin/python3', '-m', 'azure.cli', 'snapshot', 'create', '--name', 'hc-training-workstation-2019-05-30_os_disk_snapshot', '--resource-group', 'se-training-lab', '--source', '/subscriptions/14692f20-9428-451b-8298-102ed4e39c2a/resourceGroups/se-training-lab-newhcimage000-963909/providers/Microsoft.Compute/disks/newhcimage000_disk1_e20e8b03612a4a20ab199c5692c855fc', '--output', 'json', '--tags', 'created_by=image-copy-extension']
output: ERROR: Resource newhcimage000_disk1_e20e8b03612a4a20ab199c5692c855fc is not found.
The command failed with an unexpected error. Here is the traceback:
Command '['/opt/az/bin/python3', '-m', 'azure.cli', 'snapshot', 'create', '--name', 'hc-training-workstation-2019-05-30_os_disk_snapshot', '--resource-group', 'se-training-lab', '--source', '/subscriptions/14692f20-9428-451b-8298-102ed4e39c2a/resourceGroups/se-training-lab-newhcimage000-963909/providers/Microsoft.Compute/disks/newhcimage000_disk1_e20e8b03612a4a20ab199c5692c855fc', '--output', 'json', '--tags', 'created_by=image-copy-extension']' returned non-zero exit status 1.
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 206, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 560, in execute
raise ex
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 618, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 611, in _run_job
six.reraise(*sys.exc_info())
File "/opt/az/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 588, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 297, in __call__
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 461, in default_command_handler
return op(**command_args)
File "/home/scarolan/.azure/cliextensions/image-copy-extension/azext_imagecopy/custom.py", line 82, in imagecopy
run_cli_command(cli_cmd)
File "/home/scarolan/.azure/cliextensions/image-copy-extension/azext_imagecopy/cli_utils.py", line 35, in run_cli_command
raise ex
File "/home/scarolan/.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.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/opt/az/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/opt/az/bin/python3', '-m', 'azure.cli', 'snapshot', 'create', '--name', 'hc-training-workstation-2019-05-30_os_disk_snapshot', '--resource-group', 'se-training-lab', '--source', '/subscriptions/14692f20-9428-451b-8298-102ed4e39c2a/resourceGroups/se-training-lab-newhcimage000-963909/providers/Microsoft.Compute/disks/newhcimage000_disk1_e20e8b03612a4a20ab199c5692c855fc', '--output', 'json', '--tags', 'created_by=image-copy-extension']' returned non-zero exit status 1.
To open an issue, please run: 'az feedback'
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Copy Failed: There was a problem copying the image to the ...
I kept getting this error when I tried to copy the captured image and reshare from history.
Read more >Attempting to copy Photos Library fails - Apple Community
I am attempting to copy my Photos Library to an external drive from my late 2008 MBP. The copy has failed twice and...
Read more >copy & paste images or pictures problems in Windows 10
Hi...since I upgrade to Windows 10 last month (end of July 2015) I could not copy & paste images or pictures easily anymore....
Read more >Fix Unspecified Error When Copying File or Folder ... - EaseUS
The unspecified error - 'Error Copying File or Folder' may occur to any users under Windows 10/8/7 while you are trying to copy...
Read more >Can't create a docker image for COPY failed: stat /var/lib ...
Docker still presents buggy behaviors on it's engine, imho. I used the same COPY statement on my Dockerfile, and had the same issues....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll add to the mix though I’ll need to find a quicker workaround than is probably available via this thread. I want to echo the original sentiment though in a constructive manner: “This command doesn’t work at all”. Or, at least, I don’t see what the happy path is.
If there is a subtle, additional requirement for this command to work correctly, it’s not clear to me what that requirement is.
command failed: [‘/usr/local/Cellar/azure-cli/2.0.72_1/libexec/bin/python’, ‘-m’, ‘azure.cli’, ‘snapshot’, ‘create’, ‘–name’, ‘azdevdemo-image-20190924_os_disk_snapshot’, ‘–resource-group’, ‘sales-engineering-demo’, ‘–source’, ‘/subscriptions/4352f0e7-67db-4001-8352-25147175ee02/resourceGroups/sales-engineering-demo/providers/Microsoft.Compute/disks/azdevdemo_disk1_ce217e1695df4615af8822334caf2799’, ‘–output’, ‘json’, ‘–tags’, ‘created_by=image-copy-extension’] output: ERROR: Resource azdevdemo_disk1_ce217e1695df4615af8822334caf2799 is not found.
close since no response. Feel free to create new issue if met any error.