New-CmAzIaasVm

Deploys multiple virtual machines, over multiple resource groups.

Completes the following:

  • Deploys multiple virtual machines over multiple resource groups.
  • Encrypts all os and data disks using a key encryption key from a specified keyvault.
  • Mounts all hard drives set up in the vms.
  • Enables azure monitor and links all vms to the core log analytics workspace.
  • Automatically accepts terms for using custom images.

This command forms part of the IaaS Building Block.

Parameters

-SettingsFile

Required. (String) File path for the settings file to be converted into a settings object.

-SettingsObject

Required. (Object) Object containing the configuration values required to run this cmdlet.

-LocalAdminUsername

Required. (SecureString) Local admin username for deployed vms, max length 20 characters.

-LocalAdminPassword

Required. (SecureString) Local admin passwords for deployed vms, requires three of the following character types: * Uppercase * Lowercase * Numeric * Special

-TagSettingsFile

Required. (String) File path for the tag settings file to be converted into a tag settings object.

-WhatIf

(Switch) Run the command without executing any actions, so that no changes are made. The command will output a description of actions to be performed against the affected resources in the console window. Use this option if you are unsure of the overall impact of your command and wish to review it before committing to making changes.

-Confirm

(Switch) Run the command without executing any actions, so that no changes are made. The command will output a description of actions to be performed against the affected resources in the console window. Use this option if you are unsure of the overall impact of your command and wish to review it before committing to making changes.

Usage

Example 1

1
New-CmAzIaasCompute -SettingsFile "c:/directory/settingsFile.yml" -LocalAdminUsername "username" -LocalAdminPassword "password"

Example 2

1
New-CmAzIaasCompute -SettingsObject $settings -LocalAdminUsername "username" -LocalAdminPassword "password"

Settings

Beta documentation
The following schema documentation is automatically generated as part of a recent roadmap task. There may be inaccuracies or incomplete information while we flush out bugs; please refer to the packed project settings examples where necessary.

Settings Root.

Component

component [string | null]

Value to determine what cmdlet should be dynamically loaded for these settings.

Location

location [string] Mandatory

Default location for all deployed resources.

DSCConfigNode

dscConfigNode [string | null]

Name of the compiled configuration node in automation account.

Service

service [object] Mandatory

Contains dependency and publish details for service location.

Dependencies

dependencies [object]

Contains dependency details for service location.

Automation

automation [string]

Dependency value to fetch existing resource type.

Keyvault

keyvault [string]

Dependency value to fetch existing resource type.

VNet

vnet [string | null]

Global default dependency value to fetch existing resource type.

Workspace

workspace [string]

Dependency value to fetch existing resource type.

Publish

publish [object | null]

Contains publish details for service location.

ResourceGroup

resourceGroup [string | null]

Global default value to publish on deployed resource type.

VM

vm [string | null]

Global default value to publish on deployed resource type.

NIC

nic [string | null]

Global default value to publish on deployed resource type.

proximityPlacementGroup

proximityPlacementGroup [string | null]

Global default value to publish on deployed resource type.

availabilitySet

availabilitySet [string | null]

Global default value to publish on deployed resource type.

DiskEncryptionKey

diskEncryptionKey [string] Mandatory

Name of key encryption key in the existing key vault.

Groups

groups [array] Mandatory

Contains list of details required to deploy resource groups, vm's and associated resources.

Name

name [string]

Becomes part of the generated resource group's name.

Location

location [string | null] Mandatory

Resource group deployment location

Service

service [object | null] Mandatory

Contains dependency and publish details for service location.

Publish

publish [object | null]

Contains publish details for service location.

ResourceGroup

resourceGroup [string | null]

Local overriding value to publish on deployed existing resource type.

proximityPlacementGroups

proximityPlacementGroups [array | null]

Contains list of details required to deploy proximityPlacementGroups.

Name

name [string]

Becomes part of the generated proximityPlacementGroups name.

Location

location [string | null] Mandatory

ProximityPlacementGroup's location

Service

service [object | null] Mandatory

Contains dependency and publish details for service location.

Publish

publish [object | null]

Contains publish details for service location.

proximityPlacementGroup

proximityPlacementGroup [string | null]

Local overriding value to publish on deployed existing resource type.

availabilitySets

availabilitySets [array | null]

Contains list of details required to deploy availabilitySets.

Name

name [string]

Becomes part of the generated availabilitySets name.

Location

location [string | null] Mandatory

availabilitySets location

platformUpdateDomainCount

platformUpdateDomainCount [integer | null]

Provide total number of Update Domains in Availability set.

platformFaultDomainCount

