Integrating iSCSI Target Server into System Center Virtual Machine Manager 2012 R2
Once integrated, VMM can provision storage to managed hosts
March 18, 2014
The Microsoft iSCSI Target Server provides network-accessible, block-level storage to end users. The iSCSI Target Server made its appearance on the scene as an add-on feature in Windows Storage Server. Shortly thereafter, it was available to the public as a separate, free download that could be installed on supported versions of the Windows Server OS. After introducing you to the iSCSI Target Server, I'll show you how to integrate it (as a managed storage provider) into System Center Virtual Machine Manager (VMM) 2012 R2. Once integrated, VMM can provision storage to managed hosts.
Introducing the iSCSI Target Server
The iSCSI Target Server was included with the Windows Server 2012 File Server role when it was released. The iSCSI Target Server is ideal for a variety of scenarios, including:
Deploying diskless servers using boot-capable network adapters or a third-party software loader
Providing remotely accessible storage (which can be continuously available if configured in a failover cluster) for applications running on client or server machines
Heterogeneous environments, which can include third-party iSCSI initiators
Development, test, demonstration, and lab environments in which the iSCSI Target Server is used to test applications or scenarios prior to deploying them in production environments
The iSCSI Target Server was updated in Windows Server 2012 R2. The updates include:
A redesigned data persistence layer that uses the new Virtual Hard Disk (VHD) 2.0 format first introduced in Server 2012. This new format (VHDX) provides greater storage capacity (up to 64TB) and better data corruption protection during power failures. Storage performance is enhanced due to better on-disk alignments and support for the newer large sector (native 4K) drives.
An SMI-S provider that's included with iSCSI Target Server. This provider allows for better integration with VMM.
New cmdlets in the Windows PowerShell module for the iSCSI Target Server. These cmdlets provide more management flexibility in different environments.
Improved disk-level caching functionality. The ISCSI Target Server sets the disk cache bypass flag on the host disk I/O through Force Unit Access (FUA) only when the initiator requests it. This provides the potential for further storage performance improvement.
Scalability improvements. The maximum number of sessions per target server has been increased to 544. The maximum number of LUNs per target server has been increased to 256.
Enabling the iSCSI Target Server Feature
As previously mentioned, the iSCSI Target Server is a feature (i.e., a role service) that's part of the File Server role in Server 2012 R2. You can add this feature with the Add Roles and Features functionality in Server Manager or with the Install-WindowsFeature PowerShell cmdlet.
I'll show you how to use the Install-WindowsFeature cmdlet to add this feature. If you don't use PowerShell often, I recommend that you first run the Update-Help cmdlet. It will download the latest PowerShell cmdlet information, including Help topics and examples from Microsoft.
To add the iSCSI Target Server feature, open PowerShell and run the command:
Install-WindowsFeature -Name FS-iSCSITarget-Server
After the command successfully completes, you can verify the installation using the command:
Get-WindowsFeature -Name FS* | Where InstallState -eq Installed
Once the feature is installed, you can use Server Manager or PowerShell to manage it.
Integrating the iSCSI Target Server with VMM
Integrating a storage device such as the iSCSI Target Server with VMM requires either an SMI-S provider or a native Windows Management Instrumentation (WMI) Storage Management Provider. In Server 2012, you need to manually install the SMI-S agent on the iSCSI Target Server using the VMM 2012 SP1 installation CD-ROM. One of the improvements in Server 2012 R2 is that the iSCSI Target Server SMI-S provider is installed with the feature. No additional installation or configuration is required.
After the iSCSI Target Server feature is installed, you need to perform the following steps to integrate it into VMM:
Open the VMM console, connect to the VMM server, and navigate to the Providers category, which is under FabricStorage.
Right-click Providers and select Add Storage Devices. This action initiates the Add Storage Devices Wizard.
On the Select Storage Provider Type page, select the SAN and NAS devices discovered and managed by an SMI-S provider option. Click Next.
On the Specify Discovery Scope page, provide information about the protocol and SMI-S provider you want to use. In the Protocol drop-down list, select SMI-S WMI. In the Provider IP address or FQDN field, specify either the IP address or Fully Qualified Domain Name (FQDN) of the server hosting the iSCSI Target Server. Finally, in the Run As account field, specify the account you want to use to connect to the server. The account must have local administrator privileges on the server. Click Next.
On the Gather Information page, you can watch as VMM connects to the iSCSI Target Server and collects information about the storage devices. You don't need to do much on this page, except click Next after the data collection process finishes.
On the Select Storage Devices page, choose the available storage pools that you want to be managed by VMM. Be sure to exclude the system drive for the server. When you're done, click Next.
On the Summary page, check the settings and click Finish.
After the Add Storage Devices Wizard finishes, you need to verify that the integration was successful. In the VMM console, navigate to FabricStorage. In the Providers category, make sure that the iSCSI Target Server status is Responding. In the Arrays category, click the listing for the iSCSI Target Server and inspect the displayed information, especially the storage pool information, as shown in Figure 1.
Figure 1: Inspecting the Array Information
In the Classifications and Pools category, expand the classifications that were applied to the iSCSI Target Server storage pools and inspect the information displayed for each pool, as shown in Figure 2.
Figure 2: Inspecting the Pool Information
Provisioning Storage
Once VMM is managing the iSCSI Target Server, storage can be provisioned and allocated to hosts. This requires a little preparation on the host—namely, starting the Microsoft iSCSI Initiator Service and setting it to run automatically. This can be accomplished in Server Manager (ToolsServices) or at the PowerShell command line. You can also run a short PowerShell script similar to this:
Invoke-Command -ComputerName Contoso-HYP1 -ScriptBlock { Set-Service -Name MSiSCSI -StartupType Automatic Start-Service MSiSCSI}
After starting the iSCSI Initiator Service on a host, you need to access the host's properties in the VMM console. On the host's Properties page, click Storage in the left pane. In the right pane, click Add and choose Add iSCSI Array, as Figure 3 shows.
Figure 3: Adding an iSCSI Array
In the Create New iSCSI Session dialog box shown in Figure 4, provide the requested information for the iSCSI Target Server session. After establishing a session with the iSCSI Target Server, data will be displayed indicating the total storage capacity available and the number of managed storage pools.
Figure 4: Creating a New iSCSI Target Server Session
With storage available, the next step is to create LUNs to assign to the hosts. In the VMM console, click the Create Logical Unit option on the Home ribbon. (Alternatively, you can click the Create button and choose Logical Unit.) In the Create Logical Unit dialog box, select an available storage pool, provide a name for the LUN, add a description if desired, specify a size (capacity), and click OK. After the LUN is created, it appears in the Classifications and Pools display under the appropriate classification. As Figure 5 shows, the LUN is associated with the iSCSI Target storage pool. In Figure 5, notice that the new LUN hasn't yet been assigned (Assigned = No). This isn't an anomaly. You need to allocate storage to the host before the LUN can be assigned. (If at any time you do encounter storage-related anomalies in the VMM console display, locate the iSCSI Target Server entry under FabricStorageProviders and execute a Refresh job.)
Figure 5: Examining the LUN
Allocating Storage to the Host
To make storage available to a host, you need to allocate storage to the host group that contains the host. When allocating storage to a host group, you allocate both storage pools and LUNs. First, you allocate the storage pools by opening the host group's Properties page, clicking the Allocate Storage Pools button, and providing the requested storage pool information in the Allocate Storage Pools dialog box. For this example, I allocated four storage pools to a host group named Hyper-V Servers, as shown in Figure 6.
Figure 6: Allocating Storage Pools to the Host Group
Next, you allocate the LUNS by clicking the Allocate Logical Units button on the host group's Properties page and providing the requested LUN information in the Allocate Logical Units dialog box. As Figure 7 shows, for this example, I'm allocating two LUNs from Storage Pool D to the host group.
Figure 7: Allocating LUNs to the Host Group
At this point, you can add the storage to an available host in the host group. To do so, open the host's Properties page in the VMM console and click Storage in the left pane. In the right pane, click Add and choose Add Disk, as shown in Figure 8.
Figure 8: Adding a Disk to a Host
In the dialog box that appears, you need to select the LUN you want to use and provide the requested information, as Figure 9 shows.
Figure 9: Configuring the Host's Disk
On the host, the disk will be shown as Online after the job completes. On the iSCSI Target Server, the disk will be shown as Connected in Server Manager, as you can see in Figure 10. The storage is now ready for use.
Figure 10: Making Sure the Disk Is Connected
A Management Platform for the Private Cloud
I provided you with an example of how to integrate Microsoft's iSCSI Target Server into VMM, but you can integrate other compatible third-party storage vendor solutions into VMM as well. For information about supported third-party solutions, refer to the TechNet article "Supported Storage Arrays for System Center 2012 VMM." I hope the information I presented here has been useful and has demonstrated the flexibility provided by VMM as a management platform for the private cloud.
About the Author
You May Also Like