Scenario: Catalog item which provisions a Windows (yeah, yeah, I know) VM in Azure using Morpheus native code. This VM has additional block devices defined in addition to the OS disk:
volumes:
- size: 127
maxIOPS: null
name: root
rootVolume: true
storageType: 40
minStorage: 136365211648
maxStorage: 136365211648
- size: <%= if(customOptions.environment == 'dev') {'32'} else if(customOptions.environment == 'SID') {'256'} else if(customOptions.environment == 'INTEG') {'256'} else if(customOptions.environment == 'PAT') {'256'} else if(customOptions.environment == 'PAT2') {'256'} else if(customOptions.environment == 'DEMO') {'256'} else if(customOptions.environment == 'PREP') {'256'} else if(customOptions.environment == 'PROD') {'256'} else {'256'} %>
maxIOPS: null
name: App
rootVolume: false
minStorage: 0
storageType: 40
maxStorage: <%= if(customOptions.environment == 'dev') {'34359738368'} else if(customOptions.environment == 'SID') {'274877906944'} else if(customOptions.environment == 'INTEG') {'274877906944'} else if(customOptions.environment == 'PAT') {'274877906944'} else if(customOptions.environment == 'PAT2') {'274877906944'} else if(customOptions.environment == 'DEMO') {'274877906944'} else if(customOptions.environment == 'PREP') {'274877906944'} else if(customOptions.environment == 'PROD') {'274877906944'} else {'274877906944'} %>
- size: 32
maxIOPS: null
name: Log
rootVolume: false
minStorage: 0
storageType: 40
maxStorage: 0
- size: 64
maxIOPS: null
name: Backup
rootVolume: false
minStorage: 0
storageType: 40
maxStorage: 68719476736
I then have Ansible tasks/workflows to partition, format and map these block devices to specific drive letters within the VM.
The problem is that I can’t find a programmatically predictable way to positively identify which device is which inside the VM. The ‘name:’ key/value doesn’t seem to get passed in either via the morpheus variables which are supplied to Ansible nor via an API call to Morpheus. It seems to be a tag which is only displayed in the Morpheus UI.
Has anyone else identified a path to accomplish this?