- Community Home
- >
- Software
- >
- HPE Morpheus Software
- >
- HPE Morpheus Enterprise
- >
- Re: Identify block devices inside VMs provisioned ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2022 01:47 PM
08-24-2022 01:47 PM
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?
- Tags:
- Ansible
- automation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2022 03:13 PM
08-24-2022 03:13 PM
Re: Identify block devices inside VMs provisioned from Morpheus?
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:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2022 03:42 PM
08-24-2022 03:42 PM
Re: Identify block devices inside VMs provisioned from Morpheus?
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2022 03:21 PM
08-24-2022 03:21 PM
Re: Identify block devices inside VMs provisioned from Morpheus?
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:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2022 01:41 PM
09-20-2022 01:41 PM
Re: Identify block devices inside VMs provisioned from Morpheus?
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.