Change the iSCSI initiator name

Hello

I am writing a script to configure the initiator iscsi on several hosts and led to this

Import-Csv-Path "c:\Tools\Powershell\CSV\hostconfig.csv" | %{

$StorageSystem = get-View (Get-VMHostStorage - VMHost (Get-VMHost-name _.esxHost $)) USER.USER

$StorageSystem.UpdateSoftwareInternetScsiEnabled ($true)

$StorageSystem.StorageDeviceInfo.HostBusAdapter | where {$_.} GetType(). Name - eq "HostInternetScsiHba"} | %{

$HbaName = $_. Device

}

$initName = $_.initname

$StorageSystem.UpdateInternetScsiName $initName

$iSendTarget1 = new-Object VMware.Vim.HostInternetScsiHbaSendTarget

$iSendTarget1.Address = "10.10.10.1".

$iSendTarget1.Port = '3260.

$SendTargets = $iSendTarget1

$StorageSystem.AddInternetScsiSendTargets ($HbaName, $SendTargets)

Get-VMHostStorage - $hst - RescanAllHba - RescanVmfs-VMHost

}

However, I'm stuck as to changing the name of the initiator.  I need to do for my SAN security.  I used a csv file for the main variables and can extract the new name I want to put, but I can't understand how to set it up.

Any help would be appreciated.

Thank you

Alasdair...

The UpdateInternetScsiName method needs 2 parameters, the current name and the new name.

Can try you this?

Import-Csv -Path "c:\Tools\Powershell\CSV\hostconfig.csv" | %{
     $esxImpl = Get-VMHost $_.esxHost
     $esx = $esxImpl | Get-View
     $StorageSystem = Get-View $esx.ConfigManager.StorageSystem

     $StorageSystem.UpdateSoftwareInternetScsiEnabled( $true )

     $StorageSystem.StorageDeviceInfo.HostBusAdapter | where {$_.GetType().Name -eq "HostInternetScsiHba"} | %{
          $HbaName = $_.Device
     }

     $StorageSystem.UpdateInternetScsiName($HbaName,$_.initName)

     $iSendTarget1 = New-Object VMware.Vim.HostInternetScsiHbaSendTarget
     $iSendTarget1.Address = "10.10.10.1"
     $iSendTarget1.Port = "3260"
     $SendTargets = $iSendTarget1
     $StorageSystem.AddInternetScsiSendTargets( $HbaName, $SendTargets )

     Get-VMHostStorage -VMHost $esxImpl -RescanAllHba -RescanVmfs
}

____________

Blog: LucD notes

Twitter: lucd22

Tags: VMware

