- Installing the iSCSI Target Server Role on Server 2012
- Installing the iSCSI Target SMI-S Provider (Optional)
- Creating an iSCSI Virtual Disk
- Connecting to the iSCSI Virtual Disk from another machine using iSCSI Initiator
NOTE:**This is for my lab only, I do not recommend you do this in production***
First launch the add roles and features wizard in server 2012 and on the roles page select the iSCSI Target Server Role as shown below
Next if you wish for your virtual SAN to have SMI-S support then you need to first install KB2758246
Once that has been installed on the System Center Virtual Machine Manager SP1 media you will find iSCSITargetSMISProvider.msi in the AMD64\Setup\MSI folder
Run through the install which is no more complex than clicking Next, Next and Finish.
Now we have an iSCSI target server setup that supports SMI-S, more on SMI-S can be found here
In my lab I have simply attached a VHDX to my Server and then within that created my virtual iSCSI disks, this is by no means ideal however. I would have liked to have attached a physical disk to my virtual machine and run the Virtual iSCSI disks straight from that but didn't have a spare SSD lying around.
So to summarize my file server has a C: drive and an E: drive, both are VHDX files that live on the Hyper-V host everything runs on.
Now for the fun part, open Server Manager and browse to File And Storage Services -> iSCSI under iSCSI Virtual Disks click Tasks-> New iSCSI Virtual Disk
This will launch the new iSCSI Virtual Disk Wizard, select the volume on which you wish to store the disk and press Next
Give the disk a meaningful name, in my case I was setting up a SQL cluster so this was going to be my Quorum disk
Once complete press Next
Enter a size for your disk and press Next once complete
On the iSCSI Target page select New iSCSI Target and press Next
Give the Target a meaningful name and press Next once complete
Now we need the IQN of the initiator, to get this logon to the server you are connecting from and launch the iSCSI initiator control panel applet, if it prompts you to start the service click yes.
On the Configuration tab make a note of the Initiator Name
Back on the Target Server on the on the Access Servers page click Add
Now enter the IQN of the initiator in the box as shown
..
Press ok and you will see the iSCSI initiator listed, once complete click Next
Since this is a lab I chose not to configure Authentication and just pressed Next and then Create.
Now switch over to the iSCSI initiator machine (in my case one of the SQL Nodes) and in the iSCSI initiator software click on the Discovery tab
Click Discover Portal and enter the DNS Name of the iSCSI Target server and press OK
Now click on the Targets tab and you should see the target listed, select it and click Connect
If the connection was successful you will see the status change to Connected as shown
That's all there is to it, now open disk manager and bring the disk online :)
Cheers
Wayne