...
This is very simple. When a user stops a Baremetal VM, cloud-server sends the StopCommand to the MaaS plugin. The plugin will just issue an IPMI shutdown command and return back.
A new command call DestroyCommand is added to Cloudstack. MaaS plugin handles this command and does the following
...