Created attachment 1952264 [details] Force shut down Description of problem: [RFE][Machines] Allow to confirm before shut down or reboot vm (Can provide choice like : "Don't ask again") This is a requirement from real customer in financial field with RHEL8 system, shutdown by mistake would cause huge problem , a confirmation dialog will lower the risk. How reproducible: 100% Steps to Reproduce: 1. Prepare a running VM 2. Click "Shut down" or "Force shut down" or "Reboot" or "Force reboot" A confirmation dialog with choice "Don't ask again" is expected. Actual results: As above. Expected results: As above. Additional info: For virt-manager, it has confirmation for "Force shut down" and "Force reboot". Refer to the attachment. Better to have it for shut down and reboot too.
I've started the conversation about this on GitHub @ https://github.com/cockpit-project/cockpit-machines/issues/994 Quick summary: The thought right now is to have confirmation prompts for force shutdowns and force reboots, and tie in something called "precious" that prevents deletion to also prompt for normal shutdowns and reboots. It's currently in the discussion phase on how it could be implemented.
Upstream PR: https://github.com/cockpit-project/cockpit-machines/pull/1069
Verified with packages: cockpit-machines-293-1.el9.noarch cockpit-295-1.el9.x86_64 libvirt-dbus-1.4.1-5.el9.x86_64 libvirt-client-9.3.0-2.el9.x86_64 Steps: 1. Prepare a running VM, click "Force shut down" There is dialog for user to confirm the action: Force shut down $vm_name? Uptime 3 minutes Click "Force shut down", the vm will be closed after confirmation. Click "x" or Cancel, the dialog closed without any changes. 2. Run the VM, click "Shut down" There is dialog for user to confirm the action: Shut down $vm_name? Uptime 3 minutes Click "Shut down", the vm will be closed after confirmation. Click "Reboot", the vm will be reboot. Click "x" or Cancel, the dialog closed without any changes. 3. Keep the VM running, click "Force reboot" There is dialog for user to confirm the action: Force reboot $vm_name? Uptime 3 minutes Click "Force reboot", the vm should be reboot after confirmation. Click "x" or Cancel, the dialog closed without any changes. 4. Keep the VM running, click "Reboot" There is dialog for user to confirm the action: Reboot $vm_name? Uptime 3 minutes Click "Force reboot", the vm should be reboot after confirmation. Click "x" or Cancel, the dialog closed without any changes. The new feature is available now, but for "Reboot" and "Force reboot", the vm will be reboot immediatedly instead of user click reboot. I'll keep this one verified, file new bug for the reboot issue: https://bugzilla.redhat.com/show_bug.cgi?id=2221144