VCF Deployment Fails: Failed to configure Vswitch to DVS vmknic migration on Host
search cancel

VCF Deployment Fails: Failed to configure Vswitch to DVS vmknic migration on Host

book

Article ID: 453421

calendar_today

Updated On:

Products

VMware SDDC Manager / VCF Installer VMware Cloud Foundation

Issue/Introduction

  • During a VMware Cloud Foundation (VCF) deployment where the installer is initiated with useExistingDeployment: true on a host with a preconfigured NFS datastore, the setup process fails during vCenter Server configuration while performing the Vswitch to vSphere Distributed Switch (DVS) migration task.
  • The VCF Installer UI reports a workflow progress failure at 17%.

 

  • Under the task "Migrate ESXi Host NFS vmknic(s) to vSphere Distributed Switch", the error states, "Failed to configure Vswitch to DVS vmknic migration on Host <hostname>" as shown in below screenshot:

 

In the domainmanager.log files, a NullPointerException is logged during the MigrateHostNfsVmknicsToDvsAction workflow stage: java.lang.NullPointerException: Cannot invoke "com.vmware.vim.binding.vim.host.VirtualNic.getSpec()" because "vmknic" is null

/var/log/vmware/vcf/domainmanager/domainmanager.log

YYYY-MM-DDTHH:MIN:SEC##+## INFO  [vcf_dm,######,##] [c.v.v.c.f.p.a.i.MigrateHostNfsVmknicsToDvsAction,dm-exec-4] Migrating Host <ESX-fqdn> vmknics to DVS dvs-##
YYYY-MM-DDTHH:MIN:SEC##+## INFO  [vcf_dm,######,##] [c.v.v.c.f.p.a.i.MigrateHostNfsVmknicsToDvsAction,dm-exec-4] Migrating vmknic 10.0.0.0 on host <ESX-fqdn> to dvs dvs-## portgroup dvportgroup-##
YYYY-MM-DDTHH:MIN:SEC##+## INFO  [vcf_dm,######,##] [c.v.v.c.f.p.a.i.MigrateHostNfsVmknicsToDvsAction,dm-exec-4] Is DHCP enabled on this environment false
YYYY-MM-DDTHH:MIN:SEC##+## DEBUG [vcf_dm,######,##] [c.v.e.s.c.c.v.vsphere.VcManagerBase,dm-exec-4] Getting entity type VmwareDistributedVirtualSwitch with moid dvs-## from vcenter
YYYY-MM-DDTHH:MIN:SEC##+## DEBUG [vcf_dm,######,##] [c.v.e.s.c.c.v.vsphere.VcManagerBase,dm-exec-4] Retrieved MoRef: {"_type":"VmwareDistributedVirtualSwitch","_value":"dvs-##"}
YYYY-MM-DDTHH:MIN:SEC##+## INFO  [vcf_dm,######,##] [c.v.e.s.c.c.v.vsphere.VcManagerBase,dm-exec-4] Migrating NFS Vmknic To DvSwitch 10.0.0.0
YYYY-MM-DDTHH:MIN:SEC##+## DEBUG [vcf_dm,######,##] [c.v.e.s.c.c.v.vsphere.VcManagerBase,dm-exec-4] Finding host with fqdn <ESX-shortname>.us.cambridge
YYYY-MM-DDTHH:MIN:SEC##+## ERROR [vcf_dm,######,##] [c.v.v.c.f.p.a.i.MigrateHostNfsVmknicsToDvsAction,dm-exec-4] Failed to migrate Host Vmknic to DVS for host <ESX-fqdn>
java.lang.NullPointerException: Cannot invoke "com.vmware.vim.binding.vim.host.VirtualNic.getSpec()" because "vmknic" is null

Environment

VMware Cloud Foundation 9.x
VCF 9.x

Cause

When deploying VMware Cloud Foundation (VCF) with useExistingDeployment: true, the VCF Installer VM runs directly on an ESXi host that participates in the bringup workflow and is hosted on a preconfigured NFS datastore. If the VMkernel adapter (vmknic) pre-created for NFS on that host is assigned an IP address that is not the first address in the defined NFS IP range, the bringup workflow skips vmknic creation on that host. Consequently, subsequent hosts in the cluster receive IP assignments offset from what the migration logic expects, causing the vSwitch to vSphere Distributed Switch (DVS) migration task to fail.

Resolution

To resolve this deployment failure, you must manually align the host's network configuration with the parameters expected by the VCF bringup workflow. This is a known issue and has been fixed in VCF 9.1.

Follow below mentioned workaround steps to unblock VCF deployment if an upgrade/deployment to version 9.1 isn’t feasible.

  1. Identify Required Configuration
    1. Locate your deployment input specification file (e.g., config.spec or the JSON payload generated by the VCF Installer).
    2. Search for the nfs network definition.
    3. Identify the exact portGroupKey value intended for the NFS traffic.
    4. Confirm the required IP address (this must be the first IP address defined in your NFS IP range).
  2. Configure the Port Group
    1. Log in to the vSphere Client with administrative privileges.
    2. Navigate to Networking in the inventory.
    3. Locate the Distributed Switch associated with the host.
    4. Create a new Distributed Port Group (or rename an existing one) to match the exact name of the portGroupKey identified in Step 1.C
  3. Assign the VMkernel Adapter (vmknic)
    1. Navigate to the host within your inventory.
    2. Go to Configure > Networking > VMkernel adapters.
    3. Select the existing NFS vmknic or create a new one if it is missing.
    4. Ensure this adapter is connected to the newly created/renamed port group.
    5. Edit the settings to assign the static IP address identified in Step 1.D (the first IP in your NFS IP range).
  4. Resume Deployment
    1. Return to the VCF Installer (or SDDC Manager) interface.
    2. Click Retry on the failed task to allow the workflow to re-validate the network configuration and complete the migration.