欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

vCenter?Server?的?CLI?部署方式圖文詳解

 更新時(shí)間:2024年09月20日 09:31:28   作者:JUNIOR?MU  
VMware?vCenter?Server是VMware?vSphere的核心組件,負(fù)責(zé)管理ESXi主機(jī)和實(shí)現(xiàn)高級(jí)功能,本文詳細(xì)介紹了vCenter?Server的CLI部署方法,感興趣的朋友一起看看吧

VMware vCenter Server 是 VMware vSphere 解決方案的核心組件,用于管理多個(gè) ESXi 主機(jī)并實(shí)現(xiàn)更多高級(jí)功能特性(如 HA、DRS 以及 FT 等),相信大家已經(jīng)非常熟悉了。對(duì)于 vCenter Server 的安裝和部署,可能大部分人會(huì)選擇使用 GUI 方式部署 vCenter Server,并使用 vCenter Server ISO 鏡像文件中的 \vcsa-ui-installer\win32\installer.exe 部署程序,如下圖所示。部署過程分為兩個(gè)階段,第一階段配置并部署 vCenter Server 的 OVA 虛擬機(jī)文件;第二階段設(shè)置并啟動(dòng) vCenter Server 虛擬機(jī)的服務(wù)。

其實(shí),對(duì)于 vCenter Server 的部署還支持 CLI 部署方式,像我這種在實(shí)驗(yàn)室中經(jīng)常需要安裝刪除 vCenter Server 環(huán)境的來說,可能更喜歡 CLI 自動(dòng)化部署方式,因?yàn)檫@樣可以節(jié)約很多時(shí)間來做其他事情。如果你能了解 vCenter Server 的 GUI 部署過程,那對(duì)于使用 CLI 的部署方式應(yīng)該也會(huì)非常簡單。下面來看看如何使用 CLI 方式來部署我們所需要的 vCenter Server 環(huán)境,涵蓋了 GUI 部署過程中的所有場景,更多內(nèi)容和細(xì)節(jié)請(qǐng)查看 vCenter Server 產(chǎn)品文檔。

將 vCenter Server ISO 鏡像文件掛載到本地虛擬光驅(qū) F 盤符上,可以看到 vCenter Server 安裝鏡像文件中包含的所有文件,如下圖所示。注,對(duì)于 vCenter Server 的 CLI 部署將使用 PowerShell 方式執(zhí)行,ISO 鏡像文件基于 vCenter Server 8.0 U2b,內(nèi)部版本號(hào) 23319993。

如你所見,要是使用 GUI 部署方式則選擇 vcsa-ui-installer 文件夾下面所對(duì)應(yīng)的部署程序,如果使用 CLI 部署方式則使用 \vcsa-cli-installer\win32\ 文件夾下面的 vcsa-deploy.exe 部署程序。

使用 CLI 部署方式除了要使用 vcsa-deploy.exe 部署程序以外,還需要用到 \vcsa-cli-installer\templates\install\ 文件夾下面的 JSON 配置文件,這些 JSON 配置文件中預(yù)定義了在部署 vCenter Server 過程中所需配置的信息,如部署位置 、FQDN 等。

這些 JSON 配置文件一共分為兩類,一類是 *_on_ESXi.json 文件,用于將 vCenter Server 虛擬機(jī)部署在 ESXi 主機(jī)上;另一類是  *_on_VC.json 文件,用于將 vCenter Server 虛擬機(jī)部署在現(xiàn)有 vCenter Server 上。第一類通常是用于初始部署,第二類是在已有 vSphere 環(huán)境的情況下進(jìn)行部署,后面將分別介紹這幾種 JSON 配置文件所代表的部署場景。

先看一下 vcsa-deploy.exe 部署程序的命令幫助,CLI 方式同樣可以實(shí)現(xiàn)安裝(install)、升級(jí)(upgrade)以及遷移(migrate)等功能。

F:\vcsa-cli-installer\win32\vcsa-deploy.exe --help

使用以下命令可以查看 vCenter Server 支持的部署大小以及對(duì)應(yīng)的默認(rèn)配置,可根據(jù)環(huán)境的情況自行選擇哪種部署選項(xiàng)。

F:\vcsa-cli-installer\win32\vcsa-deploy.exe --supported-deployment-sizes

如果對(duì) JSON 配置文件中的哪個(gè)配置選項(xiàng)有疑問,可以使用以下命令查看 JSON 配置文件中關(guān)于配置選項(xiàng)的說明。

F:\vcsa-cli-installer\win32\vcsa-deploy.exe install --template-help | more

下面正式進(jìn)入 CLI 部署的配置過程,涉及到 vCenter Server 的多種部署場景,不同的場景會(huì)使用到不同的 JSON 配置文件以及環(huán)境。

一、將 vCenter Server 虛擬機(jī)部署到 ESXi 主機(jī)上

將 vCenter Server 虛擬機(jī)部署到 ESXi 主機(jī)上,通常是 ESXi 主機(jī)上已經(jīng)具有本地存儲(chǔ)和網(wǎng)絡(luò)端口組等環(huán)境信息,這種場景需要用到 vCenter Server 鏡像文件中的 embedded_vCSA_on_ESXi.json 配置文件,根據(jù)這個(gè)配置文件修改為實(shí)際環(huán)境中的信息,示例如下:

