diff --git a/dom0/qvm-core/qubes.py b/dom0/qvm-core/qubes.py index 59f3a416..ea3e3b5a 100755 --- a/dom0/qvm-core/qubes.py +++ b/dom0/qvm-core/qubes.py @@ -46,6 +46,7 @@ if not dry_run: qubes_guid_path = "/usr/bin/qubes_guid" +qrexec_daemon_path = "/usr/lib/qubes/qrexec_daemon" qubes_base_dir = "/var/lib/qubes" @@ -618,6 +619,14 @@ class QubesVm(object): print "--> Starting the VM..." xend_session.session.xenapi.VM.unpause (self.session_uuid) + if not preparing_dvm: + if verbose: + print "--> Starting the qrexec daemon..." + retcode = subprocess.call ([qrexec_daemon_path, str(xid)]) + if (retcode != 0) : + self.force_shutdown() + raise OSError ("ERROR: Cannot execute qrexec_daemon!") + # perhaps we should move it before unpause and fork? if debug_console: from xen.xm import console diff --git a/dom0/qvm-tools/qvm-run b/dom0/qvm-tools/qvm-run index fe2ca357..bafe3a79 100755 --- a/dom0/qvm-tools/qvm-run +++ b/dom0/qvm-tools/qvm-run @@ -34,7 +34,6 @@ import os.path qubes_guid_path = "/usr/bin/qubes_guid" qubes_clipd_path = "/usr/bin/qclipd" -qrexec_daemon_path = "/usr/lib/qubes/qrexec_daemon" qrexec_client_path = "/usr/lib/qubes/qrexec_client" notify_object = None @@ -114,14 +113,6 @@ def vm_run_cmd(vm, cmd, options): tray_notify_error ("ERROR: Cannot start qubes_guid!") exit (1) - if options.verbose: - print "--> Starting Qubes rexec daemon..." - - retcode = subprocess.call ([qrexec_daemon_path, str(xid)]) - if (retcode != 0) : - print "ERROR: Cannot start qrexec_daemon!" - exit (1) - actually_execute(str(xid), cmd, options); else: # VM already running... diff --git a/dom0/qvm-tools/qvm-start b/dom0/qvm-tools/qvm-start index 8a3d277e..ff23e80a 100755 --- a/dom0/qvm-tools/qvm-start +++ b/dom0/qvm-tools/qvm-start @@ -27,7 +27,6 @@ import subprocess import os qubes_guid_path = "/usr/bin/qubes_guid" -qrexec_daemon_path = "/usr/lib/qubes/qrexec_daemon" def main(): usage = "usage: %prog [options] " @@ -35,8 +34,6 @@ def main(): parser.add_option ("-q", "--quiet", action="store_false", dest="verbose", default=True) parser.add_option ("--no-guid", action="store_true", dest="noguid", default=False, help="Do not start the GUId") - parser.add_option ("--no-rexec", action="store_true", dest="norexec", default=False, - help="Do not start rexec") parser.add_option ("--console", action="store_true", dest="debug_console", default=False, help="Attach debugging console to the newly started VM") parser.add_option ("--dvm", action="store_true", dest="preparing_dvm", default=False, @@ -73,14 +70,5 @@ def main(): print "ERROR: Cannot start qubes_guid!" exit (1) - if not options.norexec: - if options.verbose: - print "--> Starting Qubes rexec..." - - retcode = subprocess.call ([qrexec_daemon_path, str(xid)]) - if (retcode != 0) : - print "ERROR: Cannot start qrexec_daemon!" - exit (1) - main() diff --git a/dom0/restore/qubes_prepare_saved_domain.sh b/dom0/restore/qubes_prepare_saved_domain.sh index d920603e..a1bf0770 100755 --- a/dom0/restore/qubes_prepare_saved_domain.sh +++ b/dom0/restore/qubes_prepare_saved_domain.sh @@ -21,7 +21,7 @@ if ! [ -d $VMDIR ] ; then echo $VMDIR does not exist ? exit 1 fi -if ! qvm-start $1 --no-guid --no-rexec --dvm ; then +if ! qvm-start $1 --no-guid --dvm ; then exit 1 fi