Welcome again to this series of posts on configuring a Microsoft System Center Virtual Machine Manager 2012 R2 lab. In the previous post you configured an ISCSI Target Server on the virtual machine named LAB2013ISCSI01. The next step is to configure the ISCSI initiators (which are your two Hyper-V servers).
Open a remote desktop connection to the first Hyper-V server (LAB2013HV01) and use Powershell to connect to the ISCSI Target Server (whose IP is 192.168.134.15):
Open a remote desktop connection to the first Hyper-V server (LAB2013HV01) and use Powershell to connect to the ISCSI Target Server (whose IP is 192.168.134.15):
New-IscsiTargetPortal -TargetPortalAddress 192.168.134.15 InitiatorInstanceName : InitiatorPortalAddress : IsDataDigest : False IsHeaderDigest : False TargetPortalAddress : 192.168.134.15 TargetPortalPortNumber : 3260 PSComputerName :
In my case when I ran Connect-ISCSITarget it returned an error:
Connect-ISCSITarget -NodeAddress "iqn.1991-05.com.microsoft:lab2013hv01.lab2013.local"
connect-ISCSITarget : The target name is not found or is marked as hidden from login.
At line:1 char:1
That’s because I had made a typo entering the IP address of the Target server. To solve this I removed the wrong entry with:
Get-IscsiTargetPortal | ? targetportaladdress -like "192.168.1.15” | Remove-IscsiTargetPortal
and after re-adding it I was able to succesfully connect, as you can see here:
Get-iSCSITarget | Connect-iSCSITarget AuthenticationType : NONE InitiatorInstanceName : ROOT\ISCSIPRT\0000_0 InitiatorNodeAddress : iqn.1991-05.com.microsoft:lab2013hv01.lab2013.local InitiatorPortalAddress : 0.0.0.0 InitiatorSideIdentifier : 400001370000 IsConnected : True IsDataDigest : False IsDiscovered : True IsHeaderDigest : False IsPersistent : False NumberOfConnections : 1 SessionIdentifier : ffffe00002584430-400001370000000b TargetNodeAddress : iqn.1991-05.com.microsoft:lab2013iscsi01-target01-tar get TargetSideIdentifier : 0200 PSComputerName : AuthenticationType : NONE InitiatorInstanceName : ROOT\ISCSIPRT\0000_0 InitiatorNodeAddress : iqn.1991-05.com.microsoft:lab2013hv01.lab2013.local InitiatorPortalAddress : 0.0.0.0 InitiatorSideIdentifier : 400001370000 IsConnected : True IsDataDigest : False IsDiscovered : True IsHeaderDigest : False IsPersistent : False NumberOfConnections : 1 SessionIdentifier : ffffe00002584430-400001370000000a TargetNodeAddress : iqn.1991-05.com.microsoft:lab2013iscsi01-target03-tar get TargetSideIdentifier : 0100 PSComputerName : AuthenticationType : NONE InitiatorInstanceName : ROOT\ISCSIPRT\0000_0 InitiatorNodeAddress : iqn.1991-05.com.microsoft:lab2013hv01.lab2013.local InitiatorPortalAddress : 0.0.0.0 InitiatorSideIdentifier : 400001370000 IsConnected : True IsDataDigest : False IsDiscovered : True IsHeaderDigest : False IsPersistent : False NumberOfConnections : 1 SessionIdentifier : ffffe00002584430-4000013700000009 TargetNodeAddress : iqn.1991-05.com.microsoft:lab2013iscsi01-target02-tar get TargetSideIdentifier : 0300 PSComputerName :
Then you have to make these session persistent across reboots:
Get-iSCSISession | Register-iSCSISession
Repeat the same steps on the other Hyper-V host.
A check with Get-Disk should show you the newly mounted RAW partitions:
Get-Disk Number Friendly Name Operationa Total Size Partition lStatus Style ------ ------------- ---------- ---------- --------- 0 VMware, VMware Virtual S SCSI Disk De... Online 60 GB MBR 1 MSFT Virtual HD SCSI Disk Device Offline 120 GB RAW 2 MSFT Virtual HD SCSI Disk Device Offline 10 GB RAW 3 MSFT Virtual HD SCSI Disk Device Offline 120 GB RAW
At this point these disks must be brought online, initialized and partitioned but only on the first Hyper-V server (LAB2013HV01):
Get-disk –number 1 | % { $_ | Set-disk –isreadonly 0 $_ | Set-disk –isoffline 0 $_ | initialize-disk –partitionstyle GPT $_ | new-partition –driveletter “F” –usemaximumsize Initialize-volume –driveletter “F” –filesystem NTFS –confirm:$false } Get-disk –number 2 | % { $_ | Set-disk –isreadonly 0 $_ | Set-disk –isoffline 0 $_ | initialize-disk –partitionstyle GPT $_ | new-partition –driveletter “G” –usemaximumsize Initialize-volume –driveletter “G” –filesystem NTFS –confirm:$false } Get-disk –number 3 | % { $_ | Set-disk –isreadonly 0 $_ | Set-disk –isoffline 0 $_ | initialize-disk –partitionstyle GPT $_ | new-partition –driveletter “H” –usemaximumsize Initialize-volume –driveletter “H” –filesystem NTFS –confirm:$false }
Now your partitions should be ready:
Get-Disk Number Friendly Name Operationa Total Size Partition lStatus Style ------ ------------- ---------- ---------- --------- 0 VMware, VMware Virtual S SCSI Disk De... Online 60 GB MBR 1 MSFT Virtual HD SCSI Disk Device Online 120 GB GPT 2 MSFT Virtual HD SCSI Disk Device Online 10 GB GPT 3 MSFT Virtual HD SCSI Disk Device Online 120 GB GPT
On the other Hyper-V host run Update-Disk to make it aware of the existence of these new partitions. These three new iSCSI volume on LAB2013HV01 and LAB2013HV02 will behave just like directly-attached disk even though they are actually located elsewhere on the network. So, from the perspective of Hyper-V, the volume F:, G: and H: are just local volumes.
That's all for the moment concerning the configuration of the ISCSI back-end storage. Stay tuned for the next post on configuring a SCVMM lab!