With the increasing popularity of private cloud infrastructures, automation of storage and hypervisor management becomes even more acuter.
To provide the utility for managing Hyper-V virtual machines, Microsoft has released System Center Virtual Machine Manager (SCVMM). This functionality has been initially introduced in SCVMM 2012 SP1 as well as the support of SMI-S standard. Now, the VMM console allows users creating, removing, marking, formatting, assigning, and connecting disks to the Hyper-V hosts. Originally, these tasks were performed via utilities provided by the storage array manufacturers with complicated management.
This guide describes how to configure, connect, and use SMI-S provider to automate the management of storage arrays. StarWind Virtual SAN will be used as an example of iSCSI storage that can be operated with SMI-S.
Storage Management Initiative – Specification (SMI-S) is a standard of disk storage management. SMI-S is based on the Common Information Model (CIM) open standard, Common Information Model (CIM), and the Web-Based Enterprise Management (WBEM) technology. SMI-S is certified as an ISO standard and is supported by many storage system vendors.
SMI-S is fully supported in Windows Server 2016 by the Storage Spaces functionality. Storage Spaces enables the use of SMI-S in PowerShell scripts for automation.
Disk array manufacturers also have to ensure SMI-S support by their products. They typically provide a so-called SMI-S provider or an «agent» that mediates the communication between an SMI-S client and a server storage array. A SMI-S client is connected to the SMI-S provider via CIM-XML protocol, while SMI-S provider itself can use proprietary interfaces to manage the disk array.
Installing and Configuring StarWind SMI-S Agent
StarWind offers free SMI-S provider for storage management called StarWind SMI-S Agent.
1. To install the latest version of which is fully compatible with SMI-S provider, download the StarWind setup executable file from the website by following this link: https://www.starwindsoftware.com/starwind-virtual-san
2. Launch the downloaded setup file on the server where you wish to install StarWind Virtual SAN or one of its components. The setup wizard will appear.
3. Read and accept the License Agreement. Click Next to continue.
4. Carefully read the information about new features and improvements. Red text indicates warnings for users who are updating existing software installations. Click Next to continue.
5. Click Browse to modify the installation path if necessary and Click Next to continue.
6. Select the required components for the minimum setup including SMI-S Agent, as shown in the screenshot below, and click Next to continue.
7. Specify the Start Menu folder and click Next to continue.
8. Enable the checkbox if you want to create a desktop icon. Click Next to continue.
9. Check the components to install and click the Install button.
10. The installation wizard will ask you to configure the SMI-S Agent. You can skip this step to complete the components installation.
After StarWind SMI-S Agent is installed, it can be configured with StarWind SMI-S Configurator.
11. StarWind SMI-S Configurator can be launched from the Start menu. Alternatively, press Win + R, type StarWindSMISConfigurator in the Run window, and click OK.
12. The StarWind SMI-S Configurator window will appear.
13. In the StorageSystemName text field, specify the name for a disk array, e.g. TestStorage.
14. Specify address of the host running the StarWind service.
15. Leave the number in the StorageSystemPort field unchanged.
NOTE: Please distinguish between the StarWind service management Port (3261) and the Port 5988 which provides an access to StarWind SMI-S Agent.
16. In the path fields, specify correct paths to folders where StarWind disk device images will be stored.
NOTE: When you fill in the path fields, use the same format as the one used for the creation of virtual devices in StarWind Management Console.
17. Click OK to apply the settings.
NOTE: By default, there is no password to access StarWind SMI-S Agent. To change these settings, modify the cimserver_planned.conf file located in the installation folder of StarWind SMI-S Agent. Add the following line to the file:
enableAuthentication = true
Save the file and restart the StarWind SMI-S Agent service. Then, add the following to the command line:
cimuser-a-u <username>-w <password>
The <username> field should be filled in with the name of the existing account on the host that runs StarWind SMI-S Agent.
Connecting SMI-S provider to SCVMM 2016
To enable disk array management using VMM, connect the appropriate SMI-S provider.
To connect SMI-S provider:
18. Click the Add Resources button on the toolbar of the SCVMM console.
19. Select Storage Devices.
20. Specify the type of a storage provider. Select the SAN or NAS devices discovered and managed by a SMI-S provider radio button.
21. Select SMI-S CIMXML protocol and enter the address of the host where StarWind SMI-S Agent is running.
22. Specify the user name that will be used by VMM for authorization on StarWind SMI-S Agent. If there is no appropriate user, create it by clicking the Browse button.
23. If the wizard succeeds in connecting to the provider, it will show all available disk arrays. The picture below illustrates that wizard has detected the StarWind storage device called TestStorage.
24. Click Next and select the pools to be assigned to VMM. Each selected pool has to be classified. If there are no classification options yet, click Create classification to carry out the required action.
25. Confirm the settings specified before. Summary displays the information regarding disk array, provider, and pools to be managed by VMM.
Creating a logical unit
A logical unit (LU, Storage Volume) is created on the basis of a storage pool. All created devices are displayed in the Classification and Pools column. The screenshot below illustrates that there aren’t any logical units yet.
26. To add a new logical unit, click Create Logical Unit on the toolbar.
27. In the Create Logical Unit dialog, select a storage pool, specify name and size of an LU, and click OK.
28. The newly created device appears in the list (view the Name column).
NOTE: The new logical unit test1 is not assigned to any host, which is displayed by the value No in the Assigned field.
After this operation, StarWind Management Console displays the new device imagefile1.
The device is active and connected to the target. Note that the image file location is My Computer\E.
Allocating storage pools and logical units
SCVMM allows allocating storage pools and logical units to different Hyper-V hosts and host groups. To make a storage pool or logical unit available for a host or a host group, allocate them to a particular host or host group.
29. To allocate storage pools and logical units, click Allocate Capacity on the toolbar.
30. In the Allocate Storage Capacity dialog, click on the Allocate Storage Pools and Allocate Logical Units buttons.
31. In the Allocate Storage Pools window, select the Display as available only storage arrays that are visible to any host in the host group checkbox to verify that storage pools are available on the network.
32. Select a storage pool and click the Add button.
33. Repeat the same procedure for every storage pool and click OK.
NOTE: In case the storage pools disappeared from the list after selecting this checkbox, refresh the information on a Hyper-V host and storage provider.
- To refresh information on a Hyper-V host, click Refresh on the shortcut menu of a respective host.
- To refresh information on a storage provider, click Rescan on the shortcut menu of SMI-S provider.
If storage pools aren’t displayed on the list, check the firewall settings, network paths, network zoning, etc. It is likely that the Hyper-V hosts from the group have no access to the StarWind VSAN service.
34. Follow the same procedure to allocate the logical unit to the All Hosts group.
Connecting logical units to Hyper-V hosts
35. To connect a logical unit to a Hyper-V host, choose a host and click Properties on the shortcut menu.
36. In the Properties window, click Storage on the left pane.
37. Click Add iSCSI Array to add a disk array.
38. In the Create New iSCSI Session dialog, select a disk array and click Create.
A new disk array appears on the Target portals list on the Discovery tab of an iSCSI Initiator Properties of the selected Hyper-V host.
39. Open Microsoft iSCSI Initiator on the Hyper-V host to check the target portals. In this case, 172.16.10.2 is an IP address of the host where StarWind VSAN is installed and running.
After the new array has been added, new disks can be based on it and the existing ones connected.
40. Click Add and then Add Disk to connect a new disk to the host.
NOTE: Since the logical unit test1 has been allocated to the host group All hosts, it was automatically chosen from the list of available devices.
41. Click the Create Logical Unit button (green underlined) to create a new logical unit right from this window. As soon as the logical unit is selected, the system provides all information available for it. VMM suggests disk initialization, its formatting to NTFS, and assigning a disk letter to make a logical unit available for VHD-files of VMs.
42. Click OK to connect a logical unit to a Hyper-V host.
The host has been connected to the iSCSI target iqn.2008-08.com.starwindsoftware:vsan-02.ravi.local-test1, and a new 10GB volume has been formatted to NTFS. This proves that the connection of a logical unit to a Hyper-V host has been successful.
43. Right-click Classification and Pools of the SCVMM 2016 Console and view that the details of a logical unit test1 have been updated. The property Assigned should display the value Yes.
The same information is displayed on the Target List tab of StarWind Management Console.
The iSCSI Sessions tab shows the initiator iqn.1991-05.com.microsoft:vsan-02.ravi.local as currently connected to the selected target.
When a logical unit is allocated to a host, SMI-S provider also adds the access rule to the StarWind ACL service to permit the connection of the selected host to a target.
NOTE: Names of ACL rules created by SMI-S provider always include the prefix SMI-S. It is not recommended to change these rules or manually delete them from StarWind Management Console.
Disconnecting logical units from Hyper-V hosts
44. To disconnect logical units, open Properties of a Hyper-V host, click Storage.
45. On the Storage pane, select a disk you need to remove and click the Remove button.
46. Click Yes in the VMM dialog to confirm the disconnection of the selected logical unit. The logical unit and its data remains untouched, so this device can be connected later at any time.
Deleting logical units
If a logical unit isn’t required anymore, it can be deleted, thereby freeing the space occupied in the storage pool. A logical unit should be disconnected from all Hyper-V hosts in order to be deleted. Make sure that the property Assigned has the value No.
47. To delete a logical unit, expand Storage, and right-click Classification and Pools of the SCVMM 2016 Console.
48. Select a logical unit that you need to delete and click Remove on the shortcut menu.
49. Click OK in the VMM dialog to confirm the deletion.
List of jobs
All current and previous operations of SCVMM are listed on the Jobs window. The green checkmark and the status Completed show that all operations mentioned above have been successfully completed.
Support of the SMI-S standard by SCVMM 2016 is an important step for the automation of the cloud infrastructure management. Now, most operations can be performed from the VMM Console and there is no need to address management utilities provided by the disk array manufacturers, for example, StarWind Management Console. The use of SMI-S substantially simplifies administration as it eliminates the need to operate different disk arrays produced by various vendors.
All the operations mentioned above can be also performed by means of PowerShell scripts, which provides even more automation capabilities and simplifies management.