{
    "__version": "2.13.0",
    "__comments": "將 vCenter Server 虛擬機(jī)部署到 ESXi 主機(jī)上",
    "new_vcsa": {
        "esxi": {
            "hostname": "192.168.32.51",
            "username": "root",
            "password": "vSphere8@password",
            "deployment_network": "VM Network",
            "datastore": "Datastore-01"
        },
        "appliance": {
            "__comments": [
                "vCenter Server 部署參數(shù)"
            ],
            "thin_disk_mode": true,
            "deployment_option": "tiny",
            "name": "vcenter01"
        },
        "network": {
            "ip_family": "ipv4",
            "mode": "static",
            "system_name": "vcenter01.mulab.local",
            "ip": "192.168.32.55",
            "prefix": "24",
            "gateway": "192.168.32.254",
            "dns_servers": [
                "192.168.32.3"
            ]
        },
        "os": {
            "password": "vSphere8@password",
            "ntp_servers": "192.168.32.3",
            "ssh_enable": true
        },
        "sso": {
            "password": "vSphere8@password",
            "domain_name": "vsphere.local"
        }
    },
    "ceip": {
        "description": {
            "__comments": [
                "++++VMware Customer Experience Improvement Program (CEIP)++++",
                "VMware's Customer Experience Improvement Program (CEIP) ",
                "provides VMware with information that enables VMware to ",
                "improve its products and services, to fix problems, ",
                "and to advise you on how best to deploy and use our ",
                "products. As part of CEIP, VMware collects technical ",
                "information about your organization's use of VMware ",
                "products and services on a regular basis in association ",
                "with your organization's VMware license key(s). This ",
                "information does not personally identify any individual. ",
                "",
                "Additional information regarding the data collected ",
                "through CEIP and the purposes for which it is used by ",
                "VMware is set forth in the Trust & Assurance Center at ",
                "http://www.vmware.com/trustvmware/ceip.html . If you ",
                "prefer not to participate in VMware's CEIP for this ",
                "product, you should disable CEIP by setting ",
                "'ceip_enabled': false. You may join or leave VMware's ",
                "CEIP for this product at any time. Please confirm your ",
                "acknowledgement by passing in the parameter ",
                "--acknowledge-ceip in the command line.",
                "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
            ]
        },
        "settings": {
            "ceip_enabled": false
        }
    }
}

另存為 deploy-on-esxi.json 配置文件到 files 文件夾,使用以下命令執(zhí)行部署前預(yù)檢查。

F:\vcsa-cli-installer\win32\vcsa-deploy.exe install .\files\deploy-on-esxi.json --accept-eula --no-ssl-certificate-verification --precheck-only

如果 JSON 配置文件與部署環(huán)境檢查成功,則會(huì)輸出類似下面的內(nèi)容。

[SUCCEEDED] Successfully executed Task 'Precheck ovftool commandline parameters
to deploy a vCenter Server Appliance' in TaskFlow 'deploy-on-esxi' at 09:03:06
=================================== 09:03:07 ===================================
Result and Log File Information...
WorkFlow log directory:
C:\Users\JUNIOR~1\AppData\Local\Temp\vcsaCliInstaller-2024-08-06-09-02-x2dv8gw0\workflow_1722934960074

如果 JSON 配置文件與部署環(huán)境檢查確定沒問題,使用以下命令執(zhí)行正式部署。

F:\vcsa-cli-installer\win32\vcsa-deploy.exe install .\files\deploy-on-esxi.json --accept-eula --no-ssl-certificate-verification

如果 vCenter Server 部署成功,則會(huì)輸出類似下面的內(nèi)容。

Successfully completed VCSA deployment.  VCSA Deployment Start Time:
2024-08-06T09:11:48.264Z VCSA Deployment End Time: 2024-08-06T09:33:42.921Z
 [SUCCEEDED] Successfully executed Task 'MonitorDeploymentTask: Monitoring
Deployment' in TaskFlow 'deploy-on-esxi' at 09:33:55
Monitoring VCSA Deploy task completed
== [START] Start executing Task: Join active domain if necessary at 09:33:56 ==
Domain join task not applicable, skipping task
 [SUCCEEDED] Successfully executed Task 'Running deployment: Domain Join' in
TaskFlow 'deploy-on-esxi' at 09:33:56
 [START] Start executing Task: Provide the login information about new
appliance. at 09:33:56
    Appliance Name: vcenter01
    System Name: vcenter01.mulab.local
    System IP: 192.168.32.55
    Log in as: Administrator@vsphere.local
 [SUCCEEDED] Successfully executed Task 'ApplianceLoginSummaryTask: Provide
appliance login information.' in TaskFlow 'deploy-on-esxi' at 09:33:56
=================================== 09:33:57 ===================================
Result and Log File Information...
WorkFlow log directory:
C:\Users\JUNIOR~1\AppData\Local\Temp\vcsaCliInstaller-2024-08-06-09-03-4auw6_e4\workflow_1722935032748

