Problem with sh scripts on ESXi 5

I recently had to solve some problems with delays during renumerisations and restarts due to RDM which is attached to a host ESXi 5 discs. See this article for details http://kb.vmware.com/selfservice/microsites/search.do?language=en_US & cmd = displayKC & externalId = 1016106. Since I had a large number of RDM disks and needed to run the commands on each host I thought that I would write a script. I created the following scripts (just a subset here), but are there problems when it runs:

Perennial.sh

esxcli storage device base setconfig d naa.60000970000292600424533033434642 - perpetually reserved = true
esxcli storage device base setconfig d naa.60000970000292600424533033434643 - perpetually reserved = true
esxcli storage device base setconfig d naa.60000970000292600424533033443041 - perpetually reserved = true
esxcli storage device base setconfig d naa.60000970000292600424533033443133 - perpetually reserved = true

and

perennial_verify.sh

esxcli storage device base list d naa.60000970000292600424533033434642 > > storage_list.txt
esxcli storage device base list d naa.60000970000292600424533033434643 > > storage_list.txt
esxcli storage device base list d naa.60000970000292600424533033443041 > > storage_list.txt
esxcli storage device base list d naa.60000970000292600424533033443133 > > storage_list.txt

I put the files on a data store and gave them execute permissions and they seem to work, however when I run the scripts, they give an error at the end of running something on command not found or something. It does not run all the commands as well. Finally, when the perennial_verify.sh is run more than once something happens in the file storage_list.txt - he had me puzzed for awhile - he showed that the file was different from zero in size, but when I did a cat or less that he would say that the file is not found. Finally I tried to copy the file down in the browser of data store and found that there was a printable character appended to the end - possibly a return carraiage. Now I can not rename the file or delete it - it is impossible to remove. If anyone has any advice on running sh scripts and the correct way to pipe the output to a file I know you more.

Thank you

Ed

What is the exact error do you receive when you try to delete?

Rather than redirect the output for each order, simply redirect the script in the log file, which will capture the entire script.

./perennial_verify.sh > storage_list.txt

Tags: VMware

