Disallow locking VMs

In Sunstone, ordinary users can click on a “Lock” icon in the VM tab, and make the VM in question locked. Such VM cannot be live-migrated to another host, which complicates the infrastructure maintenance (I don’t want to reboot a host with running qemu processes, of course).

Can the “Lock” feature be disabled for ordinary users?

There are other features which complicate the infrastructure maintenance as well - for a cluster based on Ceph datastores, using Shutdown instead of Undeploy does not make sense, for example, as shut down VMs block a capacity on their host. The same is for Stop and Suspend. In short, I don’t want my users to do anything which would prevent the physical host maintenance.

Thanks!

Hello Yenya,
you can’t disable the lock action, but you can hide buttons in Sunstone view
For default configuration, look in /etc/one/sunstone-views/mixed/user.yaml, search for

      VM.lockU: true
      VM.unlock: true
      VM.poweroff: true
      VM.poweroff_hard: true
      VM.suspend: true

Change the values to false to hide buttons. To apply changes restart the Sunstone.

The user can still lock the VM from the command line.

Hello, Pavel!

Thanks for the hint, it works for me (and sorry for the late reply).

-Yenya