首页 > 系统相关 >VMware vSphere Tanzu部署_04_vCenter管理esxi并迁移网卡到DSwitch

VMware vSphere Tanzu部署_04_vCenter管理esxi并迁移网卡到DSwitch

时间:2024-07-03 15:31:26浏览次数:20  
标签:vSphere Tanzu Name Get Server 网卡 Host vc New

本次操作采用powershell来进行操作

1.安装powershell和VM插件

1.1. 安装powershell

1.2. 安装vm组件

  • 在cmd内输入pwsh后,输入:Install-Module -Name VMware.PowerCLI -Scope CurrentUser 进行组件安装
Install-Module -Name VMware.PowerCLI -Scope CurrentUser

2.配置脚本

2.1.配置管理脚本

# vcenter信息
$VCSAHostname = "192.168.201.10"
# vcenter账号
$VCSAUsername = "[email protected]"
# vcenter密码
$VCSAPassword = "VMware1!VMware1!"
# 将要创建的数据中心名
$DatacenterName = "Datacenter"
# 存储磁盘名
$DatastoreName = "datastore"
# 将要创建的集群名
$ClusterName = "Tanzu-Cluster"
# esxi信息
$ESXiHostname = "192.168.201.11"
# esxi密码
$ESXiPassword = "VMware1!VMware1!"
# 设置的vDS交换机名称
$VDSName = "DSwitch"
# 创建的vDS虚拟
$VDSManagementPG = "management"
$VDSFrontendPG = "frontend"
$VDSWorkloadPG = "workload"
# tanzi存储策略名称和tag
$StoragePolicyName = "tanzu-storage-policy"
$StoragePolicyCategory = "workloadtype"
$StoragePolicyTag = "tanzu"

$vc = Connect-VIServer $VCSAHostname -User $VCSAUsername -Password $VCSAPassword

Write-Host "Disabling Network Rollback for 1-NIC VDS ..."
Get-AdvancedSetting -Entity $vc -Name "config.vpxd.network.rollback" | Set-AdvancedSetting -Value false -Confirm:$false

Write-Host "Creating vSphere Datacenter ${DatacenterName} ..."
New-Datacenter -Server $vc -Name $DatacenterName -Location (Get-Folder -Type Datacenter -Server $vc)

Write-Host "Creating vSphere Cluster ${ClusterName} ..."
New-Cluster -Server $vc -Name $ClusterName -Location (Get-Datacenter -Name $DatacenterName -Server $vc) -DrsEnabled -HAEnabled

Write-Host "Disabling Network Redudancy Warning ..."
(Get-Cluster -Server $vc $ClusterName) | New-AdvancedSetting -Name "das.ignoreRedundantNetWarning" -Type ClusterHA -Value $true -Confirm:$false

Write-Host "Adding ESXi host ${ESXiHostname} ..."
Add-VMHost -Server $vc -Location (Get-Cluster -Name $ClusterName) -User "root" -Password $ESXiPassword -Name $ESXiHostname -Force

Write-Host "Creating Distributed Virtual Switch ${VDSName} ..."
New-VDSwitch -Server $vc -Name $VDSName -Location (Get-Datacenter -Name $DatacenterName) -NumUplinkPorts 1

# 创建vds接口,且设置的端口类型是临时端口
Write-Host "Creating Distributed Portgroup ${VDSManagementPG},${VDSFrontendPG}, ${VDSWorkloadPG} and ${VDSVMNetworkPG} ..."
New-VDPortgroup -Server $vc -Name $VDSManagementPG -Vds (Get-VDSwitch -Server $vc -Name $VDSName) -PortBinding Ephemeral
New-VDPortgroup -Server $vc -Name $VDSFrontendPG -Vds (Get-VDSwitch -Server $vc -Name $VDSName) -PortBinding Ephemeral
New-VDPortgroup -Server $vc -Name $VDSWorkloadPG -Vds (Get-VDSwitch -Server $vc -Name $VDSName) -PortBinding Ephemeral

Write-Host "Creating vSphere Tag Category `"${StoragePolicyCategory}`" and vSphere Tag `"${StoragePolicyTag}`" for Storage Policy `"${StoragePolicyName}`" ... "
New-TagCategory -Server $vc -Name $StoragePolicyCategory -Cardinality single -EntityType Datastore
New-Tag -Server $vc -Name $StoragePolicyTag -Category $StoragePolicyCategory
Get-Datastore -Server $vc -Name $DatastoreName | New-TagAssignment -Server $vc -Tag $StoragePolicyTag
New-SpbmStoragePolicy -Server $vc -Name $StoragePolicyName -AnyOfRuleSets (New-SpbmRuleSet -Name "tanzu-ruleset" -AllOfRules (New-SpbmRule -AnyOfTags (Get-Tag $StoragePolicyTag)))

2.2.执行配置管理脚本

  • 在cmd内输入pwsh后,找到ps1脚本直接运行

3.迁移vswitch到DSwitch

