zoukankan      html  css  js  c++  java
  • 如何使用 Azure PowerShell 在 Azure Marketplace 中查找 Windows VM 映像

    本主题介绍如何使用 Azure PowerShell 在 Azure Marketplace 中查找 VM 映像。 创建 Windows VM 时使用此信息来指定 Marketplace 映像。

    确保已安装并配置最新的 Azure PowerShell 模块

    常用 Windows 映像表

    PublisherName产品SKU
    MicrosoftWindowsServer WindowsServer 2016-Datacenter
    MicrosoftWindowsServer WindowsServer 2016-Datacenter-Server-Core
    MicrosoftWindowsServer WindowsServer 2016-Datacenter-with-Containers
    MicrosoftWindowsServer WindowsServer 2016-Nano-Server
    MicrosoftWindowsServer WindowsServer 2012-R2-Datacenter
    MicrosoftWindowsServer WindowsServer 2008-R2-SP1
    MicrosoftDynamicsNAV DynamicsNAV 2017
    MicrosoftSharePoint MicrosoftSharePointServer 2016
    MicrosoftSQLServer SQL2016-WS2016 Enterprise
    MicrosoftSQLServer SQL2014SP2-WS2012R2 Enterprise
    MicrosoftWindowsServerHPCPack WindowsServerHPCPack 2012R2
    MicrosoftWindowsServerEssentials WindowsServerEssentials WindowsServerEssentials

    查找特定映像

    使用 Azure Resource Manager 创建新的虚拟机时,在某些情况下,需要使用以下映像属性组合来指定映像:

    • 发布者
    • 产品
    • SKU

    例如,将这些值用于 Set-AzureRMVMSourceImage PowerShell cmdlet 或资源组模板,必须在此资源组模板中指定要创建的 VM 类型。

    如果需要确定这些值,可以运行 Get-AzureRMVMImagePublisherGet-AzureRMVMImageOffer 和 Get-AzureRMVMImageSku cmdlet 来导航映像。 确定这些值:

    1. 列出映像发布者。
    2. 对于给定的发布者,列出其产品。
    3. 对于给定的产品,列出其 SKU。

    首先,使用以下命令列出发布者:

    PowerShell
    $locName="<Azure location, such as China North>"
    Get-AzureRMVMImagePublisher -Location $locName | Select PublisherName
    

    填写选择的发布者名称,并运行以下命令:

    PowerShell
    $pubName="<publisher>"
    Get-AzureRMVMImageOffer -Location $locName -Publisher $pubName | Select Offer
    

    填写选择的产品名称,并运行以下命令:

    PowerShell
    $offerName="<offer>"
    Get-AzureRMVMImageSku -Location $locName -Publisher $pubName -Offer $offerName | Select Skus
    

    从 Get-AzureRMVMImageSku 命令的输出,可获得为新虚拟机指定映像所需的所有信息。

    下面是一个完整示例:

    PowerShell
    $locName="China North"
    Get-AzureRMVMImagePublisher -Location $locName | Select PublisherName
    

    输出:

    PublisherName
    -------------
    a10networks
    aiscaler-cache-control-ddos-and-url-rewriting-
    alertlogic
    AlertLogic.Extension
    Barracuda.Azure.ConnectivityAgent
    barracudanetworks
    basho
    boxless
    bssw
    Canonical
    ...
    

    对于“MicrosoftWindowsServer”发布者:

    PowerShell
    $pubName="MicrosoftWindowsServer"
    Get-AzureRMVMImageOffer -Location $locName -Publisher $pubName | Select Offer
    

    输出:

    Offer
    -----
    Windows-HUB
    WindowsServer
    WindowsServer-HUB
    

    对于“WindowsServer”产品:

    PowerShell
    $offerName="WindowsServer"
    Get-AzureRMVMImageSku -Location $locName -Publisher $pubName -Offer $offerName | Select Skus
    

    输出:

    Skus
    ----
    2008-R2-SP1
    2008-R2-SP1-zhcn
    2008-R2-SP1-smalldisk
    2012-Datacenter
    2012-Datacenter-zhcn
    2012-Datacenter-smalldisk
    2012-R2-Datacenter
    2012-R2-Datacenter-smalldisk
    2016-Datacenter
    2016-Datacenter-Server-Core
    2016-Datacenter-Server-Core-smalldisk
    2016-Datacenter-smalldisk
    2016-Datacenter-with-Containers
    2016-Nano-Server
    

    从上面的列表中复制选择的 SKU 名称,已获得 Set-AzureRMVMSourceImage PowerShell cmdlet 或资源组模板的所有信息。

    后续步骤

    现在,可以确切地选择想要使用的映像。 若要使用刚找到的映像信息快速创建虚拟机,请参阅使用 PowerShell 创建 Windows 虚拟机

    立即访问http://market.azure.cn

  • 相关阅读:
    Sublime Text 3 绝对神器
    spring 笔记3: Spring 多环境配置文件切换
    elk-logstash: window下指定jdk目录
    通过slf4j/log4j的MDC/NDC 实现日志追踪
    spring 笔记2:Spring MVC : Did not find handler method for 问题的解决
    mysql一机多实例安装记录
    Java:通过反射复制父类字段到子类。
    mybatis研究:select性能对比
    spring " expected single matching bean but found 2" 问题一例。
    数组去重复
  • 原文地址:https://www.cnblogs.com/zangdalei/p/7941976.html
Copyright © 2011-2022 走看看