Dela via


Skapa en ny vm-rollinstans från galleriet [SPFSDK][VMROLE]

 

Gäller för: Windows Azure Pack

VM-roller skapas från ett vm-rollgalleriobjekt. Galleriobjektet innehåller en mall som måste anpassas. När rollobjektet för den virtuella datorn har skapats skickas objektet sedan till tjänsthanterings-API:ets klienttjänst där det verifieras och bearbetas.

Om du vill skapa en ny VM-roll från ett galleriobjekt följer du dessa steg, som beskrivs nedan:

  1. Hämta eller skapa ett molntjänstobjekt

  2. Hämta referens till ett vm-rollgalleriobjekt

  3. Hämta resursdefinitionen från vm-rollgalleriobjektet

  4. Samla in resursdefinitionsparametrarna

  5. Skapa ett JSON-objekt för resurskonfiguration från resursdefinitionsparametrarna

  6. Skapa och skicka ett JSON-objekt för vm-rollinstans

Tips

Mer information om platshållarna som används i URL:en finns i URL-fuskbladet för VM-roller [SPFSDK][VMROLE].

Viktigt

När du kommer åt en resurs i molntjänster måste du lägga till frågesträngen api-version=2013-03 . Frågesträngen börjar alltid med tecknet ? efter URL:en.

Hämta eller skapa ett molntjänstobjekt

Först måste du hämta eller skapa en molntjänst. Mer information finns iCreate a Cloud Service to Host VM Roles [SPFSDK][VMROLE]. Det här steget krävs eftersom varje vm-roll finns i en molntjänst. Molntjänsten används bara när du vill hämta vm-rollinstanser eller när du skapar en ny vm-rollinstans. När du har identifierat molntjänsten att arbeta med letar du reda på det virtuella datorrollgalleriobjektet, som fungerar som en mall. Du använder det virtuella datorrollgalleriobjektet för att skapa vm-rollen.

Den VM-roll som du vill instansiera måste erbjudas den klientprenumeration som du arbetar med. Använd HTTP GET-åtgärden med samlingen Gallery/GalleryItems . Den här samlingen finns på https:// server-name:server-port/subscription-id/Gallery/GalleryItems/$/MicrosoftCompute.VMRoleGalleryItem?api-version=2013-03.

HTTP POST-begäran

GET https://smapi-server:30006/01274684-6afa-4f3f-b62f-353c6202fed1/Gallery/GalleryItems/$/MicrosoftCompute.VMRoleGalleryItem?api-version=2013-03 HTTP/1.1
x-ms-principal-id: user@domain.com
Accept: application/json
Host: smapi-server:30006
Connection: Keep-Alive

HTTP POST-svar

HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Length: 973
Content-Type: application/json; odata=minimalmetadata; streaming=true; charset=utf-8
Content-Language: en-US
Server: Microsoft-IIS/8.5
X-Content-Type-Options: nosniff
DataServiceVersion: 3.0;
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
X-Powered-By: ASP.NET
Date: Mon, 16 Sep 2013 22:32:49 GMT

{
    "odata.metadata": "https://spf-server:8090/SC2012R2/VMM/GalleryService.svc/$metadata#GalleryItems/MicrosoftCompute.VMRoleGalleryItem",
    "value": [{
        "ContentUrl": "Gallery/GalleryItems(Name%3d%27CentOS6LAMP%27,Version%3d%271.0.0.0%27,Publisher%3d%27Microsoft%27)/Content",
        "Description": "Deploy a CentOS 6 VM role with Apache, MySQL and PHP installed.",
        "IconUrl": null,
        "Label": "CentOS6 LAMP Role",
        "Name": "CentOS6LAMP",
        "PublishDate": "2013-09-05T18:35:00.967",
        "Publisher": "Microsoft",
        "PublisherLabel": "Microsoft",
        "ResourceDefinition@odata.mediaContentType": "application/json",
        "ResourceDefinitionUrl": "Gallery/GalleryItems(Name%3d%27CentOS6LAMP%27,Version%3d%271.0.0.0%27,Publisher%3d%27Microsoft%27)/MicrosoftCompute.ResourceDefinitionGalleryItem/ResourceDefinition",
        "Version": "1.0.0.0",
        "ViewDefinitionUrl": "Gallery/ViewDefinitions(Name%3d%27CentOS6LAMP%27,Version%3d%271.0.0.0%27,Publisher%3d%27Microsoft%27)/%24value",
        "odata.type": "MicrosoftCompute.VMRoleGalleryItem"
    }]
}