登錄 vCenter Server,查看部署情況。

二、將 vCenter Server 虛擬機(jī)部署到現(xiàn)有 vCenter Server 上

將 vCenter Server 虛擬機(jī)部署到現(xiàn)有 vCenter Server 上,通常是當(dāng)前環(huán)境中已經(jīng)具有 vSphere 環(huán)境并想在之上部署另外一套環(huán)境,這種場景需要用到 vCenter Server 鏡像文件中的 embedded_vCSA_on_VC.json 配置文件,根據(jù)這個(gè)配置文件修改為實(shí)際環(huán)境中的信息,示例如下:

{
    "__version": "2.13.0",
    "__comments": "將 vCenter Server 虛擬機(jī)部署到現(xiàn)有 vCenter Server 上",
    "new_vcsa": {
        "vc": {
            "__comments": [
                "'datacenter' must end with a datacenter name, and only with a datacenter name.",
                "'target' must end with an ESXi hostname, a cluster name, or a resource pool name.",
                "The item 'Resources' must precede the resource pool name. ",
                "All names are case-sensitive. ",
                "For details and examples, refer to template help, i.e. vcsa-deploy {install|upgrade|migrate} --template-help"
            ],
            "hostname": "vcsa8-01.mulab.local",
            "username": "administrator@vsphere.local",
            "password": "vSphere8@password",
            "deployment_network": "VM Network",
            "datacenter": [
                "mulab"
            ],
            "datastore": "vsanDatastore",
            "target": [
			    "vsan8-hci-esa"
            ]
        },
        "appliance": {
            "__comments": [
                "vCenter Server 部署參數(shù)"
            ],
            "thin_disk_mode": true,
            "deployment_option": "tiny",
            "name": "vcenter02"
        },
        "network": {
            "ip_family": "ipv4",
            "mode": "static",
            "system_name": "vcenter02.mulab.local",
            "ip": "192.168.32.56",
            "prefix": "24",
            "gateway": "192.168.32.254",
            "dns_servers": [
                "192.168.32.3"
            ]
        },
        "os": {
            "password": "vSphere8@password",
            "ntp_servers": "192.168.32.3",
            "ssh_enable": true
        },
        "sso": {
            "password": "vSphere8@password",
            "domain_name": "vsphere.local"
        }
    },
    "ceip": {
        "description": {
            "__comments": [
                "++++VMware Customer Experience Improvement Program (CEIP)++++",
                "VMware's Customer Experience Improvement Program (CEIP) ",
                "provides VMware with information that enables VMware to ",
                "improve its products and services, to fix problems, ",
                "and to advise you on how best to deploy and use our ",
                "products. As part of CEIP, VMware collects technical ",
                "information about your organization's use of VMware ",
                "products and services on a regular basis in association ",
                "with your organization's VMware license key(s). This ",
                "information does not personally identify any individual. ",
                "",
                "Additional information regarding the data collected ",
                "through CEIP and the purposes for which it is used by ",
                "VMware is set forth in the Trust & Assurance Center at ",
                "http://www.vmware.com/trustvmware/ceip.html . If you ",
                "prefer not to participate in VMware's CEIP for this ",
                "product, you should disable CEIP by setting ",
                "'ceip_enabled': false. You may join or leave VMware's ",
                "CEIP for this product at any time. Please confirm your ",
                "acknowledgement by passing in the parameter ",
                "--acknowledge-ceip in the command line.",
                "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
            ]
        },
        "settings": {
            "ceip_enabled": false
        }
    }
}

另存為 deploy-on-vcenter.json 配置文件到 files 文件夾,使用以下命令執(zhí)行部署前預(yù)檢查。

F:\vcsa-cli-installer\win32\vcsa-deploy.exe install .\files\deploy-on-vcenter.json --accept-eula --no-ssl-certificate-verification --precheck-only

如果 JSON 配置文件與部署環(huán)境檢查成功,則會(huì)輸出類似下面的內(nèi)容。

[SUCCEEDED] Successfully executed Task 'Precheck ovftool commandline parameters
to deploy a vCenter Server Appliance' in TaskFlow 'deploy-on-vcenter' at
09:05:55
=================================== 09:05:56 ===================================
Result and Log File Information...
WorkFlow log directory:
C:\Users\JUNIOR~1\AppData\Local\Temp\vcsaCliInstaller-2024-08-06-09-05-z39vgzmr\workflow_1722935126586

如果 JSON 配置文件與部署環(huán)境檢查確定沒問題,使用以下命令執(zhí)行正式部署。

F:\vcsa-cli-installer\win32\vcsa-deploy.exe install .\files\deploy-on-vcenter.json --accept-eula --no-ssl-certificate-verification

如果 vCenter Server 部署成功,則會(huì)輸出類似下面的內(nèi)容。

[SUCCEEDED] Successfully executed Task 'Precheck ovftool commandline parameters
to deploy a vCenter Server Appliance' in TaskFlow 'deploy-on-vcenter' at
09:05:55
=================================== 09:05:56 ===================================
Result and Log File Information...
WorkFlow log directory:
C:\Users\JUNIOR~1\AppData\Local\Temp\vcsaCliInstaller-2024-08-06-09-05-z39vgzmr\workflow_1722935126586

