Disabling paths to migrate all storage CF specified on HBA port connections

Hello

Do any PowerCLI guru knows a way to run a script to disable all the paths to a FC hba card port specified? I need to move all my storage to 1 port on my HBA to allow me to remove one of my storage switches and by VC is very slow

Gregg

I had a quick look and I suspect that the port WWN is the best way to select the paths that are connected to a specific port.

The script becomes something like that

$tgtHBA = "vmhba1" $tgtPortWWN = "5766023041194672011" Get-VMHost | Get-ScsiLun -LunType disk | where {$_.RuntimeName.Contains($tgtHBA)} | ` Get-ScsiLunPath | where {$_.Extensiondata.Transport.PortWorldWideName -eq $tgtPortWWN} | ` Set-ScsiLunPath -Active:$false

To get an overview of the host, the HBA, the targets and the WWN of the port, you can do

foreach($esx in (Get-View -ViewType HostSystem -Property Name,Config.StorageDevice)){
    foreach($hba in $esx.Config.StorageDevice.ScsiTopology.Adapter){
        if($hba.Target){
            $hba.Target | Select @{N="VMHost";E={$esx.Name}},
                @{N="HBA";E={($esx.Config.StorageDevice.HostBusAdapter | where {$_.Key -eq $hba.Adapter}).Device}},
                Target,
                @{N="Port WWN";E={$_.Transport.PortWorldWideName}}
        }
    }
}

Tags: VMware

