Already a member?
Sign in
Using iscsicli On Hyper-V Server to Connect to MD3000i and EqualLogic
Microsoft Hyper-V Server is basically Windows Server Core 2008 with only the Hyper-V role. Hyper-V Server does not have a GUI for configuring or managing the system. In order to connect a Hyper-V Server to iSCSI storage the command line tool iscsicli.exe and a few other commands must be used. The directions below are step by step instructions to connect a Hyper-V Server to first an MD3000i iscsi array and then to an EqualLogic PS5000e array.
NIC 1 - Primary Data Network - 10.10.10.x
NIC 2 - VM Data Network - 192.168.50.x
NIC 3 - iSCSI Network - 10.10.30.x
NIC 4 - iSCSI Network - 10.10.30.x
The MD3000i and EqualLogic arrays are connected to the 10.10.30.x network
Set IP Address for NICs 3 and 4 that are connected to 10.10.30.0 iscsi subnet Using the Hyper-V Configuration text based tool
Select 3 - Network Settings
Then select NIC Index 4 and 5 (will have to do steps seperately for each NIC)
Enable the iSCSI Initiator to auto start:
sc \\r0hypervR805c config msiscsi start= auto
SC is a command line program used for communicating with the Service Control Manager and services.
Usage: sc <server> [command] [service name] <option1> <option2>...
start iscsi initiator:
sc \\r0hypervR805c start msiscsi
Check status of iscsi initiator:
sc \\r0hypervR805c query msiscsi
Add iscsi targets:
iscsicli Qaddtargetportal 10.10.30.25
iscsicli Qaddtargetportal 10.10.30.27
iscsicli Qaddtargetportal 10.10.30.28
iscsicli Qaddtargetportal 10.10.30.29
iscsicli QaddTargetPortal 10.10.30.40
The first four are for the MD3000i, the last entry is for the EqualLogic
Get iSCSI Target IQN:
iscsicli ListTargets
Microsoft iSCSI Initiator Version 6.0 Build 6000
Targets List:
iqn.1984-05.com.dell:powervault.600188b000474fb400000000458d86ec
The operation completed successfully.
Only the MD3000i has a LUN created and assigned at this point.
Login to Target. This step only does the login, not the connection:
iscsicli qlogintarget iqn.1984-05.com.dell:powervault.600188b000474fb400000000458d86ec
Simple single Connection to Target LUN. This step will connect to the target LUN:
iscsicli PersistentLoginTarget iqn.1984-05.com.dell:powervault.600188b000474fb400000000458d86ec T * * * * * * * * * * * * * * * 0
List the target LUNs that have been connected:
iscsicli listpersistenttargets
Microsoft iSCSI Initiator Version 6.0 Build 6000
Total of 1 peristent targets
Target Name :
iqn.1984-05.com.dell:powervault.600188b000474fb40000
0000458d86ec
Address and Socket : 10.10.30.25 3260
Session Type : Data
Initiator Name : Root\ISCSIPRT\0000_0
Port Number : <Any Port>
++Security Flags : 0x0
++Version : 0
++Information Specified: 0x20
++Login Flags : 0x8
++Username :
The operation completed successfully.
iscsicli reporttargetmappings
Microsoft iSCSI Initiator Version 6.0 Build 6000
Total of 1 mappings returned
Session Id : fffffa801a5c3018-4000013700000006
Target Name :
iqn.1984-05.com.dell:powervault.600188b000474fb4000
00000458d86ec
Initiator : Root\ISCSIPRT\0000_0
Initiator Scsi Device : \\.\Scsi4:
Initiator Bus : 0
Initiator Target Id : 0
Target Lun: 0x0 <--> OS Lun: 0x0
Target Lun: 0x1f00 <--> OS Lun: 0x1f
The operation completed successfully.
At this point the LUN is connected through iSCSI. The things done with iscsicli are equivalent to what would be done with the iSCSI Initiator GUI based management tool on a Windows Server 2008 system.
DISKPART>RESCAN
DISKPART>LIST DISK
DISKPART>select disk 4 (You will need to use the number that corresponds to your disk)
DISKPART>create partition primary
DISKPART>select partition 1
DISKPART>assign letter=m
DISKPART>format fs=ntfs label="MDVMHosts2" quick
A LUN was created on the EqualLogic storage and assigned to the host. In order for the target to appear the refreshtargetportal command was necessary at the beginning:
iscsicli refreshtargetportal 10.10.30.40 3260
iscsicli listtargets
iscsicli qlogintarget iqn.2001-05.com.equallogic:0-8a0906-21de97202-61e510b651b48ed1-eqvmhosts20
Microsoft iSCSI Initiator Version 6.0 Build 6000
Session Id is 0xfffffa801a5cd018-0x4000013700000008
Connection Id is 0xfffffa801a5cd018-0x8
The operation completed successfully.
iscsicli persistentlogintarget iqn.2001-05.com.equallogic:0-8a0906-21de97202-61e510b651b48ed1-eqvmhosts20 T * * * * * * * * * * * * * * * 0
Microsoft iSCSI Initiator Version 6.0 Build 6000
The operation completed successfully.
iscsicli listpersistenttargets
Microsoft iSCSI Initiator Version 6.0 Build 6000
Total of 2 peristent targets
Target Name : iqn.1984-05.com.dell:powervault.600188b000474fb400000000458d86ec
Address and Socket : 10.10.30.25 3260
Session Type : Data
Initiator Name : Root\ISCSIPRT\0000_0
Port Number : <Any Port>
++Security Flags : 0x0
++Version : 0
++Information Specified: 0x20
++Login Flags : 0x8
++Username :
Target Name : iqn.2001-05.com.equallogic:0-8a0906-21de97202-61e510b651b48ed1-eqvmhosts20
Address and Socket : 10.10.30.40 3260
Session Type : Data
Initiator Name : Root\ISCSIPRT\0000_0
Port Number : <Any Port>
++Security Flags : 0x0
++Version : 0
++Information Specified: 0x20
++Login Flags : 0x8
++Username :
The operation completed successfully.
diskpart
Microsoft DiskPart version 6.0.6001
Copyright (C) 1999-2007 Microsoft Corporation.
On computer: R0HYPERVR805C
DISKPART> rescan
Please wait while DiskPart scans your configuration...
DiskPart has finished scanning your configuration.
DISKPART> list disk
Disk ### Status Size Free Dyn Gpt
-------- ---------- ------- ------- --- ---
Disk 0 Online 67 GB 0 B
Disk 1 No Media 0 B 0 B
Disk 2 Online 545 GB 0 B
Disk 3 Online 20 MB 20 MB
Disk 4 Online 200 GB 200 GB
DISKPART> select disk 4
Disk 4 is now the selected disk.
DISKPART> create partition primary
DiskPart succeeded in creating the specified partition.
DISKPART> select partition 1
Partition 1 is now the selected partition.
DISKPART> assign letter=n
DiskPart successfully assigned the drive letter or mount point.
DISKPART> format fs=ntfs label="EQVMHosts20" quick
100 percent completed
DiskPart successfully formatted the volume.
DISKPART>
Links -
http://social.technet.microsoft.com/Forums/en-US/winservercore/thread/85ebf386-adeb-4721-a752-c0b936f2a692/
Hardware Configuration
The following step by step should work for most configurations, but some changes will be necessary to account for differences in IP address, number of NICs, number of LUNs, etc. The hardware specifically used for this example was a Dell PowerEdge R805, with two local disks configured in a RAID 1, Hyper-V Server installed on the local disks (actually it is the install used in this video). The NICs used are the four on-board NICs of the R805 and were connected as follows:NIC 1 - Primary Data Network - 10.10.10.x
NIC 2 - VM Data Network - 192.168.50.x
NIC 3 - iSCSI Network - 10.10.30.x
NIC 4 - iSCSI Network - 10.10.30.x
The MD3000i and EqualLogic arrays are connected to the 10.10.30.x network
Step by Step Instructions
Set IP Address for NICs 3 and 4 that are connected to 10.10.30.0 iscsi subnet Using the Hyper-V Configuration text based tool
Select 3 - Network Settings
Then select NIC Index 4 and 5 (will have to do steps seperately for each NIC)
1 Set Network Adapter IP Address
S Static 10.10.30.231 and 10.10.30.230, mask 255.255.255.0, no gateway
Enable iSCSI Inititator
Enable the iSCSI Initiator to auto start:sc \\r0hypervR805c config msiscsi start= auto
SC is a command line program used for communicating with the Service Control Manager and services.
Usage: sc <server> [command] [service name] <option1> <option2>...
start iscsi initiator:
sc \\r0hypervR805c start msiscsi
Check status of iscsi initiator:
sc \\r0hypervR805c query msiscsi
iscsicli Configuration
Add iscsi targets:
iscsicli Qaddtargetportal 10.10.30.25
iscsicli Qaddtargetportal 10.10.30.27
iscsicli Qaddtargetportal 10.10.30.28
iscsicli Qaddtargetportal 10.10.30.29
iscsicli QaddTargetPortal 10.10.30.40
The first four are for the MD3000i, the last entry is for the EqualLogic
Get iSCSI Target IQN:
iscsicli ListTargets
Microsoft iSCSI Initiator Version 6.0 Build 6000
Targets List:
iqn.1984-05.com.dell:powervault.600188b000474fb400000000458d86ec
The operation completed successfully.
Only the MD3000i has a LUN created and assigned at this point.
Login to Target. This step only does the login, not the connection:
iscsicli qlogintarget iqn.1984-05.com.dell:powervault.600188b000474fb400000000458d86ec
Simple single Connection to Target LUN. This step will connect to the target LUN:
iscsicli PersistentLoginTarget iqn.1984-05.com.dell:powervault.600188b000474fb400000000458d86ec T * * * * * * * * * * * * * * * 0
List the target LUNs that have been connected:
iscsicli listpersistenttargets
Microsoft iSCSI Initiator Version 6.0 Build 6000
Total of 1 peristent targets
Target Name :
iqn.1984-05.com.dell:powervault.600188b000474fb40000
0000458d86ec
Address and Socket : 10.10.30.25 3260
Session Type : Data
Initiator Name : Root\ISCSIPRT\0000_0
Port Number : <Any Port>
++Security Flags : 0x0
++Version : 0
++Information Specified: 0x20
++Login Flags : 0x8
++Username :
The operation completed successfully.
iscsicli reporttargetmappings
Microsoft iSCSI Initiator Version 6.0 Build 6000
Total of 1 mappings returned
Session Id : fffffa801a5c3018-4000013700000006
Target Name :
iqn.1984-05.com.dell:powervault.600188b000474fb4000
00000458d86ec
Initiator : Root\ISCSIPRT\0000_0
Initiator Scsi Device : \\.\Scsi4:
Initiator Bus : 0
Initiator Target Id : 0
Target Lun: 0x0 <--> OS Lun: 0x0
Target Lun: 0x1f00 <--> OS Lun: 0x1f
The operation completed successfully.
At this point the LUN is connected through iSCSI. The things done with iscsicli are equivalent to what would be done with the iSCSI Initiator GUI based management tool on a Windows Server 2008 system.
Using DISKPART to Create Partition, Mount, and Format
The following commands are run after running diskpart.exe, from the DISKPART> prompt.DISKPART>RESCAN
DISKPART>LIST DISK
DISKPART>select disk 4 (You will need to use the number that corresponds to your disk)
DISKPART>create partition primary
DISKPART>select partition 1
DISKPART>assign letter=m
DISKPART>format fs=ntfs label="MDVMHosts2" quick
Adding EqualLogic iSCSI LUN
The steps are almost exactly the same, but this time there is less explanation and more direct output from the screeen:A LUN was created on the EqualLogic storage and assigned to the host. In order for the target to appear the refreshtargetportal command was necessary at the beginning:
iscsicli refreshtargetportal 10.10.30.40 3260
iscsicli listtargets
iscsicli qlogintarget iqn.2001-05.com.equallogic:0-8a0906-21de97202-61e510b651b48ed1-eqvmhosts20
Microsoft iSCSI Initiator Version 6.0 Build 6000
Session Id is 0xfffffa801a5cd018-0x4000013700000008
Connection Id is 0xfffffa801a5cd018-0x8
The operation completed successfully.
iscsicli persistentlogintarget iqn.2001-05.com.equallogic:0-8a0906-21de97202-61e510b651b48ed1-eqvmhosts20 T * * * * * * * * * * * * * * * 0
Microsoft iSCSI Initiator Version 6.0 Build 6000
The operation completed successfully.
iscsicli listpersistenttargets
Microsoft iSCSI Initiator Version 6.0 Build 6000
Total of 2 peristent targets
Target Name : iqn.1984-05.com.dell:powervault.600188b000474fb400000000458d86ec
Address and Socket : 10.10.30.25 3260
Session Type : Data
Initiator Name : Root\ISCSIPRT\0000_0
Port Number : <Any Port>
++Security Flags : 0x0
++Version : 0
++Information Specified: 0x20
++Login Flags : 0x8
++Username :
Target Name : iqn.2001-05.com.equallogic:0-8a0906-21de97202-61e510b651b48ed1-eqvmhosts20
Address and Socket : 10.10.30.40 3260
Session Type : Data
Initiator Name : Root\ISCSIPRT\0000_0
Port Number : <Any Port>
++Security Flags : 0x0
++Version : 0
++Information Specified: 0x20
++Login Flags : 0x8
++Username :
The operation completed successfully.
diskpart
Microsoft DiskPart version 6.0.6001
Copyright (C) 1999-2007 Microsoft Corporation.
On computer: R0HYPERVR805C
DISKPART> rescan
Please wait while DiskPart scans your configuration...
DiskPart has finished scanning your configuration.
DISKPART> list disk
Disk ### Status Size Free Dyn Gpt
-------- ---------- ------- ------- --- ---
Disk 0 Online 67 GB 0 B
Disk 1 No Media 0 B 0 B
Disk 2 Online 545 GB 0 B
Disk 3 Online 20 MB 20 MB
Disk 4 Online 200 GB 200 GB
DISKPART> select disk 4
Disk 4 is now the selected disk.
DISKPART> create partition primary
DiskPart succeeded in creating the specified partition.
DISKPART> select partition 1
Partition 1 is now the selected partition.
DISKPART> assign letter=n
DiskPart successfully assigned the drive letter or mount point.
DISKPART> format fs=ntfs label="EQVMHosts20" quick
100 percent completed
DiskPart successfully formatted the volume.
DISKPART>
Links -
http://social.technet.microsoft.com/Forums/en-US/winservercore/thread/85ebf386-adeb-4721-a752-c0b936f2a692/
|
todd_muirhead |
Latest page update: made by todd_muirhead
, Oct 9 2008, 1:39 PM EDT
(about this update
About This Update
197 words added 72 words deleted view changes - complete history) |
|
Keyword tags:
core
diskpart
diskpart.exe
equallogic
hyper-v
iscsi
iscsicli
iscsicli.exe
md3000i
server core
storage
More Info: links to this page
|

