ESXi本身现在已经不支持配置LACP了,要配置必须使用vCenter完成。
分类目录归档:Software
Windows MDM未知错误0x80192efe的解决方案
症状:
设备无法自动enroll MDM,事件管理器里面(Applications and Services Logs -> Microsoft -> Windows -> DeviceManagement-Enterprise-Diagnostics-Provider -> Admin)有如下报错:
| 1 | MDM Enroll: Failed (Unknown Win32 Error code: 0x80192efe) | 
解决方法:
首先去Azure AD和Intune删掉这台设备(能看到的都删掉)。
然后让Azure AD Sync重新同步一次:在安装有Azure AD Sync的服务器上执行
| 1 2 | PS C:\Windows\system32> Import-Module ADSync PS C:\Windows\system32> Start-ADSyncSyncCycle -PolicyType Initial | 
等这台机子被重新同步到Azure AD以后,强制重新enroll MDM:在目标设备上执行
| 1 | gpupdate /force | 
使用PowerDNS自建权威DNS服务器
珍惜你身边自架DNS和邮件服务器的人吧,他们很可能互相都认识。 #晦涩难懂的码农段子
— 𝓧𝓲𝓷 𝓛𝓲 (@delphij) April 27, 2019
设计目标
- PowerDNS权威DNS
- PostgreSQL后端
- 双节点HA
- 管理面板
Hashicorp Vault在auto unseal不可用时的恢复措施
首先想办法拿到原来vault服务器的配置文件。在seal块里面写上一行disabled = "true",然后启动vault服务器(开个新的或者用原来的都行,只要存储后端能连上就行),进入migration模式。你应该会看到类似的log:
| 1 | [WARN]  core: entering seal migration mode; Vault will not automatically unseal even if using an autoseal: from_barrier_type=azurekeyvault to_barrier_type=shamir | 
然后每个recovery key持有人下载一个vault,在自己的设备上执行:
(PowerShell)
| 1 2 | $env:VAULT_ADDR="http://localhost:8200" ./vault.exe operator unseal "-migrate" | 
(Bash)
| 1 2 | export VAULT_ADDR="http://localhost:8200" ./vault operator unseal -migrate | 
然后输入自己的那份recovery key。如果成功的话,会提示
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | Unseal Key (will be hidden): Key Value --- ----- Seal Type shamir Initialized true Sealed true Total Shares 5 Threshold 3 Unseal Progress 1/3 Unseal Nonce -UUID- Seal Migration in Progress true Version 1.1.2 HA Enabled false | 
等输入的recovery key数量到达阈值以后,vault会解锁。
如果要设置新的auto unseal,同样修改配置文件,然后手工unseal一次即可。
使用Azure Blob Storage和Azure Key Vault作为后端建立Hashicorp Vault服务器
设置Azure
首先建立一个Storage account,获得:
- storage account的名字
- accountkey(两个之一即可)
然后建立一个Key Vault,去keys里面新建一个key,获得:
- Tenant ID
- key vault的名字
- 新建的key的名字
然后我们需要设置Key Vault的access policy。
- 如果Vault程序运行在Azure VM上,那么需要加一下那台虚拟机
- 否则,去Azure AD注册一个新的application,加一下那个application
权限的话key permissions里面全选即可。如果你注册了一个新的application,那么需要在application里面生成一个client secret。
设置Hashicorp Vault
参考配置文件:
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | storage "azure" {   accountName = "storage-account-name"   accountKey  = "storage-account-key"   container   = "blob-storage-name"   environment = "AzurePublicCloud" } seal "azurekeyvault" {   tenant_id      = "your-aad-tenant-id"   vault_name     = "key-vault-name"   key_name       = "key-name" # only if Vault server is not run on Azure VM:   client_id      = "aad application client id"   client_secret  = "aad application client secret" } listener "tcp" {   address     = "127.0.0.1:8200"   tls_disable = 1 } ui = true #log_level = "Trace" default_lease_ttl = "30m" max_lease_ttl = "43800h" disable_mlock = false disable_cache = false cluster_name = "test-cluster" # cannot use with free version disable_sealwrap = true | 
初始化Hashicorp Vault
| 1 | .\vault.exe server "-config=vault.conf" | 
启动服务器,然后访问http://localhost:8200/ui/vault/init完成初始化向导即可。

