.. _Accessing Virtuozzo Infrastructure Platform iSCSI Targets from Microsoft Hyper-V:

Accessing Virtuozzo Infrastructure Platform iSCSI Targets from Microsoft Hyper-V
--------------------------------------------------------------------------------

.. note::  Names of the targets to be mounted must not contain underscore characters.

1. Make sure that Microsoft iSCSI Initiator Service, ``MSiSCSI``, is running.

2. Discover a new target portal. For example, for the portal 192.168.10.100, run:

   ::   

       PS C:\Users\Administrator>new-iscsitargetportal \
       -targetportaladdress 192.168.10.100
       Initiator Instance Name  :
       Initiator Portal Address :
       IsDataDigest             : False
       IsHeaderDigest           : False
       TargetPortalAddress      : 192.168.10.100
       TargetPortalPortNumber   : 3260
       .. _PSComputerName           ::
       
       PSComputerName           :

3. Connect to the desired target. For example, for the target iqn.2014-03.com.vstorage:test1

   ::

       PS C:\Users\Administrator> connect-iscsitarget
       cmdlet Connect-IscsiTarget at command pipeline position 1
       Supply values for the following parameters:
       NodeAddress: iqn.2014-04.com.vstorage:test1
       AuthenticationType      : NONE
       InitiatorInstanceName   : ROOT\ISCSIPRT\0000_0
       InitiatorNodeAddress    : iqn.1991-05.com.microsoft:win-l2dj7g36n7e...
       InitiatorPortalAddress  : 0.0.0.0
       InitiatorSideIdentifier : 400001370000
       IsConnected             : True
       IsDataDigest            : False
       IsDiscovered            : True
       IsHeaderDigest          : False
       IsPersistent            : False
       NumberOfConnections     : 1
       SessionIdentifier       : ffffe00000b5e020-4000013700000005
       TargetNodeAddress       : iqn.2014-04.com.vstorage:test1
       TargetSideIdentifier    : 0001
       .. _PSComputerName          ::
       
       PSComputerName          :

4. To check that the disk has been connected, run

   ::

       PS C:\Users\Administrator> get-disk
       Number Friendly Name                     OperationalStatus Total Size
       ------ -------------                     ----------------- ----------
       1      IET VIRTUAL-DISK SCSI Disk Device Offline           100 GB RAW
       ...

You can now initialise the newly mounted disk for use in Microsoft Hyper-V.

For more information, see **iSCSI Cmdlets in Windows PowerShell** at http://technet.microsoft.com/en-us/library/hh826099.aspx.