platformFaultDomainCount [integer | null]

Provide total number of Fault Domains in availability set.

proximityPlacementGroup

proximityPlacementGroup [string | null]

Specifies proximity placement group to attach with availability set.

sku

sku [object | null]

sku details.

name

name [string]

The sku name.

Valid values:"Classic" , "Aligned" , "classic" , "aligned"

tier

tier [string | null]

Specifies the tier of virtual machines in a scale set.

Valid values:"Standard" , "Basic" , "standard" , "basic" , ""

capacity

capacity [integer | null]

Specifies the number of virtual machines in the scale set.

Service

service [object | null] Mandatory

Contains dependency and publish details for service location.

Publish

publish [object | null]

Contains publish details for service location.

availabilitySet

availabilitySet [string | null]

Local overriding value to publish on deployed existing resource type.

VirtualMachines

virtualMachines [array]

Contains list of details required to deploy vm's and associated resources.

Name

name [string]

Becomes part of the generated virtual machine's name.

Size

size [string]

Preset vm hardware configuration option (predefined in azure).

UpdateGroup

updateGroup [string | null]

Pre-defined group of azure defined vm update bundles.

Valid values:"Critical" , "CriticalSecurity" , "Recommended" , "All" , "critical" , "criticalsecurity" , "recommended" , "all" , ""

UpdateFrequency

updateFrequency [string | null]

The frequency of the updates applied to the vm.

Valid values:"Monthly" , "Monday" , "Tuesday" , "Wednesday" , "Thursday" , "Friday" , "Saturday" , "Sunday" , "Daily" , "monthly" , "monday" , "tuesday" , "wednesday" , "thursday" , "friday" , "saturday" , "sunday" , "daily" , ""

ImageReference

imageReference [object]

Container of details in regards to the vm image used.

Publisher

publisher [string]

Publisher source of the image.

Offer

offer [string]

Platform or marketplace image product.

Sku used

sku [string]

Image sku.

Version

version [string]

Platform or marketplace image version, (Major.Minor.Build) or latest.

Location

location [string | null] Mandatory

Virtual machine deployment location

zone

zone [integer | null]

Virtual machine deployment zone.

Valid values:"1" , "2" , "3" , ""

zone

availabilitySet [string | null]

Availability set of virtual machine.

Service

service [object | null] Mandatory

Contains dependency and publish details for service location.

Publish

publish [object | null]

Contains publish details for service location.

VM

vm [string | null]

Local overriding value to publish on deployed existing resource type.

NIC

nic [string | null]

Local overriding value to publish on deployed existing resource type.

OSDisk

osDisk [object]

Container of details in regards to vm's operating system disk.

OSType

osType [string]

The over arching type of OS to use.

Valid values:"Windows" , "Linux" , "windows" , "linux"

ExpandableDiskSizeGB

expandableDiskSizeGB [integer]

The size of the disk in gigabytes. (Overwrites disk size in vm image).

caching

caching [string]

Defines disk caching strategy

Valid values:"None" , "ReadOnly" , "ReadWrite" , "none" , "readonly" , "readwrite"

DataDiskSizes

dataDisks [array | null]

List of details specifiying the size of and how many data disks will be deployed with the vm.

diskSizeGB

diskSizeGB [integer]

The size of the disk in gigabytes.

Caching

caching [string]

Defines disk caching strategy

Valid values:"None" , "ReadOnly" , "ReadWrite" , "none" , "readonly" , "readwrite"

Plan

plan [object | null]

Container of details in regards to what vm marketplace image to use for the vm.

Name

name [string]

Plan id.

Publisher

publisher [string]

Publisher id source of the image..

Product

product [string]

Marketplace image product.

Networking

networking [object]

Container of details in regards to network dependency values.

Service

service [object | null] Mandatory

Contains dependency and publish details for service location.

Dependencies

dependencies [object | null]

Contains dependency details for service location.

Vnet

vnet [string | null]

Local overriding dependency value to fetch existing resource type.

IPAddress

ipAddress [string | null]

Private ip address for the network interface card. Must follow ipv4 format.

SubnetName

subnetName [string]

Name of subnet to use in existing vnet.

Examples