Ett vm-rollgalleriobjekt, MicrosoftCompute.VMRoleGalleryItem, har en egenskap med namnet ResourceDefinitionUrl. Den här URL:en representerar platsen för resursdefinitionen för galleriobjektet. En resursdefinition är den mall som används när du skapar en ny instans av en VM-roll. I allmänhet har en resursdefinition en lista med parametrar som du måste ange värden för. De här parametrarna används för att konfigurera vm-rollen när en instans skapas.

Med referens till ett befintligt vm-rollgalleriobjekt använder du HTTP GET-åtgärden på url:en som identifieras från egenskapen ResourceDefinitionUrl . Den här URL:en läggs till efter prenumerationen på klient-URL:en: https:// server:30006/subscription-id/ResourceDefinitionUrl?api-version=2013-03. Mer information om ResourceDefinition-objektet finns i ResourceDefinition [SPFSDK][VMROLE].

HTTP POST-begäran

GET https://smapi-server:30006/01274684-6afa-4f3f-b62f-353c6202fed1/Gallery/GalleryItems(Name%3d%27CentOS6LAMP%27,Version%3d%271.0.0.0%27,Publisher%3d%27Microsoft%27)/MicrosoftCompute.ResourceDefinitionGalleryItem/ResourceDefinition?api-version=2013-03 HTTP/1.1
x-ms-principal-id: user@domain.com
Accept: application/json
Host: smapi-server:30006

HTTP POST-svar

HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Length: 2009
Content-Type: application/json
Content-Language: en-US
Server: Microsoft-IIS/8.5
X-Content-Type-Options: nosniff
DataServiceVersion: 1.0;
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
X-Powered-By: ASP.NET
Date: Thu, 19 Sep 2013 20:00:23 GMT

{
    "IntrinsicSettings": {
        "HardwareProfile": { "VMSize": "[Param.VMRoleVMSize]" },
        "NetworkProfile": { ... removed for brevity ... }
    },
    "Name": "CentOS6LAMP",
    "Publisher": "Microsoft",
    "ResourceExtensionReferences": [{ ... removed for brevity ... }],
    "ResourceParameters": [{
            "Description": "Computer size",
            "Name": "VMRoleVMSize",
            "Type": "String"
        },
        {
            "Description": "Operating system disk",
            "Name": "VMRoleOSVirtualHardDiskImage",
            "Type": "String"
        },
        {
            "Description": "Network reference",
            "Name": "VMRoleNetworkRef",
            "Type": "String"
        },
        {
            "Description": "Resource Extension CentOS6LAMP. Parameter MySQLRootPassword. Run conce command parameter",
            "Name": "CentOS6LAMPMySQLRootPassword",
            "Type": "SecureString"
        },
        {
            "Description": "Compute name pattern",
            "Name": "VMRoleComputerNamePattern",
            "Type": "String"
        },
        {
            "Description": "Time zone",
            "Name": "VMRoleTimeZone",
            "Type": "String"
        },
        {
            "Description": "Administrator credential",
            "Name": "VMRoleAdminCredential",
            "Type": "Credential"
        },
        {
            "Description": "DNS domain name",
            "Name": "VMRoleDNSDomainName",
            "Type": "String"
        },
        {
            "Description": "SSH public key",
            "Name": "VMRoleSSHPublicKey",
            "Type": "String"
        }
    ],
    "SchemaVersion": "1.0",
    "Type": "Microsoft.Compute/VMRole/1.0",
    "Version": "1.0.0.0"
};

Samla in resursdefinitionsparametrarna

Varje resursdefinition kan ha en lista med parametrar som du måste ange ett värde för. Först måste du kontrollera om det finns några parametrar. Om så finns anger du värden för var och en av parametrarna och packar den resulterande listan i ett annat objekt. När du har hämtat resursdefinitionen från föregående steg kontrollerar du egenskapen ResourceParameters . Den här egenskapen innehåller en lista över parametrar som definieras och används av resursdefinitionen. Listan kan vara tom. Om det inte är det måste du ange ett värde för varje parameter.

Parametrarna för resursdefinitionen och de värden som du anger packas i en JSON-kodad sträng. Formatet på strängen är: { "parameter1 name" : "parameter1 value", "parameter2 name" : "parameter2 value", ... }.

"ResourceParameters": [{
        "Description": "Computer size",
        "Name": "VMRoleVMSize",
        "Type": "String"
    },
    {
        "Description": "Operating system disk",
        "Name": "VMRoleOSVirtualHardDiskImage",
        "Type": "String"
    }
]

