Direkt zum Hauptbereich

Step-by-step: Using the Microsoft iSCSI Software Target with Hyper-V (Standalone, Full, VHD)

In this post, I will show all the steps required to run Windows Server 2008 Hyper-V with the Microsoft iSCSI Software Target. We will cover the specific scenario of a standalone Windows Server 2008 server (as opposed to a clustered one) on a full install (as opposed to a core install) and using a VHD file (as opposed a pass-through disk).
In order to follow these instructions you will need at least two computers. One computer will run a full install of Windows Server 2008 with the Hyper-V role enabled. The other computer needs to be a Windows Storage Server (WSS) with the iSCSI pack or Windows Unified Data Storage Server (WUDSS). Optionally, you could add a Client for your Virtual Machine and a computer for remote Hyper-V Management.
Configuring the Networks
For your server running Hyper-V, you should consider having at least three Network Interface Cards (NICs). One will be dedicated to iSCSI traffic. The second will be connected to the Virtual Switch and used for traffic going to your virtual machine. The third NIC you will dedicate to remote management. This configuration is showed in the diagram below:
Checking the Windows Storage Server
WSS (with the Microsoft iSCSI Software Target) comes preinstalled from the hardware vendor. This special OS release is not available the Microsoft sales channels like software retailers or volume licensing. You can find more information about WSS and WUDSS at http://www.microsoft.com/storageserver. Windows Storage Server 2008 is also available from MSDN or TechNet subscriber downloads for non-production use (see details athttp://blogs.technet.com/josebda/archive/2009/05/13/windows-storage-server-2008-with-the-microsoft-iscsi-software-target-3-2-available-to-msdn-and-technet-plus-subscribers.aspx).
You should make sure you have the proper credentials (username and password) with administrator privileges on the Storage Server. You should also make sure you have remote access to the Storage Server via Remote Desktop. Once you log on to the Storage Server via Remote Desktop, verify that you can locate the Microsoft iSCSI Software Target Management Console (MMC), which can be found in the Administration Tools menu. From a Storage Server perspective, we’ll perform all the configuration actions using the iSCSI Target MMC.
Checking the Server running Hyper-V
On the server running Windows Server 2008 Hyper-V, you should make sure to run Windows Update to get the latest updates. This will ensure that you have the final release of Hyper-V, not the beta version that was released with Windows Server 2008.
You will also need to enable the Hyper-V role. This is done using Server Manager by right-clicking the “Roles” node on the tree on the left and selecting “Add Roles”.
This will bring up the “Add Roles Wizard”, where you will find “Hyper-V” on the list of roles:
While configuring the Hyper-V role on the wizard, you should see the three (or more) NICs on your server on the “Create Virtual Networks” step.
Make sure you do not select the NICs used for iSCSI traffic and Hyper-V remote management in the “Create Virtual Networks”.
You will need to restart the server after you add the Hyper-V role.
Loading the iSCSI Initiator
The next step now is to configure the iSCSI initiator on the Hyper-V server.
You can find the “iSCSI Initiator” under “Administrative Tools” in Windows Server 2008. You can also find it in the “Control Panel”.
The first time you load the iSCSI initiator, it will ask you two questions.
The first question is about loading the Microsoft iSCSI Initiator service every time:
The second question is about configuring the firewall to allow the iSCSI traffic:
You should click on “Yes” for both questions.
After that, the iSCSI Initiator Properties windows will load, showing the “General” tab.
This tab gives you an important piece of information: your initiator name or IQN. We’ll need this later when configuring the target:
Configuring the target portal
The next step is configure the initiator with the address of your iSCSI target portal.
In our case, this is the computer running Windows Storage Server and the Microsoft iSCSI Software Target.
In the iSCSI Initiator Properties window, select the “Discovery” tab and add the IP address of the Storage Server to the list of Target Portals.
Click on “Add Portal…” to add the information. You will need the IP address of your Storage Server at this point. Port 3260 is the default.
Here’s the screen after the Target Portal is added:
Now, if you switch over the “Targets” tab of the iSCSI Initiator Properties windows, you will see this:
This blank list of targets is expected at this point, since we haven’t configured any targets yet.
We’ll do that next.
Creating the iSCSI Target
Now we switch over the Microsoft iSCSI Software Target side, on the Windows Storage Server.
We will create the target using the Microsoft iSCSI Software Target MMC we mentioned before.
After starting the wizard, skip the introduction page by clicking “Next”.
Next, you will provide the name and description for the target. We’ll be using simply “T1” for the name.
On the following screen, you need to provide the identification for the target.
Here you can use an IQN (iSCSI Qualified Name) or you can use the advanced setting to go with an IP address, DNS name or MAC address.
Since our initiator in this case already contacted the Storage Server, you can simply click on “Browse” and pick the IQN from there.
Once you get the right IQN, click “Next” to proceed.
Finally, click “Finish” to create the target.
Adding LUNs to the iSCSI Target
Now that the target is created, you need to add virtual disks or LUNs to it. These will be the logical units that will be presented to the initiator.
You will do this by right-clicking the target T1 and selecting the option to “Create Virtual Disks for iSCSI Target”.
You will start the wizard. Click “Next” on the introduction page.
Next, you will provide a path to the file to use as your virtual disk or LUN. This file will have a VHD extension.
Next, you will specify the size for the virtual disk or LUN. We’ll create a 20GB LUN here, which is enough to install Windows Server 2008 later on. The iSCSI target uses fixed-sized VHD files, but you can extend them if needed.
Next, you will specify a description for the virtual disk or LUN.
Finally, click “Finish” to create the virtual disk. Depending on the size, it could take a while.
At this point, you can see the target and its virtual disk on the Microsoft iSCSI Software Target MMC:
You can check the properties of the target, including the target IQN, by right-clicking the target name and clicking on “Properties”.
Now we go back to the initiator side.
Configuring the iSCSI Initiator targets
When we last checked the “Targets” tab of the iSCSI Initiator Properties windows, we had an empty list.
With the target properly configured, you should see the it showing after you click on “Refresh”:
Now you need to click on “Log on…” to connect to the target.
On the “Log On to Target” window, be sure to check the box to “Automatically restore this connection when the computer starts”.
Once you log on, the target status will change to “Connected”.
The LUN should also appear in the list of “Volumes and Devices” in the iSCSI Initiator Properties:
Now we need to work on that LUN to turn it into an NTFS volume with a drive letter.
That is done in Disk Management.
Preparing the Volume
If you followed all the steps so far, you should already have the LUN as an offline, uninitialized, unallocated volume in Server Manager, under Disk Management:
The first thing you need to do here is to online the volume, by right-clicking on the disk:
The volume will be onlined automatically if you are running the Standard Edition of Windows Server 2008.
After that, the volume will be online, but still uninitialized. You will then select the option to “Initialize Disk”:
At this point you need to select a partition style (MBR or GPT). The older MBR style is commonly used for small partitions. GPT is required for partitions larger than 2TB.
After this, you have a basic disk online which you could use to create an NTFS volume. If you right click it again, there will be an option to create a “New Simple Volume”.
Once you go through that wizard, format the volume and assign it a drive letter, you will have the final result in Disk Management as drive E:
We’ll use this drive E: as our storage for Hyper-V.
Creating the Virtual Machine
Last but not least, we must now create our Virtual Machine. We’ll do this in the Hyper-V Manager:
There are two places in the New Virtual Machine Wizard where you will refer to the E: disk.
The first one is when you select the location of your virtual machine configuration files:
The second one is when you specify the location of the virtual hard drive used by that virtual machine:
In this case, by using the wizard, we selected the default option of using a Dynamically Expanding VHD file that is exposed to the child partition as Virtual IDE.
You can verify that looking at the settings for the resulting Virtual Machine:
If you click on the “Inspect” button, you can see it’s a Dynamic VHD:
You could, of course, use any of the other types of VHD files or even a pass-through disk, but that’s a topic for another blog post…
I hope this blog post has helped you understand all the steps required to use the Microsoft iSCSI Software Target to provision storage for your Windows Server 2008 server running Hyper-V.
This post covered a scenario where Hyper-V runs on a full install of Windows Server 2008, using a VHD file on the parent and without Failover Clustering.


