Libvirt: Power Off Option Not Always Working - How To Fix?

So there is some work to be done. My recommendation on the design would be two fold.

First the frontend needs to be updated to support dynamically querying the REST API for the supported actions instead of hardcoding that into Javascript. Looking at the API code I don’t see a way to do that today, but GET /hosts/:id/power is probably the best place to add that.

Then backend wise you probably need to enhance PowerManager::Virt. In the PowerManager::Bmc controller there is already a poweroff action that in the libvirt world would probably map to virsh destroy.

2 Likes