Unable to preserve 'Connect On PowerOn' network adapter state with PowerCLI [New-HCXMigration] cmdlet
search cancel

Unable to preserve 'Connect On PowerOn' network adapter state with PowerCLI [New-HCXMigration] cmdlet

book

Article ID: 436666

calendar_today

Updated On:

Products

VMware HCX

Issue/Introduction

When performing an HCX Bulk Migration using the PowerCLI New-HCXMigration cmdlet, you may observe the following behavior:

  • The source virtual machine (VM) has multiple network adapters with varying "Connect On PowerOn" states (e.g., some are enabled, while others are disabled).  
  • After the migration is initiated or completed, all network adapters on the destination VM default to "Connect On PowerOn" being **enabled**. 
  • There is no available parameter within the New-HCXMigration cmdlet or the $NetworkMapping object to specify or inherit the source "Connect On PowerOn" state.

Environment

VMware HCX

Cause

This behavior is a known limitation within the current VMware HCX PowerCLI module. The New-HCXMigration cmdlet does not currently feature a parameter to replicate the per-adapter "Connect at Power On" checkbox functionality available in the HCX Manager UI. By design, the current implementation defaults all mapped adapters to a connected state during the migration draft creation.

Resolution

  • This is a known issue impacting VMware HCX. 

Workaround

To manage the "Connect On PowerOn" state for specific adapters post-migration, you can use standard PowerCLI cmdlets to modify the configuration on the destination VM.

Example: Disabling Connect on PowerOn for a Specific Adapter

⚠️ Review this command with your administrator before running it.

powershell
# Target a specific VM and network adapter to disable 'StartConnected'
Get-VM "DestinationVMName" | Get-NetworkAdapter | Where-Object { $_.Name -eq "Network adapter 3" } | Set-NetworkAdapter -StartConnected $false -Confirm:$false

This script can be integrated into your post-migration automation workflow to ensure adapter states match your requirements.

Additional Information

Related Information
HCX - PowerCli operations and best practices
VMware PowerCLI Documentation: New-HCXMigration