当前位置:网站首页>Diskpart San policy is not onlineall, which affects automatic disk hanging

Diskpart San policy is not onlineall, which affects automatic disk hanging

2022-06-24 03:58:00 shawyang

Early in use 2019 Mirror image , In the early 2019 The mirrored disk policy is Microsoft's default san policy No onlineall, The new public image has been optimized. Microsoft's default setting is san policy onlineall

If it's not like this , for example :

If multiple disks are attached, the disk may be restarted and dropped

If not onlineall( All online ) Words , Continue to diskpart Command line execution of san policy=onlineall

It is recommended that you check whether or not before mirroring san policy = onlineall, If not, set it

in addition , Open as an administrator before creating an image cmd The command line executes this 2 Sentence command to avoid other problems during initialization

reg delete "HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" /v "RealTimeIsUniversal" /f

reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Cloudbase Solutions" /f 2>&1 > $null

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

The stock of machines needs to be manually executed by the user diskpart enter san policy=onlineall enter , And manually online the offline disks in the disk manager , Then restart the observation

Machines in stock 、 Custom images need to be repaired by yourself

I want to make a special mention here cloudbase-init, It is an open source initializer , It is not produced by the cloud platform , Many cloud vendors use it , It has a configuration item san_policy=OnlineAll You can add it to the configuration file before you do the image

Profile path :C:\Program Files\Cloudbase Solutions\Cloudbase-Init\conf\cloudbase-init.conf

The following figure is not the official cloud platform , Neither cloudbase-init Official , I did it myself cloudbase-init Data allocated ,cloudbase-init There are many special configuration items for , for example :

set_unique_boot_disk_id

display_idle_timeout

real_time_clock_utc

volumes_to_extend

san_policy

wait

Reference resources cloudbase-init Official information :

①https://readthedocs.org/projects/cloudbase-init/downloads/pdf/latest/

②https://cloudbase-init.readthedocs.io/en/latest/config.html

原网站

版权声明
本文为[shawyang]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/09/20210917140156374K.html