Created a special category, 'kernel_params', for options passed to the kernel which we are booting, such as the installer kernels. With this patch we don't mess up with the other uses of extra_params still keeping consistency between libvirt and kvm tests. Signe-off-by: Lucas Meneghel Rodrigues <lmr@xxxxxxxxxx> --- client/virt/guest-os.cfg.sample | 21 +++++++++------------ client/virt/kvm_vm.py | 4 ++++ client/virt/libvirt_vm.py | 6 +++--- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/client/virt/guest-os.cfg.sample b/client/virt/guest-os.cfg.sample index 538dd87..7eb2b1d 100644 --- a/client/virt/guest-os.cfg.sample +++ b/client/virt/guest-os.cfg.sample @@ -104,11 +104,10 @@ variants: shell_prompt = "^\[.*\][\#\$]\s*$" unattended_install: boot_path = "images/pxeboot" - # TODO: does kvm need to prefix this with '--append'? - extra_params += " 'ks=cdrom nicdelay=60 console=ttyS0,115200 console=tty0'" + kernel_params = "ks=cdrom nicdelay=60 console=ttyS0,115200 console=tty0" # You have to use ks=floppy if you want to use floppies to # hold your kickstart file - #extra_params += " ks=floppy nicdelay=60 console=ttyS0,115200 console=tty0" + #kernel_params = "ks=floppy nicdelay=60 console=ttyS0,115200 console=tty0" variants: - 8.32: no setup @@ -403,8 +402,7 @@ variants: boot_path = images/pxeboot # You have to use ks=floppy if you want to use floppies to # hold your kickstart file - # TODO: does kvm need to prefix this with '--append'? - extra_params += " ks=cdrom nicdelay=60 console=ttyS0,115200 console=tty0" + kernel_params = "ks=cdrom nicdelay=60 console=ttyS0,115200 console=tty0" variants: - 3.9.i386: no setup autotest linux_s3 guest_s4 shutdown multi_disk @@ -768,8 +766,8 @@ variants: unattended_install: # You have to use autoyast=floppy if you want to use floppies to # hold your autoyast file - #extra_params += " --append 'autoyast=floppy console=ttyS0,115200 console=tty0'" - extra_params += " --append 'autoyast=device://scd0/autoinst.xml console=ttyS0,115200 console=tty0'" + #kernel_params = "autoyast=floppy console=ttyS0,115200 console=tty0" + kernel_params = "autoyast=device://scd0/autoinst.xml console=ttyS0,115200 console=tty0" wait_no_ack = yes variants: @@ -932,10 +930,10 @@ variants: unattended_install: # You have to use autoyast=floppy if you want to use floppies to # hold your autoyast file - #extra_params += " --append 'autoyast=floppy console=ttyS0,115200 console=tty0'" - extra_params += " --append 'autoyast=device://scd0/autoinst.xml console=ttyS0,115200 console=tty0'" + #kernel_params = "autoyast=floppy console=ttyS0,115200 console=tty0" + kernel_params = "autoyast=device://scd0/autoinst.xml console=ttyS0,115200 console=tty0" # --- uncomment the below line for other SLES 10 distros only --- - #extra_params += " --append 'autoyast=device://hdb/autoinst.xml console=ttyS0,115200 console=tty0'" + #kernel_params = "autoyast=device://hdb/autoinst.xml console=ttyS0,115200 console=tty0" kernel = linux initrd = initrd wait_no_ack = yes @@ -1036,7 +1034,7 @@ variants: kernel = linux initrd = initrd wait_no_ack = yes - extra_params += " --append 'console=ttyS0,115200 console=tty0'" + kernel_params = "console=ttyS0,115200 console=tty0" variants: - 6.10-32: @@ -1720,4 +1718,3 @@ variants: steps = steps/memtest86+.steps cdrom_cd1 = isos/misc/memtest86+-2.01.iso md5sum_cd1 = 9fae22f2666369968a76ef59e9a81ced - diff --git a/client/virt/kvm_vm.py b/client/virt/kvm_vm.py index 1fb177f..b55d57d 100644 --- a/client/virt/kvm_vm.py +++ b/client/virt/kvm_vm.py @@ -680,6 +680,10 @@ class VM(virt_vm.BaseVM): for pci_id in vm.pa_pci_ids: qemu_cmd += add_pcidevice(help, pci_id) + kernel_params = params.get("kernel_params") + if kernel_params: + qemu_cmd += " --append '%s'" % kernel_params + extra_params = params.get("extra_params") if extra_params: qemu_cmd += " %s" % extra_params diff --git a/client/virt/libvirt_vm.py b/client/virt/libvirt_vm.py index 97b9f8b..437fbe6 100644 --- a/client/virt/libvirt_vm.py +++ b/client/virt/libvirt_vm.py @@ -761,9 +761,9 @@ class VM(virt_vm.BaseVM): virt_install_cmd += (" --wait %s" % params.get("virt_install_wait_time")) - extra_params = params.get("extra_params") - if extra_params: - virt_install_cmd += " --extra-args '%s'" % extra_params + kernel_params = params.get("kernel_params") + if kernel_params: + virt_install_cmd += " --extra-args '%s'" % kernel_params virt_install_cmd += " --noautoconsole" -- 1.7.7.4 -- 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