登錄 vCenter Server,查看部署情況。

三、部署多個(gè) vCenter Server

前面兩種場景分別是將 vCenter Server 部署到 ESXi 主機(jī)或者現(xiàn)有 vCenter Server 上,針對(duì)前面兩種情況,可能你有同時(shí)部署多個(gè) vCenter Server 環(huán)境的需求,可以將 embedded_vCSA_on_ESXi.json 或者 embedded_vCSA_on_VC.json 配置文件復(fù)制為多個(gè) vCenter Server 的部署配置文件,然后將這些文件放在同一個(gè)文件夾內(nèi)(如 deploy-multiple-vcenter),部署的時(shí)候指定這個(gè)文件夾即可同時(shí)部署多個(gè) vCenter Server 環(huán)境。

如果已經(jīng)配置好了 JSON 配置文件并放在了同一文件夾(如 deploy-multiple-vcenter),使用以下命令執(zhí)行部署前預(yù)檢查。

F:\vcsa-cli-installer\win32\vcsa-deploy.exe install .\files\deploy-multiple-vcenter\ --accept-eula --no-ssl-certificate-verification --precheck-only

如果文件夾中的 JSON 配置文件與部署環(huán)境檢查確定沒問題,使用以下命令執(zhí)行正式部署。

F:\vcsa-cli-installer\win32\vcsa-deploy.exe install .\files\deploy-multiple-vcenter\ --accept-eula --no-ssl-certificate-verification四、部署具有增強(qiáng)型鏈接模式的 vCenter Server

增強(qiáng)型鏈接模式(ELM)就是將環(huán)境中的多個(gè) vCenter Server 實(shí)例鏈接到一起并加入到同一個(gè) SSO 域當(dāng)中,當(dāng)你通過 SSO 管理員登錄到任意一個(gè) vCenter Server 的時(shí)候,可以同時(shí)看到鏈接的其他 vCenter Server,這樣就可以實(shí)現(xiàn)多個(gè) vCenter Server 實(shí)例的統(tǒng)一管理??梢圆榭催@篇(使用cmsso-util命令進(jìn)行鏈接、刪除、修改多個(gè)vCenter Server(VCSA)的SSO域。)文章了解更多關(guān)于增強(qiáng)型鏈接模式 vCenter Server 的相關(guān)配置。

部署具有增強(qiáng)型鏈接模式的 vCenter Server 虛擬機(jī)到 ESXi 主機(jī)上,需要用到 vCenter Server 鏡像文件中的 embedded_vCSA_replication_on_ESXi.json 配置文件,根據(jù)這個(gè)配置文件修改為實(shí)際環(huán)境中的信息,示例如下:

{
    "__version": "2.13.0",
    "__comments": "將具有增強(qiáng)型鏈接模式的 vCenter Server 虛擬機(jī)部署到 ESXi 主機(jī)上",
    "new_vcsa": {
        "esxi": {
            "hostname": "192.168.32.51",
            "username": "root",
            "password": "vSphere8@password",
            "deployment_network": "VM Network",
            "datastore": "Datastore-01"
        },
        "appliance": {
            "__comments": [
                "vCenter Server 部署參數(shù)"
            ],
            "thin_disk_mode": true,
            "deployment_option": "tiny",
            "name": "vcenter03"
        },
        "network": {
            "ip_family": "ipv4",
            "mode": "static",
            "system_name": "vcenter03.mulab.local",
            "ip": "192.168.32.57",
            "prefix": "24",
            "gateway": "192.168.32.254",
            "dns_servers": [
                "192.168.32.3"
            ]
        },
        "os": {
            "password": "vSphere8@password",
            "ntp_servers": "192.168.32.3",
            "ssh_enable": true
        },
        "sso": {
            "password": "vSphere8@password",
            "domain_name": "vsphere.local",
            "first_instance": false,
            "replication_partner_hostname": "vcenter01.mulab.local",
            "sso_port": 443
        }
    },
    "ceip": {
        "description": {
            "__comments": [
                "++++VMware Customer Experience Improvement Program (CEIP)++++",
                "VMware's Customer Experience Improvement Program (CEIP) ",
                "provides VMware with information that enables VMware to ",
                "improve its products and services, to fix problems, ",
                "and to advise you on how best to deploy and use our ",
                "products. As part of CEIP, VMware collects technical ",
                "information about your organization's use of VMware ",
                "products and services on a regular basis in association ",
                "with your organization's VMware license key(s). This ",
                "information does not personally identify any individual. ",
                "",
                "Additional information regarding the data collected ",
                "through CEIP and the purposes for which it is used by ",
                "VMware is set forth in the Trust & Assurance Center at ",
                "http://www.vmware.com/trustvmware/ceip.html . If you ",
                "prefer not to participate in VMware's CEIP for this ",
                "product, you should disable CEIP by setting ",
                "'ceip_enabled': false. You may join or leave VMware's ",
                "CEIP for this product at any time. Please confirm your ",
                "acknowledgement by passing in the parameter ",
                "--acknowledge-ceip in the command line.",
                "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
            ]
        },
        "settings": {
            "ceip_enabled": false
        }
    }
}

