--machine MACHINE :set the machine type to emulate.
add libvirt command line parameter "--machine ?" wrapper in libvirt_vm.py.

Signed-off-by: Qing Lin<[email protected]>
---
  client/virt/libvirt_vm.py |    7 +++++++
  1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/client/virt/libvirt_vm.py b/client/virt/libvirt_vm.py
index 355ac5e..f66eca5 100644
--- a/client/virt/libvirt_vm.py
+++ b/client/virt/libvirt_vm.py
@@ -663,6 +663,9 @@ class VM(virt_vm.BaseVM):
          def add_name(help, name):
              return " --name '%s'" % name

+        def add_machine_type(help, machine_type):
+            return " --machine %s" % machine_type
+
          def add_hvm_or_pv(help, hvm_or_pv):
              if hvm_or_pv == "hvm":
                  return " --hvm --accelerate"
@@ -846,6 +849,10 @@ class VM(virt_vm.BaseVM):
          # Add the VM's name
          virt_install_cmd += add_name(help, name)

+        machine_type = params.get("machine_type")
+        if machine_type:
+            virt_install_cmd += add_machine_type(help, machine_type)
+
          mem = params.get("mem")
          if mem:
              virt_install_cmd += add_mem(help, mem)

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to