This topic contains 5 replies, has 4 voices, and was last updated by  Christopher L December 1, 2016.

Running a FailoverTest from Powershell?

  • I’m trying to run a FailoverTest of a VPG through the RESTful API from Powershell and hitting problems

    I’m creating authentication headers OK, querying a list of VPGs, looping through to find the VpgIdentifer of the required VPG OK and then returning a list of Checkpoints for the required VPG. I select the latest one to create the Request Body before issuing an Invoke-RESTMethod along the lines of below: –

    $testFailoverURI = “https://myzvm.mydomain.com:9669/v1/vpgs/1a1aaaaa-a1a1-1aa1-a1a1-a111111a11aa/FailoverTest”;

    $contentType = “application/json”;

    $failoverTestBody = ‘{“CheckpointId”: “1111111”}’

    $testFailover = Invoke-RestMethod -Uri $testFailoverURI -Method Post -Headers $zvmSessionHeader -Body $failoverTestBody -ContentType $contentType;

    but am getting the error: –

    Invoke-RestMethod : {“Message”:”Exception occured in API : FailoverTest is not allowed due to below VraActivities:Vra on Host 111aa1a1-a1a1-11aa-11a1-a1a11111111a.host-11111 is not tracked “}

    Any help/guidance would be much appreciated.

    Thanks in advance,

    Lee

    Hi Lee,

    What version of ZVM are you running? Also, what is the versions of  the vCenter and hosts?

    Senior Technical Architect at Zerto

    Running ZVM 4.5 Update 1, with vSphere 5.5 (both ESXi and vCenter, licensed with Enterprise Plus)

    I’ve been doing more investigation and don’t believe the problem is actually with the script. After looking into the error more and identifying the host reported in the error message I tried using my script against the API at the target site and it works fine.

    I’ve updated a ticket with Zerto Support and it initially looks like this is due to a known error – just waiting for confirmation.

    Thanks,

    Lee

    Hi Lee,

    Did you get any further feedback from Zerto Support on this issue?

    Ken

    I’ve created a REST wrapepr module –

    Which has working FailoverTest calls

    Chris@ChristopherLewis.com
You must be logged in to create new topics. Click here to login