Similar Questions

  • lately and I don't know why I see a pop up of a problem with the script. can some1 help me?

    There is a pop up of a problem with the script. He asked end and contuniue the script. I didn't have this problem before. Please help me this is getting really annoying. He asks a lot

    I changed a theme and almost never have a problem again...

  • Having a problem with the script error message

    The error message and web page script error every move I make now. I tried to check and uncheck boxes tab in advance internet options. I also ran a check of the system that did not help either. Any suggestions? Thank you

    Hi Mic,

    From the description, it seems that you have a problem with the script error message in Internet Explorer.

    To better understand the question, please answer the following questions:

    1. is specific to a particular Web site question?

    2 have you made changes on the computer before this problem?

    3. What is the exact full error message and web page of script error message?

    4. When you get exactly the script error message and web page error message appears?

    5. what exactly you're talking about when you say "system check"?

    See the article mentioned:

    How to troubleshoot script errors in Internet Explorer

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

    Hope the above information is helpful. If you have any question back to us, we are happy to help you.

  • Problems with Java script

    Hi, I'm doing a site with dream weaver cs5.  I am instituting a slider, this cursor uses java script coding, I'm not familiar with Java script. Here is the site that I have problems with. Www.bussmanncomputers.net/Jara.

    What said Teodor, the jQuery library is not found as can be demonstrated when we follow him - http://www.bussmanncomputers.net/Jara/js/jquery.js - link you have placed in your document online.

    The only reason why there is a 404 error is because the file is not in the specified location, it has not been downloaded to the location of i.o.w..

  • problems with the script in indesign

    Hi all

    I'm new and scripts so I hope I can explain what I need

    Well, I have an indesign file in which I need to insert an extra layer with the translation of a language, have a layer IN English and an extra a FR for the french.

    I found a script that's like that

    with (app.clipboardPreferences) {}

    pasteRemembersLayers = true;

    }

    var docTarget = app.documents.itemByName ('French.indd');

    var docSource = app.documents.itemByName ('French.indd');

    If (docSource.isValid & & docTarget.isValid) {}

    var numSpreads = docSource.spreads.length;

    for (var i = 0; i < numSpreads; i ++) {}

    app.activeDocument = docSource;

    app.activeWindow.activeSpread = app.activeDocument.spreads [i];

    App.Select (App.activeDocument.spreads [i] .allPageItems);

    If (app.selection.length > 0) {}

    app. Copy ();

    app.activeDocument = docTarget;

    If (app.activeDocument.spreads [i] .isValid) {}

    app.activeWindow.activeSpread = app.activeDocument.spreads [i];

    app.pasteInPlace ();

    }

    }

    }

    }

    but it seems to cause problems with the files,

    I have to say that the source is a file very heavy, even enter takes a long time.

    but I want to just get into the text layer,

    Do you think this script works finally, can you spot an error or something?

    Hello

    Your script is copying content of any doc (allPageItems) in an another doc - all number two need to have equal variances.

    You don't need to run the script if your goal is to create the new layer in the existing doc.

    The questions are

    What elements of the page must be copied into this layer

    AND

    should bound texts copied frames play any content

    AND

    wherever the content come from?

    Jarek

  • "I use CS2 in Windows XP sp2, 32-bit, interested in CS3 &amp; tried to download &amp; install, giving message" "code error 1720" problem with a script required for this installation and windows package install ".

    Currently I am interested in CS3 & CS2 user, so I doenloaded CS3 but gives the time installation message "Error 1720, there is a problem with this windows package install." A script is required for this installation to complete, contact technical support.

    Google search for help with the problem of Windows...

    https://www.Google.com/search?q=Error+1720&SourceID=IE7&RLS=com.Microsoft: en - US: IE - address & ie = & oe = & gws_rd = ssl

  • Problems with the script to output event

    In fact I don't know if I have a problem with the Exit event or if there is something wrong with my script syntax... The output of a field event, I check if the field is empty or not and check a flag I put in place.

    The first if statement works - if I get back a value in the field, everything goes as planned. If I delete the value of the field, nothing happens.

    //if field has a value hide subSection04
    if (!(this.rawValue == null || this.rawValue.length == 0))
    {
         subSections.subSection04.presence = "hidden";
    }
    
    //if field is empty and flag equals true show subSection04
    else if ((this.rawValue == null || this.rawValue.length == 0) && (subFlags.Commercial.rawValue == true))
    {
         subSections.subSection04.presence = "visible";
    }
    
    //if field is empty and flag equals false hide subSection04
    else if ((this.rawValue == null || this.rawValue.length == 0) && (subFlags.Commercial.rawValue == false))
    {
         subSections.subSection04.presence = "hidden";
    }
    
    There are a few groups radio button that also control this behavior, they are all inter relate. So I tried also triggers the Click event of a radiobutton Group (which resembles the value in this field) out of this area, but that doesn't seem to work.

    Hi Jono,

    Your expression subFlags.Commercial.rawValue is true compares a String data type with a Boolean data type.

    Edit the expression as subFlags.Commercial.rawValue is 'true'

    I hope that this should work for you.

    Your code should look like

    //if field has a value hide subSection04
    if (!(this.rawValue == null || this.rawValue.length == 0))
    {
         subSections.subSection04.presence = "hidden";
    }
    
    //if field is empty and flag equals true show subSection04
    else if ((this.rawValue == null || this.rawValue.length == 0) && (subFlags.Commercial.rawValue == "true"))
    {
         subSections.subSection04.presence = "visible";
    }
    
    //if field is empty and flag equals false hide subSection04
    else if ((this.rawValue == null || this.rawValue.length == 0) && (subFlags.Commercial.rawValue == "false"))
    {
         subSections.subSection04.presence = "hidden";
    }
    

    Nith

  • Problems with PowerCLI script variables

    Hello

    I hope that someone in the community can tell me where I was wrong in the script below. I have a few other PowerCLI scripts that work in a way similar to this work and these, but this one has a problem. The script is intended to collect information on a number of ESX objects in an array of arrays, $reportfinal, which can then be written to a CSV file that will have the column names for the objects, and each line will yield the values for RDM related objects for each virtual computer. The problem is that, rather than add the results to the table of $reportfinal, the results are crushed, and worse still, the values repeat themselves (for example the size of the various disks is reported as the same value).

    $report = @)

    $reportfinal = @)

    $VMs = get-VMHost | Get - VM | Get-View

    $rowcoll = "" | Select the virtual machine, VMController, SCSIBusShare, SCSIBusNumber, SCSIUnitNo, DeviceLabel, SCSISummary, DeviceFilename, DeviceCapKB, DeviceDiskMode, DeviceDiskUUID

    {ForEach ($VM to $VMs)

    #Clear table report for each virtual computer

    $report = @)

    Foreach ($SCSI_Controller in ($VM. Config.Hardware.Device | where {$_.} (({DeviceInfo.Label - like "SCSI *"})) {}

    $rowcoll. VM = $VM. Name

    $rowcoll. VMController = $SCSI_Controller.DeviceInfo.Label

    {Foreach ($Disk_Key to $SCSI_Controller.Device)}

    Foreach ($Disk_Device in ($VM. Config.Hardware.Device | where {$_.key - eq $Disk_Key})) {}

    $rowcoll. SCSIBusShare = $SCSI_Controller.SharedBus

    $rowcoll. SCSIBusNumber = $SCSI_Controller.BusNumber

    $rowcoll. SCSIUnitNo = $Disk_Device.UnitNumber

    $rowcoll. DeviceLabel = $Disk_Device.DeviceInfo.Label

    $rowcoll. SCSISummary = $SCSI_Controller.DeviceInfo.Summary

    $rowcoll. DeviceFilename = $Disk_Device.Backing.Filename

    $rowcoll. DeviceCapKB = $Disk_Device.CapacityInKB

    $rowcoll. DeviceDiskMode = $Disk_Device.Backing.DiskMode

    $rowcoll. DeviceDiskUUID = $Disk_Device.Backing.UUID

    }

    }

    }

    #Append the next line of the report data collection

    $report += $rowcoll

    #Append the next report to the final report data collection

    $reportfinal += $report

    }

    $reportfinal | Export-Csv-path D:\temp\SAP_Report_Disks_RDM_Mappings.csv - NoTypeInformation

    Note: Some parts of the script came another announcement on this forum about a script to display the ROW information for the list of virtual machines.

    See you soon,.

    Ed

    My mistake, I deleted the line wrong $report.

    Try this one

    $reportfinal = @()
    
    $VMs = Get-View -ViewType VirtualMachine
    
    foreach ($VM in $VMs) {
    
         #Clear report array for each VM
    
         foreach ($SCSI_Controller in ($VM.Config.Hardware.Device | where {$_.DeviceInfo.Label -like "SCSI*" } )) {
    
              foreach ($Disk_Key in $SCSI_Controller.Device) {
                   foreach ($Disk_Device in ($VM.Config.Hardware.Device | where {$_.key -eq $Disk_Key } )) {
                        $rowcoll = "" | select VM, VMController, SCSIBusShare, SCSIBusNumber, SCSIUnitNo, DeviceLabel, SCSISummary, DeviceFilename, DeviceCapKB, DeviceDiskMode,DeviceDiskUUID
                      $rowcoll.VM = $VM.Name
                      $rowcoll.VMController = $SCSI_Controller.DeviceInfo.Label
                        $rowcoll.SCSIBusShare = $SCSI_Controller.SharedBus
                        $rowcoll.SCSIBusNumber = $SCSI_Controller.BusNumber
                        $rowcoll.SCSIUnitNo = $Disk_Device.UnitNumber
                        $rowcoll.DeviceLabel = $Disk_Device.DeviceInfo.Label
                        $rowcoll.SCSISummary = $SCSI_Controller.DeviceInfo.Summary
                        $rowcoll.DeviceFilename = $Disk_Device.Backing.Filename
                        $rowcoll.DeviceCapKB = $Disk_Device.CapacityInKB
                        $rowcoll.DeviceDiskMode = $Disk_Device.Backing.DiskMode
                        $rowcoll.DeviceDiskUUID = $Disk_Device.Backing.UUID
                        $reportfinal += $rowcoll
                   }
              }
         }
    
    }
    
    $reportfinal | Export-Csv -path C:\SAP_Report_Disks_RDM_Mappings.csv -NoTypeInformation
    
  • Problem with Calc Script - if

    All, Hy

    I guess it's really simple, but I have no idea how to solve this problem.

    The Script looks like this:

    "View segment.
    (IF (@SUBSTRING (@NAME(&REPORTING_MONTH), 0, 3) = "M07")
    'Segment View' = 'Segment View'-> 'real ';
    ENDIF ;)


    I get the Error Message:

    "Error analysis [view Segment] (line xxx) formula: [()] without [)].

    Someone at - it an idea how to solve this problem?

    Kind regards


    Joerg

    Published by: Blue Raven on 19.08.2010 02:29

    Try this. It can works

    "View segment.
    (IF (@ismbr (@match ('Period', ' M07 * "" ")) and @ismbr (& REPORTING_MONTH)))
    'Segment View' = 'Segment of view'-> 'real ';
    ENDIF ;)

  • Problem with Java Script in my mail service

    I'm unable to access my email GMX account. Whenever I try, a rose windows opens at the top indicating that Java Script is required. However, when I check with the tolls, the enable JavaScript box is checked. I've deleted and reinstalled Firefox 10.0.1 two times with the same results. I can to my account via Internet Explorer and Safari without difficulty.

    Any ideas?

    Due to various difficulties, I reinstalled Windows 7. That solved the problem

  • Problem with external scripts to run

    Hello

    I was wondering if someone can help me, got a problem where the external script is running without problems, the file gets generated and released into the log folder then file disappears as expected.

    When the file disappears, file does not appear to have sent to the BB server. The file has no file extension.

    The customer is 4.40 and the host file is defined by:

    "IP ADDRESS" "Servername" #testip "filename."

    I expect that filename must display the column in Big Brother, but does not...

    All thoughts.

    Concerning

    Col

    What is the format that you use for the log file?

    help of BBPE customer win:

    The first line must begin with the color of the State for the test (usually green, yellow or red). The rest of the file can contain anything; If you click on the color on the screen of Big Brother, you will see the contents of the file. Generally, we recommend that include you the date, time and name of the host on the first line, with the following lines describing the results of the tests, like this:

    color day date [hostname]
    results message
    results message
    ...

    For example:

    Red game 08 21:10:24 1998 [xxx.domain.com]
    blah blah
    blah blah

    We highly recommend that you include the host name on the first line, especially if the client computer uses the DHCP protocol.

    You can change the amount of time before the test results never expire (and the test status shows purple), the substitution of the default on the servers of the display. Place a sign plus (+) and the time, before immediately after the color in the log file. You can express the time in minutes (m), hours (h) or days (d). For example, to have this test does not turn purple for 26 hours:

    Green + 26: Thu 08 21:10:24 1998 [xxx.domain.com]
    blah blah
    blah blah

    Change the expiration time can be useful for scripts that you run only once a day: save the controls, the system checks every day and so on.

    In addition, you can send the status for a test on a different host including the hostname before color, separated by a colon (:). This is useful if you run tests for several hosts from the same client of Big Brother. For example:

    Some.Host.Anywhere:Red Thu 08 21:10:24 1998 [xxx.domain.com]
    blah blah
    blah blah

    This indicates to the server that this status is for some.host.anywhere, not for the current client host.

  • Problem with Powershell script for vSpherePowerCLI

    Hello

    I am creating a script that clones of a VM environment VMware-model as much as I need.

    I found a script online, that should do it:

    ____________________________________

    SE connect-VIServer-Server 192.168.0.1

    Get-VMHost

    $host1 = "192.168.0.2".

    $template = 'template1 '.

    $datastore = "data1."

    $customization = "templtest".

    for ($i = 1; $i - 3; $i ++)

    {

    $tempvm = 'vServer -' + $i

    $array += $tempvm

    }

    foreach ($vm in $array)

    {

    $vm = New - VM - name $vm - model $template - $host1 - $datastore - OSCustomizationSpec $customization data store host - confirm: $false

    }

    _____________________________

    for example, this script should create 3 Template1 VMs with the names: vServer-1, vServer-2 and vServer3.

    But it creates a virtual machine with the name vServer-1vServer-2vServer-3.

    Can someone help me with this problem?

    Is there something wrong in education for?

    Thanks in anticipation,

    Alex

    Hi Alex,

    Before the statement, you must insert the following line:

    $array = @()
    

    This will initialize the variable $array as an empty array.

    Best regards, Robert

    Post edited by: RvdNieuwendijk

  • Problems with vicfg-iscsi on ESXi 4.1 servers

    Hi all!

    I am an administrator for some servers ESXi 60 + who have partially been upgraded to ESXi 4.1 (260247). Our vCenters have also been upgraded to 4.1.

    After this update, I tried to access these servers through the

    $> vicfg-iscsi - host ESX Server version is 4.1.0. This operation is supported on ESX, ESXi 4.0 4.0, or through VC 4.0

    > end disconnect

    I found no information on this subject in the knowledge base, or discussions. What I am doing wrong. This command worked perfectly with 4.0 and its updates.

    Any help is appreciated. Thank you.

    Thomas

    Since you have a mixture of guests 4.1 and 4.0, you will need to use the last 4.1 vCLI to manage your 4.1 hosts. The CLIs are mostly compatible with the previous version, including point releases or back 1 exit. The error is liekly your vCLI releases 4.0 most try to manage and configure a host 4.1

    You can download the latest here http://www.vmware.com/support/developer/vcli/ or use vMA 4.1 vCLI which includes the last vCLI

    =========================================================================

    William Lam

    VMware vExpert 2009,2010

    VMware VCP3, 4

    VMware VCAP4-DCA

    VMware scripts and resources at: http://www.virtuallyghetto.com/

    Twitter: @lamw

    repository scripts vGhetto

    Introduction to the vMA (tips/tricks)

    Getting started with vSphere SDK for Perl

    VMware Code Central - Scripts/code samples for developers and administrators

    VMware developer community

    If you find this information useful, please give points to "correct" or "useful".

  • Problems with the RAID on ESXi 4

    Hello

    Although I have been using VMware Server for a few years, I am beginner with ESXi and would like some advice please.

    I'm putting a laboratory machine using the following environment:

    Dell PowerEdge SC1425

    3 GB RAM

    disks SCSI 2 x 73 GB attached to an Adaptec 39320 b. RAID controller with integrated HOSTRAID support.

    I worked on how to configure oem.tgz to recognize the RAID controller and have successfully upgraded to ESXi 4.1.0.

    Where I struggle is as follows:

    I wanted to install ESXi on two SCSI drives, configured as RAID1 mirror.

    I started by setting up a RAID1 with the Adaptec BIOS table. The problem is that when I installed ESXi, it would not fully start, claiming that I have two drives with the same UUID.

    So, I did it again, reset the controller (i.e. no RAID). This time, ESXi installed and running successfully, but as I suspected it would be started from a single disc and shows the other drive as a data store.

    Is there something I'm missing here? Should I persevere with RAID1 with the Adaptec BIOS configuration, or is there something in ESXi I should use?

    It does not appear on the HCL, and I expect that the card is also well supported and a RAID device. The fact that the card does not appear in the simple.map may indicate that it is an OEM version. Adaptec card BIOS can be flashed so I would check that. There are versions of pilot listed as entries of subtext of the HCL. See if there is any meaning with those.

  • Problem with a script post-porn the subform

    Hello

    I have a form with radio 5 buttons. Two of the radio buttons, the values 3 and 5 must make visible hidden subform. All other values are leaving the hidden subform. Here is my script:

    If (this.rawValue == '1') {}

    Page1.deliveryInformation.flowed.presence = 'hidden ';
    }
    If (this.rawValue == '2') {}

    Page1.deliveryInformation.flowed.presence = 'hidden ';
    }
    If (this.rawValue == '3') {}

    Page1.deliveryInformation.flowed.presence = "visible";
    }

    If (this.rawValue == '4') {}

    Page1.deliveryInformation.flowed.presence = 'hidden ';
    }

    If (this.rawValue == '5') {}

    Page1.deliveryInformation.flowed.presence = "visible";
    }

    else {}

    Page1.deliveryInformation.flowed.presence = 'hidden ';
    }

    Value 3 does not work. All other values are working as expected. I've been watching this script on over an hour and does not know why it does not work. Any help would be appreciated.

    Thank you

    MDawn

    The problem is with the last part else.

    Either place the conditions in

    If() {}

    }

    {ElseIf()}

    }

    else {}

    }

    OR

    Use the switch as a box below.

    Switch (this.rawValue)

    {

    case '1 ':

    Page1.deliveryInformation.flowed.presence = 'hidden ';

    break;

    case '2 ':

    Page1.deliveryInformation.flowed.presence = 'hidden ';

    break;

    case '3 ':

    Page1.deliveryInformation.flowed.presence = "visible";

    break;

    case '4 ':

    Page1.deliveryInformation.flowed.presence = 'hidden ';

    break;

    case "5":

    Page1.deliveryInformation.flowed.presence = "visible";

    break;

    by default:

    Page1.deliveryInformation.flowed.presence = 'hidden ';

    }

    Thank you

    Srini

Maybe you are looking for

  • backup size

    How can I limit the size of the backup on icloud

  • CODE 80072EFE: cannot run windows update

    I had some problems with my computer Windows Vista - Business Office.  Here are the ones I've noticed so far. 1. I can't run windows update, I get error code 80072efe when I try. 2. I get continuous popups.  Not all the time and not every time I have

  • Information found on the Officejets EWS

    SAP (built-in web server) is a useful tool which is used in many respects related to networking, it can provide information on Web Services and can also set Static IP and static DNS on the printer. But, if it is connected to the network via Ethernet

  • Windows 10 app shows on my system tray but does not load

    I want to book a room for 10 new windows and I see the app on my systems tray, but it never loads. I assumed it was because I had bad internet connection the first time I tried but I got from the best internet connection and the problem persists. I a

  • Family safety does not. Child can browse any site and stay connect as he/she wants to

    Hello I have set up family safety for my daughter, but it is just worked for 2 days, now she can browse any website and stay connected as long as she wants, the family safety is always on the web filter and the time as well. But no security at all. I