vm.gowatana.jp

NEOにほんごVMware(仮)

VCF むけの PowerCLI モジュールをインストールしてみる。(PowerVCF / PowerValidatedSolutions)

VMware Cloud Foundation(VCF)を操作する PowerCLI モジュールを、Windows マシンにインストールしてみます。VCF を操作するおもなモジュールには、PowerVCF と、VMware Validated Solutions の Planning and Preparation Workbook ベースの自動化に対応する PowerValidatedSolutions などがあります。

PowerVCF

PowerShell Module for VMware Validated Solutions (PowerValidatedSolutions)

 

PowerValidatedSolutions は PowerVCF も前提にしているので、PowerValidatedSolutions 関連のモジュールをひととおりインストールしてみます。

 

今回の内容です。

 

今回の環境

Windows Server 2022 にインストールします。

接続先は、VCF 5.2 の SDDC Manager です。

 

1. PowerShell Core 7 のインストール

PowerVCF は、PowerShell Core 7.x 以上に対応しているので、本日時点で最新の PowerShell Core 7.4.5 をインストールします。

下記の .msi ファイルをダウンロードして、デフォルトの設定でインストールしておきます。

 

2. PowerCLI のインストール

「pwsh.exe」を実行して、PowerShell Core のターミナルを開きます。今回の PowerSehll バージョンです。

PS> $PSVersionTable | select PSVersion

PSVersion
---------
7.4.5

 

パッケージ リポジトリのポリシー設定を緩和しておきます。

PS> Set-PSRepository -Name PSGallery -InstallationPolicy Trusted

 

PowerCLI をインストールします。

PS> Install-Module -Name VMware.PowerCLI -Scope CurrentUser

 

PowerCLI の CEIP を無効化します。

PS> Set-PowerCLIConfiguration -Scope User -ParticipateInCeip:$false -Confirm:$false

 

インストールされた PowerCLI のバージョンです。

PS> Get-Module -Name VMware.PowerCLI -ListAvailable | select Version

Version
-------
13.3.0.24145081

 

3. PowerVCF のインストール

PowerVCF をインストールします。

PS> Install-Module -Name PowerVCF -MinimumVersion 2.4.1 -Scope CurrentUser

 

インストールされた PowerVCF のバージョンを確認しておきます。

PS> Get-Module -Name PowerVCF -ListAvailable | select Version

Version
-------
2.4.1.1000

 

4. PowerValidatedSolutions 関連モジュールのインストール

VMware.vSphere.SsoAdmin インストールして、バージョンを確認しておきます。

PS> Install-Module -Name VMware.vSphere.SsoAdmin -MinimumVersion 1.3.9 -Scope CurrentUser
PS> Get-Module -Name VMware.vSphere.SsoAdmin -ListAvailable | select Version

Version
-------
1.3.9

 

ImportExcel をインストールして、バージョンを確認しておきます。

PS> Install-Module -Name ImportExcel -MinimumVersion 7.8.5 -Scope CurrentUser
PS> Get-Module -Name ImportExcel -ListAvailable | select Version

Version
-------
7.8.9

 

PowerValidatedSolutions をインストールて、バージョンを確認しておきます。

PS> Install-Module -Name PowerValidatedSolutions -MinimumVersion 2.11.0 -Scope CurrentUser
PS> Get-Module -Name PowerValidatedSolutions -ListAvailable | select Version

Version
-------
2.11.1.1010

 

5. コマンドの様子

PowerVCF に含まれるコマンドの様子を見ておきます。操作できる対象は多いのですが、ベースにしている REST API の都合もあってか、PowerCLI ほど Get/Set/Add/Remove のように動詞(Verb)が揃っていません。

PS> gcm -Module PowerVCF | group Noun | select Count,Name,{$_.Group.Verb -join ","} | Sort-Object Name

