diff mbox

[KVM-AUTOTEST,01/18] KVM test: kvm_preprocessing.py: allow modifying VM params without restarting

Message ID 1276820075-31310-1-git-send-email-mgoldish@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michael Goldish June 18, 2010, 12:14 a.m. UTC
None
diff mbox

Patch

diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py
index ee3e9b2..17f3a29 100644
--- a/client/tests/kvm/kvm_preprocessing.py
+++ b/client/tests/kvm/kvm_preprocessing.py
@@ -79,8 +79,13 @@  def preprocess_vm(test, params, env, name):
                           "restarting it...")
             start_vm = True
 
-    if start_vm and not vm.create(name, params, test.bindir, for_migration):
-        raise error.TestError("Could not start VM")
+    if start_vm:
+        # Start the VM (or restart it if it's already up)
+        if not vm.create(name, params, test.bindir, for_migration):
+            raise error.TestError("Could not start VM")
+    else:
+        # Don't start the VM, just update its params
+        vm.params = params
 
     scrdump_filename = os.path.join(test.debugdir, "pre_%s.ppm" % name)
     try: