Upgrade of vCenter Server from version 8.0 to 9.0 fails with the following error "Failed to set DNS. Error setting DNS configuration. Details : Operation Failed.. Code: com.vmware.applmgmt.err_operation_failed"
search cancel

Upgrade of vCenter Server from version 8.0 to 9.0 fails with the following error "Failed to set DNS. Error setting DNS configuration. Details : Operation Failed.. Code: com.vmware.applmgmt.err_operation_failed"

book

Article ID: 427687

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • Attempting to upgrade vCenter Server from version 8.0 to 9.0 fails with the below error during Stage 2 of the Upgrade process:


  • In the upgrade logs on the destination vCenter Server appliance following log entries are seen. 
    Log location: /var/log/vmware/upgrade/upgrade-export.log

    YYYY-MM-DDTHH:MM:SS  DNS servers: 127.0.0.1, 192.168.1.1, 192.168.2.2
    YYYY-MM-DDTHH:MM:SS  ERROR: setnet failed : {
        "detail": [
            {
                "id": "install.setnet.set.dns.vami",
                "translatable": "Error setting DNS configuration. Details : %(0)s",
                "args": [
                    "Operation Failed.. Code: com.vmware.applmgmt.err_operation_failed"
                ],
                "localized": "Error setting DNS configuration. Details : Operation Failed.. Code: com.vmware.applmgmt.err_operation_failed"
            },
            {
                "id": "install.setnet.set.dns",
                "translatable": "Failed to set DNS",
                "localized": "Failed to set DNS"
            }
        ],
        "componentKey": "setnet",
        "problemId": null,
        "resolution": null
    }
    . Stderr:YYYY-MM-DDTHH:MM:SS - 13732 - INFO - vcsa_network_base - 80 - StreamHandler added
    YYYY-MM-DDTHH:MM:SS - 13732 - INFO - vcsa_network_base - 72 - NetworkUtil; Doesn't exist creating one.dns server change failed with error , rc=1

    YYYY-MM-DDTHH:MM:SS ERROR apply_networking Command /bin/python /bin/setnet --locale en --statusFile /var/log/vmware/upgrade/setnet_status.json completed with non-zero exit code 1.
    YYYY-MM-DDTHH:MM:SS INFO transfer_network Capturing network state for eth0 interface. LogMessage : after applying source networking

    YYYY-MM-DDTHH:MM:SS INFO transfer_network File '/etc/systemd/network/10-eth0.network' has contents: [Match]
    Name=eth0

    [DHCPv4]
    SendRelease=false
    UseDNS=no

    [Network]
    Gateway=192.168.0.0
    Address=192.168.2.0/22
    LinkLocalAddressing=no
    DHCP=no
    DNS=127.0.0.1 192.168.1.1 192.168.2.2

Environment

VMware vCenter Server 9.0

Cause

This issue occurs because an incorrect Default Gateway was provided during Stage 1 i.e. Deployment of the upgrade process. The gateway provided does not reside on the same subnet as the temporary IP address, the setnet utility fails to validate and apply the DNS settings, resulting in the upgrade failure.

In the above case, the default gateway was set up as 192.168.0.0 (IP address taken as example) meanwhile the correct gateway should have been 192.168.2.0. 

Resolution

To resolve this issue, the vCenter Server Appliance must be redeployed with the correct networking information.

  1. Delete the failed 9.0 Appliance: Power off and delete the partially deployed vCenter 9.0 VM from the inventory.

  2. Verify Network Details: Confirm the correct Default Gateway, Subnet Mask, and IP address for the network segment where the vCenter will reside.

  3. Restart the Upgrade: Run the vCenter Server 9.0 Installer again.

  4. During Stage 1, ensure that the Default Gateway field is populated with the correct, reachable gateway IP address that corresponds to the temporary IP assigned to the new appliance.

  5. Once Stage 1 completes with the correct gateway, proceed with the data migration in Stage 2.

Additional Information

Upgrade a vCenter Appliance 8.0 or later by Using the GUI