Om parametrarna för resursdefinitionen till exempel visas som i föregående kodexempel kan den packade JSON-kodade strängen vara följande.

"{\"VMRoleVMSize\":\"ExtraSmall\",\"VMRoleOSVirtualHardDiskImage\":\"CentOS Linux 6 (64-bit):1.0.0.0\"}"

Mer information om egenskapen ResourceParameters finns i ResourceDefinition [SPFSDK][VMROLE].

Skapa ett JSON-objekt för resurskonfiguration från resursdefinitionsparametrarna

ResourceConfiguration-objektet representerar värdena för de parametrar som används för att skapa en VM-roll. ResourceConfiguration-objektet innehåller också ett versionsfält som representerar versionen av de angivna parametervärdena. Genom att till exempel använda parametervärdena från föregående avsnitt visar exempelkoden ResourceConfiguration-objektet .

{
    "Version": "1.0.0.0",
    "ParameterValues": "{\"VMRoleVMSize\":\"ExtraSmall\",\"VMRoleOSVirtualHardDiskImage\":\"CentOS Linux 6 (64-bit):1.0.0.0\"}"
}

Mer information om ResourceConfiguration-objektet finns i ResourceConfiguration [SPFSDK][VMROLE].

Skapa och skicka ett JSON-objekt för vm-rollinstans

Med referenser till det befintliga ResourceDefinition-objektet och ResourceConfiguration-objektet som du skapade kan du skapa ett nytt VirtualMachineRole-objekt . VirtualMachineRole-objektet skickas sedan till servern som brödtext för en HTTP POST-åtgärd. URL:en till POST till är https://server:30006/subscription-id/CloudServices/cloudservice-name/Resources/MicrosoftCompute/VMRoles?api-version=2013-03

Följande JSON-objekt är ett exempel på en VM-roll som skickas till servern. Observera att egenskaperna ResourceConfiguration, ResourceDefinition, Label och Name har angetts. Mer information om VirtualMachineRole-objektet finns i VirtualMachineRole (instans) [SPFSDK][VMROLE].

{
    "InstanceView": null,
    "Label": "Description of the VM Role Instance",
    "Name": "MyVMRole",
    "ProvisioningState": null,
    "ResourceConfiguration": {
        "ParameterValues": "{\"VMRoleVMSize\" : \"ExtraSmall\",\"VMRoleOSVirtualHardDiskImage\" : \"CentOS Linux 6 (64-bit):1.0.0.0\",\"VMRoleNetworkRef\" : \"My VM Network\",\"CentOS6LAMPMySQLRootPassword\" : \"!!pass3abc12\",\"VMRoleComputerNamePattern\" : \"LAMP###\",\"VMRoleTimeZone\" : \"Pacific Standard Time\",\"VMRoleAdminCredential\" : \"root:!!pass3abc12\",\"VMRoleDNSDomainName\" : \"mydns\",\"VMRoleSSHPublicKey\" : \"key123\"}",
        "Version": "1.0.0.0"
    },
    "ResourceDefinition": {
        "IntrinsicSettings": {
            "HardwareProfile": { "VMSize": "[Param.VMRoleVMSize]" },
            "NetworkProfile": {
                "NetworkAdapters": [{
                    "IPAddresses": [{
                        "AllocationMethod": "Dynamic",
                        "ConfigurationName": "IPV4Configuration",
                        "LoadBalancerConfigurations": [],
                        "Type": "IPV4"
                    }],
                    "Name": "NIC1",
                    "NetworkRef": "[Param.VMRoleNetworkRef]"
                }]
            },
            "OperatingSystemProfile": {
                "AdminCredential": "[Param.VMRoleAdminCredential]",
                "ComputerNamePattern": "[Param.VMRoleComputerNamePattern]",
                "LinuxOperatingSystemProfile": {
                    "DNSDomainName": "[Param.VMRoleDNSDomainName]",
                    "SSHPublicKey": "[Param.VMRoleSSHPublicKey]"
                },
                "TimeZone": "[Param.VMRoleTimeZone]",
                "WindowsOperatingSystemProfile": null
            },
            "ScaleOutSettings": {
                "InitialInstanceCount": "1",
                "MaximumInstanceCount": "5",
                "MinimumInstanceCount": "1",
                "UpgradeDomainCount": "1"
            },
            "StorageProfile": {
                "DataVirtualHardDisks": [],
                "OSVirtualHardDiskImage": "[Param.VMRoleOSVirtualHardDiskImage]"
            }
        },
        "Name": "CentOS6LAMP",
        "Publisher": "Microsoft",
        "ResourceExtensionReferences": [{
            "Name": "CentOS6LAMP",
            "Publisher": "Microsoft",
            "ReferenceName": "CentOS6LAMP",
            "ResourceExtensionParameterValues": "{\"MySQLRootPassword\":\"[Param.CentOS6LAMPMySQLRootPassword]\"}",
            "Version": "1.0.0.0"
        }],
        "ResourceParameters": [{
            "Description": "Computer size",
            "Name": "VMRoleVMSize",
            "Type": "String"
        },
            {
                "Description": "Operating system disk",
                "Name": "VMRoleOSVirtualHardDiskImage",
                "Type": "String"
            },
            {
                "Description": "Network reference",
                "Name": "VMRoleNetworkRef",
                "Type": "String"
            },
            {
                "Description": "Resource Extension CentOS6LAMP. Parameter MySQLRootPassword. Run conce command parameter",
                "Name": "CentOS6LAMPMySQLRootPassword",
                "Type": "SecureString"
            },
            {
                "Description": "Compute name pattern",
                "Name": "VMRoleComputerNamePattern",
                "Type": "String"
            },
            {
                "Description": "Time zone",
                "Name": "VMRoleTimeZone",
                "Type": "String"
            },
            {
                "Description": "Administrator credential",
                "Name": "VMRoleAdminCredential",
                "Type": "Credential"
            },
            {
                "Description": "DNS domain name",
                "Name": "VMRoleDNSDomainName",
                "Type": "String"
            },
            {
                "Description": "SSH public key",
                "Name": "VMRoleSSHPublicKey",
                "Type": "String"
            }
        ],
        "SchemaVersion": "1.0",
        "Type": "Microsoft.Compute/VMRole/1.0",
        "Version": "1.0.0.0"
    },
    "Substate": null
}