另存為 deploy-elm-on-esxi.json 配置文件到 files 文件夾,使用以下命令執(zhí)行部署前預(yù)檢查。

F:\vcsa-cli-installer\win32\vcsa-deploy.exe install .\files\deploy-elm-on-esxi.json --accept-eula --no-ssl-certificate-verification --precheck-only

如果 JSON 配置文件與部署環(huán)境檢查成功,則會(huì)輸出類似下面的內(nèi)容。

[SUCCEEDED] Successfully executed Task 'Precheck ovftool commandline parameters
to deploy a vCenter Server Appliance' in TaskFlow 'deploy-elm-on-esxi' at
09:42:46
=================================== 09:42:46 ===================================
Result and Log File Information...
WorkFlow log directory:
C:\Users\JUNIOR~1\AppData\Local\Temp\vcsaCliInstaller-2024-08-06-09-42-qzp_kn0v\workflow_1722937339642

如果 JSON 配置文件與部署環(huán)境檢查確定沒問題,使用以下命令執(zhí)行正式部署。

F:\vcsa-cli-installer\win32\vcsa-deploy.exe install .\files\deploy-elm-on-esxi.json --accept-eula --no-ssl-certificate-verification

如果 vCenter Server 部署成功,則會(huì)輸出類似下面的內(nèi)容。

Successfully completed VCSA deployment.  VCSA Deployment Start Time:
2024-08-06T09:52:23.624Z VCSA Deployment End Time: 2024-08-06T10:15:36.574Z
 [SUCCEEDED] Successfully executed Task 'MonitorDeploymentTask: Monitoring
Deployment' in TaskFlow 'deploy-elm-on-esxi' at 10:16:03
Monitoring VCSA Deploy task completed
== [START] Start executing Task: Join active domain if necessary at 10:16:04 ==
Domain join task not applicable, skipping task
 [SUCCEEDED] Successfully executed Task 'Running deployment: Domain Join' in
TaskFlow 'deploy-elm-on-esxi' at 10:16:04
 [START] Start executing Task: Provide the login information about new
appliance. at 10:16:05
    Appliance Name: vcenter03
    System Name: vcenter03.mulab.local
    System IP: 192.168.32.57
    Log in as: Administrator@vsphere.local
 [SUCCEEDED] Successfully executed Task 'ApplianceLoginSummaryTask: Provide
appliance login information.' in TaskFlow 'deploy-elm-on-esxi' at 10:16:05
=================================== 10:16:05 ===================================
Result and Log File Information...
WorkFlow log directory:
C:\Users\JUNIOR~1\AppData\Local\Temp\vcsaCliInstaller-2024-08-06-09-44-5l_hhkqk\workflow_1722937468472

登錄 vCenter Server,查看部署情況。

部署具有增強(qiáng)型鏈接模式的 vCenter Server 虛擬機(jī)到現(xiàn)有 vCenter Server 上,需要用到 vCenter Server 鏡像文件中的 embedded_vCSA_replication_on_VC.json 配置文件,根據(jù)這個(gè)配置文件修改為實(shí)際環(huán)境中的信息,示例如下:

{
    "__version": "2.13.0",
    "__comments": "將具有增強(qiáng)型鏈接模式的 vCenter Server 虛擬機(jī)部署到現(xiàn)有 vCenter Server 上",
    "new_vcsa": {
        "vc": {
            "__comments": [
                "'datacenter' must end with a datacenter name, and only with a datacenter name.",
                "'target' must end with an ESXi hostname, a cluster name, or a resource pool name.",
                "The item 'Resources' must precede the resource pool name. ",
                "All names are case-sensitive. ",
                "For details and examples, refer to template help, i.e. vcsa-deploy {install|upgrade|migrate} --template-help"
            ],
            "hostname": "vcsa8-01.mulab.local",
            "username": "administrator@vsphere.local",
            "password": "vSphere8@password",
            "deployment_network": "VM Network",
            "datacenter": [
                "mulab"
            ],
            "datastore": "vsanDatastore",
            "target": [
			    "vsan8-hci-esa"
            ]
        },
        "appliance": {
            "__comments": [
                "vCenter Server 部署參數(shù)"
            ],
            "thin_disk_mode": true,
            "deployment_option": "tiny",
            "name": "vcenter04"
        },
        "network": {
            "ip_family": "ipv4",
            "mode": "static",
            "system_name": "vcenter04.mulab.local",
            "ip": "192.168.32.58",
            "prefix": "24",
            "gateway": "192.168.32.254",
            "dns_servers": [
                "192.168.32.3"
            ]
        },
        "os": {
            "password": "vSphere8@password",
            "ntp_servers": "192.168.32.3",
            "ssh_enable": true
        },
        "sso": {
            "password": "vSphere8@password",
            "domain_name": "vsphere.local",
            "first_instance": false,
            "replication_partner_hostname": "vcenter02.mulab.local",
            "sso_port": 443
        }
    },
    "ceip": {
        "description": {
            "__comments": [
                "++++VMware Customer Experience Improvement Program (CEIP)++++",
                "VMware's Customer Experience Improvement Program (CEIP) ",
                "provides VMware with information that enables VMware to ",
                "improve its products and services, to fix problems, ",
                "and to advise you on how best to deploy and use our ",
                "products. As part of CEIP, VMware collects technical ",
                "information about your organization's use of VMware ",
                "products and services on a regular basis in association ",
                "with your organization's VMware license key(s). This ",
                "information does not personally identify any individual. ",
                "",
                "Additional information regarding the data collected ",
                "through CEIP and the purposes for which it is used by ",
                "VMware is set forth in the Trust & Assurance Center at ",
                "http://www.vmware.com/trustvmware/ceip.html . If you ",
                "prefer not to participate in VMware's CEIP for this ",
                "product, you should disable CEIP by setting ",
                "'ceip_enabled': false. You may join or leave VMware's ",
                "CEIP for this product at any time. Please confirm your ",
                "acknowledgement by passing in the parameter ",
                "--acknowledge-ceip in the command line.",
                "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
            ]
        },
        "settings": {
            "ceip_enabled": false
        }
    }
}

