From 1227741e283a6e689252fa18ad6a864f343b9ea2 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Sat, 10 Mar 2012 21:03:15 +0100 Subject: [PATCH] dom0/core: disable automatic starting NetVM when trying attach to --- dom0/qvm-core/qubes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dom0/qvm-core/qubes.py b/dom0/qvm-core/qubes.py index 4bee260f..9d16677b 100755 --- a/dom0/qvm-core/qubes.py +++ b/dom0/qvm-core/qubes.py @@ -383,6 +383,8 @@ class QubesVm(object): self._set_netvm(new_netvm) def _set_netvm(self, new_netvm): + if self.is_running() and not new_netvm.is_running(): + raise QubesException("Cannot dynamically attach to stopped NetVM") if self.netvm is not None: self.netvm.connected_vms.pop(self.qid) if self.is_running(): @@ -406,8 +408,6 @@ class QubesVm(object): return if self.is_running(): - if not new_netvm.is_running(): - new_netvm.start() # refresh IP, DNS etc self.create_xenstore_entries() self.attach_network()