為從 ISO 建立的 Azure 版本虛擬機器啟用熱補丁
重點
- 熱補丁允許在不重新啟動的情況下進行安全更新,從而延長伺服器的正常運作時間。
- 正確的登錄配置對於啟用 Hotpatch 至關重要。
- 安裝驗證對於確保 Hotpatch 設定成功至關重要。
釋放 Azure 版本 VM 中熱補丁的強大功能
在本指南中,我們將探討如何在使用 ISO 建置的 Azure 版本虛擬機器上啟用熱補丁,以確保無縫更新和增強可用性。
什麼是 Azure 版本熱補丁?
Azure 版熱修補程式是一項無需重新啟動伺服器即可套用安全性更新的功能。此功能對於維持持續的服務可用性、提高營運安全性和加快更新流程至關重要。
如何為 Azure 版本虛擬機器啟用熱補丁
步驟 1: 配置基於虛擬化的安全性
首先,您需要啟用基於虛擬化的安全性。在 PowerShell 中執行以下命令:
$registryPath = "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" $parameters = @{ Path = $registryPath Name = "EnableVirtualizationBasedSecurity" Value = "0x1" Force = $True PropertyType = "DWORD" } New-ItemProperty @parameters
專業提示: 在變更系統註冊表時,請務必確保您具有管理權限。
步驟 2: 定義熱補丁表大小
重新啟動後,透過執行以下命令來設定熱補丁表所需的大小:
$registryPath = "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" $parameters = @{ Path = $registryPath Name = "HotPatchTableSize" Value = "0x1000" Force = $True PropertyType = "DWORD" } New-ItemProperty @parameters
步驟 3: 為 Hotpatch 設定 Windows 更新端點
輸入以下命令為 Hotpatch 準備 Windows 更新端點:
$registryPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Update\TargetingInfo\DynamicInstalled\Hotpatch.amd64" $nameParameters = @{ Path = $registryPath Name = "Name" Value = "Hotpatch Enrollment Package" Force = $True } $versionParameters = @{ Path = $registryPath Name = "Version" Value = "10.0.20348.1129" Force = $True } New-Item $registryPath -Force New-ItemProperty @nameParameters New-ItemProperty @versionParameters
步驟 4: 下載並安裝熱補丁服務包
使用以下命令下載 Hotpatch 服務包:
$parameters = @{ Source = "https://go.microsoft.com/fwlink/?linkid=2211714" Destination = ".\KB5003508.msu" } Start-BitsTransfer @parameters
然後,安裝該套件:
wusa.exe.\KB5003508.msu
步驟 5: 驗證熱補丁安裝
最後,透過執行以下命令確認熱補丁的安裝:
Get-HotFix | Where-Object { $_. HotFixID -eq "KB5003508" }
概括
在 Azure 版本 VM 上成功啟用 Hotpatch 可以無縫安裝安全性更新,從而保持較高的正常運行時間和系統完整性。遵循上述步驟可確保您的環境安全並有效管理。
結論
透過遵循本指南,您可以利用 Hotpatch 功能,從而確保您的 Azure 版 VM 安全性並符合最新更新,而不會造成不必要的停機。採用熱補丁來提高伺服器效能和可用性。
FAQ(常見問題)
如果我找不到 Hotpatch 選項怎麼辦?
確保您的 Windows Server 版本支援 Hotpatch。另外,請驗證註冊表中的配置。
使用 Hotpatch 有什麼先決條件嗎?
您必須擁有 Windows Server 2022 的 Azure Edition 版本並啟用 Active Directory 環境才能讓熱修補有效運作。