This situation does not need a code change.
Apply the workaround described in the relevant section.
Workaround:
Undeploying the Edge will allow the upgrade.
Appliances can be redeployed post-upgrade.
Follow the steps as below, via REST API call:
Note: As the appliances will be undeployed, network disruption is to be expected during the operation.
- REST API call: GET /api/4.0/edges/edge-2/appliances
- Modify <deployAppliances> from true to false:
<deployAppliances>false</deployAppliances>
- REST API call with the above modified body: PUT /api/4.0/edges/edge-2/appliances
The content should be similar to:
<?xml version="1.0" encoding="UTF-8"?>
<appliances>
<appliance>
<highAvailabilityIndex>0</highAvailabilityIndex>
<vcUuid>50068fa9-2d61-395d-a11d-1aee8cf90e9d</vcUuid>
<vmId>vm-651</vmId>
<haAdminState>up</haAdminState>
<resourcePoolId>resgroup-346</resourcePoolId>
<resourcePoolName>PrimaryResourcePool</resourcePoolName>
<datastoreId>datastore-250</datastoreId>
<datastoreName>datastore-250</datastoreName>
<hostId>host-232</hostId>
<hostName>esxi01.mydomain</hostName>
<vmHostname>nsx-edge01-0</vmHostname>
<vmName>nsx-edge01-0</vmName>
<deployed>true</deployed>
<cpuReservation>
<limit>-1</limit>
<reservation>0</reservation>
</cpuReservation>
<memoryReservation>
<limit>-1</limit>
<reservation>0</reservation>
</memoryReservation>
<edgeId>edge-2</edgeId>
<configuredResourcePool>
<id>resgroup-346</id>
<name>PrimaryResourcePool</name>
<isValid>true</isValid>
</configuredResourcePool>
<configuredDataStore>
<id>datastore-250</id>
<isValid>false</isValid>
</configuredDataStore>
<configuredHost>
<id>host-232</id>
<name>esxi01.mydomain</name>
<isValid>true</isValid>
</configuredHost>
</appliance>
<appliance>
<highAvailabilityIndex>1</highAvailabilityIndex>
<vcUuid>5006d672-fd98-abc4-6383-0be1a977b0db</vcUuid>
<vmId>vm-745</vmId>
<haAdminState>up</haAdminState>
<resourcePoolId>domain-c212</resourcePoolId>
<resourcePoolName>SecondaryResourcePool</resourcePoolName>
<datastoreId>datastore-233</datastoreId>
<datastoreName>PrimaryDatastore</datastoreName>
<hostId>host-234</hostId>
<hostName>esxi02.mydomain</hostName>
<vmHostname>nsx-edge01-1</vmHostname>
<vmName>nsx-edge01-1</vmName>
<deployed>true</deployed>
<cpuReservation>
<limit>-1</limit>
<reservation>0</reservation>
</cpuReservation>
<memoryReservation>
<limit>-1</limit>
<reservation>0</reservation>
</memoryReservation>
<edgeId>edge-2</edgeId>
<configuredResourcePool>
<id>domain-c212</id>
<name>SecondaryResourcePool</name>
<isValid>true</isValid>
</configuredResourcePool>
<configuredDataStore>
<id>datastore-233</id>
<name>PrimaryDatastore</name>
<isValid>true</isValid>
</configuredDataStore>
<configuredHost>
<id>host-234</id>
<name>esxi02.mydomain</name>
<isValid>true</isValid>
</configuredHost>
</appliance>
<deployAppliances>false</deployAppliances>
</appliances>
- Trigger the Upgrade.
- Repeat the steps 1 to 3, and set deployAppliances to true, with valid datastoreId for both appliances.
The content should be similar to:
<?xml version="1.0" encoding="UTF-8"?>
<appliances>
<appliance>
<highAvailabilityIndex>0</highAvailabilityIndex>
<vcUuid>50068fa9-2d61-395d-a11d-1aee8cf90e9d</vcUuid>
<vmId>vm-651</vmId>
<haAdminState>up</haAdminState>
<resourcePoolId>resgroup-346</resourcePoolId>
<resourcePoolName>PrimaryResourcePool</resourcePoolName>
<datastoreId>datastore-233</datastoreId>
<datastoreName>PrimaryDatastore</datastoreName>
<hostId>host-232</hostId>
<hostName>esxi01.mydomain</hostName>
<vmHostname>nsx-edge01-0</vmHostname>
<vmName>nsx-edge01-0</vmName>
<deployed>true</deployed>
<cpuReservation>
<limit>-1</limit>
<reservation>0</reservation>
</cpuReservation>
<memoryReservation>
<limit>-1</limit>
<reservation>0</reservation>
</memoryReservation>
<edgeId>edge-2</edgeId>
<configuredResourcePool>
<id>resgroup-346</id>
<name>PrimaryResourcePool</name>
<isValid>true</isValid>
</configuredResourcePool>
<configuredDataStore>
<id>datastore-233</id>
<name>PrimaryDatastore</name>
<isValid>true</isValid>
</configuredDataStore>
<configuredHost>
<id>host-232</id>
<name>esxi01.mydomain</name>
<isValid>true</isValid>
</configuredHost>
</appliance>
<appliance>
<highAvailabilityIndex>1</highAvailabilityIndex>
<vcUuid>5006d672-fd98-abc4-6383-0be1a977b0db</vcUuid>
<vmId>vm-745</vmId>
<haAdminState>up</haAdminState>
<resourcePoolId>domain-c212</resourcePoolId>
<resourcePoolName>SecondaryResourcePool</resourcePoolName>
<datastoreId>datastore-233</datastoreId>
<datastoreName>PrimaryDatastore</datastoreName>
<hostId>host-234</hostId>
<hostName>esxi02.mydomain</hostName>
<vmHostname>nsx-edge01-1</vmHostname>
<vmName>nsx-edge01-1</vmName>
<deployed>true</deployed>
<cpuReservation>
<limit>-1</limit>
<reservation>0</reservation>
</cpuReservation>
<memoryReservation>
<limit>-1</limit>
<reservation>0</reservation>
</memoryReservation>
<edgeId>edge-2</edgeId>
<configuredResourcePool>
<id>domain-c212</id>
<name>SecondaryResourcePool</name>
<isValid>true</isValid>
</configuredResourcePool>
<configuredDataStore>
<id>datastore-233</id>
<name>PrimaryDatastore</name>
<isValid>true</isValid>
</configuredDataStore>
<configuredHost>
<id>host-234</id>
<name>esxi02.mydomain</name>
<isValid>true</isValid>
</configuredHost>
</appliance>
<deployAppliances>true</deployAppliances>
</appliances>