Skip to content

Commit

Permalink
Fix vm get boot log (#18830)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoxing-ms authored Jul 16, 2021
1 parent 53b5c5b commit 0ec28e8
Show file tree
Hide file tree
Showing 3 changed files with 535 additions and 355 deletions.
5 changes: 2 additions & 3 deletions src/azure-cli/azure/cli/command_modules/vm/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -1587,9 +1587,8 @@ def get_boot_log(cmd, resource_group_name, vm_name):
# Managed storage
if blob_uri is None:
try:
poller = client.virtual_machines.retrieve_boot_diagnostics_data(resource_group_name, vm_name)
uris = LongRunningOperation(cmd.cli_ctx)(poller)
blob_uri = uris.serial_console_log_blob_uri
boot_diagnostics_data = client.virtual_machines.retrieve_boot_diagnostics_data(resource_group_name, vm_name)
blob_uri = boot_diagnostics_data.serial_console_log_blob_uri
except CloudError:
pass
if blob_uri is None:
Expand Down
Loading

0 comments on commit 0ec28e8

Please sign in to comment.