Skip to content

vm create: expose --boot-diagnostics-storage to capture boot log#6302

Merged
yugangw-msft merged 2 commits into
Azure:devfrom
yugangw-msft:bd
May 8, 2018
Merged

vm create: expose --boot-diagnostics-storage to capture boot log#6302
yugangw-msft merged 2 commits into
Azure:devfrom
yugangw-msft:bd

Conversation

@yugangw-msft
Copy link
Copy Markdown
Contributor

@yugangw-msft yugangw-msft commented May 7, 2018

Fix #5634
Related command flows will be

    1. az storage account create -g yg -n ygstor --sku standard_lrs
    2. az vm create -g yg -n yg-1  --image ubuntults --boot-diagnostics-storage ygstor

For VM with unmanaged disk, I thought about defaulting the storage account to the os disk's but it turns out not very worthy for 2 reasons:

  1. boot diagnostics only works with standard storage sku, so CLI default on using premium sku will not work.
  2. VMs using managed disk is the majority scenario now which requires a pre-existing storage account any way. So defaulting for vm with unmanaged disk with standard_lrs will be pretty minority, hence could become confusing
  • The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

  • I adhere to the Command Guidelines.

@promptws
Copy link
Copy Markdown

promptws commented May 7, 2018

View a preview at https://prompt.ws/r/Azure/azure-cli/6302
This is an experimental preview for @microsoft users.

@colemickens
Copy link
Copy Markdown
Contributor

colemickens commented May 7, 2018

Can you make this private build public? I need this functionality for early stage boot diagnostics. I'm not getting anywhere with trying to Stop, enable diagnostics, and reboot. For whatever reason, I can't even get Azure to Stop the VM I'm trying to debug.

edit: Never mind, I see what this does the PUT, I can do this from resources.azure.com for now.

c.argument('write_accelerator', nargs='*', min_api='2017-12-01', arg_group='Storage',
help="enable/disable disk write accelerator. Use singular value 'true/false' to apply across, or specify individual disks, e.g.'os=true 1=true 2=true' for os disk and data disks with lun of 1 & 2")
c.argument('boot_diagnostics_storage',
help='pre-existing storage account name or its blob uri to capture boot diagnostics. Its sku should be one of Standard_GRS, Standard_LRS and Standard_RAGRS')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the service need permission to the storage account?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No extra permission configuration is needed. I believe CRP just accesses the storage under VM creator's identity captured through the original token from the VM PUT

@yugangw-msft yugangw-msft merged commit e9ac232 into Azure:dev May 8, 2018
@yugangw-msft yugangw-msft deleted the bd branch May 8, 2018 17:15
@dsboulder
Copy link
Copy Markdown

When are you folks going to release this feature?

@yugangw-msft
Copy link
Copy Markdown
Contributor Author

@dsboulder, the release date will be around May 22, based on the milestone page https://github.com/Azure/azure-cli/milestones

@Klaas-
Copy link
Copy Markdown

Klaas- commented Nov 6, 2018

I have a question about the --boot-diagnostics-storage option. Other options like subnet allow the full path to a resource (/subscriptions/id/ResourceGroup/...) is there a reason why this just accepts the name?

@yugangw-msft
Copy link
Copy Markdown
Contributor Author

storage name has to be unique across groups and subscriptions, so accepting a name is enough

@specterz
Copy link
Copy Markdown

Hi Team,

How do you specify a "Microsoft Managed Storage Account" for boot diagnostics during az vm create command?

As per this azure article, if we don't specify storage account, then it should automatically pick up azure managed storage account, however based on azure cli command, it requires an argument - Azure Article

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding Boot diagnostics option in VM create

7 participants