[PATCH 1/3] KVM test: Add the support of kernel and initrd option for qemu-kvm

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

 



"-kernel" option is useful for both unattended installation and the
unittest in /kvm/user/test.

Signed-off-by: Jason Wang <jasowang@xxxxxxxxxx>
---
 client/tests/kvm/kvm_vm.py |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
index c203e14..2515859 100755
--- a/client/tests/kvm/kvm_vm.py
+++ b/client/tests/kvm/kvm_vm.py
@@ -288,6 +288,16 @@ class VM:
             tftp = kvm_utils.get_path(root_dir, tftp)
             qemu_cmd += " -tftp %s" % tftp
 
+        kernel = params.get("kernel")
+        if kernel:
+            kernel = kvm_utils.get_path(root_dir, kernel)
+            qemu_cmd += " -kernel %s" % kernel
+        
+        initrd = params.get("initrd")
+        if initrd:
+            initrd = kvm_utils.get_path(root_dir, initrd)
+            qemu_cmd += " -initrd %s" % initrd
+        
         extra_params = params.get("extra_params")
         if extra_params:
             qemu_cmd += " %s" % extra_params

--
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