3.1. 迁移vswitch到DSwitch

  • 在DSwitch在添加esxi主机


  • 将vmnic0接口分配给DSwitch

  • 设置vmk0的网络为management



3.2. 设置vcenter虚拟机网卡为vds网络

  • 登录esxi系统,手动进行虚拟网卡的修改

标签:vSphere,Tanzu,Name,Get,Server,网卡,Host,vc,New
From: https://www.cnblogs.com/amsilence/p/18281718

相关文章

  • VMware vSphere Tanzu部署_03_vCenter部署
    vCenter部署部署vCenter通过安装ISO内的webui工具进行vCenter虚机部署配置部署位置为ESXI机器配置部署规格为tiny模式配置vcsa部署的磁盘类型为精简模式配置vcsa的网络初始化vCenter配置vcsa开启ntp同步和开启SSH登录配置vsphere登录账号和登录......
  • VMware vSphere Tanzu部署_02_ESXI系统安装
    ESX系统安装设置虚拟闪存占用为8G安装ESXI7.0时,默认会占用128G的VMFSL虚拟闪存大小,侵占磁盘空间。可以在安装过程中按shift+字母o键,添加使用参数:autoPartitionOSDataSize=8192安装系统配置网络......
  • VMware vSphere Tanzu部署_01_Tanzu架构设计
    想写关于vspherewithtanzu系列的文章,想了很久,墨迹到现在才才想好整体的文章架构和实验的资源信息在这里感谢williamlam,因为它的文章,我才得以用32GB的机器来搭建Tanzu集群参考文档:https://williamlam.com/2020/11/complete-vsphere-with-tanzu-homelab-with-just-32gb-of-me......
  • VMware ESXi 8.0U3 macOS Unlocker & OEM BIOS ConnectX-3 网卡定制版 (集成驱动版)
    VMwareESXi8.0U3macOSUnlocker&OEMBIOSConnectX-3网卡定制版(集成驱动版)VMwareESXi8.0U3macOSUnlocker&OEMBIOS集成网卡驱动和NVMe驱动(集成驱动版)发布ESXi8.0U3集成驱动版,在个人电脑上运行企业级工作负载请访问原文链接:https://sysin.org/blog/vmwa......
  • VMware ESXi 8.0U3 macOS Unlocker & OEM BIOS 集成网卡驱动 Marvell AQC 网卡定制版
    VMwareESXi8.0U3macOSUnlocker&OEMBIOS集成网卡驱动MarvellAQC网卡定制版VMwareESXi8.0U3macOSUnlocker&OEMBIOS集成网卡驱动和NVMe驱动(集成驱动版)发布ESXi8.0U3集成驱动版,在个人电脑上运行企业级工作负载请访问原文链接:https://sysin.org/bl......
  • Centos双网卡冗余绑定
    1.前言关于双网卡绑定,前前后后踩过不少的坑,虽然这是RHCE中的一道题,但是在实践中碰到问题也够喝一壶的。在实践中,虚拟机、物理机都做过,但是不尽相同,大部分的坑也集中在这里,本文长期更新关于网卡绑定中遇到的问题及处理方法。现在的服务器默认都配备4张千兆网卡,在生产环境......
  • VMware ESXi 8.0U3 macOS Unlocker & OEM BIOS 集成网卡驱动 Marvell AQC 网卡定制版
    VMwareESXi8.0U3macOSUnlocker&OEMBIOS集成网卡驱动MarvellAQC网卡定制版VMwareESXi8.0U3macOSUnlocker&OEMBIOS集成网卡驱动和NVMe驱动(集成驱动版)发布ESXi8.0U3集成驱动版,在个人电脑上运行企业级工作负载请访问原文链接:https://sysin.org/blog/vmw......
  • linux下打满网卡的带宽和影响打满网卡的原因
     1.打满网卡带宽的定义网络传输场景很多,咱们这里用一个最常见的场景:客户端发送数据,服务端接收数据,所以这里给一个打满的定义:使用监控软件发现客户端的上行和服务端的下载带宽用满 2.测试软件客户端://ClientsideCprogramtodemonstrateSocket//programming#inc......
  • VMware ESXi 8.0U3 macOS Unlocker & OEM BIOS 集成网卡驱动和 NVMe 驱动 (集成驱动版
    VMwareESXi8.0U3macOSUnlocker&OEMBIOS集成网卡驱动和NVMe驱动(集成驱动版)发布ESXi8.0U3集成驱动版,在个人电脑上运行企业级工作负载请访问原文链接:https://sysin.org/blog/vmware-esxi-8-u3-sysin/,查看最新版。原创作品,转载请保留出处。作者主页:sysin.org......
  • Centos7.5删除virbr0网卡
    1.ifconfig查看linux网卡ip[root@localhost~]#ifconfigens33:flags=4163<UP,BROADCAST,RUNNING,MULTICAST>mtu1500inet192.168.44.128netmask255.255.255.0broadcast192.168.44.255inet6fe80::27ec:9128:8fca:ee44prefixlen64scopeid0x20<link>ether0......