Creating an iSCSI Target for ESXi with Starwind Virtual SAN for vSphere

For those of you that follow my blog closely, I want to apologize for my months-long absence from posting articles. Not only have I had a number of serious health issues over the last few months, but I also launched my own cloud hosting company, born out of my cloud consulting business, and it has kept me extremely busy. Hopefully, I’m going to be able to get back into posting regular articles here soon. But, for those that have been waiting, here is a much requested article: installing Starwind iSCSI NAS and making an iSCSI target.

Introduction to Starwind Virtual SAN

As part of any solid ESXi lab, you should have at least a single iSCSI target for your VMs to use to learn about iSCSI, and possibly two iSCSI targets so that you can create a highly available target to use and test failover with. Although ESXi can use local storage, and even use high performance RAID cards with local storage, in Enterprise situations, you will be working with iSCSI much more than any other type of storage attached to an ESXi node.

There are a number of software options for SANs both for the home lab and in the Enterprise setting. You have options ranging from NextenaStor, OpenFiler and FreeNAS to a panopoly of commercial and free options. Having used almost everything on the market, my favorite for ease of use and performance is Starwind Virtual SAN Free Edition.

Starwind installs on top of Windows (you can use the consumer versions (Windows 7/Windows 8) or the server versions (Server 2008/Server 2012), whichever you happen to have available). The folks over at Starwind have been kind enough to provide a free edition of their software that is available publically to anyone that wants to use it. The free version allows unlimited storage for a single-node device and the creation of an HA device that is limited to 128 GB. This is more than enough for a home lab, even for the HA device. In my personal lab, I have a 32TB primary NAS, and a secondary, smaller NAS that has two 128GB SSDs in RAID1 that I use as the second node on a HA setup.

Many people have questioned my choice of a iSCSI/NAS software that sits on top of a commercial operating system. This means that you will not only need to purchase Starwind (in a commercial setting; remember that they provide a free version that can be used non-commercially in your lab [see my description in the paragraph above]), but you also purchase the operating system. The reason that I like this setup is because for storage, Starwind uses image files that are saved right on your hard drive. This means that you can copy these image files using Windows Explorer, back them up, or whatever you wish to do with them, very simply. If your image file is small enough, you can back it up on a flash drive. My image files are always 750GB (a good size for a datastore), so if necessary, I can back them up to an external hard drive. It just makes it so much easier to work with.

Starwind Virtual SAN: Free vs. Paid

So what are the differences between the commercial version of Starwind and it’s free version? I mean, if you can make a single target as large as you’d like, why do you want the paid version? Well, to begin with their licensing simply doesn’t allow its use in a commercial setting. In addition, you get the following benefits:

  1. Use in a Commercial Environment: This is the biggest no-brainer. No paid license? No business use. Period.
  2. Unlimited RAM Caching: In the free version, RAM caching is limited to 512MB, but in the commercial verion, it’s unlimited. I have a single node paid version of Starwind graciously provided by Starwind for free for lab testing, and in my SAN that has 64GB of memory, I devote 55GB of that to RAM caching on my iSCSI targets. Having a 55GB hot RAM cache boots performance exponentially.
  3. Full Technical Support: With the free version, you get very limited technical support.
  4. HA Storage Larger than 128GB: You are limited to 128GB worth of highly available storage; depending on your license, you can go higher than this.
  5. Asynchronous WAN Replication, NAS/SAN Cluster File Sharing, and More. For the full breakdown in paid vs. free, you can download the PDF at: http://bit.ly/starwind-free-vs-paid

Hardware for SAN Server

The great thing about Starwind is that it runs on any type of storage that you happen to have available. The most common option, as I stated, creates an image file for its iSCSI target, which can be simply stored on a file system. This means you can run it on a single drive, a high performance RAID, an SSD drive, or even a RAM drive. The media is completely agnostic, and the target is simply presented to ESXi. This makes Starwind inordinately flexible, and also allows you an option of backing up the iSCSI file.

In this instance, I’m setting up a new, custom-built SAN to do some iSCSI testing, and this is a great opportunity to document it. Since I’ll be installing Starwind from scratch on the new SAN, I thought I would walk you through the process of installing Starwind, creating a target, and then attaching that target inside ESXi.

