Configuring iSCSI Target on Server 2012 Core

As you know, Server 2012 natively supports creating iSCSI targets. It’s great addition and i want to demonstrate how to set up this feature in core environment using only Powershell

My test equipment:

iSCSI Initiator –  Hyper-V VM on Server 2012
iSCSI Target – Intel Server System S1530SH with 2 SATA 500 Gb in RAID 1 and external RAID Controller with three different RAID 1.

It’s not very old server system but, comparing with newest server systems, it seems very slow during some tasks. Anyway, installation Server 2012 Datacenter Core takes about 6 minutes. Great? I think it’s pretty nice result.

Configuring iSCSI Server Target

1. Type powershell in the command line then Rename-Computer -NewName yourpcname -Restart . This cmdlet lets you change standard name of your server.
Also, i recommend to execute Update-Help cmdlet to get the latest help pages.

Rename-pc

2. After successful restart we need to configure ip parameters. Type Get-adapter to show all network adapters in your system and their status. Remember NIC’s Index number. For example, NIC with 12 looks to iSCSI , NIC with 13 – internal

get-netadapter

Changing ip properties at NIC with index 12

newNetIP

Type ipconfig /all to see result

3. Installing iSCSI Target feature. Type Get-WindowsFeature to see all available features in Server 8 and then Add-WindowsFeature FS-iSCSITarget-Server.

iSCSIfeatON

How to enable Windows Automatic Updates on Server Core?

4. Enabling Remote Desktop Services to management . However, you can use remote powershell connection

rdpON

5. Creating partitions and VHD on our disks

Get-Disk to see what disks are available in the system

get-disk

I have some old information on these disks, so i should run Clear-Disk -RemoveData to prepare them for new partitions and volumes

cleardisk

We have to initialize all disks before creation new partition using New-Partition cmdlet

newpartition

Formatting partition using Format-Volume cmdlet

formatpart

Creating Vitrual Disks on each partitions which we want to share through iSCSI Target New-iSCSIVirtualDisk c:\test\disk1.vhd -Description “test” -Size 10Gb

new-iscsivd

6. Setting up new iSCSI Target Server, disks mapping

New-iSCSIServerTarget testTarget -IntiatorIDs “IQN:iqn. … “

test – your target name, intitiatorID – client’s id to access target.

How can i get InitiatorID?

You have to use iscsicli command

iscsicl

Create Target : New-iSCSIServerTarget NameOfTarget -InitiatorIDs “IQN:iqn….”

newtarget

Mapping our VHDs to iSCSI Target

Add-iSCSIVirtualDiskTarget Test s:\test\disk2.vhd

vhdmapping

—————————–

Configuring iSCSI Initiator on the client machine

1. Starting iSCSI Intiator

startiSCSI

2. Connecting to created iSCSI Portal

New-iSCSITargetPortal -TargetPortalAddress YourTargetIP

con2targ

Get-iSCSItarget |FL   > shows your added target portal

gettarg

Connect-iSCSITarget -NodeAddress “your target IQN”

connecttargets

Get-Disk to see iSCSI disks. By default, they are in offline status

Get-DiskClient

Taking disks to online operational status using Set-Disk

takeonlinedisks

Finally, we’ll create new partitions and volumes. Notice , if your iSCSI disks are using for DPM Backups , it’s not necessary to create volumes. DPM can create them by itself.

New-Partition -DiskNumber _ -UseMaximumSize -DriveLetter _

UseMaximumSize lets to create partitions with the biggest size as possible.

newpart

Get-Partition -DiskNumber YourDisksNumbers | Format-Volume

format-volumes

Any questions or comments? Leave a reply!

Installation guide for DPM 2012

DPM 2012 provides disk-based and tape-based data protection and recovery for servers and desktops. DPM can also centrally manage system state and Bare Metal Recovery. Now DPM available only in the System Center Package (Standard or Datacenter) with other great and very powerful products such as VMM, SCOM and others. You can download evaluation versions using this link .

Before installation:

  • Check DPM requirements: Software, Hardware, Network
  • Watch video “What’s New in DPM 2012” to understand all changes between prior versions DPM
  • Update your target servers
  • Update your remote SQL server if you planning to deploy DPM using existing database servers
  • Disable IE Enhanced Security (Server Dashboard – IE Enhanced Security Configuration – Off)ie_esc_off

I am not going to make an attention to planning and requirements for DPM 2012. However, during reading TechNet, I noticed some interesting things:

————–

“DPM is not supported on the Turkish language version of any of the listed Windows Server versions.”

Poor, poor Turkey 🙂 I do not know reason, but it is funny and I cannot understand “Why? Why only Turkish? We all love Turkey!)

————–

«For the DPM database, DPM requires a dedicated instance of the 64-bit version of SQL Server 2012 or SQL Server 2008 R2 or SQL Server 2008 R2 SP1, Enterprise or Standard Edition»

