diff mbox

[KVM-AUTOTEST,04/06] VM.create(): always destroy() the VM before attempting to start it

Message ID 1244507691-9575-4-git-send-email-lmr@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lucas Meneghel Rodrigues June 9, 2009, 12:34 a.m. UTC
Also, don't do it in kvm_preprocessing.py since it's now done in
kvm_vm.py.

Signed-off-by: Michael Goldish <mgoldish@redhat.com>
---
 client/tests/kvm/kvm_preprocessing.py |    1 -
 client/tests/kvm/kvm_vm.py            |    2 ++
 2 files changed, 2 insertions(+), 1 deletions(-)

Comments

Lucas Meneghel Rodrigues June 10, 2009, 7:29 p.m. UTC | #1
On Mon, 2009-06-08 at 21:34 -0300, Lucas Meneghel Rodrigues wrote:
> Also, don't do it in kvm_preprocessing.py since it's now done in
> kvm_vm.py.

Applied, thanks!

> Signed-off-by: Michael Goldish <mgoldish@redhat.com>
> ---
>  client/tests/kvm/kvm_preprocessing.py |    1 -
>  client/tests/kvm/kvm_vm.py            |    2 ++
>  2 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py
> index e395d98..f60cfe8 100644
> --- a/client/tests/kvm/kvm_preprocessing.py
> +++ b/client/tests/kvm/kvm_preprocessing.py
> @@ -80,7 +80,6 @@ def preprocess_vm(test, params, env, name):
>              start_vm = True
>  
>      if start_vm:
> -        vm.destroy()
>          if not vm.create(name, params, qemu_path, image_dir, iso_dir,
>                           for_migration):
>              message = "Could not start VM"
> diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
> index 6de3989..d7b0735 100644
> --- a/client/tests/kvm/kvm_vm.py
> +++ b/client/tests/kvm/kvm_vm.py
> @@ -303,6 +303,8 @@ class VM:
>          @param for_migration: If True, start the VM with the -incoming
>          option
>          """
> +        self.destroy()
> +
>          if name != None:
>              self.name = name
>          if params != None:
diff mbox

Patch

diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py
index e395d98..f60cfe8 100644
--- a/client/tests/kvm/kvm_preprocessing.py
+++ b/client/tests/kvm/kvm_preprocessing.py
@@ -80,7 +80,6 @@  def preprocess_vm(test, params, env, name):
             start_vm = True
 
     if start_vm:
-        vm.destroy()
         if not vm.create(name, params, qemu_path, image_dir, iso_dir,
                          for_migration):
             message = "Could not start VM"
diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
index 6de3989..d7b0735 100644
--- a/client/tests/kvm/kvm_vm.py
+++ b/client/tests/kvm/kvm_vm.py
@@ -303,6 +303,8 @@  class VM:
         @param for_migration: If True, start the VM with the -incoming
         option
         """
+        self.destroy()
+
         if name != None:
             self.name = name
         if params != None: