[KVM-AUTOTEST PATCH] KVM test: support 'cache' and 'serial' params to the qemu -drive option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Support 'cache' and 'serial'.
Both can be controlled directly from the config file, e.g.:
drive_cache = writeback

or for a specific image 'image1':
drive_cache_image1 = writeback

or for 'image1' of VM 'vm1':
drive_cache_image1_vm1 = writeback

The cache options are listed in the QEMU documentation.
(currently "none", "writeback", or "writethrough" are supported.)

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

diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
index 9aea3fb..e98ffd7 100644
--- a/client/tests/kvm/kvm_vm.py
+++ b/client/tests/kvm/kvm_vm.py
@@ -226,6 +226,10 @@ class VM:
                                                                image_dir)
             if image_params.get("drive_format"):
                 qemu_cmd += ",if=%s" % image_params.get("drive_format")
+            if image_params.get("drive_cache"):
+                qemu_cmd += ",cache=%s" % image_params.get("drive_cache")
+            if image_params.get("drive_serial"):
+                qemu_cmd += ",serial=%s" % image_params.get("drive_serial")
             if image_params.get("image_snapshot") == "yes":
                 qemu_cmd += ",snapshot=on"
             if image_params.get("image_boot") == "yes":
-- 
1.5.4.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux