下载地址:support下载,解压到C盘根目录下。
下载地址:https://www.python.org/downloads/release/python-376/

安装步骤:



检查是否安装成功:

安装依赖模块:
pip install requests pip install configparser


验证安装成功:

下载地址:https://www.cloudbase.it/downloads/CloudbaseInitSetup_Stable_x64.msi
如果名字不是CloudbaseInitSetup_1_1_2_x64.msi,需要重命名为该名称。
该文件放在C盘根目录,无需安装
下载地址:https://ecs-instance-driver.obs.cn-north-1.myhuaweicloud.com/vmtools-windows.zip
下载后需要解压并提取相关文件到代理镜像指定目录。
以windows2016_64为例:
拷贝upgrade\windows 2016_64\drivers\viostor下的所有文件到代理镜像C:\smsWindowsAgent\bin\peAgent\OpenStack\windows_device_driver\Windows2016_64下
同样方式拷贝upgrade\windows 2016_64\drivers目录下的其他目录下的文件到C:\smsWindowsAgent\bin\peAgent\OpenStack\windows_device_driver\Windows2016_64下
拷贝完成后C:\smsWindowsAgent\bin\peAgent\OpenStack\windows_device_driver\Windows2016_64下文件示例

同样的方式,处理好其他操作系统版本即可。文件夹名字不是一样的,版本能对应上即可。
注意:

下载地址:https://github.com/PowerShell/Win32-OpenSSH/releases/tag/v8.1.0.0p1-Beta
注意下载8.1版本,更高版本存在协议协商问题导致无法正常连接
Set-Service sshd -StartupType Automatic
Set-Service ssh-agent -StartupType Automatic
Start-Service ssh-agent
# AuthorizedKeysFile__PROGRAMDATA__/ssh/administrators_authorized_keys
Dim Count:Count = 0
Set http=CreateObject("Msxml2.ServerXMLHTTP")
http.setTimeouts 5000, 5000, 10000, 10000
For i = 1 To 5
On Error Resume Next
Err.Clear
http.open "GET","http://169.254.169.254/openstack/latest/meta_data.json",False
http.send
If Err.Number <> 0 Then
Err.Clear
End If
If http.status < 300 Then
Exit For
Else
wscript.sleep 5000
End If
Count = Count + 1
Next
text_metadata=http.responsetext
byol_str="""BYOL"": ""true"""
mypos=InStr(1,text_metadata,byol_str,1)
If mypos > 0 Then
'skip Windows activation - byol option found'
wscript.sleep 1000
Else
'start Windows activation - byol option not found'
Set WshShell=CreateObject("WScript.Shell")
WshShell.Run "cmd.exe /c cscript /nologo %windir%/system32/slmgr.vbs /skms kmsAddress", 0, True
WshShell.Run "cmd.exe /c cscript /nologo %windir%/system32/slmgr.vbs /ato", 0, True
'Windows activation success'
End If
strPath = Wscript.ScriptFullName
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile(strPath)
strFolder = objFSO.GetParentFolderName(objFile)
f = objFSO.DeleteFile(objFile)