Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[Compute] az vm update: support cross tenant image
  • Loading branch information
arrownj committed Jul 27, 2020
commit 22718e8435d68ea870207a0f28329cad8bc87776
7 changes: 5 additions & 2 deletions src/azure-cli/azure/cli/command_modules/vm/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -1227,8 +1227,11 @@ def update_vm(cmd, resource_group_name, vm_name, os_disk=None, disk_caching=None
os_type = vm.storage_profile.os_disk.os_type.value if vm.storage_profile.os_disk.os_type else None
_set_data_source_for_workspace(cmd, os_type, resource_group_name, workspace_name)

return sdk_no_wait(no_wait, _compute_client_factory(cmd.cli_ctx).virtual_machines.create_or_update,
resource_group_name, vm_name, **kwargs)
aux_subscriptions = None
if vm and vm.storage_profile and vm.storage_profile.image_reference and vm.storage_profile.image_reference.id:
aux_subscriptions = _parse_aux_subscriptions(vm.storage_profile.image_reference.id)
client = _compute_client_factory(cmd.cli_ctx, aux_subscriptions=aux_subscriptions)
return sdk_no_wait(no_wait, client.virtual_machines.create_or_update,resource_group_name, vm_name, **kwargs)
# endregion


Expand Down
Loading