You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting os disk id of the source vm/image
'NoneType' object is not subscriptable
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 194, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 342, in execute
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 315, in execute
result = cmd(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 175, in call
return super(AzCliCommand, self).call(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/knack/commands.py", line 109, in call
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/init.py", line 349, in default_command_handler
result = op(**command_args)
File "/home/Wolfthorne/.azure/cliextensions/image-copy-extension/azext_imagecopy/custom.py", line 27, in imagecopy
source_os_disk_id = json_cmd_output['storageProfile']['osDisk']['managedDisk']['id']
TypeError: 'NoneType' object is not subscriptable
Ivan Fateev (@PoisonousJohn)
This extension is using the managed disk of the source vm from which the image was created.
In the output it looks like the disk source is in a blob. What was the process to create your image? Was the vm managed-disk based?
Activity
derekbekoe commentedon Feb 27, 2018
Wolf7horne Are you attempting to use this against Public Azure?
Wolf7horne commentedon Feb 28, 2018
Derek Bekoe (@derekbekoe) Yes I am.
tamirkamara commentedon Feb 28, 2018
Wolf7horne:
Wolf7horne commentedon Feb 28, 2018
Tamir Kamara (@tamirkamara)
tamirkamara commentedon Mar 5, 2018
Wolf7horne
I think this means that the vm isn't based on managed disks. Can you rerun the command with --debug and send the full output?
PoisonousJohn commentedon Apr 2, 2018
Tamir Kamara (@tamirkamara) the same issue, full output attached.
Full command
az image copy --source-resource-group batch_template_vms --source-object-name template-batch-vm-image-54509 --target-location northeurope --target-resource-group batch_experiments --cleanup --debug 2> log.txtlog.txt
tamirkamara commentedon Apr 2, 2018
Ivan Fateev (@PoisonousJohn)
This extension is using the managed disk of the source vm from which the image was created.
In the output it looks like the disk source is in a blob. What was the process to create your image? Was the vm managed-disk based?
Tamir
PoisonousJohn commentedon Apr 2, 2018
Tamir Kamara (@tamirkamara) as it was mentioned by Wolf7horne, the case is related to blob-based image (non-managed disk).
I understand that for now this extension assumes you're using image disk. Do you have any plans on supporting blob images?
Added FileShare commands. (Azure#84)
Adding cmds & tests for Container app certs & domains (Azure#107)
Add aosm extension (#6426)
build: apic-extension 1.2.0b1 release (#8411)
build: apic-extension 1.2.0b1 release (Azure#8411)
build: apic-extension v1.2.0b3 release - analysis follow up (#8439)