Count Name                          $_.Group.Verb -join ","
----- ----                          -----------------------
   16
    1 CatchWriter                   Debug
    1 CloudBuilder                  Connect
    3 CloudBuilderSDDC              Get,Restart,Start
    4 CloudBuilderSDDCValidation    Get,Restart,Start,Stop
    1 LogMessage                    Write
    1 SetupLogFile                  Start
    2 VCFApplicationVirtualNetwork  Add,Get
    1 VCFBackup                     Start
    2 VCFBackupConfiguration        Get,Set
    2 VCFBundle                     Get,Request
    1 VCFBundleUpload               Start
    2 VCFCeip                       Get,Set
    3 VCFCertificate                Get,Request,Set
    2 VCFCertificateAuthority       Get,Remove
    2 VCFCertificateCsr             Get,Request
    4 VCFCluster                    Get,New,Remove,Set
    1 VCFClusterValidation          Get
    1 VCFCommand                    Invoke
    2 VCFCommissionedHost           New,Remove
    2 VCFConfigurationDNS           Get,Set
    1 VCFConfigurationDNSValidation Get
    2 VCFConfigurationNTP           Get,Set
    1 VCFConfigurationNTPValidation Get
    2 VCFCredential                 Get,Set
    1 VCFCredentialAutoRotatePolicy Set
    1 VCFCredentialExpiry           Get
    3 VCFCredentialTask             Get,Restart,Stop
    2 VCFDepotCredential            Get,Set
    2 VCFEdgeCluster                Get,New
    4 VCFFederation                 Get,Join,Remove,Set
    1 VCFFederationInvite           New
    1 VCFFederationMember           Get
    1 VCFFederationTask             Get
    1 VCFFipsMode                   Get
    1 VCFGroup                      New
    1 VCFHealthSummary              Start
    1 VCFHealthSummaryBundle        Request
    1 VCFHealthSummaryTask          Get
    1 VCFHost                       Get
    4 VCFIdentityProvider           Get,New,Remove,Update
    3 VCFLicenseKey                 Get,New,Remove
    1 VCFLicenseMode                Get
    1 VCFManager                    Get
    1 VCFMicrosoftCa                Set
    3 VCFNetworkIPPool              Add,Get,Remove
    3 VCFNetworkPool                Get,New,Remove
    1 VCFNsxtCluster                Get
    1 VCFOpensslCa                  Set
    2 VCFPersonality                Get,New
    2 VCFProxy                      Get,Set
    1 VCFPSC                        Get
    1 VCFRelease                    Get
    1 VCFRestore                    Start
    1 VCFRestoreTask                Get
    1 VCFRole                       Get
    1 VCFService                    Get
    1 VCFServiceUser                New
    2 VCFSupportBundle              Request,Start
    1 VCFSupportBundleTask          Get
    1 VCFSystemPrecheck             Start
    1 VCFSystemPrecheckTask         Get
    2 VCFTask                       Get,Restart
    1 VCFToken                      Request
    1 VCFUpgradable                 Get
    2 VCFUpgrade                    Get,Start
    3 VCFUser                       Get,New,Remove
    1 VCFvCenter                    Get
    1 VCFVra                        Get
    1 VCFVrli                       Get
    2 VCFVrliConnection             Get,Set
    1 VCFVrops                      Get
    2 VCFVropsConnection            Get,Set
    4 VCFVrslcm                     Get,New,Remove,Reset
    4 VCFWorkloadDomain             Get,New,Remove,Set
    1 VCFWsa                        Get

 

PowerValidatedSolutions は Validated Solutions に対応するためのモジュールということもあり、対象(Noun)は多いのですが PowerVCF 以上に特定の操作に特化されている印象です。

PS> gcm -Module PowerValidatedSolutions | group Noun | select Count,Name,{$_.Group.Verb -join ","} | Sort-Object Name

