SimpliVity VM Data to SimpliVity Host Mapping

Have had several requests from customers for a report to identify where a VM’s primary data and secondary (or HA copy) data is stored in a SimpliVity cluster. The VM’s data locations are available in the HPE SimpliVity REST API but this information is not displayed in the vCenter Plugin.

Here is a quick powershell script, using the SimpliVity REST API, I put together to provide this information https://github.com/herseyc/SVT/blob/master/SVT-VMHAMAP.ps1

The script creates and outputs a powershell object with the following information:

VMNAME – vCenter Inventory Name of the VM
VMSTATE – Current state of VM
VMHA – Is the VM in SimpliVity HA
OSCLUSTER – The SimpliVity Cluster the VM is in
VMPRIMARY – Location of the VMs Primary Data
VMSECONDARY – Location of the VMs Secondary (HA) Data

To use the script just edit the variables for the OVC IP Address ($ovc), vCenter Username ($username), and the password for the vCenter Username ($pass) and run it in powershell.

You can format the output into a table using:
SVT-VMHAMAP.ps1 | Format-Table

The table formatted output will look something like this:

You can also export the output to a CSV file using:
SVT-VMHAPMAP.ps1 | Export-CSV -Path

Hope you find this useful. Happy to answer any questions, just post them in the comments.

Leave a Reply

Your email address will not be published. Required fields are marked *

1 × 5 =