lamw / nsxt-automated-lab-deployment Goto Github PK
View Code? Open in Web Editor NEWNSX-T 2.0 Automated Lab Deployment with vSphere 6.x
NSX-T 2.0 Automated Lab Deployment with vSphere 6.x
some weird behavior in the code when joining different controllers to the NSX-T Manager. here is how the issue takes place.
1- first controller join is successful and the thumb-controller file in /tmp/thumb-controller
[01-06-2018_01:44:35] Successfully logged into NSX Manager nsxt-mgr.kay.local ...
[01-06-2018_01:44:35] Connecting back to Management vCenter Server vcenter.kay.local ...
[01-06-2018_01:44:37] Retrieving NSX Manager Thumbprint ...
[01-06-2018_01:44:37] Configuring NSX Controller nsxt-ctr1 as control-cluster master ...
[01-06-2018_01:44:37] Sending admin username ...
[01-06-2018_01:44:39] Sending admin password ...
[01-06-2018_01:44:44] Sending join management plane command ...
[01-06-2018_01:45:15] Sending shared secret command ...
[01-06-2018_01:45:20] Sending control cluster init command ...
2- the controller thus-print controller file gets deleted from ctr1. I did monitor the session and saw the file get deleted once join is successful.
3- the scripts tries to join the second controller. it creates the file thus-controller in the second node of the controller cluster.
4- now here is the issue starting. the variable $nsxControllerCertThumbprint returns a value of null which does not execute the copy file to the local system c:\temp\thubprint-controller.
5- the error shows as follows.
[01-06-2018_01:45:45] Configuring additional NSX Controller nsxt-ctr2 ...
[01-06-2018_01:45:45] Sending admin username ...
[01-06-2018_01:45:47] Sending admin password ...
[01-06-2018_01:45:52] Sending join management plane command ...
[01-06-2018_01:46:23] Sending shared secret command ...
[01-06-2018_01:46:28] Sending exit command ...
[01-06-2018_01:46:38] Sending root username ...
[01-06-2018_01:46:40] Sending root password ...
[01-06-2018_01:46:50] Sending get control cluster cert ...
[01-06-2018_01:46:50] Sleeping for 60 Seconds ...
[01-06-2018_01:47:50] i am dealing with
[01-06-2018_01:47:50] nsxt-ctr2
[01-06-2018_01:47:50] Processing certificate thumbprint ...
Copy-VMGuestFile : 1/6/2018 1:47:51 PM Copy-VMGuestFile The underlying connection was closed: An unexpected error occurred on a receive.
At C:\Users\Administrator\Desktop\nested.ps1:1046 char:17
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get-Content : Cannot find path 'C:\Temp\controller-thumbprint' because it does not exist.
At C:\Users\Administrator\Desktop\nested.ps1:1047 char:48
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My-Logger : Cannot bind argument to parameter 'message' because it is an empty string.
At C:\Users\Administrator\Desktop\nested.ps1:1048 char:27
My-Logger $nsxControllerCertThumbprint
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6- the script tries to join the additional third controller and the thumbprint-controller file gets created but the system gets the same error as in step number 5 as the value in Null.
during deployment. it happens on 2 Nested ESXi Hosts although fake scsi reservation is set during the script execution.
[01-02-2018_12:25:48] Adding ESXi host 192.168.1.172 to Cluster ...
[01-02-2018_12:25:55] Adding ESXi host 192.168.1.173 to Cluster ...
[01-02-2018_12:26:02] Enabling VSAN & disabling VSAN Health Check ...
[01-02-2018_12:26:30] Querying ESXi host disks to create VSAN Diskgroups ...
[01-02-2018_12:26:30] Creating VSAN DiskGroup for 192.168.1.171 ...
New-VsanDiskGroup : 1/2/2018 12:27:21 AM New-VsanDiskGroup Server task failed: A general system error occurred: Failed to reserve disk naa.6000c29214e6756d49a926a32ec4d244 with exception: Failed to reserve disk
naa.6000c29214e6756d49a926a32ec4d244 with exception: Reserve failed with error code: -1
At C:\Users\kay\Desktop\Nested_Deployment.ps1:898 char:13
New-VsanDiskGroup -Server $vc -VMHost $vmhost -SsdCanonic ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[01-02-2018_12:28:46] Clearing default VSAN Health Check Alarms, not applicable in Nested ESXi env ...
[01-02-2018_12:28:46] Disconnecting from new VCSA ...
[01-02-2018_12:28:56] Successfully logged into NSX Manager nsxt-mgr.kay.local ...
[01-02-2018_12:28:56] Connecting back to Management vCenter Server vcenter.kay.local ...
[01-02-2018_12:28:57] Retrieving NSX Manager Thumbprint ...
[01-02-2018_12:28:58] Configuring NSX Controller nsxt-ctr1 as control-cluster master ...
[01-02-2018_12:28:58] Sending admin username ...
[01-02-2018_12:29:00] Sending admin password ...
[01-02-2018_12:29:05] Sending join management plane command ...
[01-02-2018_12:29:36] Sending shared secret command ...
[01-02-2018_12:29:41] Sending control cluster init command ...
[01-02-2018_12:30:06] Configuring additional NSX Controller nsxt-ctr2 ...
[01-02-2018_12:30:06] Sending admin username ...
[01-02-2018_12:30:08] Sending admin password ...
[01-02-2018_12:30:13] Sending join management plane command ...
[01-02-2018_12:30:43] Sending shared secret command ...
[01-02-2018_12:30:48] Sending exit command ...
[01-02-2018_12:30:59] Sending root username ...
[01-02-2018_12:31:01] Sending root password ...
[01-02-2018_12:31:11] Sending get control cluster cert ...
[01-02-2018_12:31:36] Processing certificate thumbprint ...
Copy-VMGuestFile : 1/2/2018 12:31:36 AM Copy-VMGuestFile The underlying connection was closed: An unexpected error occurred on a receive.
At C:\Users\kay\Desktop\Nested_Deployment.ps1:1035 char:17
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get-Content : Cannot find path 'C:\Users\kay\AppData\Local\Temp\controller-thumbprint' because it does not exist.
At C:\Users\kay\Desktop\Nested_Deployment.ps1:1036 char:48
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When executing the if($runAddESXiTransportNode) {} block, the following create method fails with an invalid_request message. The $transportNodeSpec variable output is provided below. It looks as though it may be missing some required values. Please advise.
PS C:\> $transportNode = $transportNodeService.create($transportNodeSpec)
A server error occurred: 'com.vmware.vapi.std.errors.invalid_request': . Check $Error[0].Exception.ServerError for more details.
At line:1 char:1
+ $transportNode = $transportNodeService.create($transportNodeSpec)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], CisServerException
+ FullyQualifiedErrorId : VMware.VimAutomation.Cis.Core.Types.V1.CisServerException
PS C:\> $transportNodeService
Name Documentation
com.vmware.nsx.transport_nodes
PS C:\> $transportNodeSpec
self : <Unset, [com.vmware.nsx.model.self_resource_link]>
revision : <Unset, [long]>
description : <Unset, [string]>
display_name : ca-esx-1-123.corp.local
resource_type : <Unset, [string]>
tags : <Unset, [List<com.vmware.nsx.model.tag>]>
host_switch_spec : <Unset, [dynamic_structure]>
host_switches : <Unset, [List<com.vmware.nsx.model.host_switch>]>
node_id : 55b057d6-459f-4c90-ac46-7f29b2b01296
transport_zone_endpoints : System.Object[]
Hi,
I get the following error while trying to deploy the edge OVA
Import-VApp : 1/1/2018 11:26:43 PM Import-VApp Host did not have any virtual network defined.
At C:\Users\kay\Desktop\Nested_Deployment.ps1:769 char:23
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
does this indicated any issues in the initial configuration.
Note: never tried this on NSX-T 2.0, I am running the script on 2.1 version of NSX-T
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.