Count Name                                     $_.Group.Verb -join ","
----- ----                                     -----------------------
    1
    1 ADAuthentication                         Test
    1 ADPrincipalGuid                          Get
    2 AntiAffinityRule                         Add,Undo
    1 AriaNetworksAuthentication               Test
    1 AriaNetworksConnection                   Test
    2 AriaNetworksDataSource                   Get,Remove
    2 AriaNetworksDeployment                   New,Undo
    1 AriaNetworksInternalApiToken             Request
    1 AriaNetworksInternalAuthentication       Test
    1 AriaNetworksJsonSpec                     Export
    4 AriaNetworksLdapConfiguration            Add,Get,New,Undo
    1 AriaNetworksNodes                        Get
    2 AriaNetworksNsxDataSource                Add,Undo
    1 AriaNetworksNsxtDataSource               New
    1 AriaNetworksNsxtDataSourceCredentials    Update
    1 AriaNetworksToken                        Request
    3 AriaNetworksVcenterDataSource            Add,New,Undo
    1 AriaNetworksvCenterDataSourceCredentials Update
    1 CbrDeployment                            Invoke
    1 CbrJsonSpec                              Export
    1 CbrPrerequisite                          Test
    1 CbrSolutionInterop                       Invoke
    1 CbwDeployment                            Invoke
    1 CbwJsonSpec                              Export
    1 CbwPrerequisite                          Test
    1 CbwSolutionInterop                       Invoke
    1 CcmDeployment                            Invoke
    1 CcmJsonSpec                              Export
    1 CcmPrerequisite                          Test
    1 CcmSolutionInterop                       Invoke
    1 CertToNsxCertificateStore                Add
    2 ClusterGroup                             Add,Undo
    2 ContentLibrary                           Add,Undo
    1 ContentLibraryItem                       Import
    2 DatastoreTag                             Set,Undo
    1 DnsServers                               Test
    1 DriDeployment                            Invoke
    1 DriJsonSpec                              Export
    1 DriPrerequisite                          Test
    2 DRSolutionTovCenter                      Connect,Undo
    3 DrsVmToVmGroup                           Add,Get,Remove
    1 EndpointConnection                       Test
    2 ESXiAdminGroup                           Get,Set
    1 EsxiAlert                                Get
    1 EsxiAuthentication                       Test
    1 EsxiConnection                           Test
    2 EsxiVrmsStaticRoute                      Add,Undo
    2 EsxiVrmsVMkernelPort                     Add,Undo
    1 ExceptionWriter                          Debug
    1 GenerateChainPem                         Invoke
    1 GeneratePKCS12                           Invoke
    1 GeneratePrivateKeyAndCsr                 Invoke
    3 GlobalPermission                         Add,Get,Remove
    1 GlobalWsaDeployment                      Invoke
    1 GlobalWsaJsonSpec                        Export
    1 GlobalWsaPrerequisite                    Test
    1 HrmDeployment                            Invoke
    1 HrmJsonSpec                              Export
    1 HrmPrerequisite                          Test
    1 IamDeployment                            Invoke
    1 IamJsonSpec                              Export
    1 IamMscaSignedCertificate                 Request
    1 IamPrerequisite                          Test
    2 IdentitySource                           Add,Undo
    1 IlaDeployment                            Invoke
    1 IlaJsonSpec                              Export
    1 IlaMscaSignedCertificate                 Request
    1 IlaPrerequisite                          Test
    1 IlaSolutionInterop                       Invoke
    1 InvDeployment                            Invoke
    1 InvJsonSpec                              Export
    1 InvMscaSignedCertificate                 Request
    1 InvPrerequisite                          Test
    1 InvSolutionInterop                       Invoke
    1 IomDeployment                            Invoke
    1 IomJsonSpec                              Export
    1 IomMscaSignedCertificate                 Request
    1 IomPrerequisite                          Test
    1 IomSolutionInterop                       Invoke
    1 IpAddress                                Test
    1 IPaddressArray                           Test
    2 LocalAccountLockout                      Get,Set
    2 LocalPasswordComplexity                  Get,Set
    2 LocalUserPasswordExpiration              Get,Set
    1 MscaRootCertificate                      Get
    2 Namespace                                Add,Undo
    2 NamespacePermission                      Add,Undo
    1 NamespaceVmClass                         Add
    2 NetworkSegment                           Add,Undo
    1 NsxEdgeCluster                           Get
    1 NSXLBDetails                             Get
    1 NsxtAlarm                                Get
    1 NsxtApplianceUser                        Get
    1 NsxtApplianceUserExpirationPolicy        Set
    1 NsxtApplianceUserPassword                Set
    1 NSXTAuthentication                       Test
    1 NsxtBackupConfiguration                  Get
    1 NsxtBackupHistory                        Get
    2 NsxtCertificate                          Get,Set
    2 NsxtComputeManager                       Get,Set
    1 NsxtComputeManagerStatus                 Get
    1 NSXTConnection                           Test
    1 NsxtEdgeCluster                          Get
    1 NsxtEdgeNode                             Get
    1 NsxtEvent                                Get
    1 NsxtGlobalSegmentID                      Get
    2 NsxtGroup                                Get,Remove
    2 NsxtIdentitySource                       Add,Undo
    1 NsxtLBAppProfile                         New
    1 NsxtLBPersistenceAppProfile              New
    1 NsxtLBPool                               New
    1 NsxtLBServiceMonitor                     New
    1 NsxtLBVirtualServer                      New
    3 NsxtLdap                                 Get,New,Remove
    2 NsxtLdapRole                             Add,Undo
    1 NsxtLdapStatus                           Get
    1 NsxtLoadBalancer                         New
    1 NsxtLocaleService                        Get
    1 NsxtLogicalRouter                        Get
    1 NsxtNodeProfile                          Get
    4 NsxtNodeProfileSyslogExporter            Add,Remove,Set,Undo
    1 NsxtPrefix                               Add
    3 NsxtPrefixList                           Get,New,Remove
    5 NsxtPrincipalIdentity                    Add,Get,New,Remove,Undo
    3 NsxtRole                                 Get,Remove,Set
    3 NsxtRouteMap                             Get,New,Remove
    1 NsxtRoutingConfigRedistribution          Get
    2 NsxtRoutingConfigRedistributionRule      Get,Set
    1 NsxtRoutingConfigRouteMap                Get
    2 NsxtSecurityPolicy                       Get,Remove
    3 NsxtSegment                              Get,New,Remove
    1 NsxtServerDetail                         Get
    3 NsxtSyslogExporter                       Get,Remove,Set
    1 NsxtSyslogStatus                         Get
    1 NsxtTier0BgpNeighborConfig               New
    1 NsxtTier0BgpStatus                       Get
    1 NsxtTier0Gateway                         Get
    1 NsxtTier0LocaleServiceBgp                Get
    2 NsxtTier1                                New,Set
    1 NsxtTier1Gateway                         Get
    1 NsxtTier1ServiceInterface                New
    1 NsxtTier1StaticRoute                     New
    1 NsxtToken                                Request
    1 NsxtTransportNode                        Get
    1 NsxtTransportNodeStatus                  Get
    1 NsxtTransportNodeTunnel                  Get
    1 NsxtTransportNodeTunnelStatus            Get
    1 NsxtTransportZone                        Get
    1 NsxtUser                                 Get
    2 NsxtVidm                                 Get,Set
    1 NsxtVidmGroup                            Get
    2 NsxtVidmRole                             Add,Undo
    1 NsxtVidmStatus                           Get
    1 NsxtVidmUser                             Get
    1 NtpServer                                Test
    1 OperationsDefaultAdapter                 Remove
    1 PcaDeployment                            Invoke
    1 PcaJsonSpec                              Export
    1 PcaMscaSignedCertificate                 Request
    1 PcaPrerequisite                          Test
    1 PcaSolutionInterop                       Invoke
    1 PdrDeployment                            Invoke
    1 PdrJsonSpec                              Export
    1 PdrPrerequisite                          Test
    1 PdrSolutionInterop                       Invoke
    2 PhotonAppliance                          Deploy,Remove
    1 PowerValidatedSolutionsOutput            Show
    1 PowerValidatedSolutionsPrereq            Test
    2 PrefixList                               Add,Undo
    1 PrereqDnsEntries                         Test
    2 ProtectionGroup                          Add,Undo
    3 RecoveryPlan                             Add,Set,Undo
    2 Registry                                 Enable,Undo
    1 RequestSignedCertificate                 Invoke
    2 ResourcePool                             Add,Undo
    2 RouteMap                                 Add,Undo
    1 SddcDeployedFlavor                       Update
    2 SddcManagerRole                          Add,Undo
    1 SignedCertificate                        Request
    2 SiteRecoveryManager                      Install,Undo
    1 SnapshotConsolidation                    Get
    1 SnapshotStatus                           Get
    1 SrmApplianceDetail                       Get
    1 SrmApplianceState                        Set
    1 SrmAuthentication                        Test
    1 SrmAuthenticationREST                    Test
    3 SrmConfiguration                         Get,Remove,Set
    1 SrmConnection                            Test
    2 SrmLicenseKey                            Add,Undo
    2 SrmMapping                               Add,Undo
    1 SrmNetworkAll                            Get
    2 SrmNetworkDns                            Get,Set
    2 SrmNetworkInterface                      Get,Set
    3 SrmProtectionGroup                       Add,Get,Remove
    3 SrmRecoveryPlan                          Add,Get,Remove
    1 SrmRecoveryPlanCalloutStep               Add
    1 SrmRecoveryPlanStep                      Get
    1 SrmRecoveryPlanVm                        Get
    1 SrmRecoveryPlanVMPriority                Set
    1 SrmRegistration                          Test
    1 SrmRemoteSession                         Connect
    1 SrmSdkAuthentication                     Test
    2 SrmService                               Get,Set
    2 SrmSitePair                              New,Undo
    1 SrmSitePairing                           Get
    1 SrmTask                                  Get
    1 SrmToken                                 Request
    1 SrmTokenREST                             Request
    1 SrmVamiAuthentication                    Test
    2 SrmVamiCertificate                       Get,Set
    1 SrmVamiConnection                        Test
    1 SSOAuthentication                        Test
    1 SSOConnection                            Test
    2 SsoPermission                            Add,Undo
    2 SsoUser                                  Add,Undo
    1 StorageFolder                            Add
    2 StoragePolicy                            Add,Undo
    1 SubscribedLibrary                        Get
    2 SupervisorCluster                        Enable,Undo
    1 SupervisorClusterCertificate             Install
    1 SupervisorClusterCSR                     New
    1 SupervisorClusterLicense                 Add
    2 SupervisorService                        Add,Undo
    5 TanzuKubernetesCluster                   Add,Get,New,Remove,Undo
    1 TanzuSignedCertificate                   Install
    1 UndoCbrDeployment                        Invoke
    1 UndoCbrSolutionInterop                   Invoke
    1 UndoCbwDeployment                        Invoke
    1 UndoCbwSolutionInterop                   Invoke
    1 UndoCcmDeployment                        Invoke
    1 UndoCcmSolutionInterop                   Invoke
    1 UndoDriDeployment                        Invoke
    1 UndoGlobalWsaDeployment                  Invoke
    1 UndoHrmDeployment                        Invoke
    1 UndoIamDeployment                        Invoke
    1 UndoIlaDeployment                        Invoke
    1 UndoIlaSolutionInterop                   Invoke
    1 UndoInvDeployment                        Invoke
    1 UndoInvSolutionInterop                   Invoke
    1 UndoIomDeployment                        Invoke
    1 UndoIomSolutionInterop                   Invoke
    1 UndoPcaDeployment                        Invoke
    1 UndoPcaSolutionInterop                   Invoke
    1 UndoPdrDeployment                        Invoke
    1 UndoPdrSolutionInterop                   Invoke
    1 ValidatedSolutionMenu                    Start
    1 VamiCertificate                          Install
    1 VamiPKCS12Certificate                    Request
    1 VCConfigurationDNS                       Get
    1 VCConfigurationNTP                       Get
    1 VcenterApiToken                          Request
    1 VcenterBackupStatus                      Get
    2 VCenterCEIP                              Get,Set
    1 VcenterCommand                           Invoke
    2 vCenterGlobalPermission                  Add,Undo
    2 VcenterPasswordExpiration                Get,Set
    1 vCenterPermission                        Set
    2 VcenterRootPasswordExpiration            Get,Set
    1 vCenterServerDetail                      Get
    1 VcenterTriggeredAlarm                    Get
    1 VCFAuthentication                        Test
    1 VCFConnection                            Test
    1 VCFDnsSearchDomain                       Get
    3 VcLicense                                Get,New,Remove
    1 VCVersion                                Get
    2 VdsPortGroup                             Add,Undo
    2 VMClass                                  Add,Get
    2 VMFolder                                 Add,Undo
    1 VmGroup                                  Add
    1 VMOvfEnvTransport                        Set
    1 VMOvfEULA                                Set
    1 VMOvfIPAssignment                        Set
    1 VMOvfProduct                             New
    2 VMOvfProperties                          Backup,Restore
    3 VMOvfProperty                            Get,New,Set
    2 VmStartupRule                            Add,Undo
    1 VMtoFolder                               Move
    1 VMvAppConfig                             Get
    1 vRAAPIVersion                            Get
    1 vRAAuthentication                        Test
    5 vRACloudAccount                          Add,Get,New,Remove,Undo
    1 vRACloudAccountZone                      Update
    3 vRACloudZone                             Get,Remove,Update
    1 vRAConnection                            Test
    2 vRADeployment                            New,Undo
    2 vRADnsConfig                             Set,Undo
    4 vRAGroup                                 Add,Get,New,Undo
    2 vRAGroupOrgRole                          Remove,Set
    2 vRAGroupRoles                            Get,Remove
    2 vRAGroupServiceRole                      Remove,Set
    1 vRAIntegrationDetail                     Get
    3 vRAIntegrationItem                       Add,Remove,Test
    1 vRAJsonSpec                              Export
    4 vRANotification                          Add,Get,New,Remove
    2 vRANtpConfig                             Set,Undo
    3 vRAOrganizationDisplayName               Get,Set,Update
    1 vRAOrganizationId                        Get
    1 vRAResourceCompute                       Get
    1 vRAResourceComputeTag                    Add
    1 vRAServerDetail                          Get
    1 vRAServices                              Get
    1 vRAToken                                 Request
    4 vRAUser                                  Add,Get,New,Undo
    2 vRAUserOrgRole                           Remove,Set
    1 vRAUserRoles                             Get
    2 vRAUserServiceRole                       Remove,Set
    3 vRAvRLIConfig                            Get,Remove,Set
    2 vRAvROPSIntegrationItem                  New,Undo
    1 VrConnection                             Test
    1 vRealizeLoadBalancer                     Copy
    1 vRealizeLoadBalancerSpec                 New
    5 vRLIAgentGroup                           Add,Get,New,Remove,Undo
    8 vRLIAlert                                Disable,Enable,Get,New,Remove,Set,Undo,Update
    1 vRLIAlertDatacenter                      Add
    1 vRLIAlertVirtualMachine                  Add
    1 vRLIAuthentication                       Test
    5 vRLIAuthenticationAD                     Add,Get,Remove,Set,Undo
    2 vRLIAuthenticationGroup                  Add,Undo
    5 vRLIAuthenticationWSA                    Add,Get,Remove,Set,Undo
    1 vRLIConnection                           Test
    6 vRLIContentPack                          Enable,Get,Install,Remove,Uninstall,Update
    2 vRLIDeployment                           New,Undo
    2 vRLIEmailNotification                    Get,Set
    3 vRLIGroup                                Add,Get,Remove
    1 vRLIIndexPartition                       Get
    1 vRLIJsonSpec                             Export
    2 vRLILogArchive                           Add,Set
    7 vRLILogForwarder                         Add,Get,Remove,Set,Test,Undo,Update
    1 vRLIMarketplaceMetadata                  Get
    2 vRLIPhotonAgent                          Install,Undo
    2 vRLIRetentionThreshold                   Get,Set
    1 vRLIRole                                 Get
    1 vRLIServerDetail                         Get
    3 vRLISmtpConfiguration                    Add,Get,Set
    2 vRLISyslogEdgeCluster                    Set,Undo
    1 vRLIToken                                Request
    1 vRLIVersion                              Get
    1 vRLIWorkloadDomain                       Register
    1 VrmsAuthenticationREST                   Test
    3 VrmsConfiguration                        Get,Remove,Set
    1 VrmsDatastore                            Get
    1 VrmsNetworkAdapter                       Add
    2 VrmsNetworkInterface                     Get,Set
    1 VrmsRemoteSession                        Connect
    4 VrmsReplication                          Add,Get,Remove,Set
    1 VrmsSitePairing                          Get
    1 VrmsTokenREST                            Request
    1 VrmsVamiAuthentication                   Test
    2 VrmsVamiCertificate                      Get,Set
    1 VrmsVamiConnection                       Test
    1 VrmsVm                                   Get
    1 vROParameterDefinition                   New
    7 vROPSAdapter                             Add,Get,Remove,Set,Start,Stop,Undo
    1 vROPSAdapterCollecterGroup               Update
    1 vROPSAdapterConnection                   Test
    1 vROPSAdapterIdentityManager              Add
    1 vROPSAdapterKind                         Get
    1 vROPSAdapterNsxt                         Add
    1 vROPSAdapterPing                         Add
    2 vROPSAdapterSddcHealth                   Add,Update
    1 vROPSAdapterSrm                          Add
    1 vROPsAdapterStatus                       Test
    1 vROPsAdapterStatusByType                 Test
    1 vROPSAdapterVcenter                      Update
    1 vROPSAdapterVcf                          Add
    1 vROPSAdapterVr                           Add
    1 vROPSAlertDefinition                     Get
    4 vROPSAlertPlugin                         Add,Get,Remove,Set
    1 vROPSAlertPluginEmail                    Add
    1 vROPSAlertPluginStatus                   Set
    1 vROPSAuthentication                      Test
    1 vROPSAuthRole                            Get
    1 vROPSAuthSource                          Get
    1 vROPSCollector                           Get
    3 vROPSCollectorGroup                      Add,Get,Remove
    1 vROPSConnection                          Test
    4 vROPSCredential                          Add,Get,Remove,Undo
    3 vROPSCurrency                            Add,Get,Set
    2 vROPSDeployment                          New,Undo
    2 vROPSDnsConfig                           Set,Undo
    1 vROPSGroupRemoteCollectors               Add
    1 vROPsJsonSpec                            Export
    1 vROpsLogForwarding                       Get
    1 vROpsLogForwardingConfig                 Request
    6 vROPSManagementPack                      Enable,Get,Import,Install,Register,Set
    1 vROPSManagementPackActivity              Get
    1 vROPSManagementPackStatus                Get
    4 vROPSNotification                        Get,Import,New,Remove
    1 vROPSNsxCredential                       Add
    2 vROPSNtpServer                           Add,Undo
    1 vROPSResourceDetail                      Get
    1 vROPsServerDetail                        Get
    1 vROPSSolution                            Get
    1 vROPSToken                               Request
    6 vROPSUserAccount                         Add,Get,Import,Remove,Search,Update
    5 vROPSUserGroup                           Add,Get,Import,Remove,Search
    1 vROPSVcenterCredential                   Add
    1 vROPSVcfCredential                       Add
    1 vROPSVersion                             Get
    1 vROPSvRAAdapterCredential                Update
    1 vROPSWorkloadDomain                      Register
    1 vRORestMethod                            Invoke
    1 vROTrustedCertificate                    Add
    2 vROvCenterServer                         Add,Remove
    1 vROVersion                               Get
    2 vROWorkflow                              Get,Invoke
    1 vROWorkflowExecution                     Get
    1 vROWorkflowExecutionResult               Get
    1 vROWorkflowExecutionState                Get
    1 VrRegistration                           Test
    1 VrSdkAuthentication                      Test
    1 vRSLCMAdapterOperation                   New
    3 vRSLCMApplianceNtpConfig                 Add,Get,Set
    1 vRSLCMAuthentication                     Test
    1 vRSLCMBundle                             Request
    1 vRSLCMCertificate                        Install
    1 vRSLCMConnection                         Test
    5 vRSLCMDatacenter                         Add,Get,New,Remove,Undo
    4 vRSLCMDatacenterVcenter                  Add,Get,New,Sync
    3 vRSLCMDeployment                         Invoke,New,Undo
    2 vRSLCMDnsConfig                          Set,Undo
    3 vRSLCMEnvironment                        Add,Get,Remove
    1 vRSLCMEnvironmentVMs                     Get
    3 vRSLCMGroup                              Add,Get,Remove
    2 vRSLCMGroupRole                          Add,Undo
    1 vRSLCMHealth                             Get
    1 vRSLCMJsonSpec                           Export
    4 vRSLCMLoadbalancer                       Get,New,Remove,Undo
    5 vRSLCMLockerCertificate                  Add,Get,Import,Remove,Undo
    5 vRSLCMLockerLicense                      Add,Get,New,Remove,Undo
    5 vRSLCMLockerPassword                     Add,Get,New,Remove,Undo
    5 vRSLCMMyVMwareAccount                    Add,Get,New,Remove,Undo
    2 vRSLCMNtpServer                          Add,Undo
    1 VrslcmPrerequisite                       Test
    1 vRSLCMProductBinaries                    Get
    1 vRSLCMProductBinariesMapped              Get
    2 vRSLCMProductBinary                      Register,Request
    1 vRSLCMProductDetails                     Get
    3 vRSLCMProductNode                        Get,Start,Stop
    3 vRSLCMProductNtpServer                   Add,Get,Remove
    1 vRSLCMProductPassword                    Get
    1 vRSLCMProductVersion                     Get
    3 vRSLCMPSPack                             Get,Install,Update
    4 vRSLCMRequest                            Get,Remove,Resume,Watch
    1 vRSLCMRole                               Get
    1 vRSLCMServerDetail                       Get
    1 vRSLCMSnapshot                           Start
    2 vRSLCMSshStatus                          Get,Set
    1 vRSLCMToken                              Request
    1 VrslcmUndoDeployment                     Invoke
    2 vRSLCMUpgrade                            Invoke,Start
    2 vRSLCMUpgradeIso                         Connect,Disconnect
    1 vRSLCMUpgradeStatus                      Get
    1 VsanHealthTest                           Get
    1 vSphereApiAuthentication                 Test
    1 vSphereApiConnection                     Test
    1 vSphereApiToken                          Request
    1 VsphereAuthentication                    Test
    1 VsphereConnection                        Test
    2 vSphereMobServer                         Connect,Disconnect
    2 vSphereReplication                       Add,Undo
    2 vSphereReplicationManager                Install,Undo
    3 vSphereRole                              Add,Copy,Undo
    2 WMCluster                                Connect,Disconnect
    1 WMClusterCertificate                     Install
    1 WmClusterConfigStatus                    Watch
    1 WMClusterCSR                             Request
    1 WMLicenseStatus                          Get
    3 WMRegistry                               Enable,Get,Remove
    1 WMRegistryHealth                         Get
    1 WMSubnetInput                            Test
    3 WorkspaceOne                             Initialize,Install,Undo
    1 WorkspaceOneApplianceNtpConfig           Set
    1 WorkspaceOneCertificate                  Install
    1 WorkspaceOneDirectory                    Add
    1 WorkspaceOneDirectoryConnector           Add
    2 WorkspaceOneDirectoryGroup               Add,Undo
    2 WorkspaceOneDnsConfig                    Set,Undo
    2 WorkspaceOneNsxtIntegration              Set,Undo
    1 WorkspaceOneNtpConfig                    Set
    1 WorkspaceOneRole                         Add
    1 WorkspaceOneSmtpConfig                   Set
    2 WsaAccountLockout                        Get,Set
    1 WSAActiveDirectoryGroupDetail            Get
    1 WSAAuthentication                        Test
    1 WSABindPassword                          Set
    2 WSAClient                                Add,Get
    1 WSAConnection                            Test
    2 WSAConnector                             Add,Get
    2 WSADeployment                            New,Undo
    1 WSADirectory                             Get
    1 WSADirectoryDomain                       Get
    1 WSADirectoryGroup                        Set
    2 WsaDirectorySync                         Invoke,Start
    1 WSADirectoryUser                         Set
    1 WSAGroup                                 Get
    1 WSAIdentityProvider                      Get
    1 WsaJsonSpec                              Export
    1 WSALdapDirectory                         Add
    1 WSAMscaSignedCertificate                 Request
    1 WSAOAuthToken                            Get
    2 WsaPasswordPolicy                        Get,Set
    1 WSARole                                  Get
    2 WSARoleAssociation                       Add,Get
    1 WSARoleId                                Get
    1 WSARoleMember                            Set
    1 WSARuleSet                               Get
    1 WSAServerDetail                          Get
    2 WSASmtpConfiguration                     Get,Set
    1 WSASyncSetting                           Set
    1 WSAToken                                 Request
    1 WSAUser                                  Get

 