另存為 deploy-elm-on-vcenter.json 配置文件到 files 文件夾,使用以下命令執(zhí)行部署前預(yù)檢查。

F:\vcsa-cli-installer\win32\vcsa-deploy.exe install .\files\deploy-elm-on-vcenter.json --accept-eula --no-ssl-certificate-verification --precheck-only

如果 JSON 配置文件與部署環(huán)境檢查成功,則會(huì)輸出類似下面的內(nèi)容。

[SUCCEEDED] Successfully executed Task 'Precheck ovftool commandline parameters
to deploy a vCenter Server Appliance' in TaskFlow 'deploy-elm-on-vcenter' at
09:55:12
=================================== 09:55:13 ===================================
Result and Log File Information...
WorkFlow log directory:
C:\Users\JUNIOR~1\AppData\Local\Temp\vcsaCliInstaller-2024-08-06-09-54-lps7j7v1\workflow_1722938084996

如果 JSON 配置文件與部署環(huán)境檢查確定沒問題,使用以下命令執(zhí)行正式部署。

F:\vcsa-cli-installer\win32\vcsa-deploy.exe install .\files\deploy-elm-on-vcenter.json --accept-eula --no-ssl-certificate-verification

如果 vCenter Server 部署成功,則會(huì)輸出類似下面的內(nèi)容。

[SUCCEEDED] Successfully executed Task 'Precheck ovftool commandline parameters
to deploy a vCenter Server Appliance' in TaskFlow 'deploy-elm-on-vcenter' at
09:55:12
=================================== 09:55:13 ===================================
Result and Log File Information...
WorkFlow log directory:
C:\Users\JUNIOR~1\AppData\Local\Temp\vcsaCliInstaller-2024-08-06-09-54-lps7j7v1\workflow_1722938084996

登錄 vCenter Server,查看部署情況。

部署具有增強(qiáng)型鏈接模式 vCenter Server 的時(shí)候,可能大部分情況是環(huán)境中已經(jīng)有第一個(gè) vCenter Server 了,然后再使用上面所述的方式部署第二個(gè) vCenter Server 并將其鏈接到第一個(gè) vCenter Server 中。其實(shí),如果環(huán)境中沒有第一個(gè) vCenter Server 的時(shí)候,也可以同時(shí)部署增強(qiáng)型鏈接模式的 vCenter Server,比如,deploy-vcenter01-on-esxi.json 配置文件用于部署第一個(gè) vCenter Server,deploy-vcenter01-elm-on-esxi.json 配置文件用于部署具有增強(qiáng)型鏈接模式的第二個(gè) vCenter Server,將這兩個(gè) JSON 配置文件放在同一文件夾中,在部署的時(shí)候指定這個(gè)文件夾,這樣 CLI 部署完第一個(gè) vCenter Server 后,然后當(dāng)?shù)诙€(gè) vCenter Server 部署的時(shí)候就會(huì)自動(dòng)鏈接到第一個(gè) vCenter Server 中去。

五、將 vCenter Server 虛擬機(jī)部署到 ESXi 主機(jī)上并配置單節(jié)點(diǎn) vSAN ESA 集群

對(duì)于初始構(gòu)建 vSphere 環(huán)境的用戶來說,可能 ESXi 主機(jī)安裝部署以后,想直接將 ESXi 主機(jī)應(yīng)用于 vSAN 環(huán)境,同時(shí)又想將 vSAN 存儲(chǔ)用于承載 vCenter Server。如果使用以上所述場景,部署 vCenter Server 的前提是環(huán)境中必須具有用于存放 vCenter Server 的本地/共享存儲(chǔ),但是,VMware 這里提供了一種方式,在部署 vCenter Server 之前,可以直接將初始安裝的 ESXi 主機(jī)轉(zhuǎn)換成 vSAN 集群的第一臺(tái)主機(jī),這樣配置為單節(jié)點(diǎn) vSAN 集群后,再將配置后的 vSAN 存儲(chǔ)用于承載 vCenter Server 虛擬機(jī)所使用的存儲(chǔ)。如果是這樣,就不用單獨(dú)先配置 ESXi 主機(jī)的本地/共享存儲(chǔ)用于部署 vCenter Server 了,這也是 VMware 很多解決方案所使用的方式,比如 VMware Cloud Foundation。

