如何為從 ISO 建置的 Azure 版本虛擬機器啟用 Hotpatch

如何為從 ISO 建置的 Azure 版本虛擬機器啟用 Hotpatch

安裝 Windows Server 2022 Datacenter: Azure Edition 的 Hotpatch 時,無需重新啟動即可安裝安全性更新。它可以與桌面體驗和伺服器核心一起使用。在本文中,我們將了解如何為為 ISO 建置的 Azure 版本虛擬機器啟用 Hotpatch。

什麼是 Azure 版本熱補丁?

Azure 版熱修補程式的目的是允許安裝安全性更新而無需重新啟動伺服器,以確保伺服器的高可用性。它還有其他一些好處,包括更安全的環境和更快的更新。

$registryPath = "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" $parameters = $parameters = @{ Path = $registryPath Name = "EnableVirtualizationBasedSecurity" Value = "0x1" Force = $True PropertyType = "DWORD" } New-ItemProperty @parameters

現在您可以重新啟動電腦。電腦啟動後,執行以下命令來設定熱補丁表大小。

$registryPath = "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" $parameters = $parameters = @{ Path = $registryPath Name = "HotPatchTableSize" Value = "0x1000" Force = $True PropertyType = "DWORD" } New-ItemProperty @parameters

最後,我們需要執行以下命令來設定Hotpatch的Windows Update端點

$registryPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Update\TargetingInfo\DynamicInstalled\Hotpatch.amd64" $nameParameters = $parameters = @{ Path = $registryPath Name = "Name" Value = "Hotpatch Enrollment Package" Force = $True } $versionParameters = $parameters = @{ Path = $registryPath Name = "Version" Value = "10.0.20348.1129" Force = $True } New-Item $registryPath -Force New-ItemProperty @nameParameters New-ItemProperty @versionParameters

設定完Hotpatch註冊表後,我們需要安裝它。

下載並安裝 Hotpatch 服務包

最後,我們需要下載並安裝Hotpatch服務套件。但是,為此,您需要從 Microsoft 更新目錄下載 Microsoft 更新獨立套件 KB5003508 並將其複製到您的電腦。為此,請運行下面提到的命令。

$parameters = @{ Source = "https://go.microsoft.com/fwlink/?linkid=2211714" Destination = ".\KB5003508.msu" } Start-BitsTransfer @parameters

為從 ISO 建置的 Azure 版本虛擬機器啟用 Hotpatch

現在,我們需要安裝剛下載的軟體包,為此,執行以下命令。

wusa.exe. \KB5003508.msu

若要驗證軟體包是否已安裝,請執行下面提到的命令。

Get-HotFix | Where-Object {$_.HotFixID -eq "KB5003508"}

就是這樣!你的工作完成了。

如何將 ISO 檔案附加到 Azure VM?

您無法從 ISO 檔案建立 Azure VM。您只能從 VHD、託管磁碟或託管磁碟映像/快照建立 VM。如果要在 Azure 中使用此 ISO,則需要在本機上使用 HyperV 之類的工具來建立 VM、匯出 VHD 並將其上傳到 Azure。

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *