From 68ad6d07602fbe647363de7ba0bd6bb7a53eefcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 24 Jan 2014 06:42:20 +0100 Subject: [PATCH] dispvm: start guid during savefile preparation Now gui-agent supports reconnect to guid, so start it early to have Xorg running in the VM. This is still not done - for example it tries to run some commands via (not running yet) qrexec. --- core-modules/000QubesVm.py | 4 ++-- dispvm/qubes-prepare-saved-domain.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core-modules/000QubesVm.py b/core-modules/000QubesVm.py index 3d96288e..a4908aeb 100644 --- a/core-modules/000QubesVm.py +++ b/core-modules/000QubesVm.py @@ -1577,13 +1577,13 @@ class QubesVm(object): # the successful unpause is some indicator of it qmemman_client.close() - if self._start_guid_first and start_guid and not preparing_dvm and os.path.exists('/var/run/shm.id'): + if self._start_guid_first and start_guid and os.path.exists('/var/run/shm.id'): self.start_guid(verbose=verbose, notify_function=notify_function, before_qrexec=True) if not preparing_dvm: self.start_qrexec_daemon(verbose=verbose,notify_function=notify_function) - if start_guid and not preparing_dvm and os.path.exists('/var/run/shm.id'): + if start_guid and os.path.exists('/var/run/shm.id'): self.start_guid(verbose=verbose, notify_function=notify_function) if preparing_dvm: diff --git a/dispvm/qubes-prepare-saved-domain.sh b/dispvm/qubes-prepare-saved-domain.sh index 22b738d9..12f6f33b 100755 --- a/dispvm/qubes-prepare-saved-domain.sh +++ b/dispvm/qubes-prepare-saved-domain.sh @@ -25,7 +25,7 @@ if ! [ -d $VMDIR ] ; then echo $VMDIR does not exist ? exit 1 fi -if ! qvm-start $1 --no-guid --dvm ; then +if ! qvm-start $1 --dvm ; then exit 1 fi @@ -41,6 +41,7 @@ fi #set -x xenstore-write /local/domain/$ID/qubes-save-request 1 xenstore-watch-qubes /local/domain/$ID/device/qubes-used-mem +kill `cat /var/run/qubes/guid-running.$ID` xenstore-read /local/domain/$ID/qubes-gateway | \ cut -d . -f 3 | tr -d "\n" > $VMDIR/netvm-id.txt xl block-detach $1 xvdb