首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >腾讯云使用powershell自动安装配置windows cloudbase-init 1.1.6做自定义镜像

腾讯云使用powershell自动安装配置windows cloudbase-init 1.1.6做自定义镜像

原创
作者头像
Windows技术交流
修改2025-08-21 14:21:50
修改2025-08-21 14:21:50
2920
举报
文章被收录于专栏:Windows技术交流Windows技术交流

需要能访问公网,因为脚本会通过公网下载安装文件

cloudbase-init 官网:https://cloudbase.it/cloudbase-init/,最新版没写支持2008*,实测是不支持的

cloudbase-init较新版本不适用≤2008R2的低版本系统(cloudbase-init 1.1.2适用2008R2,1.1.4和1.1.6都不适用)

下载低版本1.1.2去这里下载:https://github.com/cloudbase/cloudbase-init/releases

Server2008R2的vc运行库即便安装全了,也还报错"无法启动此程序,因为计算机中丢失api-ms-win-core-path-l1-1-0.dll"​

api-ms-win-core-path-l1-1-0.dll是高版本系统特有的​​Universal C Runtime(UCRT)​​组件,与常规VC++运行库独立,2008R2(Win7)跟高版本系统的差异是无法弥补的。

对于≥Server2012的系统,可以安装1.1.6

代码语言:txt
复制
#不适用≤2008R2的低版本系统(cloudbase-init 1.1.2适用2008R2,1.1.4和1.1.6都不适用)

Set-executionpolicy -ExecutionPolicy Unrestricted -Scope CurrentUser -Force;

(New-Object System.Net.WebClient).DownloadFile("http://windows-1251783334.cos.ap-shanghai.myqcloud.com/cloudbase-init1.1.6.ps1",  (Get-Location).Path+"/cloudbase-init1.1.6.ps1");

./cloudbase-init1.1.6.ps1

安装TAT

代码语言:txt
复制
Set-executionpolicy -ExecutionPolicy Unrestricted -Scope CurrentUser -Force;

(New-Object System.Net.WebClient).DownloadFile("http://tat-1258344699.cos-internal.accelerate.tencentcos.cn/tat_agent/tat_agent_installer.exe",  (Get-Location).Path+"/tat_agent_installer.exe");

& .\tat_agent_installer.exe

安装云监控组件

代码语言:txt
复制
Set-executionpolicy -ExecutionPolicy Unrestricted -Scope CurrentUser -Force;

(New-Object System.Net.WebClient).DownloadFile("http://update2.agent.tencentyun.com/update/windows-stargate-installer.exe",  (Get-Location).Path+"/windows-stargate-installer.exe");
& .\windows-stargate-installer.exe

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档