Change Log を確認すると、VCF 関連モジュールのコマンドはけっこう改廃が激しそうです。

 

6. SDDC Manager での VCF 情報取得

vCenter や NSX Manager のように、SDDC Manager に接続する Connect-VcfSddcManagerServer コマンドが用意されています。しかし実際にはこのコマンドは使用せず、Request-VCFToken でアクセス トークンを取得して操作するようです。

 

まず、下記のように SDDC Mnager のアドレスを指定してトークンを取得します。

  • この環境の SDDC Manager:vcf-m01-sddc-01.c.go-lab.jp
PS> Request-VCFToken -fqdn vcf-m01-sddc-01.c.go-lab.jp

PowerShell credential request
Enter your credentials.
User: administrator@vsphere.local
Password for user administrator@vsphere.local: ****************

Successfully Requested New API Token From SDDC Manager: vcf-m01-sddc-01.c.go-lab.jp

 

ワークロード ドメインの情報を取得してみます。

PS> Get-VCFWorkloadDomain

id                         : 7cf1ffbe-c741-433a-8b13-7f781f184940
name                       : vcf-m01
orgName                    : COM
status                     : ACTIVE
upgradeState               : AVAILABLE
upgradeStatus              : @{status=UP_TO_DATE}
type                       : MANAGEMENT
owners                     : {administrator@vsphere.local}
vcenters                   : {@{id=4451c29a-987e-4dd6-a10f-e86193ff82a6; fqdn=vcf-m01-vc-01.c.go-lab.jp}}
ssoId                      : 6844ff2a-615e-42a0-b777-acf21131b7d0
ssoName                    : vsphere.local
isManagementSsoDomain      : True
clusters                   : {@{id=7259aead-a34a-4ba4-bd80-dc0cdff385c7}}
nsxtCluster                : @{id=0933cd36-84dd-4f5f-beed-cc8004296a7f; vipFqdn=vcf-m01-nsx.c.go-lab.jp; vip=192.168.70.12}
licensingInfo              : @{licensingMode=PERPETUAL; subscriptionStatus=UNSUBSCRIBED; isRegistered=False; isSubscribed=False}
capacity                   : @{cpu=; memory=; storage=}
lifecycleManagementMode    : IMAGES
isNetworkSeparationEnabled : False
isSecurityEnabled          : False
isPrimaryDomainForNsx      : False

 