將 vCenter Server 虛擬機(jī)部署到 ESXi 主機(jī)上并配置單節(jié)點(diǎn) vSAN ESA 集群,需要用到 vCenter Server 鏡像文件中的 vCSA_with_cluster_on_ESXi.json 配置文件,根據(jù)這個(gè)配置文件修改為實(shí)際環(huán)境中的信息,示例如下:

{
    "__version": "2.13.0",
    "__comments": "將 vCenter Server 虛擬機(jī)部署到 ESXi 主機(jī)上并配置單節(jié)點(diǎn) vSAN ESA 集群",
    "new_vcsa": {
        "esxi": {
            "hostname": "esxi.mulab.local",
            "username": "root",
            "password": "vSphere8@password",
            "deployment_network": "VM Network",
            "VCSA_cluster": {
                "__comments": [
                    "Optional section. You must provide this option if you want to create the vSAN bootstrap cluster"
                ],
                "datacenter": "datacenter",
                "cluster": "vsan-esa",
                "compression_only": false,
                "deduplication_and_compression": false,
                "enable_vlcm": true,
                "enable_vsan_esa": true,
                "storage_pool": {
                    "single_tier": [
                        "0654f79de904b1744a000c29669162b236",
                        "063ec1878a6b90d657000c296a1c16f648"
                    ]
                },
                "vsan_hcl_database_path": "all.json"
            }
        },
        "appliance": {
            "__comments": [
                "vCenter Server 部署參數(shù)"
            ],
            "thin_disk_mode": true,
            "deployment_option": "small",
            "name": "vcenter"
        },
        "network": {
            "ip_family": "ipv4",
            "mode": "static",
            "ip": "192.168.32.50",
            "dns_servers": [
                "192.168.32.3"
            ],
            "prefix": "24",
            "gateway": "192.168.32.254",
            "system_name": "vcenter.mulab.local"
        },
        "os": {
            "password": "vSphere8@password",
            "ntp_servers": "192.168.32.3",
            "ssh_enable": true
        },
        "sso": {
            "password": "vSphere8@password",
            "domain_name": "vsphere.local"
        }
    },
    "ceip": {
        "description": {
            "__comments": [
                "++++VMware Customer Experience Improvement Program (CEIP)++++",
                "VMware's Customer Experience Improvement Program (CEIP) ",
                "provides VMware with information that enables VMware to ",
                "improve its products and services, to fix problems, ",
                "and to advise you on how best to deploy and use our ",
                "products. As part of CEIP, VMware collects technical ",
                "information about your organization's use of VMware ",
                "products and services on a regular basis in association ",
                "with your organization's VMware license key(s). This ",
                "information does not personally identify any individual. ",
                "",
                "Additional information regarding the data collected ",
                "through CEIP and the purposes for which it is used by ",
                "VMware is set forth in the Trust & Assurance Center at ",
                "http://www.vmware.com/trustvmware/ceip.html . If you ",
                "prefer not to participate in VMware's CEIP for this ",
                "product, you should disable CEIP by setting ",
                "'ceip_enabled': false. You may join or leave VMware's ",
                "CEIP for this product at any time. Please confirm your ",
                "acknowledgement by passing in the parameter ",
                "--acknowledge-ceip in the command line.",
                "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
            ]
        },
        "settings": {
            "ceip_enabled": false
        }
    }
}

JSON 配置文件中,關(guān)于 ESXi 主機(jī)用于 vSAN 存儲(chǔ)池的硬盤信息可以在下圖所示的地方獲取。注意,由于是部署 vSAN ESA 環(huán)境,需要下載 vSAN HCL 文件到本地,并將文件的路徑填入到對(duì)應(yīng)的 JSON 配置文件當(dāng)中,當(dāng)前部署環(huán)境將 vSAN HCL 文件放在了運(yùn)行 CLI 命令的當(dāng)前目錄(C:\Users\JUNIOR_MU\)。

另存為 deploy-on-esxi-with-vsan-esa.json 配置文件到 files 文件夾,使用以下命令執(zhí)行部署前預(yù)檢查。

F:\vcsa-cli-installer\win32\vcsa-deploy.exe install .\files\deploy-on-esxi-with-vsan-esa.json --accept-eula --no-ssl-certificate-verification --precheck-only

如果 JSON 配置文件與部署環(huán)境檢查成功,則會(huì)輸出類似下面的內(nèi)容。

[SUCCEEDED] Successfully executed Task 'Running Pre-check: vSAN Cluster Health
Checks.' in TaskFlow 'install' at 10:53:30
Running Pre-check: vSphere vLCM Cluster Enablement.
 [START] Start executing Task: Running Pre-check for vSphere vLCM Cluster
