Hey all,
Given the cloud template YAML below, I thought I would be able to iterate over each of the virtual machines that get added and specify different CPUcount and memoryMB for each VM. In reality, it if request 3 virtual machines, then 3 do get deployed and each works fine, however, they all take the same CPU and memory specification. Disks, work fine (since the fix released last year). I believe this could be a problem with the actual product but wondered if anyone else had managed to get this working at all? BTW, I am running vRA8.6 fully patched and up to date.
formatVersion: 1
inputs:
testprops:
type: array
items:
type: object
properties:
memory:
type: integer
encrypted: false
title: Memory
description: Total Memory in GB
default: 4
cpuCount:
type: integer
encrypted: false
title: Total CPUs
default: 1
resources:
Cloud_vSphere_Machine:
type: Cloud.vSphere.Machine
properties:
image: Centos-7
cpuCount: '${input.testprops[count.index].cpuCount}'
totalMemoryMB: '${input.testprops[count.index].memory * 1024}'
storage:
constraints:
- tag: 'storage:gold'
networks:
- network: '${resource.Cloud_vSphere_Network.id}'
count: '${length(input.testprops)}'
Cloud_vSphere_Network:
type: Cloud.vSphere.Network
properties:
networkType: existing
constraints:
- tag: 'network.profile:192.168.100.0/24'
Silly me - forgot something so simple!
allocatePerInstance: true
Silly me - forgot something so simple!
allocatePerInstance: true