Script of VM failover between two data center

http://communities.VMware.com/docs/doc-7470

I came across this link and will look into it today... Just wondering if Arian had a play with this again

As we cannot afford to buy RS... that look like the way forward!

Sorting... Script simple failover taking into account Vmx were created on the side of DR.

Concerning

Tags: VMware

Similar Questions

  • can we do vMotion between two data center

    Dear team,

    Can we do vMotion between two data center (esxi5, x)

    Can we do SVMotion between two data center (esxi5, x)

    Note: it is not a physical data center, it is a virtual data center

    can we do vMotion between clusters (esxi5.x)

    can we do SVMotion between clusters (esxi5.x)

    concerning

    Mr. VMware

    Can we do vMotion between two data center (esxi5, x)

    NO, you can't.

    Can we do SVMotion between two data center (esxi5, x)

    Yes, as long as data warehouses are shared.

    can we do vMotion between clusters (esxi5.x)

    Yes, as they perform the same CPU families.

    can we do SVMotion between clusters (esxi5.x)

    Yes, as long as data warehouses are shared.

  • FabricPath or OTV between two data center using Direct fiber cable

    Hello

    I have two data center both of them has the same equipment N7k, N5k and N2k, and we want the dataCenter being active/active, I'm really confused to use OTV or FabricPath characteristic, if someone can help me with my scenario and explain to me what is the best solution and advantage and disadvantage between OTV and PabrcPath.

    Many thanks in advance

    Hi Steven,

    No problem, I'll go through your points as completely as possible. I advise you to read more about these protocols, maybe if you have access to INE or similar, see their videos on this. I would also like to say again that I have not seen all documentation Cisco indicating that FabricPath to be used as a DCI.

    With regard to the way fabric you ask what follows...

     1. only can use it between two datacenters of you have more we can't, please correct me?

    No, you can use the path of fabric with more than two data centers, but even with OTV, you can use it with more than two data centers.

     2. HSRP localization can not be implemented as OTV. However You can have two differnet Gateways at the Data Center 1 and 2 using two different HSRP groups. If server is moved dynamically from, (i didn't understand this point can you please explain with example?

    OK, so this is a GREAT topic. Location of HSRP CAN be implemented with OTV, but cannot be implemented with fabric path. First hop redundancy protocols can be localized and is supported by Cisco with OTV, this basically allows the same default gateway to reside in two of your data centers providing the ACTIVE/ACTIVE configuration. So no matter where your VM is, they did not change their default, even if gateway your servers to move to the other datacenter.

    If we didn't have this, we would have only an active member of HSRP divided between DC and things would be extremely troublesome in regard to traffic flows. A virtual machine in DC2 VLAN needs to talk to host in VLAN B. But the default gateway is completely in DC1. So frame is sent to the ICD in DC1, then the gateway by default, routes packets VLAN B. This VLAN B lies in fact in DC2, so now it has to go all the way back to DC2. You get my point...? :)

    With localization happen only local to the domain controller. If all servers / VMS in the domain controller can speak locally to its "own" default gateway.

     3. unknown unicast flooding (can you give me an example?)

    Unknown unicast traffic is unicast packets/images with unknown destination mac address. By default, switches are flooding this type of traffic to all ports in the VLAN. With path of fabric that would take place during your DCI, but with OTV, it is all taken care locally, so massive savings on bandwidth here and it is much more effective.

     4. ARP optimization between Data Center (can you give an example regarding ARP optimization?)

    There is another function of OTV, which makes it far superior on the way of tissue. Essentially, we are reducing the volume of traffic passing through the transport infrastructure (i.e. ICD)

    When ARP, host in DC1 to host that responds in DC2, we use links and there is travel time of package that might be minimal, but is not the most optimal. OTV AED - or edge device spy ARP response and subsequently knows that this mapping exists from there. ARP takes place after the first Protocol, the EDA almost proxy ARP to DC1 so the ARP request locally does not have to travel to DC2.

     5. Typically two flows (Odd VLANs by OTV-VDC-1 and even vlans by OTV-VDC-2) carry the entire layer 2 traffic flow between the two Data Centes. Hence the load balancing the links is not efficient. ( (can you explain compare with FabricPath if you have example?)

    IMHO, it's bad and good. Balance the workload of the OTV if you have more than an AED on site. VLAN strange appointment via an AED, even numbered VLAN go through the other. Depending on traffic on VLANs, this could become unbalanced. Fabric used by all its links to mac addresses 'route' to the respective SID - ID switch she needs to do. So perhaps a better uniformity of split here.

     6. VLAN scalability for OTV is lower than FabricPath as of this content writing. (can you explain what this mean i didn't understand it)

    I completely disagree with this comment. I too do not understand.

     7. Resiliency of FabricPath network is better than OTV in some failure scenarios.(can me an example ?)

    I also disagree with that. Resilience of path of fabric could be same as OTV or perhaps better. However, my personal experience is that OTV fine tuning with things like BFD failover is much faster!

    Fabric is good because the control of aircraft ISIS and its operation is admirable, but could say the same for the OTV.

    Lets say one of the DCI links had to die, the transmission of the tissue path would continue through the other links, then perhaps for low latency, high frequency, environments that would be beneficial. OTV will change the EDA and re - learn mac, announced by other AEDS, addresses, but as I said, the time could be extremely minimal and tuning. This isn't a big deal, unless you need under second time convergence!

    I hope that I have answered your questions, I recommend use for your DCI OTV, use the path of fabric for your inside of local switching in your DC. This has been implemented repeatedly and the links I sent you the models validated Cisco also point out.

    Remember - fabric has been built to be a step towards TRILL, and replacement of protocols spanning-tree, OTV was built especially for the dci. They are both built and examples of specific design. It makes no sense to get these confused or mixed up, unless there is a real and pressing the case.

    Joel conclusion is right, use the right tools for the job. If the use case is good for the FP then OK, if not, OTV.

    Rcmnd - reading http://www.packetmischief.ca/2013/04/23/DCI-series-overlay-transport-vir...

    These are just my thoughts.

    Bilal (CCIE #45032)

  • MaxL Script to clear the data between two dates

    Hi all

    I need advice to clear the data between two dates, I have three dimensions in my sketch, 'eno', 'hiredate' and the 'actualamount '.

    Now I need to erase the data between the date range, up to now, I have this script,

    Fix ("HireDate", "Eno")

    Difficulty (@relative ("00:00:00",0),@relative("eno",0)) 2015-07-15 "))

    CLEARDATA "sal."

    endfix

    ENDFIX

    These scripts only clears on a specific day, but I tried to write the script to clear between two dates, I surfed on a few sites, but no clear answers, finaanly came here, kindly help in this regard.

    Thanks in advance.

    Have you not tried the format of "startdate":"enddate" for example "August":"September."

    See you soon

    John

  • Calculate the (age) years between two dates

    Nice day!

    I have not been able to find an answer, that I was able to use in the archives or online and would be very grateful for the help.  I'm working with Adobe Acrobat Pro XI (not LiveCycle) and I have very little experience with programming (for the most part, copy / paste).

    I need to create a text box that calculates the number of years between two dates entered, i.e. the age when the date of birth and death are given.  Also, would be nice if she was a Virgin until the two were provided.  Anyone would be able to give me the code I need to put in the custom calculation script?

    Once again, any help would be much appreciated!  Thank you and have a wonderful day!

    For the fields for Date of birth DOB and DOD for the Date of death and age in complete years both by using a'd-mmm-yyyy' date format you can use a custom calculation to the JavaScript for the field of age as:

    function GetField (cName) {}
    get the field with error trapping object;
    oField var = this.getField (cName);
    test error;
    if(oField == null) app.alert ("error during the" + cName, 1, 0);
    Returns the field object;
    return oField;
    } / / end GetField function;

    function {Scand (cFormat, cString)
    using date string format convert object date;
    convert string to date using format;
    Kai var = util.scand (cFormat, cString);
    the value null is an error of conversion;
    if(oDate == null) app.alert ("Conversion error" cString "by using the format" + cFormat, 1, 0);
    date of return;
    Return to oDate;
    } / / end Scand function;

    clear the value of the field;

    Event.Value ="";
    get data dob and dod;
    var oDOB = GetField ("DOB");
    Var o = GetField ("DOD");

    treat only if DOB and DOD have value and are not null;
    If (oDOB! = null & o! = null & oDOB.value! = "" & oDOD.value!) = "") {}

    convert the DOB and DOD to date objects.
    oDOB var = util.scand ("d-mmm-yyyy", oDOB.value);
    O var = util.scand ("d-mmm-yyyy", oDOD.value);

    get the difference over the years;
    var Age = oDOD.getFullYear () - oDOB.getFullYear ();

    adjust for month of previous DOD DOB;
    If (oDOD.GetMonth)< odob.getmonth())="">

    adjust the DOD before DOB date in the month of birth;

    If (oDOD.GetMonth () == oDOB.getMonth () & oDOD.getDate ())< odob.getdate())="">
    Set the value of the field;

    Event.Value = Age;
    }

  • How can I determine if the current date is between two dates?

    I'm trying to post a link when grave the current date between two dates. I have setup the startdate and the enddate. When he falls between the startdate one date enddate, the link will be apear. The startdate and enddate have already been formatted previously, as mm/dd/yyyyy. I tried to use the following script, nothing will do. What I am doing wrong?

    < cfif startDate GTE #dateformat (now (), "MM/DD/YYYY") # AND enddate LTE #dateformat (now (), ' MM/DD/YYYY') # >

    Don't know what you're talking about. I used the #dateformat(date_entered, 'mm/dd/yyyy') # for years without problem. I googled the datediff function before posting here and what I've found is datediff determines the whole number of units by which date1 is less than date2. I don't know how this can help me.

  • Calculate the difference in days between two Dates

    Hello

    I'm trying to understand how to calculate the difference in days between two dates using JavaScript in LiveCycle. (Minimum = JavaScript knowledge)

    Where 'Start_Date' and 'Current_Date' are the names of the two dates in the palette of the hierarchy. (the two Date/time field)

    * Current date is using the object > value > execution property > current Date/time

    I need a text or number field showing the difference in days. (Difference_in_Days)

    I noticed the following code is pretty standard among other responses:

    var

    Start_date = new Date (Start_Date);

    var

    Current_Date = new Date (Current_Date);

    var

    nAgeMilliseconds = Current_Date.getTime) - Start_date.getTime ();

    var

    nMilliSecondsPerYear = 365 * 24 * 60 * 60 * 1000 ;

    I know there is lack of code and code above are may not be not correct.

    Please notify.

    OK, that's because of the way that javascript and works of the calculate event.  The field will be filled with whatever the script resolves at the end of execution. Technically, your script does not have a value because the last thing you do is an assignment to a variable.  Change the last line as follows:

    Math.ABS ((firstDate.getTime)

    ((- secondDate.getTime (()) / (oneDay));

    (eliminate the variable assignment) and get rid of the app.alert.  Your script will "return" (have) regardless of the value of calculation from the East and which will be stored in the field.

  • Calculate the number of days between two dates

    Hello

    Can someone help please change my formcalc script to calculate the number of working days between two date fields.  My script currently calculates the total number of days between two dates, including the weekends which must be excluded from the total.

    If

    (HasValue (Start_Date1) & HasValue (End_Date1)) then

    $

    = Date2Num (End_Date1, "YYYY-MM-DD" "en_IE") - Date2Num (Start_Date1, "YYYY-MM-DD" "en_IE") + 1

    on the other

    ""

    endif

    Any help will be most appreciated.

    Thank you.

    Check...

    (1) you said that you put the script on the event «days1» calculate My sample imitates the variable names used in the original message, "Start_Date1" and "End_Date1". If the names of variables for the start and end dates are different, you will need to modify the script to account for these names.

    (2) the Date2Num functions in the calculation of the "totalDays" use the date format "YYYY-MM-DD". If your date habits differ from "YYYY-MM-DD" FormCalc will complain.

    Steve

  • photo selection between two dates

    In Photos

    It is possible to select photos between two dates?

    In Photos,.

    is it possible to select the photos between two dates?

    Thank you, thank you

    Yes.  With a smart album like this:

  • Dynamic calculation of the number of days between two dates in a table

    Hello

    I'm working on request where I dynamically calculate the number of days between two dates in a table.

    The calculation must be dynamic, i.e., when I recover the Start_date and End_date and move to the field following (call_duration) in the same row, the difference must be calculated dynamically in this area and make sure the field read-only.

    APEX version: 5.0

    Hi BO123,

    BO123 wrote:

    Hello

    I'm working on request where I dynamically calculate the number of days between two dates in a table.

    The calculation must be dynamic, i.e., when I recover the Start_date and End_date and move to the field following (call_duration) in the same row, the difference must be calculated dynamically in this area and make sure the field read-only.

    APEX version: 5.0

    one of the way to do this by calling ajax on change of end_date.

    See the sample code given below to fetch the resulting duration and making the field read only after calculation

    Step 1: Change your page

    under CSS-> Inline, put the code below

    .row_item_disabled {
      cursor: default;
      opacity: 0.5;
      filter: alpha(opacity=50);
      pointer-events: none;
    }
    

    Step 2: Create on demand Ajax process I say CALC_DURATION

    Please check Procces Ajax, see line 6.7 How to assign a value to the variable sent by ajax call

    Declare
      p_start_date  date;
      p_end_date    date;
      p_duration number;
    Begin
      p_start_date  := to_date(apex_application.g_x01);
      p_end_date    := to_date(apex_application.g_x02);
    
       --do your calculation and assign the output to the variable p_duration
      select p_end_date - p_start_date into p_duration
        from dual;
    
      -- return calculated duration
      sys.htp.p(p_duration);
    End;
    

    Step 3: Create the javascript function

    Change your page-> the function and the declaration of the Global Variable-> put the javascript function

    You must extract the rowid in the first place, for which you want to set the time, see line 2

    assuming f06, f07 and f08 is the id of the start date, and end date columns respectively, and duration

    See no line no 8 how set the value returned by the process of ajax at the duration column

    Replace your column to the respective column identifiers in the code below

    function f_calulate_duration(pThis) {
      var row_id  = pThis.id.substr(4);
      var start_date = $('#f06_'+row_id).val();
      apex.server.process ( "CALC_DURATION", {
      x01: start_date,x02: $(pThis).val()
    }, { success: function( pData ) {
    // set duration to duration column
    $('#f08_'+row_id).val(pData);
    // disable duration column
    $("#f08_" + row_id).attr("readonly", true).addClass('row_item_disabled'); }
    });
    }
    

    Step 4: choose the end date call the javascript function

    Go to report attributes-> edit your Date column end-> column-> Attrbiutes element attributes-> put the code below

    onchange="javascript:f_calulate_duration(this);"
    


    hope this helps you,

    Kind regards

    Jitendra

  • difference between two dates in the year/month/day in Obiee

    Hi gurus,

    I know this question have been asked and answered several times but I have a requirement that is a little different, then the previous ones.

    I want to calculate the difference between two dates in OBIEE10g in year/month/day format similar to the below SQL output

    SQL > select end_date, start_date,

    trunc (months_between (end_date, start_date) / 12) years.

    months of mod (trunc (months_between (end_date, start_date)), 12).

    End_date - add_months (start_date, trunc (months_between (end_date, start_date))) days

    t

    Thanks in advance

    SK

    Search for this

    "TIMESTAMPDIFF IN THE FORM OF MTHS # YEARS."

    or else

    To get the current mandate of employees since the date of hiring in the form of # years # mths or # year (s) # month (s)

    Concat (concat (cast (TIMESTAMPDIFF (SQL_TSI_Month, "Employee attributes". (((' ' Hiring last Date employee ", CURRENT_DATE) / 12 as char),"Year (s)"), concat (cast (MOD (TIMESTAMPDIFF (SQL_TSI_Month,"Employee attributes". (((((' ' Hiring last Date employee ", CURRENT_DATE), 12) as char), 'Month (s)'))

    Concat (concat (CAST (TIMESTAMPDIFF (SQL_TSI_YEAR, "Employee attributes". (((' ' Hiring last Date employee ", CURRENT_DATE) as CHAR),"Year (s)"), concat (cast (MOD (TIMESTAMPDIFF (SQL_TSI_Month,"Employee attributes". (((((' ' Hiring last Date employee ", CURRENT_DATE), 12) as char), 'Mth (s)'))

  • Number of Saturdays between two dates

    Hello

    How can I get number of Saturdays between two dates, including the two dates?

    for example number of Saturdays between 09/05/2014 and 10/05/2014 is five

    Help, please

    I use oracle 10g

    SQL> with t
      2  as
      3  (
      4  select to_date('05/09/2014 ', 'dd/mm/yyyy') from_dt
      5       , to_date('05/10/2014 ', 'dd/mm/yyyy') to_dt
      6    from dual
      7  )
      8   select to_char(from_dt + (level-1), 'fmDay') day_
      9        , count(*) cnt
     10     from t
     11  connect
     12       by level <= to_dt - from_dt + 1
     13    group
     14       by to_char(from_dt + (level-1), 'fmDay');
    
    DAY_             CNT
    --------- ----------
    Saturday           5
    Thursday           4
    Tuesday            4
    Friday             5
    Wednesday          4
    Monday             4
    Sunday             5
    
    7 rows selected.
    
    SQL>
    
  • Days between two dates given

    Hi all

    I need the days between two dates given.

    Select to_date('25-mar-2014','dd-mon-yyyy') start_date, end_date to_date('30-mar-2014','dd-mon-yyyy')

    of the double

    Desired output:

    25

    26

    27

    28

    29

    30

    Thanks in advance.

    Kind regards

    Afzal.

    Select the level - 1 desired_output + to_number (to_char (start_date, 'dd'))

    of (to_date('25-mar-2014','dd-mon-yyyy') select start_date, end_date to_date('30-mar-2014','dd-mon-yyyy'))

    of the double

    )

    connect by level<=  end_date="" -="" start_date="" +="">

    DESIRED_OUTPUT
    25
    26
    27
    28
    29
    30

    Concerning

    Etbin

  • Months between two dates

    Hello

    I have two dates. start date and end date.

    I want to extract months between two dates

    months should be as

    JAN

    FEB

    MAR

    for example.

    Start - 1-jan-2014

    date of end - 31 - dec - 2014

    How can I do this?

    Thanks and greetings

    CORINE

    You should always use the function MONTHS_BETWEEN...

    for example

    SQL > ed
    A written file afiedt.buf

    1 with t as (select date '' 2014-01-01 as start_date date ' 2014-12-31' as double end_date)
    2  --
    3 end of test data
    4  --
    5. Select to_char (add_months (start_date, rownum-1), 'My') by month
    6 t
    7 * connect by rownum<=>
    SQL > /.

    LUN
    ---
    Jan
    Feb
    Mar
    Apr
    May
    Jun
    Jul
    Aug
    Ms
    Oct
    Nov
    Dec

    12 selected lines.

    And if you want that they display, separated by commas...

    SQL > ed
    A written file afiedt.buf

    1 with t as (select date '' 2014-01-01 as start_date date ' 2014-12-31' as double end_date)
    2  --
    3 end of test data
    4  --
    5 Select listagg (to_char (add_months (start_date, rownum-1), 'My'), ',') group by month (order by rownum)
    6 t
    7 * connect by rownum<=>
    SQL > /.

    MONTH
    -----------------------------------------------------------------------------------------------------------------
    Jan, Feb, Mar, Apr, may, June, July, August, Sept, Oct, Nov, Dec

  • Number of occurrences of a day between two dates

    Hello

    I have a requirement in my code to count the number of times per day occurs between two dates. So, for example if

    start date = January 1, 2014

    end date = March 31, 2014

    The number of times that happens day 1 is three times. That's why I want the result to be 3. My three input parameters are the number of the day, start and end dates. I know that this can be done by parsing through the days and incrementing a counter of sorts, but can it be done without any loop etc?

    Looking for options of

    Thank you

    Birdy

    SELECT COUNT (TO_CHAR (DAYS, 'DD')) IN)

    SELECT DAYS START_DATE + LEVEL 1

    FROM T1

    CONNECT BY LEVEL<=>

    WHERE TO_CHAR (DAYS, 'DD') ='&01';

    Post edited by: Parth272025

Maybe you are looking for