当前位置:网站首页>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
边栏推荐
- LeetCode 473. 火柴拼正方形
- OHOS LTS 3.0移植到RaspberryPi 4B
- 【Golang】快速复习指南QuickReview(一)——字符串string
- 如何在Microsoft Exchange 2010中安装SSL证书
- Implementing MySQL fuzzy search with node and express
- 【Golang】在Go语言的角度重新审视闭包
- 怎么开户?在国海证券开户安全吗?需要带什么?
- SQL聯合查詢(內聯、左聯、右聯、全聯)的語法
- Is Guoyuan futures trading software formal? How to download safely?
- 基于SSM实现微博系统
猜你喜欢

ZABBIX monitoring - Aruba AP operation data

Interview with Mo Tianlun | ivorysql wangzhibin - ivorysql, an Oracle compatible open source database based on PostgreSQL

宝安区航城街道领导一行莅临联诚发参观调研

测试的重要性及目的

Activity registration | introduction to mongodb 5.0 sequential storage features

UGeek大咖说 | 可观测之超融合存储系统的应用与设计

The evolution of the "Rainbow Bridge" middleware platform for the acquisition database based on shardingsphere

Elastricearch's fragmentation principle of the second bullet

35歲危機?內卷成程序員代名詞了…

TCP/UDP基本原理
随机推荐
如何在Microsoft Exchange 2010中安装SSL证书
Ugeek's theory 𞓜 application and design of observable hyperfusion storage system
【Golang】怎样优雅的清空切片
Applet development framework recommendation
Are internal consultants and external consultants in SAP implementation projects difficult or successful?
Deeply understand and grasp the basic characteristics of digital economy
八大误区,逐个击破(终篇):云难以扩展、定制性差,还会让管理员失去控制权?
【白话技术】二维码
Emmet syntax specification
如何利用数仓创建时序表
图扑软件数字孪生智慧水务,突破海绵城市发展困境
Development notes of wedding studio applet based on wechat applet
How to open a domestic futures account? Which futures company is safer to open an account?
【Golang】深究字符串——从byte rune string到Unicode与UTF-8
【Golang】快速复习指南QuickReview(二)——切片slice
[golang] quick review guide quickreview (VIII) -- goroutine
Stochastic process -- Markov chain
Goldfish rhca memoirs: do447 managing user and team access -- effectively managing users with teams
What are the useful personnel management software? Personnel management system software ranking!
徽商期货交易软件正规吗?如何安全下载?