The following example files are automatically generated from the settings file schema definition to show how the specification can be used in practise. Cloudmarque can accept both JSON and YAML parameter files.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
{
  "component": "string",
  "location": "string",
  "dscConfigNode": "string",
  "service": {
    "dependencies": {
      "automation": "string",
      "keyvault": "string",
      "vnet": "string",
      "workspace": "string"
    },
    "publish": {
      "resourceGroup": "string",
      "vm": "string",
      "nic": "string",
      "proximityPlacementGroup": "string",
      "availabilitySet": "string"
    }
  },
  "diskEncryptionKey": "string",
  "groups": [
    {
      "name": "string",
      "location": "string",
      "service": {
        "publish": {
          "resourceGroup": "string"
        }
      },
      "proximityPlacementGroups": [
        {
          "name": "string",
          "location": "string",
          "service": {
            "publish": {
              "proximityPlacementGroup": "string"
            }
          }
        }
      ],
      "availabilitySets": [
        {
          "name": "string",
          "location": "string",
          "platformUpdateDomainCount": "integer",
          "platformFaultDomainCount": "integer",
          "proximityPlacementGroup": "string",
          "sku": {
            "name": "Classic",
            "tier": "Standard",
            "capacity": "integer"
          },
          "service": {
            "publish": {
              "availabilitySet": "string"
            }
          }
        }
      ],
      "virtualMachines": [
        {
          "name": "string",
          "size": "string",
          "updateGroup": "Critical",
          "updateFrequency": "Monthly",
          "imageReference": {
            "publisher": "string",
            "offer": "string",
            "sku": "string",
            "version": "string"
          },
          "location": "string",
          "zone": "1",
          "availabilitySet": "string",
          "service": {
            "publish": {
              "vm": "string",
              "nic": "string"
            }
          },
          "osDisk": {
            "osType": "Windows",
            "expandableDiskSizeGB": 0,
            "caching": "None"
          },
          "dataDisks": [
            {
              "diskSizeGB": 0,
              "caching": "None"
            }
          ],
          "plan": {
            "name": "string",
            "publisher": "string",
            "product": "string"
          },
          "networking": {
            "service": {
              "dependencies": {
                "vnet": "string"
              }
            },
            "ipAddress": "string",
            "subnetName": "string"
          }
        }
      ]
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
component: "string"    # Optional
location: "string"    # Mandatory
dscConfigNode: "string"    # Optional
service:     # Mandatory
  dependencies:     # Mandatory
    automation: "string"    # Mandatory
    keyvault: "string"    # Mandatory
    vnet: "string"    # Optional
    workspace: "string"    # Mandatory
  publish:     # Optional
    resourceGroup: "string"    # Optional
    vm: "string"    # Optional
    nic: "string"    # Optional
    proximityPlacementGroup: "string"    # Optional
    availabilitySet: "string"    # Optional
diskEncryptionKey: "string"    # Mandatory
groups:     # Mandatory
  - name: "string"    # Mandatory
    location: "string"    # Optional
    service:     # Optional
      publish:     # Optional
        resourceGroup: "string"    # Optional
    proximityPlacementGroups:     # Optional
      - name: "string"    # Mandatory
        location: "string"    # Optional
        service:     # Optional
          publish:     # Optional
            proximityPlacementGroup: "string"    # Optional
    availabilitySets:     # Optional
      - name: "string"    # Mandatory
        location: "string"    # Optional
        platformUpdateDomainCount: "integer"    # Mandatory
        platformFaultDomainCount: "integer"    # Mandatory
        proximityPlacementGroup: "string"    # Optional
        sku:     # Mandatory
          name: "Classic"    # Mandatory
          tier: "Standard"    # Optional
          capacity: "integer"    # Optional
        service:     # Optional
          publish:     # Optional
            availabilitySet: "string"    # Optional
    virtualMachines:     # Mandatory
      - name: "string"    # Mandatory
        size: "string"    # Mandatory
        updateGroup: "Critical"    # Optional
        updateFrequency: "Monthly"    # Optional
        imageReference:     # Mandatory
          publisher: "string"    # Mandatory
          offer: "string"    # Mandatory
          sku: "string"    # Mandatory
          version: "string"    # Mandatory
        location: "string"    # Optional
        zone: "1"    # Optional
        availabilitySet: "string"    # Optional
        service:     # Optional
          publish:     # Optional
            vm: "string"    # Optional
            nic: "string"    # Optional
        osDisk:     # Mandatory
          osType: "Windows"    # Mandatory
          expandableDiskSizeGB: 0    # Mandatory
          caching: "None"    # Optional
        dataDisks:     # Optional
          - diskSizeGB: 0    # Mandatory
            caching: "None"    # Optional
        plan:     # Optional
          name: "string"    # Mandatory
          publisher: "string"    # Mandatory
          product: "string"    # Mandatory
        networking:     # Mandatory
          service:     # Optional
            dependencies:     # Optional
              vnet: "string"    # Optional
          ipAddress: "string"    # Optional
          subnetName: "string"    # Mandatory