Identify block devices inside VMs provisioned from Morpheus?

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?

Have you used the variable <%=server.volumes%>?

(I believe in Ansible the var would be morpheus['server']['volumes'])

I get returns of the entire disk map when I do that:

I also have a shared script here, would have to double check when not on my phone if this is the code that would format, online, and label the disks in the UI on both provisioning and reconfigure phases for windows:

Howdy, yessir, I have seen that, but it’s giving Linux device paths, which I don’t know how to map inside of a Winders VM.

I guess I should have been more clear. The drive letters are specific, not randomized. Logs is a specific drive letter. Apps is a specific drive letter. It’s not enough that they simply have some letter - it needs to be the specific letter the company has standardized upon, and for that I need to be able to trace a specific volume from the catalog code, through to Azure, through to inside the VM. I can map from Azure to the VM by referencing the LUN numbers, but I’m running into difficulty in saying “oh, look, here’s this volume I named “Log”, which on the Azure side is blahblahblah,” which then gets me the LUN number.

Ideally, the {{ morpheus }} JSON hairball that’s passed into Ansible would have more verbosity about the storage volumes.