HTTP POST-begäran

POST https://smapi-server:30006/01274684-6afa-4f3f-b62f-353c6202fed1/CloudServices/TestVM/Resources/MicrosoftCompute/VMRoles?api-version=2013-03 HTTP/1.1
x-ms-principal-id: user@domain.com
Accept: application/json
Content-Type: application/json
Host: smapi-server:30006
Content-Length: 2676
Expect: 100-continue
Connection: Keep-Alive

{"InstanceView":null,"Label":"Description Value Here","Name":"ExampleVMRole","ProvisioningState":null,"ResourceConfiguration":{"ParameterValues":"{\"VMRoleVMSize\" : \"ExtraSmall\",\"VMRoleOSVirtualHardDiskImage\" : \"CentOS Linux 6 (64-bit):1.0.0.0\",\"VMRoleNetworkRef\" : \"My VM Network\",\"CentOS6LAMPMySQLRootPassword\" : \"!!pass3abc12\",\"VMRoleComputerNamePattern\" : \"LAMP###\",\"VMRoleTimeZone\" : \"Pacific Standard Time\",\"VMRoleAdminCredential\" : \"root:!!pass3abc12\",\"VMRoleDNSDomainName\" : \"mydns\",\"VMRoleSSHPublicKey\" : \"andy\"}","Version":"1.0.0.0"},"ResourceDefinition":{"IntrinsicSettings":{"HardwareProfile":{"VMSize":"[Param.VMRoleVMSize]"},"NetworkProfile":{"NetworkAdapters":[{"IPAddresses":[{"AllocationMethod":"Dynamic","ConfigurationName":"IPV4Configuration","LoadBalancerConfigurations":[],"Type":"IPV4"}],"Name":"NIC1","NetworkRef":"[Param.VMRoleNetworkRef]"}]},"OperatingSystemProfile":{"AdminCredential":"[Param.VMRoleAdminCredential]","ComputerNamePattern":"[Param.VMRoleComputerNamePattern]","LinuxOperatingSystemProfile":{"DNSDomainName":"[Param.VMRoleDNSDomainName]","SSHPublicKey":"[Param.VMRoleSSHPublicKey]"},"TimeZone":"[Param.VMRoleTimeZone]","WindowsOperatingSystemProfile":null},"ScaleOutSettings":{"InitialInstanceCount":"1","MaximumInstanceCount":"5","MinimumInstanceCount":"1","UpgradeDomainCount":"1"},"StorageProfile":{"DataVirtualHardDisks":[],"OSVirtualHardDiskImage":"[Param.VMRoleOSVirtualHardDiskImage]"}},"Name":"CentOS6LAMP","Publisher":"Microsoft","ResourceExtensionReferences":[{"Name":"CentOS6LAMP","Publisher":"Microsoft","ReferenceName":"CentOS6LAMP","ResourceExtensionParameterValues":"{\"MySQLRootPassword\":\"[Param.CentOS6LAMPMySQLRootPassword]\"}","Version":"1.0.0.0"}],"ResourceParameters":[{"Description":"Computer size","Name":"VMRoleVMSize","Type":"String"},{"Description":"Operating system disk","Name":"VMRoleOSVirtualHardDiskImage","Type":"String"},{"Description":"Network reference","Name":"VMRoleNetworkRef","Type":"String"},{"Description":"Resource Extension CentOS6LAMP. Parameter MySQLRootPassword. Run conce command parameter","Name":"CentOS6LAMPMySQLRootPassword","Type":"SecureString"},{"Description":"Compute name pattern","Name":"VMRoleComputerNamePattern","Type":"String"},{"Description":"Time zone","Name":"VMRoleTimeZone","Type":"String"},{"Description":"Administrator credential","Name":"VMRoleAdminCredential","Type":"Credential"},{"Description":"DNS domain name","Name":"VMRoleDNSDomainName","Type":"String"},{"Description":"SSH public key","Name":"VMRoleSSHPublicKey","Type":"String"}],"SchemaVersion":"1.0","Type":"Microsoft.Compute\/VMRole\/1.0","Version":"1.0.0.0"},"Substate":null}

