After Building an iVM profile you get an error saying
Error (VBoxManage:error: The session is not locked (session state:unlocked) VBoxManage: error: Details: code NS_ERROR_UNEXPECTED (0x8000ffff)...
The very long error message prevents essential buttons from being displayed so you cannot rebuild this profile from the UI.
Use these steps to fix the problem:
1. Log into the CLI/ssh using the g2 user
2. Get the vmp_id of the profile:
curl -X GET http://localhost/rapi/system/vm/profiles
or from a browser session (when already logged into the UI:
Note down the vmp_id (not the vmb_id)
3. Now build the profile again:
$ curl -X POST localhost/rapi/system/vm/profiles/<vmp_id>/build
Now your profile will be rebuilt. This procedure will take 15 to 35 minutes.