Home > SAN, Storage, Virtualization, VMware > How to create a Virtual ISCSI SAN Disk with VMware Workstation and Server 2008 R2

How to create a Virtual ISCSI SAN Disk with VMware Workstation and Server 2008 R2

This post explains how to setup Windows 2008 R2 to be a virtual San that can be connected to from other machines.  This is helpful for providing shared storage for testing items like clustering.

Note: This should NOT be used in a production environment.

Setup Target

1.  Setup a base 2008 R2 VM with all of the latest updates.  I normally have one of these on hand and create linked clones from it to save space.  See my post here for details on setting this up.

2.  If you do not have a domain controller – you must setup one up.  Again I use the base VM mentioned in Step  to create a domain controller off of.  See my post here on how to setup a Domain Controller with VMware without upsetting your network environment.

3.  Now you are ready to create the Operating system.  Create a linked clone from the base, rename the machine name (I will use VSAN for machine name), and join the machine to your domain.

4.  Download the Microsoft iSCSI Software Target 3.3 from the following site.

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=45105d7f-8c6c-4666-a305-c8189062a0d0

5.  Copy iscsitarget_public.msi to the VSAN machine and launch the installer.  Follow the dialogs and perform the standard installation.

6.  Now launch the administrator via Administrative Tools – Microsoft iSCSI Software Target

image

7.  Right click on iSCSI targets and Create iSCSI target

8.  Give a valid name to your Target (I’ll call this SAN1)

9.  On the iSCSI Initiators Identifiers screen – this can be confusing.  For the IQN you will want to give it a name that your Client machine will use.  Since we haven’t set that up yet – we have to guess (and come back later to fix if needed).  The syntax for this is as follows.

iqn.1991-05.com.microsoft:machinename.domainname.com

The italicized words will need to be changed to match your environment.

10.  Click finish to complete.

11.  Right click on the newly created target in the tree and create a virtual disk

image

12.  Walk through the wizard providing a file name, space (note it’s in megabytes), and description.

13.  Make sure to Check the ‘Enable this target storage services’ checkbox” in the SAN1 properties. Otherwise the Discover Targets doesn’t work when configuring the clients

At this point you now have a valid SAN disk available to your client.

Setup Client

This can be setup on most of the newer operating systems.

1.  Login to the OS as an administrator

2.  From the download earlier – get the following file for installation

iscsitargetClient_public.msi

3.  Start the installation and follow the defaults.

4.  Now launch the program via Administrative Tools – iSCSI Initiator

image

5.  Go to the Discovery Tab and click Discover Portal… Type in the IP Address of the VSAN machine we created in above and click ok.

6.  Go to the targets Tab and click refresh.  You should see an entry in the Discovered targets list box.  If the status does not show as connected – highlight the item and click Connect.

7.  Now go to the Volumes and Devices tab.  Click Auto Configure to automatically make the SAN drive available.

Now if you go into disk management you can see the drive.  Bring it online, initialize it, and create a partition to start using it.

Advertisement
  1. sp
    May 4, 2011 at 3:05 pm | #1

    wondering if you could explain your comment of “Note: This should NOT be used in a production environment.” I assume its because you would recommend never to have an iscsi target on a virtual server? Is this because of perfmance reasons of serving it from a virtual disk or something else?

    thanks!

  2. tsells
    May 4, 2011 at 8:43 pm | #2

    This is intended for testing with iSCSI without the need for an expensive solution. From a performance perspective – the physical system will win hands down. Besides – in production – you want failover – so there would be no need to create a virtual iSCSI solution on a physical solution.

    • sp
      May 5, 2011 at 9:18 pm | #3

      when you say failover, I assume you mean that if the VM providing the iscsi target goes down, you lose your shared disk. The reason I’m thinking about this is what to do in cloud environments where they might have shared disks but NAS type shares not SAN type shares. (though in Amazon, perhaps EBS devices would serve this need, though don’t have enough experience with that and know Amazon has lots of issues with EBS).

      Something I was thinking is that one might be able to use a loopback mechanism to make the shared block device on the more stable NAS medium and then treat that loopback file device as the shared disk. With all that said, unsure how this would impact performance or stability (lots of layers can mean many places where things can go wrong).

      anyways mostly thinking out loud about this issue as trying to understand it more fully, any feedback on what I said would be appreciated.

  3. Viking
    May 11, 2011 at 5:13 pm | #4

    Hi there,

    Perhaps this has already been answered above and I just read it wrong, but I was wondering if this particular method would be suitable for setting up a Virtual SAN that allows for Windows and SQL Clustering to 2 nodes (2 separate VM instances) that share the same drives, without having to run 3 concurrent VM instances.
    My current project is an in house trial run being done on PCs (not actual servers as none are available) which will be replicated in our production environment with a physical SAN. So the primary issue I’m facing is available resources, necessitating a single shared Virtual SAN which can be accessed by both SQL Server VMs.
    Generally, the point of my question is: Does the Virtual SAN need to be on a separate VM from the two SQL Server VMs?

    “For the IQN you will want to give it a name that your Client machine will use.”
    “Type in the IP Address of the VSAN machine we created in above and click ok.”

    • tsells
      May 11, 2011 at 7:41 pm | #5

      I would keep them separate. You can host this machine on another PC but it could be slower. I am not sure if you can host a virtuual iscsi on the same machine you are trying to connect to it with. It wouldn’t hurt to try it though.

      • Viking
        May 12, 2011 at 2:09 pm | #6

        Thanks very much for your reply. Your input has influenced the acquisition of a physical server for the purposes of this project. I much appreciate the blogs you have written on this topic as well. They have proven to be extremely useful.

  4. August 8, 2011 at 3:00 pm | #7

    I spent ages trying to work out what I was doing wrong… A Step 13 in the Target creation should say “Check the ‘Enable this target storage services’ checkbox” in the SAN1 properties. Otherwise the Discover Targets doesn’t work when configuring the clients. Other than that – Thanks, very useful!

    • tsells
      August 8, 2011 at 7:01 pm | #8

      Thank you for the comment. I added the Step 13 so hopefully others won’t run into the same issues you had. I am glad this was helpful.

  5. dan holmes
    September 29, 2011 at 2:22 pm | #9

    What are the options if i need to use windows 2003 as the SAN?

  6. tsells
    September 29, 2011 at 2:40 pm | #10

    Only 2008 is supported.

    • dan holmes
      September 29, 2011 at 2:42 pm | #11

      can 2003 be a consumer? can i make the SAN 2008 and have 2003 use those drives? I need the cluster to be setup on 2003. I don’t care what the SAN is.

  7. tsells
    September 29, 2011 at 2:47 pm | #12

    The virtual SAN client / target software only supports 2008.

  8. Dave
    October 10, 2011 at 7:15 pm | #13

    I’m a little confused. If I have Windows 7, with the builtin iSCSI initiator, can’t I already access an iSCSI target built on Server 2008? Why would I need a special client? iSCSI is a standard, right?

  9. tsells
    October 10, 2011 at 8:54 pm | #14

    You should be able to use the one built into Windows 7. I have not tested this but it makes sense that MS included with the latest OS.

  1. April 22, 2011 at 4:47 pm | #1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.