Do not try to install DPM without SP1 to an existing SQL Server 2012 you will receive an error “Server 2008 SQL Instance required”

————–

Open SQL Remote Ports using these commands to successful creating DPM instance. Just create .bat file, for example sqlports.bat and run as administrator. Also, you can check result using firewall.cpl

netsh advfirewall firewall add rule name=”Open Port 80″ dir=in action=allow protocol=TCP localport=80

@echo ========= SQL Server Ports ===================
@echo Enabling SQLServer default instance port 1433
netsh advfirewall firewall add rule name=”SQL Server” dir=in action=allow protocol=TCP localport=1433
@echo Enabling Dedicated Admin Connection port 1434
netsh advfirewall firewall add rule name=”SQL Admin Connection” dir=in action=allow protocol=TCP localport=1434
@echo Enabling Conventional SQL Server Service Broker port 4022
netsh advfirewall firewall add rule name=”SQL Service Broker” dir=in action=allow protocol=TCP localport=4022
@echo Enabling Transact SQL/RPC port 135
netsh advfirewall firewall add rule name=”SQL Debugger/RPC” dir=in action=allow protocol=TCP localport=135
@echo ========= Analysis Services Ports ==============
@echo Enabling SSAS Default Instance port 2383
netsh advfirewall firewall add rule name=”Analysis Services” dir=in action=allow protocol=TCP localport=2383
@echo Enabling SQL Server Browser Service port 2382
netsh advfirewall firewall add rule name=”SQL Browser” dir=in action=allow protocol=TCP localport=2382

@echo ========= Misc Applications ==============
@echo Enabling HTTP port 80
netsh advfirewall firewall add rule name=”HTTP” dir=in action=allow protocol=TCP localport=80
@echo Enabling SSL port 443
netsh advfirewall firewall add rule name=”SSL” dir=in action=allow protocol=TCP localport=443
@echo Enabling port for SQL Server Browser Service’s ‘Browse’ Button
netsh advfirewall firewall add rule name=”SQL Browser” dir=in action=allow protocol=UDP localport=1434
@echo Allowing multicast broadcast response on UDP (Browser Service Enumerations OK)
netsh firewall set multicastbroadcastresponse ENABLE

————–

“The following are additional prerequisites for DPM: Microsoft .NET Framework 3.5 with Service Pack 1 (SP1)”

Using Server Manager, you can add NETFX3 feature to Server 2012, but it does not work.

netfxerr

You should use dism utility to add this feature 

  • Mount your Server 2012 image/cd (in this example, drive letter is D)
  • Press Win+Q, type cmd , right click and choose pin to taskbar
  • Run CMD as administrator and paste dism /online /enable-feature /featurename:NetFX3 /all /Source:d:\sources\sxs /LimitAccessnetfx3 dism

————–

Installation:

1. Choose “Run the prerequisite Checker” and check again all requirements. It’s very important step!

dpm_1

2. Click on “Data Protection Manager” to setup the core of DPM
dpm_2

3. Accept license terms

dpm_3

4. DPM says “Welcome” to you. Just click “Next”

dpm_inst_1

5. DPM can install a dedicated instance of SQL Serverl 2008 R2 or you can choose your existing remote SQL instance . Don’t forget open all ports to communicate on SQL Server! (see information in the top of this article) I choose a dedicated instance and click “CHECK”

dpm_inst_2

6. Make sure that your server meets all requirements and click “Next”

dpm_inst_3

7. Paste your license key and click “Next”

dpm_inst_4

8. On this stage you can change default path to installation. I agree with default paths and click “Next” again.

dpm_inst_5

9. Choose password for DPM and SQL’s service accounts. Notice, if you are using remote instance DPM does not create any SQL service accounts

dpm_inst_6

10. Choose a “Windows Update” to delivering updates

dpm_inst_7

11. Choose “No, …” and click “Next”. On the summary page also click Next and wait while wizard setups DPM

dpm_inst_8

12. After successful setup use Microsoft Windows Update (control /name Microsoft.WindowsUpdate) to install DPM latest CU (currently, CU3) or you can setup manually using this link

dpm_update

13. WIN+R – type services.cmd and check that main DPM service are running

servdpm

14. You are ready to get started with DPM 2012. I’m planning to make a second part of this article about configuring DPM . Follow me and keep in touch! 🙂

P.S. System Center 2012 SP1 is available now:)

Look our my other posts:

Deploying DPM Agent 2012 to Untrusted or Workgroup Computers

How to upgrade DPM 2012 to DPM 2012 SP1?

How to update DPM agents to 4.1.3333.0 after upgrading to SP1?

How to fix “Replica is inconsistent” in DPM during backing up SQL 2012 DBs?

%d bloggers like this: