Pojdmě se podívat na nástroje které někdo z vás možná někde zahlédnul , ale nenapadlo ho je použít.
Jsou to nástoje co využijete pokud již máte roběhnuté NSX nebo ho chystáte a budete chtít udělat konfiguraci přes CLI a budete řešit následně automatizace, audit apod…
O jaké se jedná?
PyNSXv – což je tool založen na Python a detail naleznete včetně instalace zde https://github.com/vmware/pynsxv
Já jsem vykoušel instalace pro Windows i macOS. Obě fungují dobře. Jen pozor nepoužít nikdy Python 3.x ale Python 2.x.
První krok je připravit si nsx.ini pokud máte více NSX prostředí připravíte si více nsx.ini.
Jeho formát je
# [nsxraml] # nsxraml_file = <> # Uncomment the above section and add the path to the raml spec you want to use instead of the bundled version [nsxv] nsx_manager = <nsx_manager_IP> nsx_username = admin nsx_password = <nsx_manager_password> [vcenter] vcenter = <VC_IP_or_Hostname> vcenter_user = administrator@domain.local vcenter_passwd = <vc_password> [defaults] transport_zone = <transport_zone_name> datacenter_name = <vcenter datacenter name> edge_datastore = <datastore name to deploy edges in> edge_cluster = <vcenter cluster for edge gateways>
Následně již můžete použít help viz. ukázka
NOV-MacBook-Pro:~ nov$ pynsxv -h
usage: pynsxv [-h] [-i INI] [-v] [-d] {lswitch,dlr,esg,dhcp,lb,dfw,usage} …
PyNSXv Command Line Client for NSX for vSphere
positional arguments:
{lswitch,dlr,esg,dhcp,lb,dfw,usage}
lswitch Functions for logical switches
dlr Functions for distributed logical routers
esg Functions for edge services gateways
dhcp Functions for Edge DHCP
lb Functions for Edge Load Balancer
dfw Functions for distributed firewall
usage Functions to retrieve NSX-v usage statistics
optional arguments:
-h, –help show this help message and exit
-i INI, –ini INI nsx configuration file
-v, –verbose increase output verbosity
-d, –debug print low level debug of http transactions
A ukázka vypisu Logických switchů:
NOV-MacBook-Pro:~ nov$ pynsxv lswitch list
+———–+—————+
| LS name | LS ID |
|———–+—————|
| Web01 | virtualwire-1 |
| App01 | virtualwire-2 |
| DB01 | virtualwire-3 |
| Transport | virtualwire-4 |
| Client | virtualwire-5 |
+———–+—————+
NOV-MacBook-Pro:~ nov$
Výpis interface na DLR
NOV-MacBook-Pro:~ nov$ pynsxv dlr list_interfaces -n DLR
+——————+—————-+—————-+——————–+
| Interface name | Interface ID | Interface IP | Interface subnet |
|——————+—————-+—————-+——————–|
| Transport | 2 | 192.168.40.2 | 255.255.255.0 |
| Web01 | 10 | 192.168.30.1 | 255.255.255.0 |
| App01 | 11 | 192.168.10.1 | 255.255.255.0 |
| DB01 | 12 | 192.168.20.1 | 255.255.255.0 |
+——————+—————-+—————-+——————–+
NOV-MacBook-Pro:~ nov$
Samozřejmě můžete i tvořit a nebo mazat objekty. To je vše otestujte …
PowerNSX – Tohle je pro změnu tool který využíva PowerCLI. Takže kdo ho ovládá bude i velice rychle ovládat i tuto příkaz řádku. Detail včetně instalace je zde https://github.com/vmware/powernsx
Opět mám vykoušeno jak na Windows tak macOS.
Pokud máme nainstalováno tak se můžeme mrknout jednoduše
PS /Users/nov> Get-Command -Module PowerNSX
CommandType Name Version Source
———– —- ——- ——
Function Add-NsxDynamicCriteria 3.0.1047 PowerNSX
Function Add-NsxDynamicMemberSet 3.0.1047 PowerNSX
Function Add-NsxEdgeInterfaceAddress 3.0.1047 PowerNSX
Function Add-NsxFirewallExclusionListMember 3.0.1047 PowerNSX
Function Add-NsxFirewallRuleMember 3.0.1047 PowerNSX
Function Add-NsxIpSetMember 3.0.1047 PowerNSX
Function Add-NsxLicense 3.0.1047 PowerNSX
Function Add-NsxLoadBalancerPoolMember 3.0.1047 PowerNSX
Function Add-NsxLoadBalancerVip 3.0.1047 PowerNSX
Function Add-NsxSecondaryManager 3.0.1047 PowerNSX
Function Add-NsxSecurityGroupMember 3.0.1047 PowerNSX
Function Add-NsxServiceGroupMember 3.0.1047 PowerNSX
Function Add-NsxTransportZoneMember 3.0.1047 PowerNSX
Function Add-XmlElement 3.0.1047 PowerNSX
Function Clear-NsxEdgeInterface 3.0.1047 PowerNSX
Function Clear-NsxManagerTimeSettings 3.0.1047 PowerNSX
Function Connect-NsxLogicalSwitch 3.0.1047 PowerNSX
Function Connect-NsxServer 3.0.1047 PowerNSX
Function Copy-NsxEdge 3.0.1047 PowerNSX
Function Disable-NsxEdgeSsh 3.0.1047 PowerNSX
Function Disconnect-NsxLogicalSwitch 3.0.1047 PowerNSX
Function Disconnect-NsxServer 3.0.1047 PowerNSX
Function Enable-NsxEdgeSsh 3.0.1047 PowerNSX
Function Export-NsxObject 3.0.1047 PowerNSX
Function Find-NsxWhereVMUsed 3.0.1047 PowerNSX
Function Format-XML 3.0.1047 PowerNSX
Function Get-NsxApplicableMember 3.0.1047 PowerNSX
Function Get-NsxBackingDVSwitch 3.0.1047 PowerNSX
Function Get-NsxBackingPortGroup 3.0.1047 PowerNSX
Function Get-NsxCliDfwAddrSet 3.0.1047 PowerNSX
Function Get-NsxCliDfwFilter 3.0.1047 PowerNSX
Function Get-NsxCliDfwRule 3.0.1047 PowerNSX
Function Get-NsxClusterStatus 3.0.1047 PowerNSX
Function Get-NsxController 3.0.1047 PowerNSX
Function Get-NsxDynamicCriteria 3.0.1047 PowerNSX
Function Get-NsxDynamicMemberSet 3.0.1047 PowerNSX
Function Get-NsxEdge 3.0.1047 PowerNSX
Function Get-NsxEdgeBgp 3.0.1047 PowerNSX
Function Get-NsxEdgeBgpNeighbour 3.0.1047 PowerNSX
Function Get-NsxEdgeCertificate 3.0.1047 PowerNSX
Function Get-NsxEdgeCsr 3.0.1047 PowerNSX
Function Get-NsxEdgeFirewall 3.0.1047 PowerNSX
Function Get-NsxEdgeFirewallRule 3.0.1047 PowerNSX
Function Get-NsxEdgeInterface 3.0.1047 PowerNSX
Function Get-NsxEdgeInterfaceAddress 3.0.1047 PowerNSX
Function Get-NsxEdgeNat 3.0.1047 PowerNSX
Function Get-NsxEdgeNatRule 3.0.1047 PowerNSX
Function Get-NsxEdgeOspf 3.0.1047 PowerNSX
Function Get-NsxEdgeOspfArea 3.0.1047 PowerNSX
Function Get-NsxEdgeOspfInterface 3.0.1047 PowerNSX
Function Get-NsxEdgePrefix 3.0.1047 PowerNSX
Function Get-NsxEdgeRedistributionRule 3.0.1047 PowerNSX
Function Get-NsxEdgeRouting 3.0.1047 PowerNSX
Function Get-NsxEdgeStaticRoute 3.0.1047 PowerNSX
Function Get-NsxEdgeSubInterface 3.0.1047 PowerNSX
Function Get-NsxFirewallExclusionListMember 3.0.1047 PowerNSX
Function Get-NsxFirewallGlobalConfiguration 3.0.1047 PowerNSX
Function Get-NsxFirewallPublishStatus 3.0.1047 PowerNSX
Function Get-NsxFirewallRule 3.0.1047 PowerNSX
Function Get-NsxFirewallRuleMember 3.0.1047 PowerNSX
Function Get-NsxFirewallSavedConfiguration 3.0.1047 PowerNSX
Function Get-NsxFirewallSection 3.0.1047 PowerNSX
Function Get-NsxFirewallThreshold 3.0.1047 PowerNSX
Function Get-NsxIpPool 3.0.1047 PowerNSX
Function Get-NsxIpSet 3.0.1047 PowerNSX
Function Get-NsxLicense 3.0.1047 PowerNSX
Function Get-NsxLoadBalancer 3.0.1047 PowerNSX
Function Get-NsxLoadBalancerApplicationProfile 3.0.1047 PowerNSX
Function Get-NsxLoadBalancerApplicationRule 3.0.1047 PowerNSX
Function Get-NsxLoadBalancerMonitor 3.0.1047 PowerNSX
Function Get-NsxLoadBalancerPool 3.0.1047 PowerNSX
Function Get-NsxLoadBalancerPoolMember 3.0.1047 PowerNSX
Function Get-NsxLoadBalancerStats 3.0.1047 PowerNSX
Function Get-NsxLoadBalancerVip 3.0.1047 PowerNSX
Function Get-NsxLogicalRouter 3.0.1047 PowerNSX
Function Get-NsxLogicalRouterBgp 3.0.1047 PowerNSX
Function Get-NsxLogicalRouterBgpNeighbour 3.0.1047 PowerNSX
Function Get-NsxLogicalRouterBridge 3.0.1047 PowerNSX
Function Get-NsxLogicalRouterBridging 3.0.1047 PowerNSX
Function Get-NsxLogicalRouterInterface 3.0.1047 PowerNSX
Function Get-NsxLogicalRouterOspf 3.0.1047 PowerNSX
Function Get-NsxLogicalRouterOspfArea 3.0.1047 PowerNSX
Function Get-NsxLogicalRouterOspfInterface 3.0.1047 PowerNSX
Function Get-NsxLogicalRouterPrefix 3.0.1047 PowerNSX
Function Get-NsxLogicalRouterRedistributionRule 3.0.1047 PowerNSX
Function Get-NsxLogicalRouterRouting 3.0.1047 PowerNSX
Function Get-NsxLogicalRouterStaticRoute 3.0.1047 PowerNSX
Function Get-NsxLogicalSwitch 3.0.1047 PowerNSX
Function Get-NsxMacSet 3.0.1047 PowerNSX
Function Get-NsxManagerBackup 3.0.1047 PowerNSX
Function Get-NsxManagerCertificate 3.0.1047 PowerNSX
Function Get-NsxManagerComponentSummary 3.0.1047 PowerNSX
Function Get-NsxManagerNetwork 3.0.1047 PowerNSX
Function Get-NsxManagerRole 3.0.1047 PowerNSX
Function Get-NsxManagerSsoConfig 3.0.1047 PowerNSX
Function Get-NsxManagerSyncStatus 3.0.1047 PowerNSX
Function Get-NsxManagerSyslogServer 3.0.1047 PowerNSX
Function Get-NsxManagerSystemSummary 3.0.1047 PowerNSX
Function Get-NsxManagerTimeSettings 3.0.1047 PowerNSX
Function Get-NsxManagerVcenterConfig 3.0.1047 PowerNSX
Function Get-NsxSecondaryManager 3.0.1047 PowerNSX
Function Get-NsxSecurityGroup 3.0.1047 PowerNSX
Function Get-NsxSecurityGroupEffectiveIpAddress 3.0.1047 PowerNSX
Function Get-NsxSecurityGroupEffectiveMacAddress 3.0.1047 PowerNSX
Function Get-NsxSecurityGroupEffectiveMember 3.0.1047 PowerNSX
Function Get-NsxSecurityGroupEffectiveVirtualMachine 3.0.1047 PowerNSX
Function Get-NsxSecurityGroupEffectiveVnic 3.0.1047 PowerNSX
Function Get-NsxSecurityGroupMemberTypes 3.0.1047 PowerNSX
Function Get-NsxSecurityPolicy 3.0.1047 PowerNSX
Function Get-NsxSecurityPolicyHighestUsedPrecedence 3.0.1047 PowerNSX
Function Get-NsxSecurityTag 3.0.1047 PowerNSX
Function Get-NsxSecurityTagAssignment 3.0.1047 PowerNSX
Function Get-NsxSegmentIdRange 3.0.1047 PowerNSX
Function Get-NsxService 3.0.1047 PowerNSX
Function Get-NsxServiceDefinition 3.0.1047 PowerNSX
Function Get-NsxServiceGroup 3.0.1047 PowerNSX
Function Get-NsxServiceGroupMember 3.0.1047 PowerNSX
Function Get-NsxServiceProfile 3.0.1047 PowerNSX
Function Get-NsxSpoofguardNic 3.0.1047 PowerNSX
Function Get-NsxSpoofguardPolicy 3.0.1047 PowerNSX
Function Get-NsxSslVpn 3.0.1047 PowerNSX
Function Get-NsxSslVpnAuthServer 3.0.1047 PowerNSX
Function Get-NsxSslVpnClientInstallationPackage 3.0.1047 PowerNSX
Function Get-NsxSslVpnIpPool 3.0.1047 PowerNSX
Function Get-NsxSslVpnPrivateNetwork 3.0.1047 PowerNSX
Function Get-NsxSslVpnUser 3.0.1047 PowerNSX
Function Get-NsxTransportZone 3.0.1047 PowerNSX
Function Get-NsxUserRole 3.0.1047 PowerNSX
Function Get-NsxVdsContext 3.0.1047 PowerNSX
Function Get-PowerNsxVersion 3.0.1047 PowerNSX
Function Grant-NsxSpoofguardNicApproval 3.0.1047 PowerNSX
Function Import-NsxObject 3.0.1047 PowerNSX
Function Install-NsxCluster 3.0.1047 PowerNSX
Function Invoke-NsxCli 3.0.1047 PowerNSX
Function Invoke-NsxManagerSync 3.0.1047 PowerNSX
Function Invoke-NsxRestMethod 3.0.1047 PowerNSX
Function Invoke-NsxWebRequest 3.0.1047 PowerNSX
Function Invoke-XpathQuery 3.0.1047 PowerNSX
Function New-NsxAddressSpec 3.0.1047 PowerNSX
Function New-NsxClusterVxlanConfig 3.0.1047 PowerNSX
Function New-NsxController 3.0.1047 PowerNSX
Function New-NsxDynamicCriteriaSpec 3.0.1047 PowerNSX
Function New-NsxEdge 3.0.1047 PowerNSX
Function New-NsxEdgeBgpNeighbour 3.0.1047 PowerNSX
Function New-NsxEdgeCsr 3.0.1047 PowerNSX
Function New-NsxEdgeFirewallRule 3.0.1047 PowerNSX
Function New-NsxEdgeInterfaceSpec 3.0.1047 PowerNSX
Function New-NsxEdgeNatRule 3.0.1047 PowerNSX
Function New-NsxEdgeOspfArea 3.0.1047 PowerNSX
Function New-NsxEdgeOspfInterface 3.0.1047 PowerNSX
Function New-NsxEdgePrefix 3.0.1047 PowerNSX
Function New-NsxEdgeRedistributionRule 3.0.1047 PowerNSX
Function New-NsxEdgeSelfSignedCertificate 3.0.1047 PowerNSX
Function New-NsxEdgeStaticRoute 3.0.1047 PowerNSX
Function New-NsxEdgeSubInterface 3.0.1047 PowerNSX
Function New-NsxEdgeSubInterfaceSpec 3.0.1047 PowerNSX
Function New-NsxFirewallRule 3.0.1047 PowerNSX
Function New-NsxFirewallSavedConfiguration 3.0.1047 PowerNSX
Function New-NsxFirewallSection 3.0.1047 PowerNSX
Function New-NsxIpPool 3.0.1047 PowerNSX
Function New-NsxIpSet 3.0.1047 PowerNSX
Function New-NsxLoadBalancerApplicationProfile 3.0.1047 PowerNSX
Function New-NsxLoadBalancerApplicationRule 3.0.1047 PowerNSX
Function New-NsxLoadBalancerMemberSpec 3.0.1047 PowerNSX
Function New-NsxLoadBalancerMonitor 3.0.1047 PowerNSX
Function New-NsxLoadBalancerPool 3.0.1047 PowerNSX
Function New-NsxLogicalRouter 3.0.1047 PowerNSX
Function New-NsxLogicalRouterBgpNeighbour 3.0.1047 PowerNSX
Function New-NsxLogicalRouterBridge 3.0.1047 PowerNSX
Function New-NsxLogicalRouterInterface 3.0.1047 PowerNSX
Function New-NsxLogicalRouterInterfaceSpec 3.0.1047 PowerNSX
Function New-NsxLogicalRouterOspfArea 3.0.1047 PowerNSX
Function New-NsxLogicalRouterOspfInterface 3.0.1047 PowerNSX
Function New-NsxLogicalRouterPrefix 3.0.1047 PowerNSX
Function New-NsxLogicalRouterRedistributionRule 3.0.1047 PowerNSX
Function New-NsxLogicalRouterStaticRoute 3.0.1047 PowerNSX
Function New-NsxLogicalSwitch 3.0.1047 PowerNSX
Function New-NsxMacSet 3.0.1047 PowerNSX
Function New-NsxManager 3.0.1047 PowerNSX
Function New-NsxSecurityGroup 3.0.1047 PowerNSX
Function New-NsxSecurityPolicy 3.0.1047 PowerNSX
Function New-NsxSecurityPolicyAssignment 3.0.1047 PowerNSX
Function New-NsxSecurityPolicyFirewallRuleSpec 3.0.1047 PowerNSX
Function New-NsxSecurityPolicyGuestIntrospectionSpec 3.0.1047 PowerNSX
Function New-NsxSecurityPolicyNetworkIntrospectionSpec 3.0.1047 PowerNSX
Function New-NsxSecurityTag 3.0.1047 PowerNSX
Function New-NsxSecurityTagAssignment 3.0.1047 PowerNSX
Function New-NsxSegmentIdRange 3.0.1047 PowerNSX
Function New-NsxService 3.0.1047 PowerNSX
Function New-NsxServiceGroup 3.0.1047 PowerNSX
Function New-NsxSpoofguardPolicy 3.0.1047 PowerNSX
Function New-NsxSslVpnAuthServer 3.0.1047 PowerNSX
Function New-NsxSslVpnClientInstallationPackage 3.0.1047 PowerNSX
Function New-NsxSslVpnIpPool 3.0.1047 PowerNSX
Function New-NsxSslVpnPrivateNetwork 3.0.1047 PowerNSX
Function New-NsxSslVpnUser 3.0.1047 PowerNSX
Function New-NsxTransportZone 3.0.1047 PowerNSX
Function New-NsxVdsContext 3.0.1047 PowerNSX
Function Publish-NsxSpoofguardPolicy 3.0.1047 PowerNSX
Function Remove-NsxCluster 3.0.1047 PowerNSX
Function Remove-NsxClusterVxlanConfig 3.0.1047 PowerNSX
Function Remove-NsxController 3.0.1047 PowerNSX
Function Remove-NsxDynamicCriteria 3.0.1047 PowerNSX
Function Remove-NsxDynamicMemberSet 3.0.1047 PowerNSX
Function Remove-NsxEdge 3.0.1047 PowerNSX
Function Remove-NsxEdgeBgpNeighbour 3.0.1047 PowerNSX
Function Remove-NsxEdgeCertificate 3.0.1047 PowerNSX
Function Remove-NsxEdgeCsr 3.0.1047 PowerNSX
Function Remove-NsxEdgeFirewallRule 3.0.1047 PowerNSX
Function Remove-NsxEdgeInterfaceAddress 3.0.1047 PowerNSX
Function Remove-NsxEdgeNatRule 3.0.1047 PowerNSX
Function Remove-NsxEdgeOspfArea 3.0.1047 PowerNSX
Function Remove-NsxEdgeOspfInterface 3.0.1047 PowerNSX
Function Remove-NsxEdgePrefix 3.0.1047 PowerNSX
Function Remove-NsxEdgeRedistributionRule 3.0.1047 PowerNSX
Function Remove-NsxEdgeStaticRoute 3.0.1047 PowerNSX
Function Remove-NsxEdgeSubInterface 3.0.1047 PowerNSX
Function Remove-NsxFirewallExclusionListMember 3.0.1047 PowerNSX
Function Remove-NsxFirewallRule 3.0.1047 PowerNSX
Function Remove-NsxFirewallRuleMember 3.0.1047 PowerNSX
Function Remove-NsxFirewallSavedConfiguration 3.0.1047 PowerNSX
Function Remove-NsxFirewallSection 3.0.1047 PowerNSX
Function Remove-NsxIpPool 3.0.1047 PowerNSX
Function Remove-NsxIpSet 3.0.1047 PowerNSX
Function Remove-NsxIpSetMember 3.0.1047 PowerNSX
Function Remove-NsxLoadBalancerApplicationProfile 3.0.1047 PowerNSX
Function Remove-NsxLoadBalancerMonitor 3.0.1047 PowerNSX
Function Remove-NsxLoadBalancerPool 3.0.1047 PowerNSX
Function Remove-NsxLoadBalancerPoolMember 3.0.1047 PowerNSX
Function Remove-NsxLoadBalancerVip 3.0.1047 PowerNSX
Function Remove-NsxLogicalRouter 3.0.1047 PowerNSX
Function Remove-NsxLogicalRouterBgpNeighbour 3.0.1047 PowerNSX
Function Remove-NsxLogicalRouterBridge 3.0.1047 PowerNSX
Function Remove-NsxLogicalRouterInterface 3.0.1047 PowerNSX
Function Remove-NsxLogicalRouterOspfArea 3.0.1047 PowerNSX
Function Remove-NsxLogicalRouterOspfInterface 3.0.1047 PowerNSX
Function Remove-NsxLogicalRouterPrefix 3.0.1047 PowerNSX
Function Remove-NsxLogicalRouterRedistributionRule 3.0.1047 PowerNSX
Function Remove-NsxLogicalRouterStaticRoute 3.0.1047 PowerNSX
Function Remove-NsxLogicalSwitch 3.0.1047 PowerNSX
Function Remove-NsxMacSet 3.0.1047 PowerNSX
Function Remove-NsxSecondaryManager 3.0.1047 PowerNSX
Function Remove-NsxSecurityGroup 3.0.1047 PowerNSX
Function Remove-NsxSecurityGroupMember 3.0.1047 PowerNSX
Function Remove-NsxSecurityPolicy 3.0.1047 PowerNSX
Function Remove-NsxSecurityPolicyAssignment 3.0.1047 PowerNSX
Function Remove-NsxSecurityTag 3.0.1047 PowerNSX
Function Remove-NsxSecurityTagAssignment 3.0.1047 PowerNSX
Function Remove-NsxSegmentIdRange 3.0.1047 PowerNSX
Function Remove-NsxService 3.0.1047 PowerNSX
Function Remove-NsxServiceGroup 3.0.1047 PowerNSX
Function Remove-NsxSpoofguardPolicy 3.0.1047 PowerNSX
Function Remove-NsxSslVpnClientInstallationPackage 3.0.1047 PowerNSX
Function Remove-NsxSslVpnIpPool 3.0.1047 PowerNSX
Function Remove-NsxSslVpnPrivateNetwork 3.0.1047 PowerNSX
Function Remove-NsxSslVpnUser 3.0.1047 PowerNSX
Function Remove-NsxTransportZone 3.0.1047 PowerNSX
Function Remove-NsxTransportZoneMember 3.0.1047 PowerNSX
Function Remove-NsxVdsContext 3.0.1047 PowerNSX
Function Repair-NsxEdge 3.0.1047 PowerNSX
Function Revoke-NsxSpoofguardNicApproval 3.0.1047 PowerNSX
Function Set-NsxEdge 3.0.1047 PowerNSX
Function Set-NsxEdgeBgp 3.0.1047 PowerNSX
Function Set-NsxEdgeFirewall 3.0.1047 PowerNSX
Function Set-NsxEdgeInterface 3.0.1047 PowerNSX
Function Set-NsxEdgeNat 3.0.1047 PowerNSX
Function Set-NsxEdgeOspf 3.0.1047 PowerNSX
Function Set-NsxEdgeRouting 3.0.1047 PowerNSX
Function Set-NsxFirewallGlobalConfiguration 3.0.1047 PowerNSX
Function Set-NsxFirewallSavedConfiguration 3.0.1047 PowerNSX
Function Set-NsxFirewallThreshold 3.0.1047 PowerNSX
Function Set-NsxLoadBalancer 3.0.1047 PowerNSX
Function Set-NsxLoadBalancerPoolMember 3.0.1047 PowerNSX
Function Set-NsxLogicalRouter 3.0.1047 PowerNSX
Function Set-NsxLogicalRouterBgp 3.0.1047 PowerNSX
Function Set-NsxLogicalRouterBridging 3.0.1047 PowerNSX
Function Set-NsxLogicalRouterInterface 3.0.1047 PowerNSX
Function Set-NsxLogicalRouterOspf 3.0.1047 PowerNSX
Function Set-NsxLogicalRouterRouting 3.0.1047 PowerNSX
Function Set-NsxManager 3.0.1047 PowerNSX
Function Set-NsxManagerRole 3.0.1047 PowerNSX
Function Set-NsxManagerTimeSettings 3.0.1047 PowerNSX
Function Set-NsxSslVpn 3.0.1047 PowerNSX
Function Update-PowerNsx 3.0.1047 PowerNSX
Function Wait-NsxControllerJob 3.0.1047 PowerNSX
Function Wait-NsxGenericJob 3.0.1047 PowerNSX
Function Wait-NsxJob 3.0.1047 PowerNSX
Takže se připojíme můžete na vCenter a nebo přímo na NSX Manager pokud chcete výpisy i o NSX Manageru je nutné se na něj přihlásit.
PS /Users/nov> Connect-NsxServer -vCenterServer xx.xx.xx.xx
Windows PowerShell credential request
vCenter Server SSO Credentials
User: administrator@vmware.veeam
Password for user administrator@vmware.veeam: ********
Version : 6.3.3
BuildNumber : 6276725
Credential : System.Management.Automation.PSCredential
Server : 10.10.70.18
Port : 443
Protocol : https
ValidateCertificate : False
VIConnection : 10.10.70.17
DebugLogging : False
DebugLogfile : \PowerNSXLog-administrator@vmware.veeam@-2017_09_18_15_40_29.log
A hurá do příkazů:
To co už jsem dělal ale přes první tool teď přes PowerNSX
PS /Users/nov> Get-NsxLogicalSwitch
objectId : virtualwire-1
objectTypeName : VirtualWire
vsmUuid : 4215BDE8-3927-63AB-A28E-C0C82EBCCE50
nodeId : 4215BDE8-3927-63AB-A28E-C0C82EBCCE50
revision : 4
type : type
name : Web01
description :
clientHandle :
extendedAttributes :
isUniversal : false
universalRevision : 0
tenantId : virtual wire tenant
vdnScopeId : vdnscope-1
vdsContextWithBacking : vdsContextWithBacking
vdnId : 5000
guestVlanAllowed : false
controlPlaneMode : UNICAST_MODE
ctrlLsUuid : 25624b7b-baec-4a8d-88e6-f2ce3062575f
macLearningEnabled : false
objectId : virtualwire-2
objectTypeName : VirtualWire
vsmUuid : 4215BDE8-3927-63AB-A28E-C0C82EBCCE50
nodeId : 4215BDE8-3927-63AB-A28E-C0C82EBCCE50
revision : 4
type : type
name : App01
description :
clientHandle :
extendedAttributes :
isUniversal : false
universalRevision : 0
tenantId : virtual wire tenant
vdnScopeId : vdnscope-1
vdsContextWithBacking : vdsContextWithBacking
vdnId : 5001
guestVlanAllowed : false
controlPlaneMode : UNICAST_MODE
ctrlLsUuid : f2efc51f-70e8-497a-b66b-c08493fa2b07
macLearningEnabled : false
objectId : virtualwire-3
objectTypeName : VirtualWire
vsmUuid : 4215BDE8-3927-63AB-A28E-C0C82EBCCE50
nodeId : 4215BDE8-3927-63AB-A28E-C0C82EBCCE50
revision : 4
type : type
name : DB01
description :
clientHandle :
extendedAttributes :
isUniversal : false
universalRevision : 0
tenantId : virtual wire tenant
vdnScopeId : vdnscope-1
vdsContextWithBacking : vdsContextWithBacking
vdnId : 5002
guestVlanAllowed : false
controlPlaneMode : UNICAST_MODE
ctrlLsUuid : aad27d4f-48ea-4ade-b4c1-273a225fa806
macLearningEnabled : false
objectId : virtualwire-4
objectTypeName : VirtualWire
vsmUuid : 4215BDE8-3927-63AB-A28E-C0C82EBCCE50
nodeId : 4215BDE8-3927-63AB-A28E-C0C82EBCCE50
revision : 4
type : type
name : Transport
description :
clientHandle :
extendedAttributes :
isUniversal : false
universalRevision : 0
tenantId : virtual wire tenant
vdnScopeId : vdnscope-1
vdsContextWithBacking : vdsContextWithBacking
vdnId : 5003
guestVlanAllowed : false
controlPlaneMode : UNICAST_MODE
ctrlLsUuid : 03c51d30-04ca-4692-8635-f658016ca04f
macLearningEnabled : false
objectId : virtualwire-5
objectTypeName : VirtualWire
vsmUuid : 4215BDE8-3927-63AB-A28E-C0C82EBCCE50
nodeId : 4215BDE8-3927-63AB-A28E-C0C82EBCCE50
revision : 3
type : type
name : Client
description :
clientHandle :
extendedAttributes :
isUniversal : false
universalRevision : 0
tenantId : virtual wire tenant
vdnScopeId : vdnscope-1
vdsContextWithBacking : vdsContextWithBacking
vdnId : 5004
guestVlanAllowed : false
controlPlaneMode : UNICAST_MODE
ctrlLsUuid : bfc453fd-4c72-434a-8201-3d3e0328d4ed
macLearningEnabled : false
Tohle třeba bez přihlášení na NSX Manager nefunguje …
PS /Users/nov> Get-NsxManagerSystemSummary
ipv4Address : xx.xx.xx.xx
dnsName : nsxmanager.sipovecs.local
hostName : nsxmanager
domainName : sipovecs.local
applianceName : vShield Virtual Appliance Management
versionInfo : versionInfo
uptime : 00 days, 10 hours, 26 minutes
cpuInfoDto : cpuInfoDto
memInfoDto : memInfoDto
storageInfoDto : storageInfoDto
currentSystemDate : Monday, 18 September 2017 01:49:43 PM UTC
Opět nejlépe když vykoušíte co je zde výhoda je tu nová kniha které PowerNSX ukazuje v plné síle. Já ji ještě neměl čas projít ale vám se to možná povede dřív
mrkněte na
PowerOps – Je nástroj postaven na PowerCLI a PowerNSX a ukazuje jeho sílu a fukčnost v plné parádě. Tady jeho detail https://gitlab.com/NSXPowerOps/NSX-PowerOps/tree/master
Je jsem tento tools poprvé viděl minulej týden na VMworld 2017 v Barceloně.
Pojdmě si tedy ukázat do dokáže zatím má u mě tento nástroj malé – funguje jen na Windows korektně a má jestě drobné chybky takže vše reportovat vývojářům. Ja doufám že brzy bude i dobře fungovat na macOS.
Základní menu PowerOps
Zde můžete udělat automatickou instalaci PowerNSX pokud ho ještě nemáte. My ale půjdeme hned na 2 bod a to spojení.
Hotovo a jsme připojeni a můžeme jít kouzlit s PowerOps možnost 3 tam je shováno vše možné kolem dokumentace prostředí.
Pojdmě se podívat třeba jak nám krásně vytvoří Visio diagram.
A je tu Visio … parada co říkate?
Další možnost je výstup do Excelu.
Super a máme komplet přehled o všech NSX komponentách.
Když se vrátíme na hlavní menu je tam ještě jedna možnost a to 4
Zde je několik možností jak ověřit NSX konektivitu různé části.
Jedna ze super je ověřit VTEP tedy VMkernel porty pro VXLAN.
V této části jsou ještě nejaké chyby takže vše co můžete reportujte vývojářům. Jinak tento nástroj je přínosem a až se odladí bude skvělý pomocník každého NSX Admina.
Jinak pro zajímavost mě už odepsal Hammad jeden z vývojářů a založil track pro Support for MacOS. https://gitlab.com/NSXPowerOps/NSX-PowerOps/issues/1
Takže prosím pište jim vše a podílejte se na testingu. Moc děkuji
Tak co který z nástrojů bude pro vás ten nejlepší?
Přístě se spolu podíváme na CLI a API NSX. Mějte se
NSX bylo také součástí NFD15 tak mrkněte i zde.