For those interested, the requirements for Starwind Virtual SAN and then the hardware build for this testing SAN is as follows:

Starwind Virtual SAN System Requirements

  • CPU: Intel Xeon E5620, equivalent or higher
  • RAM: 4GB Minimum
  • Network: 1GbE minimum (10Gb recommended)
  • HDD: Any (RAID10 Recommended, RAID50/60 secondary, RAID5/6 not recommended)
  • Advanced format support: Currently StarWind supports 512e disks only.
  • OS: Server 2008R2 Recommended

SAN Hardware for my SAN Testbed

  • CPU: AMD FX-8350 Vishera 4.0GHz 8 Core Processor
  • Motherboard: ASRock 970 Extreme 3
  • RAM: 32GB DDR3-1600 (4 x 8GB)
  • Power Supply: Corsair Professional Series HX 750 Watt
  • RAID Card: LSI MegaRAID SAS 9260-8i 6Gb/s 8-Port RAID Card w/Fastpath & Cachecade
  • RAID Volume 1: Seagate Cheetah 15.7K 6Gb/s 300GB SAS Drives x 4
  • RAID Volume 2: Intel Pro 2500 480GB SSDs x 4
  • RAID Volume 3: Seagate Cheetahs (RAID10) + Intel Pro 2500 x2 (RAID1) Attached as CacheCade SSD Cache to the RAID10 Volume
  • RAID Level: Testing RAID0, RAID5, RAID6, RAID10
  • OS Drive: Crucial M4 128GB 6Gb/s SSD
  • OS: Server 2008 R2 Standard x64
  • NIC: Intel Pro/1000 PCI-e Quad Gigabit NIC (All 4 Ports Dedicated to iSCSI Traffic Configured in Multipath)
  • Switch: DLink DGS-1224T 24 Port GB Smart Switch

OS Installation and Preparation

After building out the hardware portion of the SAN, I installed Server 2008 R2 and performed all system updates until Windows Update returned a clean result. At this point, I installed IOMeter, HDTune Pro, ATTO Disk Benchmark, Passmark Performance Test 7, Crystal DiskMark, Microsoft Exchange Jetstress 2013 and h2benchw3_16 for performance testing, along with their prerequisites (mainly redistributables). Also installed was LSI’s MegaRAID Utility, and the four 300GB drives formed into a RAID0 for initial testing.

Also, I install quite a few pieces of utility softwares, such as Google Chrome, Notebook ++, Filezilla Server and FTP Client, and others that I use so much in my day to day work that I wouldn’t consider working on a computer without them. One handy piece of software that I’ve found that I use in all of my server setups is called Ninite. It allows you to go through a checkbox list of common, open source/free software for a PC, select the ones that you’d like to install, and then download a small installer that installs them all for you. It’s very cool and saves a ton of time. You can find it at https://ninite.com/

Installing Starwind Virtual SAN

Once everything is setup to my satisfaction, I download Starwind Virtual SAN from the Starwind Software site. During this process, I’m also given the opportunity to download either a 30 day trial version of the software, or I can select the perpetually free license. I select the free license and save it to my hard drive on the server I intend to make my NAS. Once this is done, I open the setup for Starwind, and we’re off and running. The first screen is the Welcome Screen, and we’ll just click Next.

Starwind Virtual SAN, Installation

Starwind Virtual SAN, Installation

Our next screen is the License Agreement screen, and after reading over the EULA, we’ll change the radio button to “I Accept the License” and click Next:

Starwind Virtual San, Installation: License Agreement

Starwind Virtual San, Installation: License Agreement

Screen three is the general information screen, notifying you of the version of Starwind that you’re instaling, as well as an overview of the software. As you can see, this is the newer version just released this year, Version 8. Prior to this, and in my other articles, I had been using version 6. Version 8 has a number of enhancements, including performance enhancements as well as the ability to use SSDs as hot cache.

Starwind Virtual San, Installation: General Information

Starwind Virtual San, Installation: General Information

Finally, we’re to the meat of the installation, and we’ll need to select a destination location. Usually, I install the software itself to the OS drive (C:) and then all of my image files go on whatever letter I assign to my RAID volume. I keep the default location and move on.

