Proxmox VE
Proxmox VE
After configuring this integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [Learn more], the binary sensors automatically appear.
Configuration
You should have at least one VM or container entry configured, else this integration won’t do anything.
To use the proxmoxve
integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [Learn more], add the following configuration to your configuration.yaml
configuration.yaml 文件是 Home Assistant 的主要配置文件。它列出了要加载的集成及其特定配置。在某些情况下,需要直接在 configuration.yaml 文件中手动编辑配置。大多数集成可以在 UI 中配置。 [Learn more] file.
在更改了configuration.yaml
configuration.yaml 文件是 Home Assistant 的主要配置文件。它列出了要加载的集成及其特定配置。在某些情况下,需要直接在 configuration.yaml 文件中手动编辑配置。大多数集成可以在 UI 中配置。 [Learn more] 文件后,重启 Home Assistant 以应用更改。 该集成现在显示在集成页面的 设置 > 设备与服务 下。其实体在集成卡片上以及实体标签上列出。
# Example configuration.yaml entry
proxmoxve:
- host: IP_ADDRESS
username: USERNAME
password: PASSWORD
nodes:
- node: NODE_NAME
vms:
- VM_ID
containers:
- CONTAINER_ID
Configuration Variables
IP address of the Proxmox VE instance. Can include port by appending “:<port>”.
Whether to do strict validation on SSL certificates. If you use a self signed SSL certificate you need to set this to false.
The username used to authenticate. Can include the realm by appending “@<realm>”.
Example with multiple VMs, no containers, self-signed certificate and pve realm for the user setup described below:
proxmoxve:
- host: IP_ADDRESS
username: USERNAME
password: PASSWORD
verify_ssl: false
realm: pve
nodes:
- node: NODE_NAME
vms:
- VM_ID_1
- VM_ID_2
Binary sensor
The integration will automatically create a binary sensor for each tracked virtual machine or container. The binary sensor will either be on if the VM’s state is running or off if the VM’s state is different.
The created sensor will be called binary_sensor.NODE_NAME_VMNAME_running
.
Proxmox Permissions
To be able to retrieve the status of VMs and containers, the user used to connect must minimally have the VM.Audit
privilege. Below is a guide to how to configure a new user with the minimum required permissions.
Create Home Assistant Group
Before creating the user, we need to create a group for the user. Privileges can be either applied to Groups or Roles.
- Click
Datacenter
- Open
Permissions
and clickGroups
- Click the
Create
button above all the existing groups - Name the new group (e.g.,
HomeAssistant
) - Click
Create
Add Group Permissions to all Assets
For the group to access the VMs we need to grant it the auditor role
- Click
Datacenter
- Click
Permissions
- Open
Add
and clickGroup Permission
- Select “/” for the path
- Select your Home Assistant group (
HomeAssistant
) - Select the Auditor role (
PVEAuditor
) - Make sure
Propagate
is checked
Create Home Assistant User
Creating a dedicated user for Home Assistant, limited to only to the access just created is the most secure method. These instructions use the pve
realm for the user. This allows a connection, but ensures that the user is not authenticated for SSH connections. If you use the pve
realm, just be sure to add realm: pve
to your configuration.
- Click
Datacenter
- Open
Permissions
and clickUsers
- Click
Add
- Enter a username (e.g.,
hass
) - Set the realm to “Proxmox VE authentication server”
- Enter a secure password (it can be complex as you will only need to copy/paste it into your Home Assistant configuration)
- Select the group just created earlier (
HomeAssistant
) to grant access to Proxmox - Ensure
Enabled
is checked andExpire
is set to “never” - Click
Add
In your Home Assistant configuration, use hass@pve
for the username and your chosen password for the password.