Open inetman opened 6 years ago
Hi @inetman
The original use case for Copy-NsxEdge was to do it within the same NSX Manager, and as such, the scenario your trying is not one that has been tested.
In saying this, if you could turn on debug logging with the following command: $DebugPreference="Continue"
Run the commands again. and then post the output, we might be able to see where its failing for you
Regards Dale
I have a similar situation and I'm running into the same thing. In my case, rather than trying to pass XML into Copy-NsxEdge, I'm creating an edge object while connected to the first NSX Manager, disconnecting, connecting to the second NSX Manager, and passing the edge object into Copy-NsxEdge. Looking at the debug output, Copy-NsxEdge is running API calls against the second NSX Manager (since I'm currently connected to it) to pull information for the source edge specified by the edge object that I created, and is failing since the edge does not exist in the second NSX Manager.
$PrimaryEdgeInfo | Copy-NsxEdge -Name $DREdge -Interface $IntInternet,$IntTransit
DEBUG: Copy-NsxEdge : Invoked with Default ParameterSet
DEBUG: Copy-NsxEdge : Removing appliance node from Edge XML with moref vm-24664
DEBUG: Copy-NsxEdge : Creating new primary appliance node with ResourcePool moref: domain-c9, Datastore moref: datastore-38, Folder moref: group-v27061.
WARNING: IPSec PSK for site site set to P0WVH7z5. Please update manually as required.
WARNING: IPSec PSK for site global set to L1b3gBOj. Please update manually as required.
DEBUG: Invoke-NsxRestMethod : ParameterSetName : ConnectionObj
DEBUG: Invoke-NsxRestMethod : Method: get, URI: https://10.11.1.150:443/api/2.0/services/truststore/certificate/scope/edge-47, URIPrefix: , Body:
Invoke-NsxRestMethod : The NSX API response received indicates a failure. 404 : Not Found : Response Body: <?xml version="1.0" encoding="UTF-8"?>
<error><errorCode>202</errorCode><details>The requested object : edge-47 could not be found. Object identifiers are case sensitive.</details><moduleName>core-services</moduleName></error>
At C:\Users\clay.thomas\Documents\WindowsPowerShell\Modules\PowerNSX\3.0.1118\PowerNSX.psm1:4037 char:13
+ throw $ErrorString
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Invoke-NsxRestM...leName></error>:String) [], RuntimeException
+ FullyQualifiedErrorId : Invoke-NsxRestMethod : The NSX API response received indicates a failure. 404 : Not Found : Response Body: <?xml version="1.0" encoding="UTF-8"?>
<error><errorCode>202</errorCode><details>The requested object : edge-47 could not be found. Object identifiers are case sensitive.</details><moduleName>core-services</moduleName></error>
If there was a way to have Copy-NsxEdge (or another cmdlet) validate the source edge data passed to it via an object or XML, then use that without having to pull source edge info from the NSX Manager, that would likely solve this issue. However, I'm sure it's much easier said than done, and my case is probably a limited edge case.
Hello!
I want to migrate ESG with all configuration from one NSX Manager to another NSX Manager and cannot do it. I tried use as you can see commands below:
And I get follow error:
Maybe you can offer any way to migrate ESG beetwen NSX Managers?