Linux - VirtualizationThis forum is for the discussion of all topics relating to Linux Virtualization. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
When the power fails, the nut (ups software) initiates a shutdown on the host after a couple of minutes.
The shutdown command runs a /etc/rc.d/rc0.d/K01libvirt-guests, which do a virsh save on all active guests.
If having several guests running, this can take some time, 10-20 minutes, resulting the batteri may run out of power, and the systems are forced off, together with the guests.
How to solve this ?
I want the shutdown command on the host to shutdown the guests instead of saving their states. Is that possible in a good way, instead of changing the K01libvirt-guests script ?
Regards.
Last edited by ThomasRonshof; 02-09-2012 at 06:18 AM.
Well, I will consider that... just not sure, if it's too soon to initiate a shutdown after the first wall-notice after powerfailure. If power comes back after 30 seconds, there's no need to do a shutdown... but maybe I can adjust the warning to come after 1 minute instead and do both at the same time...
Yes, we also have some GUI users running Gnome. How do i send messages to the Gnome desktop ?
I can't answer that completely but can give some pointers.
The user needs to give permission for other users on the local host to write to their X display. Assuming they are bash users this can be done either globally in /etc/profile or per-user in ~/.bash_profile files by including
Code:
[[ $DISPLAY ]] && /usr/bin/xhost +localhost
To write to all users you would need to enumerate all the X displays on the computer. I don't know how to do that.
The displays look something like localhost:0.0
You would have to loop over each of the X displays and, if using yad, run code something like
You could prettify it by adding --image <path/to/icon/file> and --window-icon <path/to/another/icon/file>. One appears in the title bar and the other in the text area.
Last edited by catkin; 02-11-2012 at 08:21 PM.
Reason: removed $window_icon from code
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.