Similar Questions

  • Logic unit number must be manually replaced by the iSCSI initiator

    I have a VM server that once restarted the logic unit number must be manually replaced by the iSCSI initiator. Does anyone have an idea how I can get this auto re - join when the server is restarted?

    EqualLogic PS4100

    Win2008 R2 64 bit server VM

    When you logged into the volume, there is a checkbox to restore the connection.  It was supposed to end upward in the Favorites tab in the MS iSCSI initiator utility.

  • Migration of the iscsi initiator software to hardware initiator on 2012 Hyper-v cluster.

    Hello

    We have 10 blades x M620 with Broadcom 10gig 57810 M1000e CMC card dedicated for iSCSI Equallogic PS 6110 San.

    Currently software used on cluster hyper-v Windows 2012 connect SAN PS6110 iscsi initiator.

    150 VMS are in production on 15 CSVs.

    We want to change the initiator of the software to the hardware on all our existing blades without CSV output.

    Is it possible on hyper-v cluster 2012 to have 5 blades with initiator software and remaining 5 blades with hardware initiator with same CSV cluster?

    If coexistence of initiator software and material as possible through hosting then I can apply this change a bit on our 10 blades without cluster downtime.

    Hello

    What version of FW EQL do you use?

    Yes, it is possible, however a couple of updates warn first.

    1.) install the latest firmware / boot code and driver for Broadcom cards.

    2.) put the node into maint mode then you can disconnect the SW iSCSI provenance and sign in using the HW iSCSI adapter.

    3.) do not try to do it with an active node / online.

    The advantage of the HW iSCSI adapter reduces the CPU Overload, if you are maxing out the CPU not now, do not expect a large increase in performance after HW iSCSI card.

    Kind regards

  • The ISCSI initiator problem

    Another problem of beginner.  I learned a lot about my new virtual world, and the box Logic Equal Dell.  But I still have a fundamental problem that must be an easy fix, or something I do not understand from a technical perspective.  I want to be able to connect to a snapshot and be able to recover a file if necessary.

    I brought the snapshot online and I could even get on vSphere so I could see him there.  But, for the life of me I can't all iscsi initiator to see the snapshot at all.  I have a few guesses, but I can't seem to understand my problem.

    I can't get the initiator to see all the targets... it just tells me the connection fails.  I think I know why, but my skills of network management are not real strong.  When we had an outside company come in and set up the environment, they put everything on 192.168.100.x or 192.168.101.x.  Since I arrived here (more than 15 years ago), our network has always been 129.1.x.x ip addresses.  I'm programmer for the most part and I got a guy of networking which is solid to the networking but I don't know if he can answer my question either.

    In any case, when I try to add my portal target to the initiator, what IP address or the name am I supposed to point to?  I can't ping the 192 addresses because I'm on an IP 129.1.x.x, correct?  So, this is why I have no chance to find snapshots using the initiators?  I know the vCenter server has an address 129 and the SAN itself has a 129 address and I tried to connect to who but did not work.

    I think I gave permission to the snapshot to be seen by several initiators.

    I think it's my lack of networking, but maybe not.  Any help would be greatly appreciated.

    Thank you

    Ryan Kotowski

    The snapshot will not be a set of files that you can view. This will be a copy of exactly what the LUN looked like when you took the photograph, you need to mount it in vSphere just like you would ride the regular LUN. Then you will see all the VMX and VHDX files for virtual machines that you instantly. Then you can add one in vSphere and power to recover his files. Don't forget that you'll want to disable networking all on this virtual machine so that it is not in conflict with the actual VM on the network.

  • Notification of stock market center - how to change the company's name?

    Many symbols ticker, particularly on the part of foreign populations, are rather obscure (AG8. F = Agilent Technologies)

    How can I change the tickers to something meaningful, such as the name of the company?

    Thank you!

    There is no way to do it, or at least, I can't find a way. Stocks are followed under the symbols, not names.

  • How can I change the bookmark/folder names?

    How can I change the name of a bookmark or folder. Focused on aid, I see not a response to this specific problem.

    1. Select bookmarks > organize bookmarks.
    2. In the library window, select the bookmark or folder to rename.
    3. In the name box, change the name of the element. The change takes effect as soon as you click anywhere else.
    4. Close the library window

    Another way to do is with the bookmarks bar:

    1. Choose view > sidebar > bookmarks.
    2. Right click on the bookmark or folder to rename, and then click Properties.
    3. In the name box, change the name of the element.
    4. Click Save.
  • How to change the default directory names in Vista?

    I want to change my default directory:

    'C:\Documents and Settings\\My Documents' to 'C:\Documents and Settings\\My Documents.

    Hi kdukes1,

    There is no way to change the default directory of the user account name you mentioned since it is the design.

  • [Beginner] How to change the virtual machine name

    Hello

    How can I change the name of a Virtual Machine - I want to say the name that appears in VMPlayer (or VMWare Fusion) as it has recently used Virtual Machines. I tried to change the name of the vmx file but this does not affect the name of the virtual machine displayed in VMPlayer.

    Thank you very much.

    TomasBar wrote:

    How can I change the name of a Virtual Machine - I want to say the name that appears in VMPlayer (or VMWare Fusion) as it has recently used Virtual Machines.

    VMware Fusion 3.x and 2.x but not 1.x, you can click on and change the name of the virtual machine in the Virtual Machine library on the right side, just under the display area.

    For VMware Player you need to edit the "displayName ="parameter in the configuration file .vmx and of VMware Player virtual machine must be closed when you perform this operation."

  • Changing the virtual switch name

    Hello

    Is it possible to change the name of the virtual switch, for example, when you create a new vSwitch in VI Center it starts with vSwitch1 can change you it to vSwitch2 providing their isn't another switch with this name?

    Thank you

    you change the esx.conf you need to reboot (be sure and create a backup of esx.conf... /etc/vmware/esx.conf_backup /etc/vmware/esx.conf cp)

    If you found this information useful, please consider awarding points to 'Correct' or 'useful '. Thank you!

  • Possibility to change the BA, TABLE name for a report, and then keep putting in the form

    Hi all

    I have a report from a custom folder of BA1 xx_test1... Now, I want to modify the workbook to use the custom file BA2 xx_test2.
    The custom folders have the same exact columns.

    Is it possible because I dione a lot of formatting and donot want to redo everything again. ?

    Thank you
    VJ

    Hi Vj
    Let me explain a few things about Discovererw workbooks.

    All the code needed to run than a workbook is embedded in the workbook. There is no record of SQL that you can go change the code. Discoverer incorporates the name of the file and identify as well as the name of any joint used. You can change the name of a folder without causing any problem as long as you do not modify the identifier as well. When the workbook opens then he will still find the folder. You should save the workbook again at this time so that the appropriate folder name is saved too.

    Interestingly, the corporate domain names are not included in the workbook. If the Finder can locate records is any accessible business while the workbook is open.

    So here's what I'd do:

    1. get the new SQL for the custom folder and replace the SQL in your existing folder

    2. rename the folder in the name you want to use. DO NOT modify the identifier and DO NOT change the names of all the joints.

    3 try to open your workbooks. They will find the file and continue working

    With regard to a new BA, here's my recommendation.

    1. create a master BA for all folders

    2 use folders to manage in the Admin tool, I'd share any files with this master BA - then you have an area for maintenance

    3. create a new empty BA

    4 use folders to manage again, sharing folders, you need the new BA - the joints will get too shared

    5 using the tools | Security, grant users access to this new BA and remove access to any former

    That's all. The workbooks will find records in the new BA and continue as before.

    I'm really sorry about planning. This is an option you should use really. It sounds like your business might need a discoverer health check, to make sure that you use it properly. Have a look here: http://ascbi.com/consulting.htm

    I hope my answers above help
    Best wishes
    Michael

  • Repointing of the reports to changed the subject domain names

    Hi all

    Is there an easy way to repoint already created reports to use the new areas?

    Thank you.

    Hello..

    First you not told us why you want to change the name of HIS (field)?
    I think you might have changed the name of HIS (the presentation layer) in SPR... Am I wrong?
    If so, you better create an alias name as the old name for the name of presentation layer... before renaming the name of the layer...

    To create aliases for name of presentation layer,

    1. double-click on the file of presentation in the presentation layer layer, go to the alias tab. Click the new (Insert) option and type the name of the old and click OK and now in the general tab, type the new name in the name field

    2 OR, right-click of presentation layer, click Rename and type the new name. This process automatically creates the alias of presentation Layer (SA) you can watch only on the alias tab.

    By doing this, of course, already developed reports will not be affected, but... If you want to change reports existed, as if you want to add another column... then the SA is not available in the selection pane.

  • How can I change the suggested user names?

    When I connect to one of my frequently used web pages I get a proposed username is irrelevant to this page. How to change or remove the username suggested?

    Follow these steps to delete the recorded data (form) in a drop-down list:

    1. Click on the (empty) input field on the web page to open the drop-down list
    2. Select an entry in the drop-down list
    3. Press the DELETE key (on a Mac: shift + delete) to remove it.
  • How can I change the file extension name in bulk?

    I have files in a directory named like this:

    TEXT. File1
    TEXT. File2
    TEXT. File3
    .
    .
    TEXT. File100
    and I would like to change them to this:
    File1.txt
    File2.txt
    File3.txt
    .
    .
    File100.txt
    Is it possible to do so.  I can't do work ren and or http://www.bulkrenameutility.co.uk/Download.php seems to cover it.
    Someone at - he of the ides?
    Thank you

    Hi Halasz,

    You can get what you want to use, for example a/l FOR command from the command prompt:

    • [Win] + X
    • Command prompt
    • CD /D drive:------DirectoryWhereYourFilesAreStored
    • Type of / l %G in (1,1,100) @If are TEXT. %G Ren TEXT in the file. File G % File%G.txt, and then press [Enter]

    Notes

    1. Respect the %G everywhere capital elsewhere, the command will fail. If your decide to use "%g" instead of "%G" and then use "%g" everywhere for the same reason. You can also decide to use another letter...
    2. If you have more than 100 files replace the parameter appears in bold with the appropriate value.

    There is necessarily a way to do something smarter, but it would take a little thought and a batch development. Not sure whether what you need at the moment.

    More information

    If you want to know more about ordering, visit this page.

    Hope this helps at & meets your needs. If, so be sure to mark your post as answer, so this can help others... Thanks in advance.

    See you soon

    LZ.

  • No matter what script to change the stylesheet of names AND language at the same time?

    Here's the deal:

    In a document, I have several style sheets (probably more than 30, everyone should be here, it's a very technical brochures with many different styles). As it was expected to be duplicated and used in another language, absolutely all style sheets end with _en (for English) and all are set to English as the language used for hyphenation and spelling. Now, I'm ready to go for the Spanish version and I would like to change all style sheets both ends by _SP (for Spanish) and be made Spanish the language to use for the spelling and hyphenation.

    No idea someone if it can be done with a JavaScript and if so any ideal where to find such a script?

    Thanks for any comments / help.

    Try this:

    (function(){
    
      var doc=app.activeDocument;
      for (var i=1; i
    

    (the box code deals with strange once again)

  • How to change the name of a volume iSCSI target?

    How the name of a volume iSCSI target can be changed?  I created a volume with a typo in a letter.   The volume production data on it now so I can not just it delete and recreate the problem.   It's not a big deal, but it doesn't look good either.

    It's on a PS6100.   When I go into the properties of the Volume in the advance tab I can see the iSCSI name, but cannot change it.  All I change is the public alias.  But it does no good that the name appears in the vCenter with the misspelled name.

    So how can I change the iSCSI name?

    Or am I stuck creating a new volume and telling them to migrate their data for spelling can be fixed?

    See you soon

    Part of the iSCSI specification is that target names must be unique.  Therefore, once created, you cannot change the name of the volume.

    Kind regards

Maybe you are looking for

  • HP Pavilion Slimline s5580t CTO Desktop PC Hard Drive Upgrade

    Hi all I was wondering if I could upgrade my hard drive to an SSD and leave the existing as a backup HARD disk drive? Is there in the machine? Thank you!

  • Lollipop is coming

    Is 5 Android entry for lenovo s960 vibe x and when?

  • The 6310 HP printer all-in-one has a memory card?

    I got rid of my printer and wanted to know if she has a memory card, that I should be removed before I send to the recycling plant (for security reasons). If so, where is it and how to remove them?

  • Impossible to uninstall Flight Sim 2004. .

    I tried to uninstall flight sim 2004 to my computer using the Add / Remove programs in Control Panel.  It won't uninstall?   I read something about needing to uninstall disks?   I can't find the disks!   How can I uninstall this Flight Simulator (200

  • Guest EA6700 network

    Hi all I just installed the EA6700 router and noticed that you can access the network of comments without using the password even if I set a password for the router. Is anyone knows how to fix this, or is this a known bug?