Quantcast
Channel: Azure フォーラム
Viewing all articles
Browse latest Browse all 1798

Azure Quickstart TemplatesでAsianux4 SP4のVMイメージが使用できない。

$
0
0

【前提】

Gitに公開されているLinux VMを作成するテンプレートを編集してOSをAsianuxに変えるとデプロイに失敗する。

以下、実施内容

  1. https://github.com/Azure/azure-quickstart-templates/tree/master/101-simple-linux-vm
    にアクセスして"Deploy to Azure"をクリック
  2. テンプレートの編集からpublisher, offer, skuをAsianuxのものに変更
  3. 各パラメータを入力してデプロイ
  4. リソースグループの作成はされるがVMのステータスが失敗となり、デプロイが失敗する
  5. 監査ログに下記エラーが出力されている。
    statusMessage:{"status":"Failed","error":{"code":"ResourceDeploymentFailure","message":"リソース操作が完了し、ターミナル プロビジョニング状態は 'Failed' です。","details":[{"code":"VMMarketplaceInvalidInput","message":"Marketplace イメージから仮想マシンを作成する場合、要求にプラン情報が必要です。OS ディスク名は osdisk です。"}]}}

また、同様の変更をCentOSで試したところ、問題なくデプロイが成功する。

【質問】

エラーから、Asianuxを使用する際には「プラン情報」が必要かと思いますが、この「プラン情報」というパラメータの詳細がわかりません。

テンプレートから指定するための情報がありましたらご教示ください。

【編集後のazuredeploy.json】

{"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#","contentVersion": "1.0.0.0","parameters": {"newStorageAccountName": {"type": "string","metadata": {"description": "Unique DNS Name for the Storage Account where the Virtual Machine's disks will be placed."
      }
    },"adminUsername": {"type": "string","metadata": {"description": "User name for the Virtual Machine."
      }
    },"adminPassword": {"type": "securestring","metadata": {"description": "Password for the Virtual Machine."
      }
    },"dnsNameForPublicIP": {"type": "string","metadata": {"description": "Unique DNS Name for the Public IP used to access the Virtual Machine."
      }
    },"ubuntuOSVersion": {"type": "string","defaultValue": "axs4sp4licazu","allowedValues": ["axs4sp4licazu"
      ]
    }
  },"variables": {"location": "Japan East","imagePublisher": "miracl_linux","imageOffer": "asianux-server-4-sp4","OSDiskName": "axs4sp4licazu","nicName": "myNic","addressPrefix": "10.221.0.0/16","subnetName": "Subnet","subnetPrefix": "10.221.0.0/24","storageAccountType": "Standard_LRS","publicIPAddressName": "myPIP","publicIPAddressType": "Dynamic","vmStorageAccountContainerName": "vhds","vmName": "TA-N-TMPL","vmSize": "Standard_A1","virtualNetworkName": "MyVNET","vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]","subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]"
  },"resources": [
    {"type": "Microsoft.Storage/storageAccounts","name": "[parameters('newStorageAccountName')]","apiVersion": "2015-06-15","location": "[variables('location')]","properties": {"accountType": "[variables('storageAccountType')]"
      }
    },
    {"apiVersion": "2015-06-15","type": "Microsoft.Network/publicIPAddresses","name": "[variables('publicIPAddressName')]","location": "[variables('location')]","properties": {"publicIPAllocationMethod": "[variables('publicIPAddressType')]","dnsSettings": {"domainNameLabel": "[parameters('dnsNameForPublicIP')]"
        }
      }
    },
    {"apiVersion": "2015-06-15","type": "Microsoft.Network/virtualNetworks","name": "[variables('virtualNetworkName')]","location": "[variables('location')]","properties": {"addressSpace": {"addressPrefixes": ["[variables('addressPrefix')]"
          ]
        },"subnets": [
          {"name": "[variables('subnetName')]","properties": {"addressPrefix": "[variables('subnetPrefix')]"
            }
          }
        ]
      }
    },
    {"apiVersion": "2015-06-15","type": "Microsoft.Network/networkInterfaces","name": "[variables('nicName')]","location": "[variables('location')]","dependsOn": ["[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]","[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
      ],"properties": {"ipConfigurations": [
          {"name": "ipconfig1","properties": {"privateIPAllocationMethod": "Dynamic","publicIPAddress": {"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
              },"subnet": {"id": "[variables('subnetRef')]"
              }
            }
          }
        ]
      }
    },
    {"apiVersion": "2015-06-15","type": "Microsoft.Compute/virtualMachines","name": "[variables('vmName')]","location": "[variables('location')]","dependsOn": ["[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]","[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
      ],"properties": {"hardwareProfile": {"vmSize": "[variables('vmSize')]"
        },"osProfile": {"computername": "[variables('vmName')]","adminUsername": "[parameters('adminUsername')]","adminPassword": "[parameters('adminPassword')]"
        },"storageProfile": {"imageReference": {"publisher": "[variables('imagePublisher')]","offer": "[variables('imageOffer')]","sku": "[parameters('ubuntuOSVersion')]","version": "latest"
          },"osDisk": {"name": "osdisk","vhd": {"uri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]"
            },"caching": "ReadWrite","createOption": "FromImage"
          }
        },"networkProfile": {"networkInterfaces": [
            {"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
            }
          ]
        }
      }
    }
  ]
}


Viewing all articles
Browse latest Browse all 1798

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>