HCX - PowerCli cmdlets for New-HCXGuestOSCustomization and New-HCXMobilityGroup failing
search cancel

HCX - PowerCli cmdlets for New-HCXGuestOSCustomization and New-HCXMobilityGroup failing

book

Article ID: 382506

calendar_today

Updated On:

Products

VMware HCX

Issue/Introduction

  • When New-HCXGuestOSCustomization is used for the HCX migration, it fails with the following error. 
HCX-Migration> Start-HCXMigration -Migration $hcxMigration
Start-HCXMigration : 11-10-2024 11:54:06 Start-HCXMigration com.vmware.vapi.std.errors.invalid_request {'messages': [], 'data': struct {'errors': [struct {'code': E_INVALID_SCHEMA, 'message': JSONObject["name"] not found.}]}, 'error
_type': INVALID_REQUEST}.
At line:1 char:1
+ Start-HCXMigration -Migration $hcxMigration
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Start-HCXMigration], CisException
    + FullyQualifiedErrorId : VMware.VimAutomation.Hcx.Impl.V1.Service.HCXMigrationService,VMware.VimAutomation.Hcx.Commands.Cmdlets.StartHCXMigration

 

  • New-HCXMobilityGroup - failing with the following error. 
"E_INVALID_SCHEMA, 'message': JSONObject["name"] not found".

Cause

  • New-HCXGuestOSCustomization

    When using New-HCXGuestOSCustomization, you must specify all parameters. However, due to a documentation deficiency, the HCX documentation incorrectly lists some required parameters as optional.

  • New-HCXMobilityGroup

    The issue with the cmdlets that are looking for an GuestOSCustomization object.


Resolution

HCX documentation will be updated in the future to reflect the mandatory fields. 

 

Workaround 

  • New-HCXGuestOSCustomization

When creating the New-HCXGuestOSCustomization, use the same parameters that are mandatory in the UI, such as the HostName.

  • New-HCXMobilityGroup

As a workaround, add an empty mobility group level GuestOSCustomization object.

Example:

$GOS = New-HCXGuestOSCustomization -GroupConfiguration

$mobilityGroupConfigiuration = New-HCXMobilityGroupConfiguration -SourceSite $sourceSite -DestinationSite $targetSite -GuestOSCustomization $GOS

 

Additional Information