Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

New-AzureRMVirtualMachine Requires Bettter Error Handling

未关闭
#22 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
38/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
azure, powershell

调研方向

从 IntelliTect.AzureRm.psm1 第 235 行开始,该行调用了 New-AzureRmVM,并使用报告中显示的不可用 MicrosoftVisualStudio Windows 映像重现该命令。跟踪故障的处理方式,并验证 New-AzureRmVM 返回错误后不会报告 VM Created successfully。

由索引模型根据 Issue 内容生成。

描述

When executing the New-AzureRMVirtualMachine command and filling in all the information, the script executed, output an error, then reported Success:
`
...
Creating new storage account
Creating new virtual network
Creating security group and rule
Creating new public IP address WITHOUT domain name
Creating new network interface
Creating VM configuration
Creating the VM ... this will take some time ...
New-AzureRmVM : The platform image 'MicrosoftVisualStudio:Windows:10-Enterprise-N:latest' is not available. Verify that all fields in the storage profile are correct.
ErrorCode: ImageNotFound
ErrorMessage: The platform image 'MicrosoftVisualStudio:Windows:10-Enterprise-N:latest' is not available. Verify that all fields in the storage profile are correct.
StatusCode: 404
ReasonPhrase: Not Found
OperationID : 1a477195-2bab-406a-bcbe-2115eae7bfe6
At C:\Program Files\WindowsPowerShell\Modules\IntelliTect.AzureRm\1.3.3.0\IntelliTect.AzureRm.psm1:235 char:5

  • New-AzureRmVM -ResourceGroupName $Inputs.ResourceGroupName -Locat ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : CloseError: (:) [New-AzureRmVM], ComputeCloudException
    • FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.NewAzureVMCommand

VM Created successfully
`
The script needs to have better error handling.

主要语言
PowerShell
星标
11
派生
4
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

IntelliTect/PSToolbox 的其他 Issue

查看 IntelliTect/PSToolbox 的全部 Issue

相似的 Issue

更多 Cloud Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。