Beliebte Posts aus diesem Blog

Microsoft Office 2013 aktivieren via Kommandozeile

Wie man das neue Microsoft Office 2013 aktiviert via Kommandozeile, das werde ich euch in dem folgenden Beitrag Schritt für Schritt erklären. Gerade in grösseren Systemumgebungen in welchen die Clients und Standard Software automatisiert installiert werden, kann das sehr hilfreich sein und erspart einem viel Arbeit nach der Installation des Clients. Das Ziel sollte sein, möglichst viel zu automatisieren und soweit möglich, wenig noch händisch zu konfigurieren. Da kommt dieser Beitrag sicherlich nicht ungelegen. Die folgenden Befehle könnte man beispielsweise ganz einfach in eine MDT (Microsoft Development Toolkit) Umgebung mit einbeziehen oder auch mit anderer Software benutzen. Wichtig zu wissen ist, dass dies nur dann funktioniert, wenn Microsoft Office 2013 über das Internet aktiviert wird. Hat man einen eigenständigen Aktivierungsserver (KMS), funktioniert dies nicht. Zudem müssen die Befehle alle mit Administrator Rechte ausgeführt werden. Normale Benutzerberechtigungen genügen …

Windows Domain Controller: Es sind momentan keine Anmeldeserver zum Verarbeiten der Anmeldeanforderung verfügbar

Zurzeit häuft sich (warum auch immer) das Problem dass nach einem Neustart eines Windows Domain Controllers bei der Anmeldung die Fehlermeldung „Es sind momentan keine Anmeldeserver zum Verarbeiten der Anmeldeanforderung verfügbar“ kommt und eine Anmeldung so nicht möglich ist Das Problem ist hierbei das der Domain Controller im Active Directory Reperatur Modus (Abgesicherter Modus) startet. Am einfachsten lässt sich dieses Problem folgendermaßen beheben: 1) Anmeldung mit dem DSRM (Directory Services Restore Mode) / Verzeichnisdienstwiederherstellungskennwort Falls die Anmeldung nicht funktioniert kann man einen Workaround wie hier beschrieben durchführen. 2) Systemkonfiguration mittels msconfig.exe aufrufen

WSUS won’t uninstall or re-install

Hat heute ein Problem mit WSUS unter Windows Server 2008 R2 bei einem Kunden. Das Problem - die Clients konnten keinen Verbindung zum WSUS Server herstellen. Die Deinstallation wurde unerwartet beenden mit folgender Fehlermeldung: Attempt to un-install Windows Server Update Services failed with error code 0x80070643. Fatal error during installation  Die Lösung: I don’t like Windows Server Update Services (WSUS), but it’s the free alternative many companies select over the higher cost alternatives like Intune or Systems Center. So, today I had to repair a damaged WSUS installation. Turns out someone uninstalled SQL Server 2005 Express not realizing WSUS was using it. Now firing up the WSUS console just yielded an error complaining about the missing SQL database. So like any good troubleshootin IT guy the first thing I tried was to uninstall WSUS…sadly, however the product would not uninstall or re-install. Here’s how I finally got rid of it: [the problem] WSUS 3.0 SP2 is missing SQL serv…