Enablement. at 10:53:30
 [SUCCEEDED] Successfully executed Task 'Running Pre-check: vSphere vLCM Cluster
Enablement.' in TaskFlow 'install' at 10:53:30
 [SUCCEEDED] Successfully executed Task 'PrecheckTask: Running prechecks.' in
TaskFlow 'deploy-on-esxi-with-vsan-esa' at 10:53:30
vcsa-deploy execution successfully completed, workflow log dir:
C:\Users\JUNIOR~1\AppData\Local\Temp\vcsaCliInstaller-2024-08-06-10-52-j1nef3kt\workflow_1722941536363
=================================== 10:53:31 ===================================
Result and Log File Information...
WorkFlow log directory:
C:\Users\JUNIOR~1\AppData\Local\Temp\vcsaCliInstaller-2024-08-06-10-52-j1nef3kt\workflow_1722941536363

如果 JSON 配置文件與部署環(huán)境檢查確定沒問題,使用以下命令執(zhí)行正式部署。

F:\vcsa-cli-installer\win32\vcsa-deploy.exe install .\files\deploy-on-esxi-with-vsan-esa.json --accept-eula --no-ssl-certificate-verification

如果 vCenter Server 部署成功,則會(huì)輸出類似下面的內(nèi)容。

Successfully completed VCSA deployment.  VCSA Deployment Start Time:
2024-08-06T11:12:39.139Z VCSA Deployment End Time: 2024-08-06T11:31:05.857Z
 [SUCCEEDED] Successfully executed Task 'MonitorDeploymentTask: Monitoring
Deployment' in TaskFlow 'deploy-on-esxi-with-vsan-esa' at 11:31:19
Monitoring VCSA Deploy task completed
== [START] Start executing Task: Join active domain if necessary at 11:31:20 ==
Domain join task not applicable, skipping task
 [SUCCEEDED] Successfully executed Task 'Running deployment: Domain Join' in
TaskFlow 'deploy-on-esxi-with-vsan-esa' at 11:31:20
==== [START] Start executing Task: Creating the new datacenter. at 11:31:21 ====
The certificate of server 'vcenter.mulab.local' will not be verified because you
have provided either the '--no-ssl-certificate-verification' or
'--no-esx-ssl-verify' command parameter, which disables verification for all
certificates. Remove this parameter from the command line if you want server
certificates to be verified.
 [SUCCEEDED] Successfully executed Task 'Running Datacenter Creation: Creating
the new datacenter for vSphere vLCM managed cluster.' in TaskFlow
'deploy-on-esxi-with-vsan-esa' at 11:31:23
 [START] Start executing Task: Creating vSphere vLCM managed cluster. at
11:31:24
Enabling vLCM Cluster creation task on vcenter.mulab.local
Running ExecuteClusterHostSeedingWorkflow...
 [SUCCEEDED] Successfully executed Task 'Running vSphere vLCM: Creating vSphere
vLCM managed cluster.' in TaskFlow 'deploy-on-esxi-with-vsan-esa' at 11:35:44
 [START] Start executing Task: Provide the login information about new
appliance. at 11:35:45
    Appliance Name: vcenter
    System Name: vcenter.mulab.local
    System IP: 192.168.32.50
    Log in as: Administrator@vsphere.local
Your vCenter Server Appliance is deployed on a vSAN cluster. However this
one-host cluster must be further configured in order to provide the full
benefits of a vSAN cluster.
vSAN Configuration Instructions
1.       Add additional hosts to the vSAN cluster (a minimum of two).
2.       Complete the required configuration of the vSAN cluster.
3.       Apply the correct VM Storage Policy to the vCenter Server Appliance.
 [SUCCEEDED] Successfully executed Task 'ApplianceLoginSummaryTask: Provide
appliance login information.' in TaskFlow 'deploy-on-esxi-with-vsan-esa' at
11:35:45
=================================== 11:35:46 ===================================
Result and Log File Information...
WorkFlow log directory:
C:\Users\JUNIOR~1\AppData\Local\Temp\vcsaCliInstaller-2024-08-06-11-00-u9zayc8j\workflow_1722942009531

登錄 vCenter Server,查看部署情況。

當(dāng)前是單節(jié)點(diǎn) vSAN 集群,需要增加 ESXi 主機(jī)以滿足 vSAN 集群最少主機(jī)要求(3臺(tái))。

vSAN 存儲(chǔ)容量以及當(dāng)前默認(rèn)存儲(chǔ)策略配置。

vSAN ESA 集群 ESXi 主機(jī)磁盤配置。

vSAN ESA 集群 ESXi 主機(jī)網(wǎng)絡(luò)配置,需要添加配置用于 vSAN 流量的 vmkernel 網(wǎng)卡。

配置好完整的 vSAN 集群后,請(qǐng)將 vCenter Server 的策略調(diào)整為 vSAN 存儲(chǔ)策略。

到此這篇關(guān)于vCenter Server 的 CLI 部署方式的文章就介紹到這了,更多相關(guān)vCenter Server 的 CLI 部署內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評(píng)論