ESXi ホストの情報を取得してみます。

PS> Get-VCFHost

id                  : 298e42a7-1ee8-40ac-ba4d-4b76b1925a7d
serialNumber        :
esxiVersion         : 8.0.3-24022510
sshThumbprint       :
sslThumbprint       :
fqdn                : vcf-m01-esxi-01.c.go-lab.jp
hardwareVendor      : VMware, Inc.
hardwareModel       : VMware7,1
isPrimary           : False
ipAddresses         : {@{ipAddress=192.168.71.111; type=MANAGEMENT}, @{ipAddress=192.168.73.111; type=VSAN}, @{ipAddress=192.168.72.111; type=VMOTION}}
cpu                 : @{frequencyMHz=26399.9765625; usedFrequencyMHz=1837; cores=12; cpuCores=System.Object[]}
memory              : @{totalCapacityMB=98302.953125; usedCapacityMB=30669}
storage             : @{totalCapacityMB=2047968; usedCapacityMB=148107.6875; disks=System.Object[]}
physicalNics        : {@{deviceName=vmnic0; macAddress=00:50:56:91:75:2a; speed=10000; unit=MB}, @{deviceName=vmnic1; macAddress=00:50:56:91:36:fe; speed=10000; unit=MB}}
domain              : @{id=7cf1ffbe-c741-433a-8b13-7f781f184940}
networkpool         : @{id=90e3fc33-7fd7-4db5-800d-b115fcfbb129; name=vcf-m01-np01}
cluster             : @{id=7259aead-a34a-4ba4-bd80-dc0cdff385c7}
status              : ASSIGNED
bundleRepoDatastore : lcm-bundle-repo
hybrid              : False
configurationStatus : ACTIVE
datastoreType       : VSAN

