
现象:腾讯云自己的公共镜像没问题,我自己历经了阿里、华为的2008R2,在线迁移到腾讯云后,肉眼可见的校时时差很明显,禁用所有业务程序后,问题仍存在
解决:winpe离线删除外平台的驱动、组件、服务,排查用了procexp、autoruns等工具,最终处理必须在winpe中离线操作
最新版Process Explorer,版本v17.08,不适用2008R2,会报错"无法定位程序输入点 GetProcessInformation 于动态链接库KERNEL32.dll上"
上个版本,v17.06可以
得把阿里云、华为云的东西删干净才行,必须在winpe下才能删干净
尤其是PV驱动
以及一些注册表里的服务
AgentWatch
AliSecGuard
AliyunService
cloudmonitor
cloudResetPwdAgent
cloudResetPwdUpdateAgent
HwDiskMon
BALLOON
PVPanic
vioscsi
VirtioSerial
XenVbd
XenPCI
XenNet
QEMU Guest Agent VSS Provider
这些服务有些是隐藏的,在 services.msc 列表里看不到,涉及到以下目录
C:\Program Files (x86)\Alibaba\
C:\Program Files (x86)\Alibaba\cloudmonitor\wrapper\bin\UninstallApp-NT.bat
C:\Program Files\Alibaba\
C:\Program Files\AliyunService\
C:\ProgramData\aliyun\
C:\CloudResetPwdUpdateAgent\
C:\CloudResetPwdAgent\
C:\Windows\System32\drivers
具体可参考
https://cloud.tencent.com/developer/article/2477622
https://cloud.tencent.com/developer/article/2476224
https://cloud.tencent.com/developer/article/2464824具体操作:
1、停止并删除阿里、华为的平台服务
①停止Aliyun、华为云相关的平台服务






停止服务后,可执行 "sc.exe delete 服务名称" 来删除服务,有些是隐藏的,在 services.msc 列表里看不到
sc.exe stop AgentWatch
sc.exe stop AliSecGuard
sc.exe stop AliyunService
sc.exe stop cloudmonitor
sc.exe stop cloudResetPwdAgent
sc.exe stop cloudResetPwdUpdateAgent
sc.exe stop HwDiskMon
sc.exe stop BALLOON
sc.exe stop PVPanic
sc.exe stop vioscsi
sc.exe stop VirtioSerial
sc.exe stop XenVbd
sc.exe stop XenPCI
sc.exe stop XenNet
sc.exe stop "QEMU Guest Agent VSS Provider"sc.exe delete AgentWatch
sc.exe delete AliSecGuard
sc.exe delete AliyunService
sc.exe delete cloudmonitor
sc.exe delete cloudResetPwdAgent
sc.exe delete cloudResetPwdUpdateAgent
sc.exe delete HwDiskMon
sc.exe delete BALLOON
sc.exe delete PVPanic
sc.exe delete vioscsi
sc.exe delete VirtioSerial
sc.exe delete XenVbd
sc.exe delete XenPCI
sc.exe delete XenNet
sc.exe delete "QEMU Guest Agent VSS Provider"
如果删除不了则需要在winpe下挂注册表来离线删除,winpe的操作可参考我这篇文档:https://cloud.tencent.com/developer/article/2553832
2、替换外平台虚拟化驱动为腾讯云的
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser -Force
$client1 = new-object System.Net.WebClient
$client1.DownloadFile('http://windows-1251783334.cos.ap-shanghai.myqcloud.com/Install_QCloudVirtIO_new.zip','C:\Users\Administrator\Desktop\Install_QCloudVirtIO_new.zip')
powershell执行上述代码下载压缩包到桌面
然后手动解压到,比如C:\Users\Administrator\Desktop\Install_QCloudVirtIO_new\
然后powershell执行
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser -Force
cd C:\Users\Administrator\Desktop\Install_QCloudVirtIO_new\
#会先删除RedHat驱动然后安装腾讯云驱动
.\install_qcloud_virtio.ps1
#删除PV驱动
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser -Force
$PVDrivers1 = pnputil.exe -e | Select-String -Pattern "PV Driver Developers" -Context 1, 0
$PVDrivers1
#$OEMNumbers = $PVDrivers1.Context.PreContext | Select-String -Pattern "oem\d+\.inf" -AllMatches | % { $_.Matches } | % { $_.Value }
$OEMNumbers = $PVDrivers1 | ForEach-Object { $_.Context.PreContext } | Select-String -Pattern "oem\d+\.inf" -AllMatches | ForEach-Object { $_.Matches } | ForEach-Object { $_.Value }
$OEMNumbers
if($OEMNumbers -eq $null)
{Write-Host "get null"}else{
foreach ($OEMNumber in $OEMNumbers) {
Write-Host $OEMNumber
Write-Host "Deleting $OEMNumber"
pnputil.exe -f -d $OEMNumber
Write-Host "`n`n"
}
}
然后手动重启机器3、先在系统运行时尝试删除下面这些外平台的服务对应的注册表并删除其目录,如果删除不了,重启机器再尝试一次,如果还不行,在winpe下挂载注册表删除
①执行命令挂载注册表(注意调整盘符):
reg.exe load "HKLM\aaaaa" "E:\windows\system32\config\SYSTEM"
②运行regedit打开注册表,在HKEY_LOCAL_MACHINE\aaaaa\ControlSet001\Services下面找到如下服务路径,从各服务根路径上删掉
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\AgentWatch
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\AliSecGuard
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\AliyunService
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\cloudmonitor
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\cloudResetPwdAgent
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\cloudResetPwdUpdateAgent
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\HwDiskMon
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\BALLOON
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\PVPanic
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\vioscsi
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\VirtioSerial
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\XenVbd
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\XenPCI
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\XenNet
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\QEMU Guest Agent VSS Provider
③卸载注册表
reg.exe unload "HKLM\aaaaa"
④删除这些目录
C:\Program Files (x86)\Alibaba\
C:\Program Files\Alibaba\
C:\Program Files\AliyunService\
C:\ProgramData\aliyun\
⑤删除C:\Windows\System32\drivers\目录里的如下驱动
HwDiskMon.sys(华为)
pvpanic.sys(外平台引入的虚拟化驱动)
vioser.sys(外平台引入的虚拟化驱动)
balloon.sys(外平台引入的虚拟化驱动)
vioscsi.sys(外平台引入的虚拟化驱动)
xennet.sys(外平台引入的虚拟化驱动)
xenpci.sys(外平台引入的虚拟化驱动)
xenvbd.sys(外平台引入的虚拟化驱动)
BAPIDRV64.SYS(360)
4、如果前面步骤没删干净,则从控制台进入救援模式winpe中删除如下图drivers目录的几个驱动(注意:从appwiz.cpl程序列表里是删不干净的)




以上完成后,这是效果图

最后,按这个文档后半部分的4(腾讯云平台组件)5(电源模式)6(cloudbase-init)检查下
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。