深圳 公司网站建设,软件网站怎么做,北京网站建设方案书,vue vs wordpressAzure上云主机的windows2008系统需要进行就地升级。 按着微软的升级路径#xff1a;win2008--win2012--win2016--win2022
第一步#xff1a;创建快照备份#xff0c;防止升级失败第二步#xff1a;升级托管磁盘#xff0c;在VM管理的地方将磁盘升级成托管磁盘…Azure上云主机的windows2008系统需要进行就地升级。 按着微软的升级路径win2008--win2012--win2016--win2022
第一步创建快照备份防止升级失败第二步升级托管磁盘在VM管理的地方将磁盘升级成托管磁盘注意此过程是不可逆的。第三步创建升级介质磁盘 打开Portal上的cloud shell结果是一片黑屏没有任何命令行显示切换到浏览器无痕模式重新登录OK.
按微软提供的命令行修改$sku server2012Upgrade拷贝粘贴到了cloud shell中执行。 # # Customer specific parameters
# Resource group of the source VM $resourceGroup WindowsServerUpgrades
# Location of the source VM$location WestUS2
# Zone of the source VM, if any $zone
# Disk name for the that will be created $diskName WindowsServer2012UpgradeDisk
# Target version for the upgrade - must be either server2022Upgrade, server2019Upgrade, server2016Upgrade or server2012Upgrade$sku server2012Upgrade
# Common parameters
$publisher MicrosoftWindowsServer $offer WindowsServerUpgrade $managedDiskSKU Standard_LRS
# # Get the latest version of the special (hidden) VM Image from the Azure Marketplace
$versions Get-AzVMImage -PublisherName $publisher -Location $location -Offer $offer -Skus $sku | sort-object -Descending {[version] $_.Version } $latestString $versions[0].Version
# Get the special (hidden) VM Image from the Azure Marketplace by version - the image is used to create a disk to upgrade to the new version
$image Get-AzVMImage -Location $location -PublisherName $publisher -Offer $offer -Skus $sku -Version $latestString
# # Create Resource Group if it doesnt exist #
if (-not (Get-AzResourceGroup -Name $resourceGroup -ErrorAction SilentlyContinue)) { New-AzResourceGroup -Name $resourceGroup -Location $location }
# # Create Managed Disk from LUN 0 #
if ($zone){ $diskConfig New-AzDiskConfig -SkuName $managedDiskSKU -CreateOption FromImage -Zone $zone -Location $location } else { $diskConfig New-AzDiskConfig -SkuName $managedDiskSKU -CreateOption FromImage -Location $location }
Set-AzDiskImageReference -Disk $diskConfig -Id $image.Id -Lun 0
New-AzDisk -ResourceGroupName $resourceGroup -DiskName $diskName -Disk $diskConfig
成功创建介质 Name : WindowsServer2012UpgradeDisk
附加升级安装介质到VM结果发现找不到这个盘仔细比对发现原来里面还有一个地方要修改和VM实际环境一致$location WestUS在资源中删除刚才生成的安装介质重新运行命令创建介质。
第五步升级windows2012 在VM中附加安装介质盘成功。 运行安装升级 PS E:\Windows Server 2012 .\setup.exe
安装出现问题 提示 1.Active Directory on this domain controller does not contain Windows Server 2012 ADPREP /FORESTPREP updates 2.These devices might not work properly in Windows. We recommend updating the drivers for these devices before you continue. System devices: Microsoft Hyper-V S3 Cap
在E:\Windows Server 2012\resource下面没有找到ADPREP在E:\Windows Server 2012\support\adprepadprep /forestprep中搜索找到 E:\Windows Server 2012\support\adprepadprep /forestprep 执行结果 Adprep failed to verify whether schema master has completed a replication cycle after last reboot. [Status/Consequence] The schema is not upgraded. [User Action] Check the log file ADPrep.log in the C:\Windows\debug\adprep\logs\20241217071508 directory for possible cause of failure.
Adprep encountered an LDAP error. Error code: 0xc. Server extended error code: 0x20ae, Server error message: 00002 0AE: SvcErr: DSID-032103B3, problem 5010 (UNAVAIL_EXTENSION), data 8610 [User Action]
Check the log file ADPrep.log in the C:\Windows\debug\adprep\logs\20241217071508 directory for possible cause of failure. [2024/12/17:07:15:47.833] Adprep encountered an LDAP error.
Error code: 0xc. Server extended error code: 0x20ae, Server error message: 000020AE: SvcErr: DSID-032103B3, problem 5010 (UNAVAIL_EXTENSION), data 8610
第六步清除域控DC的垃圾信息 最后发现adprep /forestprep失败的原因是此前有辅助域控离线后没有清理导致的。ntdsutilmetadata cleanup删除了另外一台DC的残余信息
第七步安装更新windows 2012 adprep /forestprep执行成功 再次执行win2012安装又出现错误提示需要执行ADPREP /DOMAINPREP 执行后通过提示新错误Windows Setup cannot locate a valid hard drive to store temporary installation files. To install Windows, create more free space on the hard drive or add a new hard drive. 原因是C盘的磁盘空间不够导致。删除没有的文件腾出了空间进入到了更新界面collecting files,settings, and applications 等待很久直到成功更新。
第八步制作windows2016安装盘升级到windows2016 卸载windows2012的安装盘执行第三步创建2016的安装介质注意修改$sku server2016Upgrade
VM中挂载的安装介质执行更新 PS G:\Windows Server 2016 .\setup.exe /auto upgrade /dynamicupdate disable /eula accept 发现磁盘空间不足需要清理调windows.old --安装磁盘清理工具 Import-Module ServerManager Install-WindowsFeature Desktop-Experience 清理空间后再次执行安装更新。
第九步升级window2022 重复第八步的动作升级到2022 PS G:\Windows Server 2022 .\setup.exe /auto upgrade /dynamicupdate disable /eula accept
第十步转原来的Blob vhd磁盘到托管磁盘 原来主机挂载的数据盘是非托管的blob存储现在主机转换成了托管磁盘后原来的这些非托管磁盘无法挂载到主机了托管的主机也不能回退到非托管主机怎么办 VM里面blob磁盘转托盘磁盘很简单但是这些分离掉的blob存储盘转托管磁盘却找不到地方。 找了半天资料最后终于找到了方案那就是用blob的vhd创建一个托管磁盘 所有服务--Disks--新建磁盘资源组需要选和VM一致的选择磁盘类型源选择存储blob, OS选择windows,VM选择第一代x64创建成功。 在VM上附加磁盘就可以找到新创建的磁盘添加。