当前位置:网站首页>Cloudbase init considerations
Cloudbase init considerations
2022-06-23 20:30:00 【shawyang】
UserData Product documentation :https://cloud.tencent.com/document/product/213/17526
UserData rely on cloudbase-init,cloudbase-init Optical drive dependent , Please do not disable cloudbase-init Service or change it 、 Do not disable the optical drive , Do not delete the drive letter , If you have security software , May intercept cloudbase-init, because cloudbase-init adopt python Work , Security software may think this is a risk item , Therefore, it is necessary to do so in the security software cloudbase-init The trust of the .
cloudbase-init Very important ,cloudbase-init Can users delete ? Reference resources https://cloud.tencent.com/developer/article/1883449
powershell Automated reloading cloudbase-init by 1.1.2 edition
https://cloud.tencent.com/developer/article/1940021
There are many precautions , Be sure to read it carefully
① Don't ban it cloudbase-init service , Do not disable the CD-ROM drive , This will affect initialization 、 Set the password 、 Set up hostname Etc
② Please trust in the security software cloudbase-init, otherwise , Security software will intercept cloudbase-init, Lead to cloudbase-init Related functional exceptions , For example, resetting the password failed , Even in security software , Should also be separately in cmd Command line and powershell Command line execution net user Administrator " password " Several times , Ensure that the security software does not intercept ; because cloudbase-init Itself is python Source code , It's through cmd.exe and powershell.exe call net user Administrator " password " Orders work , therefore cloudbase-init Related executable files such as C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\Scripts In the directory .exe file 、cmd.exe、powershell.exe、net.exe、net1.exe(net1.exe It is the command of the operating system , Don't feel like a Trojan horse , The first time I saw this command , There is also this illusion ) If the executable file is blocked by the security software, the password setting will be affected , The security software has to release these executables . perhaps There is a problem with the environment variables so that these commands cannot be used in cmd Command line or powershell The command line directly recognizes , It can also lead to problems , Or the customer has installed a set python Added environment variables , and cloudbase-init I brought my own set python It's just cloudbase-init In the installation directory of , If python There is a problem with the environment variables , It may also affect cloudbase-init Normal execution .
The environment variables in the above figure cannot be recognized normally net command , I changed the order , hold %SystemRoot% Transfer to %SystemRoot%\system32 The above
Because I thought %SystemRoot%\system32 The premise is to recognize %SystemRoot%, So the %SystemRoot% Tune it up , And then it's back to normal
③ Please do not turn off password complexity in group policy , Bear in mind !!! Query whether the password complexity is enabled through the command , And set to close / Open password complexity , Reference resources https://cloud.tencent.com/developer/article/1883630
④cloudbase-init Please select the local system account (LocalSystem), Don't choose .\cloudbase-init
⑤userdata If the pipeline outputs .ps1 file , Please explicitly limit the maximum number of characters in the line of the file , such as { # Do not exceed lines of code 1023 Characters exit 2>$null } | Out-File "c:\chromesetup.ps1" -Width 1024 2>$null 1>$null
⑥ Please do not rush to log in with the new password when the password display is running just after the console is reset , Please at least wait 1 Minutes or so before operation ( front 10 The user name or password error will be reported within seconds , The reason is password reset 2 Step , The first 1 The next step is to issue instructions from the console , The first 2 Step 1 is to pass the command after startup cloudbase-init The service call powershell perform ), This phenomenon is inevitable in some special images , Basically, after setting the password 3 Minutes or more before it takes effect
⑦ Please don't delete cloudbase-init The registry , If a message is passed when the machine is created userdata, and userdata There is code for writing operations in the code , So you deleted cloudbase-init The registry of causes initialization to be marked as 0, The next time I turn on cloudbase-init You will think that the machine has not been initialized , It's a new machine , It will automatically trigger the re execution userdata Code in , The severity assumption , Suppose there is an operation to format the data disk in the code , Don't you want to be cool
But if your original machine is not used userdata, It is recommended to do a custom image , As administrator in powershell Execute this command , Otherwise, when the system is reinstalled to the original machine with the produced image , If you specify a new password that is different from the original one , The new password is not valid .
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Cloudbase Solutions" /f 2>&1 > $null
⑧ Blackstone cloudbase-init It is specially configured , With the common cvm A little difference between , Blackstone cloudbase-init Please don't move
⑨ Newly purchased machines hostname Not fully effective , You need to restart the machine to take effect , If you want to automate , Need to be in userdata Riga restart code , You can also modify cloudbase-init In the configuration file allow_reboot The parameter values are from false Change it to true, This will automatically restart after buying a new machine , This point has been fed back to Tencent cloud , I have verified that some regions have taken effect ⑩ Before making an image , Please make sure that the original machine is not used when it is created userdata, And then as an administrator in powershell Execute the following code reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Cloudbase Solutions" /f 2>&1 > $null reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles" /f 2>&1 > $null reg add "HKLM\SYSTEM\CurrentControlSet\Control\Network\NewNetworkWindowOff" /f 2>&1 > $null wevtutil el | Foreach-Object {wevtutil cl "$_" 2>$null} wevtutil cl security 2>$null wevtutil cl system 2>$null
边栏推荐
- 【Golang】来几道题以加强Slice
- 【Golang】深究字符串——从byte rune string到Unicode与UTF-8
- Development notes of wedding studio applet based on wechat applet
- Kubernetes resource topology aware scheduling optimization
- Check four WiFi encryption standards: WEP, WPA, WPA2 and WPA3
- 同花顺网上开户安全吗,佣金高不高
- Use of the vs2022scanf function. An error is reported when using scanf - the return value is ignored: Solutions
- 【Golang】快速复习指南QuickReview(六)——struct
- 重庆 奉节耀奎塔,建成后当地连中五名进士,是川江航运的安全塔
- 实现vscode写markdown文档+图片自动上传至腾讯云cos
猜你喜欢

RStudio 1.4软件安装包和安装教程

JS advanced programming version 4: generator learning

The golden nine silver ten, depends on this detail, the offer obtains the soft hand!

解读2022年度敏捷教练行业现状报告

「开源摘星计划」Containerd拉取Harbor中的私有镜像,云原生进阶必备技能

开源 SPL 重新定义 OLAP Server

Real topic of the 13th National Competition of single chip microcomputer in the Blue Bridge Cup

SAVE: 软件分析验证和测试平台

20 provinces and cities announce the road map of the meta universe

Yaokui tower in Fengjie, Chongqing, after its completion, will be the safety tower for Sichuan river shipping with five local scholars in the company
随机推荐
【Golang】快速复习指南QuickReview(八)——goroutine
Emmet语法规范
官宣.NET 7 预览版5
Deep learning of handlebar handwriting (15): building your own corpus on hugging face
[golang] quick review guide quickreview (x) -- goroutine pool
Is Guoyuan futures trading software formal? How to download safely?
UST 崩盘后,稳定币市场格局将迎来新机遇?
35岁危机?内卷成程序员代名词了…
[golang] quick review guide quickreview (III) - Map
【Golang】来几道题以加强Slice
Kubernetes resource topology aware scheduling optimization
国元期货交易软件正规吗?如何安全下载?
Are internal consultants and external consultants in SAP implementation projects difficult or successful?
Activity registration | introduction to mongodb 5.0 sequential storage features
RStudio 1.4软件安装包和安装教程
[golang] follow the object pool sync Pool
Is it safe for Huatai Securities to open an account online for securities companies with low handling fees and commissions
怎么开户?在国海证券开户安全吗?需要带什么?
【Golang】快速复习指南QuickReview(一)——字符串string
Use of the vs2022scanf function. An error is reported when using scanf - the return value is ignored: Solutions