Starwind Virtual San, Installation: Select Destination

Starwind Virtual San, Installation: Select Destination

Screen five is my component selection. There’s no reason to choose anything besides the full installation, and I just click Next to get to screen six:

Starwind Virtual San, Installation: Component Selection

Starwind Virtual San, Installation: Component Selection

Another destination folder, except this is for your Start Menu folder. Again, no reason to select anything beyond the default, so we hit our favorite button, Next, and advance on:

Starwind Virtual San, Installation: Start Menu Destination

Starwind Virtual San, Installation: Start Menu Destination

Screen 7 is additional tasks, and you need to make the exciting decision of whether you want a desktop icon or not. Chewing my fingernails at the stress, I decide to be daring, and NOT use a desktop icon, requiring me to go through the Start Menu to pull up the Starwind Console. A daring ladies’ man, as always …

Starwind Virtual San, Installation: Desktop Icon?

Starwind Virtual San, Installation: Desktop Icon?

Next is the license key phase of the install. I had already made an account at Starwind and activated a free license key and downloaded it, and I will just provide the location of that license key now. You also have the choice of requesting a time-limited full trial, or requesting your free license key here. Once I go through the process, it finally shows me my key and the information attached to it like the product, my name, company (if any), and number of servers allowed.

Starwind Virtual San, Installation: Choose License

Starwind Virtual San, Installation: Choose License

Starwind Virtual San, Installation: License Location

Starwind Virtual San, Installation: License Location

Starwind Virtual San, Installation: Apply License

Starwind Virtual San, Installation: Apply License

Screen 11 is your overview before install screen. You can hit Next here to begin the install and it will walk you through all of it, including the installation of the Agent also. Once done, it shows a completion screen and you can launch the Starwind Console.

Starwind Virtual San, Installation: Ready to Install

Starwind Virtual San, Installation: Ready to Install

Starwind Virtual San, Installation: Extracting Files

Starwind Virtual San, Installation: Extracting Files

Starwind Virtual San, Installation: Configure SMI-S Agent

Starwind Virtual San, Installation: Configure SMI-S Agent

Starwind Virtual San, Installation: Installation Completed

Starwind Virtual San, Installation: Installation Completed

Once the Starwind Console fires up for the first time, you will see the splash screen as well as a confirmation that it is connected, and it will ask you to configure the location of the Storage Pool. Mine tried to choose C: drive as the default, so I selected Choose Path and chose my E: drive, which is my RAID volume with nothing else on it. I will put my image files there.

Starwind Virtual San, Installation: Starwind Splash Screen

Starwind Virtual San, Installation: Starwind Splash Screen

Starwind Virtual San, Configuration: Storage Pool not Completed

Starwind Virtual San, Configuration: Storage Pool not Completed

Starwind Virtual San, Configuration: Storage Pool Configuration

Starwind Virtual San, Configuration: Storage Pool Configuration

Now I can open up my icon area by my system clock, click on the Starwind icon (the blue, globe-like icon), and my console will appear:

 

Starwind Virtual San, Configuration: Starwind Icon

Starwind Virtual San, Configuration: Starwind Icon

Starwind Virtual San, Configuration: Starwind Management Console

Starwind Virtual San, Configuration: Starwind Management Console

Adding an iSCSI Device and Target

Now that we have Starwind installed, we need to create an iSCSI device (think of this as a hard drive that you will store VMs on), and an iSCSI target for the device (think of this as what you connect to so that you can access the hard drive). We will start out by pulling up our Starwind console, just like we did above: clicking on the Starwind icon in our icon area. You can see below that our console will list the servers that the console is attached to (you could conceivably just have this console installed on a VM or dedicated server, and then connect out to all of your physical/virtual NAS/SAN servers and control them from the console), and information about the server and a host of other tabs with functions on them.

Note that controlling multiple servers through a single console is what I do in my lab. Starwind/iSCSI is installed on my primary NAS/SAN and then I add my secondary NAS/SAN through the console that just has the two 128GB SSDs in RAID0. This is where I stick the other half of my highly-available node so that I have a small HA SAN target to experiment with.

Starwind Virtual San, Configuration: Starwind Management Console