HTTP POST-svar

HTTP/1.1 201 Created
Cache-Control: no-cache
Content-Length: 4839
Content-Type: application/json; odata=minimalmetadata; streaming=true; charset=utf-8
Location: https://spf-server:8090/SC2012R2/VMM/Microsoft.Management.Odata.svc/VMRole/ExampleVMRole
Server: Microsoft-IIS/8.5
x-ms-request-id: 01095ac2-df63-4930-8782-691a8c365319
X-Content-Type-Options: nosniff
request-id: 68d9b05b-a9da-0000-2f56-de68daa9ce01
DataServiceVersion: 3.0;
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
X-Powered-By: ASP.NET
Date: Thu, 19 Sep 2013 22:17:57 GMT

{"odata.metadata":"https://spf-server:8090/SC2012R2/VMM/Microsoft.Management.Odata.svc/$metadata#VMRole/@Element","Name":"ExampleVMRole","Label":"Description Value Here","ResourceDefinition":{"Name":"CentOS6LAMP","Version":"1.0.0.0","Publisher":"Microsoft","SchemaVersion":"1.0","Type":"Microsoft.Compute/VMRole/1.0","ResourceParameters":[{"Name":"VMRoleVMSize","Type":"String","Description":"Computer size"},{"Name":"VMRoleOSVirtualHardDiskImage","Type":"String","Description":"Operating system disk"},{"Name":"VMRoleNetworkRef","Type":"String","Description":"Network reference"},{"Name":"CentOS6LAMPMySQLRootPassword","Type":"SecureString","Description":"Resource Extension CentOS6LAMP. Parameter MySQLRootPassword. Run conce command parameter"},{"Name":"VMRoleComputerNamePattern","Type":"String","Description":"Compute name pattern"},{"Name":"VMRoleTimeZone","Type":"String","Description":"Time zone"},{"Name":"VMRoleAdminCredential","Type":"Credential","Description":"Administrator credential"},{"Name":"VMRoleDNSDomainName","Type":"String","Description":"DNS domain name"},{"Name":"VMRoleSSHPublicKey","Type":"String","Description":"SSH public key"}],"ResourceExtensionReferences":[{"ReferenceName":"CentOS6LAMP","Name":"CentOS6LAMP","Version":"1.0.0.0","Publisher":"Microsoft","ResourceExtensionParameterValues":"{\"MySQLRootPassword\":\"[Param.CentOS6LAMPMySQLRootPassword]\"}"}],"IntrinsicSettings":{"ScaleOutSettings":{"InitialInstanceCount":"1","MaximumInstanceCount":"5","MinimumInstanceCount":"1","UpgradeDomainCount":"1"},"HardwareProfile":{"VMSize":"[Param.VMRoleVMSize]"},"StorageProfile":{"OSVirtualHardDiskImage":"[Param.VMRoleOSVirtualHardDiskImage]","DataVirtualHardDisks":[]},"OperatingSystemProfile":{"ComputerNamePattern":"[Param.VMRoleComputerNamePattern]","TimeZone":"[Param.VMRoleTimeZone]","AdminCredential":"[Param.VMRoleAdminCredential]","WindowsOperatingSystemProfile":{"WorkgroupName":null,"DomainJoin":null},"LinuxOperatingSystemProfile":{"DNSDomainName":"[Param.VMRoleDNSDomainName]","SSHPublicKey":"[Param.VMRoleSSHPublicKey]"}},"NetworkProfile":{"NetworkAdapters":[{"Name":"NIC1","NetworkRef":"[Param.VMRoleNetworkRef]","IPAddresses":[{"AllocationMethod":"Dynamic","Type":"IPV4","ConfigurationName":"IPV4Configuration","LoadBalancerConfigurations":[]}]}]}}},"ResourceConfiguration":{"Version":"1.0.0.0","ParameterValues":"{\"VMRoleVMSize\":\"ExtraSmall\",\"VMRoleOSVirtualHardDiskImage\":\"CentOS Linux 6 (64-bit):1.0.0.0\",\"VMRoleNetworkRef\":\"My VM Network\",\"CentOS6LAMPMySQLRootPassword\":\"__**__\",\"VMRoleComputerNamePattern\":\"LAMP###\",\"VMRoleTimeZone\":\"Pacific Standard Time\",\"VMRoleAdminCredential\":\"root:__**__\",\"VMRoleDNSDomainName\":\"mydns\",\"VMRoleSSHPublicKey\":\"andy\"}"},"ProvisioningState":"Provisioning","Substate":{"VMRoleMessages":[]},"InstanceView":{"VIPs":[],"InstanceCount":"0","ResolvedResourceDefinition":{"Name":"CentOS6LAMP","Version":"1.0.0.0","Publisher":"Microsoft","SchemaVersion":"1.0","Type":"Microsoft.Compute/VMRole/1.0","ResourceParameters":[{"Name":"VMRoleVMSize","Type":"String","Description":"Computer size"},{"Name":"VMRoleOSVirtualHardDiskImage","Type":"String","Description":"Operating system disk"},{"Name":"VMRoleNetworkRef","Type":"String","Description":"Network reference"},{"Name":"CentOS6LAMPMySQLRootPassword","Type":"SecureString","Description":"Resource Extension CentOS6LAMP. Parameter MySQLRootPassword. Run conce command parameter"},{"Name":"VMRoleComputerNamePattern","Type":"String","Description":"Compute name pattern"},{"Name":"VMRoleTimeZone","Type":"String","Description":"Time zone"},{"Name":"VMRoleAdminCredential","Type":"Credential","Description":"Administrator credential"},{"Name":"VMRoleDNSDomainName","Type":"String","Description":"DNS domain name"},{"Name":"VMRoleSSHPublicKey","Type":"String","Description":"SSH public key"}],"ResourceExtensionReferences":[{"ReferenceName":"CentOS6LAMP","Name":"CentOS6LAMP","Version":"1.0.0.0","Publisher":"Microsoft","ResourceExtensionParameterValues":"{\"MySQLRootPassword\":\"__**__\"}"}],"IntrinsicSettings":{"ScaleOutSettings":{"InitialInstanceCount":"1","MaximumInstanceCount":"5","MinimumInstanceCount":"1","UpgradeDomainCount":"1"},"HardwareProfile":{"VMSize":"ExtraSmall"},"StorageProfile":{"OSVirtualHardDiskImage":"CentOS Linux 6 (64-bit):1.0.0.0","DataVirtualHardDisks":[]},"OperatingSystemProfile":{"ComputerNamePattern":"LAMP###","TimeZone":"Pacific Standard Time","AdminCredential":"root:__**__","WindowsOperatingSystemProfile":{"WorkgroupName":null,"DomainJoin":null},"LinuxOperatingSystemProfile":{"DNSDomainName":"mydns","SSHPublicKey":"andy"}},"NetworkProfile":{"NetworkAdapters":[{"Name":"NIC1","NetworkRef":"My VM Network","IPAddresses":[{"AllocationMethod":"Dynamic","Type":"IPV4","ConfigurationName":"IPV4Configuration","LoadBalancerConfigurations":[]}]}]}}}}}

Se även

Etablera VM-roller [SPFSDK][VMROLE]
Skapa en molntjänst som ska vara värd för VM-roller [SPFSDK][VMROLE]
Granska en VM-roll för etableringsfel [SPFSDK][VMROLE]