Similar Questions

  • Need a script to a fast line to disable SIOC on all storages attached to a vCenter data

    Need a script to a fast line to disable SIOC on all storages attached to a vCenter data

    Hello, vmwaredownload-

    If you just want quick and dirty and know that all your data warehouses are able IGCS, you can use these few lines (you can join to the same line, separated by semicolons, if you really need a single line):

    $viewStorageRM = Get-View -Id "StorageResourceManager-StorageResourceManager"    ## get the Storag Resource Manager view$spec = New-Object VMware.Vim.StorageIORMConfigSpec -Property @{"Enabled" = $false}    ## create the config specGet-Datastore | %{$viewStorageRM.ConfigureDatastoreIORM_Task($_.Id, $spec)}    ## for all datastores, disable SIOC
    

    Which does not check if the data store is capable of IGCS, or if it is already off - he just goes and tries to disable SIOC on all data warehouses.

    To learn more, if you're interested, AC talked about allowing people with disabilities/IGCS in his vNugglets.com post earlier.

    How these three lines do for you?

  • Resources to completely migrate all virtual machines

    I have 2 ESX4 hosts in a cluster.  Each has 32 GB of memory and 2 Quad Core 2.0 GHz processors.   The host has 22VMs with 20 GB of memory and 3 GHz committed treatment while the other has 21 virtual machines using 18 GB memory and committed treatment of 5 GHz.   Now, although a VMworld to which I attended some time ago, I remember a discussion about memory "slots" and if I remember well, to migrate all my VMs from one host to another, there must be sufficient memory and CPU on the host resources 'accept' to allow all the VMS to be propelled to the top... is this correct?   In other words, if I had to migrate all my virtual machines from the host that currently has 22 VMS (20 GB / 3 GHz treatment), the other host must have at least 20 GB and 3 GB treatment yet available for these virtual machines in a State "lit.

    I ask this question especially for purposes of Manager update that I intend to each of these host ESX patch... because, as I do the correction, the virtual machines will be transferred from one to the other.

    Is this correct?  If so, I won't be able to patch hosts, UNLESS some of the virtual machines are turned off (and therefore stay in the host that is being patched)

    Slots are for admission control VMware HA.

    If you disable this feature, you can approve the memory.

    André

  • Disable the peripheral only USB storage drive?

    How can I disable only USB key in windows XP Professional without disable keyboard and mouse because these are fixed with USB ports.
    Operating system: Windows XP Profesional

    Hi adeelahmed,

    See the Microsoft article below and try the steps mentioned, check if it helps.

    How can I prevent users to connect to a USB storage device?

    http://support.Microsoft.com/kb/823732

  • Virus recovery disable MEMU cascaded to all my programs in all programs.

    Virus recovery disable MEMU cascaded to all my programs. I'm thinking how to turn all the program, so I can see them again but I need to find the place where to turn all the links of programs, starting the programs, some can tell me where the key registetion to do.

    I disassembled the virus the one I had seems to be a version upgrade because I the steps I found to remove it would not work. same virus programs could not remove a lot of it and fix it.

    Apparently, the hard drive is wipe out but it's not. The virus turn most of the off visual interface on the desktop, so you can see. but it still everything you need to know which regester key values to change and they need to change too!

    The entire program antivirus don't happen that their return on what I found. They clean it up but your left with trying to fix the rest of the problem. Biggest problem for me, is that the top of the Tower has not yet saved.

    Thanks for your help, but I found the answer to my problem here.

    http://am-TechZone.blogspot.com/2011/07/all-programs-shortcuts-are-removed.html

    It shows you the registry keys, you need to delete and copy the file had to be back in the right places.

  • migration of storage in vsphere crashes at 18%

    I'm doing a migration of storage of a logical unit number to another (both on emc clariion)

    housing starts of migration runs quickly at 18% and then changes I cancelled it twice...

    is there something wrong, we know?

    Had the same problem in my Testenviroment.

    SVmotion began to run quickly to 18% and then nothing.

    So I cancelled once and tried again, same thing.

    So I close svmotion wnt and vsphere client waited more than 18 years & and ended after a time.

    You have a 1 GB NIC for vmotion configured?

    In my own way, I use a VLAN for Vmotion.

    MCP, VCP

  • How to migrate all Windows data with attributes / privileges

    I need create a new vmdk and transfer all the data to a physical windows, because I want to test.

    What software can I use to migrate all the data with attiributes and privileges?

    WinSCP? Veeam?

    Kind regards!

    If you have found this information useful, please consider awarding points to 'Correct' or 'Useful'*.

    Attach your vmdk on a virtual Windows machine and use robocopy.

    If the two machine Windows are in the same domain, you will have no problem with permissions and attributes.

    André

  • Disable the button Save all the time

    Hello! I want to have a form that is with button "DISABLE" save all the time. When I put this code below into the trigger once - new - form - Instance:
    Set_Menu_Item_Property('Action.Save', ENABLED, PROPERTY_FALSE ) ;  
    first of all, it's disable, but when I click the "RUN" button, the "Save" button is again enable. My question is where I must put the code above to disable the button Save all the time.

    TX in advance.

    indoracle wrote:
    Hello! I want to have a form that is with button "DISABLE" save all the time. When I put this code below into the trigger once - new - form - Instance:

    Set_Menu_Item_Property('Action.Save', ENABLED, PROPERTY_FALSE ) ;  
    

    first of all, it's disable, but when I click the "RUN" button, the "Save" button is again enable. My question is where I must put the code above to disable the button Save all the time.

    TX in advance.

    Hello
    Is there another code in the form to activate this?

    Try the code at the moment-new Record Instance to the block level.

    Hope this helps.

  • My Windows 7 computer is no more can detect the wired network, but all my other wireless and wireline devices connect very well. Replace the network card and no change.

    Hello!  This morning my Windows 7 (the motherboard Acer) desktop ceased to recognize the wired connection to its network card.  In other words, it shows kind of connection, but notes "no Internet access.  It connects to a surfboard by Motorola through one Ooma hub, although I encounter the same problem when I connect to the desktop directly to the surfboard.  All other devices Wi-wired and that connect to the surfboard are functioning properly.

    Thinking that the Realtek NIC on the motherboard Asus was the problem, I installed a new Trendnet network interface card in the PCI slot.  I disabled the network card to the motherboard via the BIOS settings.  No change.  Always 'no Internet access.

    Time Warner Cable test the modem from their office and said it was working properly.  I also connected a laptop directly to the surf board using the same cable, and he was able to connect to the internet.

    Can someone help me understand what the problem is?  Thank you!

    You have McAfee? McAfee has been updated at the same time as the last batch of updates from Windows 7 and this is the cause of problems of internet connection for most, if not all, users of McAfee.

    See the communication from this "criticism" - McAfee

    Some customers may experience a loss of network connectivity and/or errors in McAfee Security Center after a recent update

    You should make the fix McAfee, if necessary. There are corresponding communications for their enterprise products.

    I had to run the removal of McAfee Development tool a few times before and it caused a problem with the license if the PC was not connected to the internet during the abduction. Due cat of McAfee support reset their files in order to allow the relocation-reactivation. Here is their link cat - McAfee - media contains the link to the cat

  • Trouble when not specify the HTTP port

    Hey all,.

    I'm trying to install JRUN4/IIS and deploy a web application that accesses servlets. I'm fairly positive that almost everything is set up very well because the servlet needs out of XML, however, I get a 404 error, if I DO NOT specify the HTTP port that uses the server - for example, my server is called frank and i've got things configured so that newsite.here.com translates into frank and things pull his IIS. Long story short, I can get out of my servlet if I specify the HTTP port that it is using such as:

    http://NewSite.here.com:8303 / htmlcontent.View

    However if I access it as:

    http://NewSite.here.com/htmlcontent.view

    In addition, newsite.here.com should resolve correctly because there are several other pages JSP/etc I can access this site.

    Can someone point me in a direction to look? Thank you.

    Did you run the web server configuration tool (wsconfig.exe)? See http://livedocs.macromedia.com/jrun/4/Installing_JRun/servconf.htm.

    Ted Zimmerman

  • my hp Pavilion all in one 23-g218 can be connected to a TV

    my hp Pavilion all in one 23-g218 can be connected to a TV

    Not with the hardware you have but you do not have 2 x usb 3.0 ports and there is such a thing as a usb 3.0 HDMI adapter:

    http://www.Amazon.com/Ideashop%C2%AE-quality-adapter-converter-laptop/DP/B010S09TPI/ref=sr_1_3?ie=UTF8 & qid = 1448745297 & SR = 8-3 & Keywords = USB + 3 + to + HDMI

    It will not sound, but you can connect an audio cable, too. Also don't forget something like a Chromecast that will take what's on the computer screen to the TV via a wireless connection with any kind of video card. I think Amazon is something similar.

    If it's 'the Answer' please click on 'Accept as Solution' to help others find it.

  • I have norton antivirus online via my ISP and I had to disable, because it comes with an error that says "cable not connected or missing network adapter" I use dial-up.

    cable not connected network adapter

    I have norton antivirus online via my ISP and I had to disable, because it comes with an error that says "cable not connected or missing network adapter" I use dial-up and do not use any type of router and I'm not on a network. I also tried to disable my network card & it still says the same error. I have an internal network card that came w / the computer (NOT a PCI one) and I wonder if there is a cord or a plug inside my computer that must be plugged. I made some changes on the internal hardware and might have missed an and I didn't have to open my Tower if it wasn't. It's a big hassle! Help, please!

    Hello

    1. Once you get the error message?

    2. do you get the error when you try to disable Norton anti-virus?

    3. are you able to access the Internet explore?

    Temporarily disable the antivirus on the computer running software and check if you are able to install the software.

    Disable the anti-virus software

    http://Windows.Microsoft.com/en-us/Windows-Vista/disable-antivirus-software

    WARNING: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you should not disable your antivirus software. If you need to disable temporarily to install other software, you must reactivate as soon as you are finished. If you are connected to the Internet or a network, while your antivirus software is disabled, your computer is vulnerable to attacks.

  • All-in-one Deskjet 2540 fails to connect wireless

    This printer worked fine without thread until I installed a new (AT & T U-Verse) Internet connection.  Previously, I had a combination router/DSL that had wireless 2 sources (hi and lo Band).  The printer connected to a wireless network with the SSID of "Rooter" (stupid name, but what the heck).

    When the modem/router has been replaced by the unit of AT & T, I lost a wireless sender (Rooter) so I tried to change the printer another point of wireless access on my local network named "FBI_Van" (another stupid name).  To do this, I used my cell phone which, at the time, was very well connected to FBI_Van.  I loaded the drivers from the printer to the laptop, connected the USB cable and began to install the printer for the new wireless connection.

    Efforts to do this have failed.  In the window "Select one of the available wireless networks" (after using the link "Convert a USB port connected wireless"), I could see my access point 'FBI_Van' very well.  By clicking on the button "use this connection", asked me to enter password WPA_PSK expression, I did.  It's the same EXACT sentence I used to connect wireless laptop.  The green progress bar went to halfway and then I got the error:

    "Cannot locate the SSID that you entered, try again".  I won't be an SSID, I entered a password that the requested software.

    First of all, I was not one who entered the SSID - this is the software that "judge" and I just clicked it.  Second, the password was perfect without error letter.

    Whne I run the wireless network Test results, using the printer itself (button wireless & B & W Print) he told me that the printer has been tirelessly "Rooter" looking for (and not finding).  The blue wireless LED blinking and the "signal strength" LCD is forced.

    So, after this long explanation of events, what can I do to make this printer to accept a new SSID access?

    Is there a way to reset the printer to "factory delivered" settings so I can start over?

    Bill

    To answer my own question.  Is there a way to reset the part of the printer wireless.  It is NOT mentioned in the manual, but here's how do:

    When the printer is on, stop the LED flashing wireless by turning off the wireless.

    Hold the button cancel (the big red 'X') and the wireless button at the same time.

    Wait about 10 seconds until the power light flashes once.

    Go to the computer that you have installed the printer software on and go down the menu to "Printer Setup and software" and click on that

    Press the radio for wireless configuration MANUAL (do not push the button 'connect to the router')

    Follow the screens to select the wireless network you want, click Next

    The password for the connection of input and let the software connect the printer to the network.

    It MUST work, if not, repeat the operation (I got two times)

    Bill

  • My driver support does not work all the time, won't let me connect, keeps losing internet connection.

    * Original title: SUPPORT of the PILOTS LOSE INTERNET.

    My driver support does not work all the time, won't let me connect, keeps losing internet connection.

    What do you mean by "driver support?

    If you have installed one of these offers of support software driver, you have installed malware.  The vast majority of them no useful software and installing a lot of malware on your computer.

    The drivers are not the soft thing you should normally be updated.  I recommend the updated drivers only in the case of a problem that has to solve, and it's rare.

    Is the ONLY source, you should consider for driver updates or OEM support site.  Even those who sometimes go way overboard in trying to update the drivers.  The latest Dell systems are equipped with updated software that checks for new updates every day.   In most cases, drivers are rarely updated after the first year of a product.

  • I'm unable to connect to a specific web site. Have you tried 3 different browsers and they all say that they are unable to connect. No one else has a problem connecting to the page.

    I tried to use www.findagrave.com for 2 days.  I tried 3 different browsers.  all say that they are unable to connect.  No one else has a problem on this page.  I have no problem to do something else.  Why, throughout this site I can not connect with?   I use it all the time in research.  very aggravating.

    original title: on a web page

    Well, I tried the support page, but I already tried all that.  I did a restore full back to factory settings... still cannot have only one page to load.  I'll call my dsl provider this afternoon.  I don't know what else to do.  I can't communicate with Findagrave.  I don't have a snail mail address but no phone number.  But I don't think that it would be them anyway, if no one else has a problem with this web site.  There must be on my end, don't you think?

    I don't know what to tell you. There is no problem, it's on your side.

    If you care to try it... on the assumption that your user account is damaged.
    Create a different user account with exactly the same type of account > connect to it and see if you can access this Web site.

    Personally, I doubt that will solve anything, since you already restored your computer to factory settings.

Maybe you are looking for

  • Satellite M40x overheating while game

    Hello When I play a game on my toshiba laptop (satellite M40X) it gets overheated after about an hour. I wonder if someone also has this problem and if I can do anything other than take EIT to the store? Thank you

  • Satellite A30 - where and how to order the recovery disk

    Hello I have a Satellite A30 range and I'm about to install a new hard drive but I don't have the original recovery disk. I told myself I can are no longer met this Toshiba directly so I wonder if someone can direct me looking for a replacement of or

  • Y510P lenovo BIOS problem

    Hello I recently bought a lenovo Y510P and made a clean windows 7 64-bit installation. Yesterday I reset my BIOS default setting and now it doesn't reconise any of my hard drives or USB keys. The only thing that I can boot from are (I think) network

  • How to pragmatically set the name of the user event?

    In LabVIEW 2010, I register a user event during execution by using the function of events Reg, but I want to put the name of the user event, according to the runtime. LV said "If wire you a cluster at the entrance to the data type of the user events

  • number stored as text

    Hi ~ When write a MS Excel table, the total number stored as text that you can see the green flag on the upper left corner of each cell, it's cause the fomula in the upper cell not feasible. the code that allows to write Excel as below: have you even