更新时间:2026-07-14 GMT+08:00
分享

执行配置脚本

操作场景

通过脚本自动化部署镜像所需的软件。

操作步骤

  1. 在云服务器中打开“此电脑”,双击“CD驱动器(X)”。
  2. 双击进入“Workspace_HDP_WindowsDesktop_Installer”目录。
  3. 双击运行“run_automation”脚本配置云服务器,在弹出的提示窗中单击“是”。

    执行后,用户自定义设置Administrator账户密码,云服务器会自动重启,完成重启后需要以Administrator账户登录。

  4. 以Administrator账户登录至云服务器后,脚本会自动运行,等待脚本执行结果。
  5. 任务执行完成后,根据执行情况执行对应操作。

    • 全部任务提示为“SUCCESS”,如下图所示,表示全部执行成功,按“Enter”键结束。

      脚本执行过程中,如遇脚本卡顿或长时间无内容输出,可按“Enter”键继续执行。

      图1 执行成功
    • 若有部分任务执行失败,在提示信息中会标红,且对应失败任务执行结果为“FAILED”。

      记录执行失败的任务:请参见如表1所示,进行对应的手动配置,详细操作请参见手动配置云服务器

      表1 执行任务与手动配置对应关系

      成功/失败提示信息(举例)

      手动配置操作

      Activating the Administrator account for the VM

      激活虚拟机Administrator账户

      Disabling Windows update

      禁用Windows更新

      Enabling hibernation

      开启休眠

      Disabling fast startup

      关闭快速启动

      Deleting a system recovery partition

      删除系统恢复分区

      Configuring the SAN policy of the ECS

      配置云服务器的SAN策略

      Enabling the group policy that allows the standard user group to shut down Windows

      开启标准用户组可关闭Windows系统的组策略

      Enabling applications to access the microphone of the OS

      开启应用可访问操作系统麦克风权限

      Disabling the firewall

      禁用防火墙

      Deleting the Microsoft language package

      删除微软语言包

      Changing the power plan to high performance

      将电源设置修改为“高性能”

      Disabling hybrid sleep

      关闭混合睡眠

      Creating a temporary local user admin

      创建临时admin本地用户

      Installing VirtIO Drivers

      安装Virtio相关驱动

      Installing the 7-Zip

      安装7zip解压缩软件

      Installing the Visual Studio 2017 runtime library

      安装Visual Studio 2017运行库

      Installing the Cloudbase-Init software

      安装Cloudbase-Init软件

      Installing WKSAppCenter

      安装WKSAppCenter

      Installing WKSAppCenterAgent

      安装WKSAppCenterAgent

      Installing HW-SysAgent

      安装HW-SysAgent

      Installing HW-SysPrep

      安装HW-SysPrep

相关文档