mportant; font-size: 1rem; word-break: break-all; color: rgb(51, 51, 51); line-height: 1.74; max-width: 100%;">

系统环境如下:

OS: windows server 2022 Core DataCenter

DB: Sql Server 2022 with CU5

ADK: Windows 11 版本 22H2 的 ADK:  https://learn.microsoft.com/zh-cn/windows-hardware/get-started/adk-install

1.安装sqlserver 2022:

 d:\setup.exe /Q  /action=install /features=SQLEngine /INSTANCEDIR="C:\Program Files\Microsoft SQL Server" /SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS" /INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server" /INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server" /INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT="y\sqladmin" /SQLSVCPASSWORD="***#2009" /SQLSYSADMINACCOUNTS="BUILTIN\Administrators" "y\scadmin" "y\ykxadmin" "y\sqladmin" /SQLSVCPASSWORD="***#2009"  /AGTSVCACCOUNT="y\sqladmin" /AGTSVCPASSWORD="***#2009" /AGTSVCSTARTUPTYPE="Automatic" /BROWSERSVCSTARTUPTYPE="Automatic" /NPENABLED="1"  /TCPENABLED="1" /skiprules=servercoreblockunsupportedfeaturescheck   /iacceptsqlserverlicenseterms /IACCEPTROPENLICENSETERMS

Install-Module -Name sqlserver -Scope AllUsers -Force

在WinServer 2022 Core 上安装SCVMM2022和SqlServer2022_SCVMM 2022

 Invoke-SqlCmd -query "select @@version" -ServerInstance "localhost" -Encrypt Optional |fl

在WinServer 2022 Core 上安装SCVMM2022和SqlServer2022_Win Server Core 2022_02

安装更新:

 D:\SQLServer2022-KB5026806-x64-CU5.exe /qs /IAcceptSQLServerLicenseTerms /Actinotallow=Patch /INSTANCENAME="MSSQLSERVER"

在WinServer 2022 Core 上安装SCVMM2022和SqlServer2022_SQLSERVER 2022_03

2.安装ADK:

MD C:\ADK

D:\ADK\adksetup.exe /quiet /installpath C:\ADK /features OptionId.DeploymentTools

在WinServer 2022 Core 上安装SCVMM2022和SqlServer2022_SQLSERVER 2022_04

 Get-CimInstance -ClassName Win32_Product |select Name

在WinServer 2022 Core 上安装SCVMM2022和SqlServer2022_SQLSERVER 2022_05

 D:\ADKWinPEAddons\adkwinpesetup.exe /quiet /installpath C:\ADK /features OptionId.WindowsPreinstallationEnvironment /forcerestart

在WinServer 2022 Core 上安装SCVMM2022和SqlServer2022_Win Server Core 2022_06

3.配置服务帐户和分布式密钥管理 

新建域账号:vmmsvc

在WinServer 2022 Core 上安装SCVMM2022和SqlServer2022_Win Server Core 2022_07


新建容器:vmmdkm

在WinServer 2022 Core 上安装SCVMM2022和SqlServer2022_SQLSERVER 2022_08


将y\vmmsvc 域账号加入本地管理员组:

Net localgroup Administrators y\vmmsvc /add

Get-LocalGroupMember Administrators

在WinServer 2022 Core 上安装SCVMM2022和SqlServer2022_Win Server Core 2022_09

新建配置文件:C:\VMServer.ini

[OPTIONS]

ProductKey=BXH69-M62YX-QQD6R-3GPWX-8WMFY

UserName=ICT

CompanyName=MSFT

ProgramFiles=C:\Program Files\Microsoft system Center 2022\Virtual Machine Manager

CreateNewSqlDatabase=1

SqlInstanceName=MSSQLSERVER

SqlDatabaseName=DB_VMM2022

RemoteDatabaseImpersonation=1

SqlMachineName=SCVMM

IndigoTcpPort=8100

IndigoHTTPSPort=8101

IndigoNETTCPPort=8102

IndigoHTTPPort=8103

WSManTcpPort=5985

BitsTcpPort=4443

CreateNewLibraryShare=1

LibraryShareName=MSSCVMMLibrary

LibrarySharePath=C:\MSSCVMMLibrary

LibraryShareDescription=Virtual Machine Manager Library Files

SQMOptIn=0

MUOptIn=0

VmmServiceLocalAccount=0  

TopContainerName=CN=VMMDKM,OU=SCVMM,DC=artingykx,DC=com

HighlyAvailable=0

VmmServerName=SCVMM

在WinServer 2022 Core 上安装SCVMM2022和SqlServer2022_SCVMM 2022_10

MD C:\MSSCVMMLibrary

在WinServer 2022 Core 上安装SCVMM2022和SqlServer2022_SQLSERVER 2022_11


4.安VMM:

 d:\Setup.exe /server /i /f C:\VMServer.ini /SqlDBAdminDomain y /SqlDBAdminName sqladmin /SqlDBAdminPassword ***#2009 /VmmServiceDomain y /VmmServiceUserName vmmsvc /VmmServiceUserPassword ***#2009 /IACCEPTSCEULA

在WinServer 2022 Core 上安装SCVMM2022和SqlServer2022_Win Server Core 2022_12

注意:密码不能包含 &,<<等特殊字符。

如果安装程序未成功完成,请查阅 %SYSTEMDRIVE%\ProgramData\VMMLogs 文件夹中的 日志文件。 ProgramData 为隐藏文件夹

在WinServer 2022 Core 上安装SCVMM2022和SqlServer2022_Win Server Core 2022_13

在WinServer 2022 Core 上安装SCVMM2022和SqlServer2022_SCVMM 2022_14

最后确定VMM服务是否正常运行:

Get-Service *VMM* |ft -AutoSize

在WinServer 2022 Core 上安装SCVMM2022和SqlServer2022_Win Server Core 2022_15

5.安装VMM更新:

安装更新前版本:

在WinServer 2022 Core 上安装SCVMM2022和SqlServer2022_Win Server Core 2022_16

安装更新UR1:kb5019202

msiexec.exe /update D:\updates\UR1\kb5019202_vmmserver_amd64.msp

在WinServer 2022 Core 上安装SCVMM2022和SqlServer2022_Win Server Core 2022_17

在WinServer 2022 Core 上安装SCVMM2022和SqlServer2022_SQLSERVER 2022_18

在WinServer 2022 Core 上安装SCVMM2022和SqlServer2022_SQLSERVER 2022_19

在WinServer 2022 Core 上安装SCVMM2022和SqlServer2022_SQLSERVER 2022_20

更新完后版本变化:

在WinServer 2022 Core 上安装SCVMM2022和SqlServer2022_SCVMM 2022_21