Modifying Switchover window schedule via API fails post upgrading to HCX 4.11
search cancel

Modifying Switchover window schedule via API fails post upgrading to HCX 4.11

book

Article ID: 407231

calendar_today

Updated On:

Products

VMware HCX

Issue/Introduction

  • Attempting to modify a migration switchover schedule (in order to trigger immediate switchover) via API below fails after upgrading to HCX 4.11.x
    • PUT "https://<HCX-MGR-URL/hybridity/api/mobility/migrations"
  • No error is seen and response is "200" but looking at the HCX UI the original switchover schedule is still set.

Environment

HCX 4.11.x

Cause

  • HCX 4.11.x introduces many enhancements in the way API calls are consumed and utilized. 
  • A specific API should be used to perform modifications to migrations.

Resolution

  • Below is the API call intended to be used to modify HCX Migration schedules. 

    • curl 'https://<HCX Manager IP or FQDN>/hybridity/api/mobility/groups/<Mobility GRP ID for BELOW MIG ID>/schedule' \                                                                                                       
        -H 'Accept: application/json' \
        -H 'Content-Type: application/json' \
        -H 'x-hm-authorization: <X-HM auth token>' \
        --data-raw '{"migrations":[{"migrationId":"<MIG ID in question>","schedule":{"switchover":{}}}]}' \
        --insecure
      
      Response code: 202 Accepted {}