diff mbox

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

Message ID 20100528082501.31543.64111.stgit@dhcp-91-25.nay.redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jason Wang May 28, 2010, 8:25 a.m. UTC
None
diff mbox

Patch

diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
index bca9d15..c7eed56 100755
--- a/client/tests/kvm/kvm_vm.py
+++ b/client/tests/kvm/kvm_vm.py
@@ -360,6 +360,16 @@  class VM:
             tftp = kvm_utils.get_path(root_dir, tftp)
             qemu_cmd += add_tftp(help, 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
+        
         for redir_name in kvm_utils.get_sub_dict_names(params, "redirs"):
             redir_params = kvm_utils.get_sub_dict(params, redir_name)
             guest_port = int(redir_params.get("guest_port"))