Starwind Virtual San, Configuration: Starwind Management Console

From the console, I will start out with clicking “Add Device”. It will ask me for an Alias (basically a “friendly name” for this volume, and I will take the default, which is Storage1, and choose 750GB for the size, which is what I size all my datastores to:

Starwind Virtual San, Configuration: Add Device Wizard

Starwind Virtual San, Configuration: Add Device Wizard

Next, I get the Creation Page, where I just click Create … along with my success page …

Starwind Virtual San, Configuration: Add Device Wizard

Starwind Virtual San, Configuration: Add Device Wizard

Starwind Virtual San, Configuration: Add Device Wizard

Starwind Virtual San, Configuration: Add Device Wizard

Once I click Finish, I’m taken to the new device that I have created. Looking at this page, I can see that Starwind has created a target for me to go along with the device (you can see the name under TargetIQN), automatically chosen clustering (you need this to let multiple VMs access this datastore … you always want this on), and stuck it in a group called General (you can create groups for your devices so that you can apply different settings to them or know what type of storage … the immediate thought that comes to mind is a group for spindle-drives and a group for SSD drives for different “tiers” of storage performance). It also has a spot to show any iSCSI sessions that are connected, and any permissions you might provide.

Now, ESXi is ready to connect to your iSCSI target. We will cover this in my next article in this series, which I will post next week. I hope you enjoyed this article, and see how drop dead easy it is to use Starwind in both the lab and in a production environment. Total time from download, to install, to configuration of my iSCSI target was approximately 8 minutes.

  • Mike Rechtien

    “Unlimited RAM Caching: In the free version, RAM caching is limited to 512MB, but in the free version, it’s unlimited.”

    I think you mean : “Unlimited RAM Caching: In the free version, RAM caching is limited to 512MB, but in the commercial verion, it’s unlimited.”

    😉

    • Mike, thanks for the catch … correction made.
      Hope you enjoyed the article. ESXi side of the hookup will have its article posted this weekend.

      • Mike Rechtien

        No problem. This part of your setup isn’t what brought me to your site (though I thought I’d thumb through this article, also).

        What actually brought me here was the ASRock Extreme 3 build, which I’ve partially duplicated. If I can get Amazon to get a DP->HDMI adapter here, I can start proper testing to make sure this really work as a replacement for my HTPC. I’ve been using one “virtualized” PC connected to my projector for game nights (it has a mirror that angles the projection directly onto my gaming table), and so far it’s been awesome. If the dongle ever gets here, I’ll be able to set up a second “virtualized” PC for the HTPC.

        Ultimately, I’d like to roll the WHS box into this setup, though I’m not sure I’ll be able to do it with this mainboard. I’ll need to see if there is enough “umph” to decode h.264 mid-high bit-rate .MKV files while the video cards are connected to the PCIe x1 slots (most likely via a x1 to x16 adapter). If not, I’ll end up having to switch mainboards, but I am having fun playing with this. 🙂

        Thanks for the articles!

      • R L Kern

        Don, not to hijack these comments, but I am trying to get openfiler going on esxi 5.5 utilizing qlogic fiber channel card. The esxi host sees the card (after installing driver) but openfiler in a virtual machine can;t see it. do I have to use passthrough or is there a way to keep it virtualized so openfiler sees it? openfiler sees my lsi raid card fine just not the fc…

        thanks

  • Rudel

    Dear Don Fountain, thanks for all the information that you provide on this Blog … It’s been an inspiration for several of my own home server builds. Hope you are still with good health … please don’t abandon this Site, I would love to know more about your more recent projects. Cheers,

    Eduardo, Chile.

    • Have been busy with quite a few things lately: my company bought two floors of a data center, I’ve opened a a large Minecraft network, and a ton of other items. I’ve got some hastily written articles that I hope to flesh out this coming month (I’m taking a much-needed vacation) that are pretty solid. Thanks for hanging in there with me. I’ve left this up for information and DO intend to keep pursuing it. Have got some great Sandy-bridge builds to update this with.

      • Rudel

        Glad to hear from you and wish you all the best with your current projects; your Blog is still a valuable source of information and I’m happy to hear that you will keep adding to it. Best regards.