id                  : 0fac3548-0d37-4b2f-8104-5c57189337d3
serialNumber        :
esxiVersion         : 8.0.3-24022510
sshThumbprint       :
sslThumbprint       :
fqdn                : vcf-m01-esxi-02.c.go-lab.jp
hardwareVendor      : VMware, Inc.
hardwareModel       : VMware7,1
isPrimary           : False
ipAddresses         : {@{ipAddress=192.168.71.112; type=MANAGEMENT}, @{ipAddress=192.168.73.112; type=VSAN}, @{ipAddress=192.168.72.112; type=VMOTION}}
cpu                 : @{frequencyMHz=26399.9765625; usedFrequencyMHz=1041; cores=12; cpuCores=System.Object[]}
memory              : @{totalCapacityMB=98302.953125; usedCapacityMB=16161}
storage             : @{totalCapacityMB=2047968; usedCapacityMB=148107.6875; disks=System.Object[]}
physicalNics        : {@{deviceName=vmnic0; macAddress=00:50:56:91:ce:c5; speed=10000; unit=MB}, @{deviceName=vmnic1; macAddress=00:50:56:91:58:5d; speed=10000; unit=MB}}
domain              : @{id=7cf1ffbe-c741-433a-8b13-7f781f184940}
networkpool         : @{id=90e3fc33-7fd7-4db5-800d-b115fcfbb129; name=vcf-m01-np01}
cluster             : @{id=7259aead-a34a-4ba4-bd80-dc0cdff385c7}
status              : ASSIGNED
bundleRepoDatastore : lcm-bundle-repo
hybrid              : False
configurationStatus : ACTIVE
datastoreType       : VSAN

