Menu

Virtual Geek

Tales from real IT system administrators world and non-production environment

MICROSOFT WINDOWS 2012 R2 ISCSI TARGET STORAGE SERVER FOR ESXI AND HYPERV

Series Parts
MICROSOFT WINDOWS 2012 R2 ISCSI TARGET STORAGE SERVER FOR ESXI AND HYPERV 
POWERSHELL INSTALLING AND CONFIGURING MICROSOFT ISCSI TARGET SERVER
VMWARE ESXI CONFIGURE (VSWITCH) VMKERNEL NETWORK PORT FOR ISCSI STORAGE
POWERCLI: VMWARE ESXI CONFIGURE (VSWITCH) VMKERNEL NETWORK PORT FOR ISCSI STORAGE
VMWARE ESXI INSTALL AND CONFIGURE SOFTWARE ISCSI STORAGE ADAPTER FOR VMFS VERSION 6 DATASTORE
POWERCLI VMWARE: CONFIGURE SOFTWARE ISCSI STORAGE ADAPTER AND ADD VMFS DATASTORE
VMWARE VCENTER STORAGE MIGRATE/SVMOTION VM AND PORT BINDING MULTIPATHING TESTING
POWERCLI: VIRTUAL MACHINE STORAGE MIGRATE/SVMOTION AND DATASTORE PORT BINDING MULTIPATHING

As Microsoft has introduced iSCSI server role since windows 2012, it can be used as iSCSI target (storage box). I use this instead of  openfiler, freenas or any other appliance for testing in my lab, I have even seen Dell vendor has come up with one of the storage NX3200 model and organizations are using it for production to store data over iscsi protocol, Although Microsoft iSCSI target 3.3 software was already existed and could be downloaded and installed separately for windows 2008 OS line. Now same thing is embedded in windows server 2012 and later as a role, no need to download and install it separately. I think Microsoft iSCSI target is better substitute for other small appliances as you can install this role along with other roles or features, and resources can be shared, so don't have to manage another server.

Warning: Windows iSCSI is not listed on VMWare HCL as Esxi iSCSI datastore. I am using it as a demo purpose.

windows server 2012 r2 iscsi target storage server iscsi initiator esxi and hyperv iqn iscsi protocol port 3260 vhd

In common networking like Ethernet and switches when you want to connect to remote storage (SAN), iSCSI protocol is used over TCP/IP protocol. (Other protocol FC are used for SAN bet require special devices and hardware), In simple storage terms iSCSI Target is the storage box where it will provide LUN disk, and iSCSI initiator (Client like esxi, windows) will consume it over LAN. This is not the file share where it is mapped or mounted on os. It is block level storage, Block level storage is like local disk to OS and uses SCSI commands for I/O. so it can be formatted like local disk and can be put choice of file system, this is one of the main difference between Block and file level and. (mapped or mounted file level storage cannot be formatted and they use protocols like SMB, CIFS or NFS and etc). 

In the above diagram I have 2 NIC cards connected to different switches for redundancy purpose and it is a best practice. If any of the (storag'se or esxi's) Nic or switch goes down, data is still visible, and it is using normal networking to carry iSCSI protocol.

Below are the IP addressing scheme on my Windows iSCSI server using for connection, Management Ethernet adapter is purely for Management connectivity, ie RDP or any other sort of connectivity. Other 2 nics cards will streaming iSCSI data only.

1 Microsoft windows storage iscsi target server ip addressing to nic ethernet card lan 3 ips multipathing, management and iscsi network

To start installing iSCSI server role, open Server Manager from start if it is not opened. click Add roles and features. I am going through all the defaults without changing any option and clicked next for Before you Begin, Installation type and server selection. Once I reached to Server Roles Select check box on File Server and iSCSI Target Server under File and storage services (File and iSCSI Services). Once clicking next for other option Features and confirmation I pressed next and in the last Install button.

2 add roles and features file and storage servers, services, iscsi target server file server, default option server manager, Installation type, server selection

