You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
3.9 KiB
Markdown

3 years ago
# IPMI & Redfish
!!! info
This page is about the server-side emulation (if you want to manage PiKVM using ipmitool or so). If you want to use the PiKVM Web UI to manage the server using IPMI (that is, as an IPMI client), see [GPIO functions with IPMI plugin](gpio.md).
## IPMI BMC
4 years ago
IPMI is an [old protocol](https://en.wikipedia.org/wiki/Intelligent_Platform_Management_Interface) for remote server management.
3 years ago
It can be useful for managing a large number of machines with PiKVM. Its advantage is that it is supported by many enterprise systems.
4 years ago
3 years ago
!!! warning
1 year ago
Although PiKVM supports the IPMI protocol, we strongly recommend that you **DO NOT USE IT** outside of trusted networks due to the protocol's [insecurity](https://github.com/NitescuLucian/nliplace.com.blog.drafts). Use Redfish or [KVMD API](api.md) instead of it. Also IPMI can not work with [2FA](auth.md#two-factor-authentication).
3 years ago
To enable IPMI BMC follow these steps:
4 years ago
1. Switch the filesystem to the RW-mode:
3 years ago
4 years ago
```
# rw
```
3 years ago
4 years ago
2. Setup IPMI account in file `/etc/kvmd/ipmipasswd`.
3 years ago
4 years ago
3. Enable `kvmd-ipmi` daemon:
3 years ago
4 years ago
```
# systemctl enable --now kvmd-ipmi
```
3 years ago
4 years ago
4. Switch the filesystem back to the RO:
3 years ago
4 years ago
```
# ro
```
3 years ago
4 years ago
5. Here some examples (on the remote PC):
3 years ago
4 years ago
```
$ ipmitool -I lanplus -U admin -P admin -H pikvm power status
$ ipmitool -I lanplus -U admin -P admin -H pikvm power on
```
3 years ago
## IPMI SoL
4 years ago
3 years ago
IPMI supports the ability to get console access to the server using Serial-over-LAN. PiKVM can act as a proxy for your server's COM port.
4 years ago
3 years ago
!!! warning
Although PiKVM supports the IPMI protocol, we strongly recommend that you **DO NOT USE IT** outside of trusted networks due to the protocol's [insecurity](https://github.com/NitescuLucian/nliplace.com.blog.drafts). Use Redfish or [KVMD API](api.md) instead of it.
3 years ago
To use this feature, you will need a USB-COM adapter that you need to connect to the PiKVM. The COM port of the adapter need to be connected to the server. As with IPMI BMC, you need to configure `kvmd-vnc` and add the following configuration to `/etc/kvmd/override.yaml`:
4 years ago
```yaml
ipmi:
sol:
device: /dev/ttyUSB0 # Path of your USB-COM adapter
speed: 115200
```
After enabling `kvmd-ipmi`, all requests that it receives over the network regarding the COM port will be forwarded to your server. For example:
```
$ ipmitool -I lanplus -U admin -P admin -H pikvm sol activate
```
4 years ago
3 years ago
## Redfish
4 years ago
[Redfish](https://www.dmtf.org/standards/redfish) is a more modern server management protocol designed to replace IPMI.
It is based on HTTP and fixes many security issues. If possible, we recommend using it instead of IPMI, or using the [KVMD API](api.md).
3 years ago
There're not special actions required to use Redfish. In addition, Redfish will use regular PiKVM credentials.
4 years ago
But for systems that have been upgraded to KVMD 2.0 (not a clean image installation), you will probably need to edit
the `/etc/kvmd/nginx/kvmd.ctx-server.conf` file to add these lines at the end:
```nginx
location /redfish {
proxy_pass http://kvmd;
include /etc/kvmd/nginx/loc-proxy.conf;
auth_request off;
}
```
!!! info
Don't be confused by the parameter `auth_request off`. KVMD performs authorization on its own. The only open HTTP entrypoint is `/redfish/v1`, which returns a static document and does not change the state of the PiKVM. It's safe.
4 years ago
If there is a file in your system after the update `/etc/kvmd/nginx/kvmd.ctx-server.conf.pacnew` you can just move it:
```
# mv /etc/kvmd/nginx/kvmd.ctx-server.conf.pacnew /etc/kvmd/nginx/kvmd.ctx-server.conf
```
3 years ago
!!! warning
Be careful not to lose your local changes if you have done anything with this file before.
4 years ago
4 years ago
To access the Redfish API, use HTTP Basic Auth. Also you can use the [redfishtool](https://github.com/DMTF/Redfishtool):
```
4 years ago
$ redfishtool -S Never -r pikvm root
4 years ago
$ redfishtool -S Never -u admin -p admin -r pikvm Systems
$ redfishtool -S Never -u admin -p admin -r pikvm Systems reset ForceOff
```