# vCenter重置ESXi主机root密码

### 背景：

管理员一般通过vCenter来管理ESXi主机，时间长了，ESXi主机的root密码忘记了，本文主要介绍在vCenter中通过修改主机配置文件来修改ESXI主机的root密码。

（备注：不用重启ESXi主机，不影响ESXi主机上的虚拟机。）

本文以vCenter 6.7为例，其余版本大同小异，版本不同图标位置有些小变化，但是思路不变。

### 1、提取主机配置文件

选中要操作的主机，右键选择“主机配置文件”>>点击“提取主机配置文件”。为方便标识，更改一下名称，如修改root密码。

### 2、选择“菜单”>>“策略和配置文件”，在“主机配置文件”中找到提取的配置文件。

![img](https://pic.chjina.com/2023/08/21/image-7.png)

### 3、选中配置文件，右击点击“编辑主机配置文件”。

取消所有的勾选项。依次选择“安全和服务” >>“安全设置” >>“安全”>>“用户配置”，然后勾选“root”。将密码策略修改成“**固定的密码配置**”，输入要修改的密码，然后点击“保存”。

![img](https://pic.chjina.com/2023/08/21/image-8.png)

### 4、依次选中要重置密码的主机， 右键选择“主机配置文件”>>点击“附加主机配置文件”。

![img](https://pic.chjina.com/2023/08/21/image-10.png)

### 5、修复主机配置文件

选择“菜单”>>“策略和配置文件”，在“主机配置文件”中找到提取的配置文件。 操作，

![img](https://pic.chjina.com/2023/08/21/image-11.png)

取消勾选“自动重新引导需要修复的主机”，点击修复。等待任务执行完毕。

### 6、验证

登录web client，输入账号和密码进行验证。

原文：

{% embed url="<https://www.dinghui.org/reset-esxi-root-password-using-vmware-host-profile.html>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chjina.com/it-zhi-shi-ku/xu-ni-hua/vmware/esxi/vcenter-zhong-zhi-esxi-zhu-ji-root-mi-ma.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
