Dom0: sync wallclocks in all vms upon resume from S3 sleep
This is really a workaround, until Xen implements proper suspend/resume mechanism for notfying DomUs about system-wide S3 sleep. See this thread for more details: http://lists.xensource.com/archives/html/xen-devel/2010-07/msg00037.html
This commit is contained in:
parent
cb5012e4d7
commit
115df6f1af
15
dom0/pm-utils/01qubes-sync-vms-clock
Executable file
15
dom0/pm-utils/01qubes-sync-vms-clock
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${PM_FUNCTIONS}"
|
||||
|
||||
sync_qubes_vms_wallclock()
|
||||
{
|
||||
DATE=$(date)
|
||||
echo "Syncing VMs clock to: $DATE"
|
||||
qvm-run --all -u root "date -s \"$DATE\""
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
thaw|resume) sync_qubes_vms_wallclock ;;
|
||||
*) exit 0 ;;
|
||||
esac
|
@ -94,6 +94,10 @@ mkdir -p $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/
|
||||
cp ../common/qubes_nmhook $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
|
||||
cp init.d/iptables $RPM_BUILD_ROOT/etc/sysconfig
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d
|
||||
cp pm-utils/01qubes-sync-vms-clock $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d/
|
||||
|
||||
%post
|
||||
|
||||
if [ "$1" != 1 ] ; then
|
||||
@ -190,3 +194,4 @@ fi
|
||||
/etc/dhclient.d/qubes_setup_dnat_to_ns.sh
|
||||
/etc/NetworkManager/dispatcher.d/qubes_nmhook
|
||||
/etc/sysconfig/iptables
|
||||
/usr/lib64/pm-utils/sleep.d/01qubes-sync-vms-clock
|
||||
|
Loading…
Reference in New Issue
Block a user