id                  : fd63c18f-6282-4f3a-b384-d764dd9c488d
serialNumber        :
esxiVersion         : 8.0.3-24022510
sshThumbprint       :
sslThumbprint       :
fqdn                : vcf-m01-esxi-03.c.go-lab.jp
hardwareVendor      : VMware, Inc.
hardwareModel       : VMware7,1
isPrimary           : False
ipAddresses         : {@{ipAddress=192.168.71.113; type=MANAGEMENT}, @{ipAddress=192.168.73.113; type=VSAN}, @{ipAddress=192.168.72.113; type=VMOTION}}
cpu                 : @{frequencyMHz=26399.9765625; usedFrequencyMHz=6311; cores=12; cpuCores=System.Object[]}
memory              : @{totalCapacityMB=98302.953125; usedCapacityMB=23917}
storage             : @{totalCapacityMB=2047968; usedCapacityMB=148107.6875; disks=System.Object[]}
physicalNics        : {@{deviceName=vmnic0; macAddress=00:50:56:91:2e:b4; speed=10000; unit=MB}, @{deviceName=vmnic1; macAddress=00:50:56:91:e4:39; speed=10000; unit=MB}}
domain              : @{id=7cf1ffbe-c741-433a-8b13-7f781f184940}
networkpool         : @{id=90e3fc33-7fd7-4db5-800d-b115fcfbb129; name=vcf-m01-np01}
cluster             : @{id=7259aead-a34a-4ba4-bd80-dc0cdff385c7}
status              : ASSIGNED
bundleRepoDatastore : lcm-bundle-repo
hybrid              : False
configurationStatus : ACTIVE
datastoreType       : VSAN

