Version User Scope of changes
Oct 9 2008, 12:02 PM EDT todd_muirhead 874 words added
Oct 9 2008, 11:48 AM EDT todd_muirhead

Changes

Key:  Additions   Deletions
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.

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

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
Example Result
SERVICE_NAME: msiscsi
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
Add an iscsi target
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
Get iSCSI Portal IQN
iscsicli ListTargets
Microsoft iSCSI Initiator Version 6.0 Build 6000
Targets List:
iqn.1984-05.com.dell:powervault.600188b000474fb400000000458d86ec
The operation completed successfully.

Login to Target
iscsicli qlogintarget
iqn.1984-05.com.dell:powervault.600188b000474fb400000000458d86ec

Simple Connection to Target LUN
iscsicli PersistentLoginTarget
iqn.1984-05.com.dell:powervault.600188b000474fb400000000458d86ec T * * * * *
* * * * * * * * * * 0
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.
C:\Users\administrator.SETC>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.
Now Mount the new Disk as a Windows Drive
DISKPART
RESCAN
LIST DISK
select disk 4
create partition primary
select partition 1
assign letter=m

format fs=ntfs label="MDVMHosts2" quick

Add EqualLogic LUN
iscsicli refreshtargetportal 10.10.30.40 3260
iscsicli listtargets
iscsicli qlogintarget iqn.2001-05.com.equallogic:0-8a0906-21d
e97202-61e510b651b48ed1-eqvmhosts20
Microsoft iSCSI Initiator Version 6.0 Build 6000
Session Id is 0xfffffa801a5cd018-0x4000013700000008
Connection Id is 0xfffffa801a5cd018-0x8
The operation completed successfully.
M:\VirtualMachines>iscsicli persistentlogintarget
iqn.2001-05.com.equallogic:0-8
a0906-21de97202-61e510b651b48ed1-eqvmhosts20 T * * * * * * * * * * * * * * *
0
Microsoft iSCSI Initiator Version 6.0 Build 6000
The operation completed successfully.
M:\VirtualMachines>iscsicli listpersistenttargets
Microsoft iSCSI Initiator Version 6.0 Build 6000
Total of 2 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 :
Target Name :
iqn.2001-05.com.equallogic:0-8a0906-21de97202-61e510
b651b48ed1-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.
Use Diskpart to create, mount and format partition
M:\VirtualMachines>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>

Notes:
iscsicli

Links -
http://social.technet.microsoft.com/Forums/en-US/winservercore/thread/85ebf38
6-adeb-4721-a752-c0b936f2a692/
http://www.eggheadcafe.com/software/aspnet/33051334/help--configuring-iscsi.a
spx