Nimble storage integration with Nimesa
In my company, one of our prospects is running an on-premise vSphere data center and the storage is backed by HP Nimble
I got the access to their environment to integrate Nimesa with Nimble storage, Earlier I integrated Nimesa with multiple storage servers like Nexenta, DDN IntelliFlash, InfiniDat and Pure Storage.
Nimble REST API
With my experience of integrating with multiple storage vendors, I planned to complete the integration work in a couple of days, and some testing for a week.
Nimble is exposing REST APIs and the document for our targeted Nimble Storage Version 4.5.2.x version is available online https://infosight.hpe.com/InfoSight/media/cms/active/public/pubs_REST_API_Reference_NOS_51x.whz/lbb1529630299502.html
We got the environment with Nimble Storage, vCenter and the ESXi attached to it.
Connectivity to the Array
I developed the REST client to connect with the Nimble Array to do operations like Manage Snapshots, Volumes, Initiators and Targets.
The communication will be like
- Obtain the API Session token using the username and password
- Use the token (X-Auth-Token) in the Header to execute the API calls
Sample API to get the token
POST : https://nimble-node1:5392/v1/tokens
{
"data":{
"username":"asvignesh",
"password":"asvignesh"
}
}
Response:
{
"data": {
"app_name": "",
"creation_time": 1578295599,
"id": "someid",
"last_modified": 1578295599,
"session_token": "tokenstring",
"source_ip": "localhost",
"username": "asvignesh"
}
}
Registering Nimble Storage with Nimesa
After integrating the authentication module, we can successfully register the Nimble Storage with Nimesa console
- Open Nimesa console
- Login to Nimesa
- Click on Add Storage from configuration setting menu in the top
- Choose the Storage vendor as Nimble
- Choose the protocol ( Https )
- Enter the IP, Port ( 5392), username and password of the Storage Host
- Click Add
Discover Virtual Machines backed by Nimble Storage
Once the registration is complete, we connect with the registered vCenters and discover all the connected ESXi server and the basic information, Datastores and Virtual Machines, and the detailed information of the Datastores from the vCenter
- Type of the datastore ( Local Disk, SAN, NAS )
- Connected Port ( iSCSI , FC, NFS
- Target Info ( Target IP, IQN, WWN )
- Disk Details ( Serial Number / mountpoint )
After getting the information from the vCenter, we identify the datastore’s backing storage details.
From the Data IP, we identify the management IP of the Array, to get all the Data IP of the Nimble array I use the API network_configs/detail and get the data_ip from the nic_list
The device backing details will help to identify the LUN / Share is from the Supported and registered storage or not.
Based on this information, I show in the dashboard as Snapshot Supported so that our UI engine can decide whether to add the VM to the backup group or not. If the Snapshot supported is true which means the LUN / Share discovered successfully and identified the backing storage system and communication to the storage is successful so we can backup the Virtual machines.
Backup the Virtual Machines backed by Nimble Storage
Once the discovery is successful and listed all the virtual machines in the Inventory with the snapshot supported status, now we can create a Backup group with the Snapshot supported virtual machines
Once the SLA policy is added and the backup group is created, the backup job will be triggered.
The Backup Job will create a Snapshot of the Volume, the volume will be identified by the SCSI Serial Number fetched from the Datastore.
GET volumes/detail?serial_number= will give the volume details, and create the snapshot of the volume using the volume ID by calling POST snapshots
Instant Clone of Virtual Machine backed by Nimble Volume
Once we setup the Backup group with application policy and schedule policy, the Nimesa scheduler will trigger backup jobs on the scheduled time.
To do the instant clone of the Virtual Machine,
Select the backup group and the Virtual machine to be cloned, and in the Backup List tab, select the backup name from the list of backups ordered by creation time by default
And Click on clone icon
In the Wizard, select the destination vCenter ( if you have multiple ), choose the host and VM Clone Name
Select the clone Expiry ( If you want to delete the clone on the specific time )
Click Next and Click Clone
The virtual machine will be cloned from the backup point on the provided environment.
Under the hood, we clone the snapshot which we created at the time of backup and attach to the Initiator group identified by the provided ESXi IQN, then the datastore will be mounted and attach the Virtual Machine to the Inventory.
Originally published at asvignesh.