id                  : 829c380b-ee96-46fa-bd7e-e7c7c5b34fdf
serialNumber        :
esxiVersion         : 8.0.3-24022510
sshThumbprint       :
sslThumbprint       :
fqdn                : vcf-m01-esxi-04.c.go-lab.jp
hardwareVendor      : VMware, Inc.
hardwareModel       : VMware7,1
isPrimary           : False
ipAddresses         : {@{ipAddress=192.168.71.114; type=MANAGEMENT}, @{ipAddress=192.168.73.114; type=VSAN}, @{ipAddress=192.168.72.114; type=VMOTION}}
cpu                 : @{frequencyMHz=26399.9765625; usedFrequencyMHz=5625; cores=12; cpuCores=System.Object[]}
memory              : @{totalCapacityMB=98302.953125; usedCapacityMB=41006}
storage             : @{totalCapacityMB=2047968; usedCapacityMB=148107.6875; disks=System.Object[]}
physicalNics        : {@{deviceName=vmnic0; macAddress=00:50:56:91:7b:fa; speed=10000; unit=MB}, @{deviceName=vmnic1; macAddress=00:50:56:91:6a:65; speed=10000; unit=MB}}
domain              : @{id=7cf1ffbe-c741-433a-8b13-7f781f184940}
networkpool         : @{id=90e3fc33-7fd7-4db5-800d-b115fcfbb129; name=vcf-m01-np01}
cluster             : @{id=7259aead-a34a-4ba4-bd80-dc0cdff385c7}
status              : ASSIGNED
bundleRepoDatastore : lcm-bundle-repo
hybrid              : False
configurationStatus : ACTIVE
datastoreType       : VSAN

 

NSX Manager のクラスタの情報を取得してみます。

PS> Get-VCFNsxtCluster

id               : 0933cd36-84dd-4f5f-beed-cc8004296a7f
vipFqdn          : vcf-m01-nsx.c.go-lab.jp
vip              : 192.168.70.12
domains          : {@{id=7cf1ffbe-c741-433a-8b13-7f781f184940; name=vcf-m01}}
nodes            : {@{id=16794609-01e3-49dd-a9ab-da19346aa97e; fqdn=vcf-m01-nsx-01.c.go-lab.jp; ipAddress=192.168.70.13; name=vcf-m01-nsx-01}}
version          : 4.2.0.0.0-24105817
isShared         : False
isShareable      : False
isVlcmCompatible : True

 

以上、PowerCLI の VCF 関連モジュールをインストールしてみる話でした。