Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AzureRT] [Hot Fix] Fix the bug of New-AzureRmVM #1199

Merged
merged 4 commits into from
Oct 29, 2015
Merged

Conversation

hyonholee
Copy link
Contributor

This update fixes the following bugs:

  1. [Hot Fix - Very Important] New-AzureRmVM fails when OS disk uses a storage account created in a different resource group from that of the VM.
  2. In Add-AzureRmVMDataDisk, VhdUri should be mandatory parameter.

@azurecla
Copy link

Hi @hyonholee, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!


It looks like you're working at Microsoft (hylee). If you're full-time, we DON'T require a contribution license agreement.



If you are a vendor, or work for Microsoft Open Technologies, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;

}
catch (Exception e)
{
if (!e.Message.Contains("ResourceNotFound"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Exceptions are swallowed here. Need to throw it and/or output the error text.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The fix is to swallow every exception during getting storage account. If the exception is "ResourceNotFound", then the given storage account name is not in the same resource group, so no warning message is shown. If the exception is other than "ResourceNotFound", we show a warning message, but keeps going, because we can still use other storage account for boot diagnostics.

@huangpf
Copy link
Contributor

huangpf commented Oct 29, 2015

LGTM

@markcowl
Copy link
Member

on demand run here:http://azuresdkci.cloudapp.net/view/1-AzurePowerShell/job/powershell-on-demand/282/

LGTM once the on-demand run passes

@markcowl
Copy link
Member

still LGTM

markcowl added a commit that referenced this pull request Oct 29, 2015
[AzureRT] [Hot Fix] Fix the bug of New-AzureRmVM
@markcowl markcowl merged commit f87828c into Azure:dev Oct 29, 2015
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.

4 participants