Replies: 3 comments 2 replies
-
Sorry, this isn't going to happen. libvirt does not have an API for this, and either way it does not really make much sense: If you can create a VM, you are the administrator. On qemu:///system you need to be a sudoer, and on qemu:///session you are the sole owner. |
Beta Was this translation helpful? Give feedback.
-
Fair. Would it have to be an ability through LibVirt though? Can it not be a flag set via Cockpit that simply prevents the action from taking place? If cockpit-vm-protect-flag = true, then deny libvirt action delete? Further, the prevention deletion of VMs is something that all major Cloud Providers offer, so it's not unheard of. Not sure why the use case wouldn't make sense here as well. |
Beta Was this translation helpful? Give feedback.
-
Hi @abudhu. I see what you talk about, it's something like https://cloud.google.com/compute/docs/instances/preventing-accidental-vm-deletion The issue I see here is that there is way to offer real protection via cockpit. The user who has enough permissions to manipulate the VM, start/stop etc (who is eventually the one we want to prevent from deleting the VM) can also modify the VMs XML in order to set the If you want to give some more insight of how these would be possible in a really safe implementation, I am happy to hear, but I also don't feel that's something for the cockpit-machines world. |
Beta Was this translation helpful? Give feedback.
-
Feature Requests -
Application: Cockpit-Machines
Requests: On a virtual machine, a settings flag which prevents deletion of the machine. This should only be able to be set by the administrator of the virtual machine.
Why: To prevent accidental deletion of Virtual Machines by users (any or self). Currently, the delete screen prompts - yes, but it would be better if the user can simply be denied the ability to delete the VM at all. Something akin to "VM is Protected and cannot be deleted. Please contact Administrator"
Beta Was this translation helpful? Give feedback.
All reactions