Few Method To Deploy Virtual Machine Scale Set With Azure Template



Virtual Machine Scale Set overview : link

Basic overview about azure template:

1. The azure template mainly contains the following elements, Each element contains properties you can set.

 

2. In the parameters section of the template, you specify which values you can input when deploying the resources

扫描二维码关注公众号,回复: 3860749 查看本文章

 

3. In the variables section, you construct values that can be used throughout your template. You do not need to define variables, but they often simplify your template by reducing complex expressions.

 

4. In the resources section, you define the resources that are deployed or updated. This section can get complicated because you must understand the types you are deploying to provide the right values.

 

5. For more information about azure template, please visit the official link.

Here is some hint about deploy scale set with azure template:

1. The image resource can be either from market place or custom image. If the image resource is custom image, it should be generalize before use. Here is the official documentation about how to generalize the custom image : link (Although the official parameter documentation show that the azure allow specific image resource, but it fail in my experiment for some unknown reason)

2. There are two methods to create osDisk, one is to create a image resource,  then reference it in the osDisk profile. The other way is directly reference the imagevhd uri to create it. Please refer to the attachments for details.

          2.1.1  Create a image resource

 

       2.1.2  Reference the image in the virtual machine profile

 

        2.2.1 Directly use imagevhd uri to create osDisk

 

3. The customer might want to separate the vhd file into different storage account.Unfortunately, the azure no longer support such behavior. In my experiment, Azure will accord to the osDisk create method automatic deploy managed disk or unmanaged disk. If you choose to create a image and then reference it to create osDisk, azure will deploy a managed disk type scale set, otherwise it will be unmanaged disk. Please refer the attachment chart for more detail.

Create

Storage account

Create

Vhdcontainers

Image Resource

osDisk

Create method

Disk type

Others

Yes

Yes

Market

Image reference

Unmanaged

Pleasecheckthefirstattachment

Yes

Yes

Custom

Image reference

Fail

No

No

Custom

Image reference

Managed

Please check the second attachment

Yes

Yes

Custom

Image uri

Fail

Yes

No

Custom

Image uri

Unmanaged

In my experiment, I Have to remove vhdcontainers

To make it work, although the Official documentation

shown that the element "image" and "vhdcontainers" can

Coexist, but it fail. And there is nothing Inside of the storage

account after the deploy success. It looks like some bad design

In the azure update.

Please check the third attachment 

No

No

Custom

Image uri

Unmanaged

Please check the fourth attachment

Some Deploy Result Of The Azure Template:

1. Using visual studio's azure template to deploy a scale set with unmanaged disk.

 

  1.1 Azure Template file,key words: Scale Set, Market Image, Unmanaged Disk, imagereference


  1.2 Resource Group:

1.3 Resource Group/Virtual Machine Scale Sets/Storage

 

2. Using custom image to deploy a scale set with managed disk. The link shown as below:

https://github.com/Azure/azure-quickstart-templates/tree/master/201-vmss-windows-customimage ,modify

Some unnecessary output message.

2.1 Azure Template file,key words: Scale Set, Custom Image, managed Disk, imagereference


2.2 Resource Group :

2.3 Resource Group/Virtual Machine Scale Sets/Storage

 

 

 


猜你喜欢

转载自blog.csdn.net/DGPLM/article/details/77753660