Once role installation is successful, Before going forward make sure 3260 ports for above iSCSI IPs are opened in firewall. Next step is configuration, on the server manager click File and Storage Services in the left pane, choose iSCSI, Click to create an iSCSI virtual disk, start the New iSCSI Virtual Disk Wizard, same option can be found under Tasks as well. In the wizard select virtual disk location, this can be any drive, I have selected C:\iSCSIDisks.

3 iSCSI storage server windows 2012 R2, to create iSCSI Virtual Disks wizard, storage location, custom path, target server name

Name the iSCSI virtual disk name, It is a vhdx file. check the file path,

4 iSCSI storage server windows 2012 R2, to create iSCSI Virtual Disks wizard, storage location, custom path, target server name, specify virtual disk name

Next window is interesting, It shows how much is the Free size is on the selected disk location, and up to that much size of disk can be created. If Fixed size is selected all the 8 GB will be allocated, similar to VMware lazy thick provisioned disk (if clear the virtual disk on allocation is selected it will full format (fill up the complete disk with 0's) takes some time similar to eager zero thick disk), Dynamically expanding is allocate the disk space when data written (VMware thin provisioned disk), 

Differencing has its own us case, it is as same as VMware linked clone disk, means it saves great amount of disk and time. once the base disk is created, it will use same disk but won't write anything to it and write changes to snapshot disk. If base disk is gone so everything is.

I am going with the Dynamically expanding, as data grows the vhdx disk size will grow and will same some space.

5 iSCSI storage server windows 2012 R2, to create iSCSI Virtual Disks wizard, Fixed size, clear the virtual disk on allocation, dynamically expanding

As this is a new deployment, create new iSCSI target and assign the disk created to this server, Multiple targets can be created to restrict or grant the access to initiators. (Access is granted to initiator server on per iSCSI target instead of on per virtual disk)

6 iSCSI storage server windows 2012 R2, to create iSCSI Virtual Disks wizard, iSCSI Target assigning disk to new iscsi target

Provide target name and description.

7 iSCSI storage server windows 2012 R2, to create iSCSI Virtual Disks wizard, iSCSI Target assigning disk to new iscsi target, name and description

For next step I need IQN name of the client initiator, for this I will be getting the same name from Esxi storage iSCSI software adapter, It is a kind of WWN or Mac address of the iSCSI adapter. Target will use it to identify initiator to grant access to virtual disks (LUN), it can be easily copy paste.

8 iSCSI storage server windows 2012 R2, to create iSCSI Virtual Disks wizard, Esxi storage adapter iscsi software adapter, vmhba, iqn name

Once IQN is identified and copied, Add initiator ID under IQN type value, There are other several type IP address and DNS name also can be added. For simplicity I am using IQN name.

9 iSCSI storage server windows 2012 R2, to create iSCSI Virtual Disks wizard, Esxi storage adapter iscsi software adapter, vmhba, iqn name, identify the initiator

Communication between iSCSI Target and initiator can be authenticated using CHAP protocol, This is a security option, for simplicity I am not using these option and clicking next.

10 iSCSI storage server windows 2012 R2, to create iSCSI Virtual Disks wizard, initiator enable reverse chap authentication, initiator authentication chap protocol

On the confirmation page verify the configuration and click create.

11 iSCSI storage server windows 2012 R2, to create iSCSI Virtual Disks wizard, confirmation vhdx virtual disk target iscsi security chap protocol

This is the end of successful configuration of windows iSCSI target. showing status as completed.

11 iSCSI storage server windows 2012 R2, to create iSCSI Virtual Disks wizard, confirmation virtual disk target iscsi security chap protocol result completed, set target access, assign iscsi virtual disk to target

This is last and important settings need to be configured, go to servers menu from the list, right click storage server, iSCSI Target Settings, and configure the IP address (Nic interfaces) to be used by iSCSI request.

12 iSCSI storage server windows 2012 R2, to create iSCSI Virtual Disks wizard, specify network addresses to be used for iSCSI Sotrage requests

As can see my target and virtual disks are in place, and I can see vhdx file with low size, as data is written disk will grow.

13 iSCSI storage server windows 2012 R2, to create iSCSI Virtual Disks wizard, cofiguration completed, iscsi virtual disks and targets

Go Back

Comment

Blog Search

Page Views

11240361

Follow me on Blogarama