From: Lucas Meneghel Rodrigues Subject: [PATCH 1/2] KVM test: Add a new (optional) extra param to VM, cdrom_extra Date: Mon, 18 Jan 2010 00:36:41 -0200 Message-ID: <1263782202-8086-1-git-send-email-lmr@redhat.com> Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues To: autotest@test.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:52127 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751653Ab0ARCgs (ORCPT ); Sun, 17 Jan 2010 21:36:48 -0500 Sender: kvm-owner@vger.kernel.org List-ID: In order to support windows install through unattended method (we need to setup rss.exe on the hosts), add an additional (and optional) parameter to tests, cdrom_extra, to make possible to boot a VM with 2 CDs. Signed-off-by: Lucas Meneghel Rodrigues --- client/tests/kvm/kvm_vm.py | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index ed6d5ad..483204c 100755 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.py @@ -268,7 +268,15 @@ class VM: iso = params.get("cdrom") if iso: iso = kvm_utils.get_path(root_dir, iso) - qemu_cmd += " -cdrom %s" % iso + qemu_cmd += " -drive file=%s,index=2,media=cdrom" % iso + + # Even though this is not a really scalable approach, + # it doesn't seem like we are going to need more than + # 2 CDs active on the same VM. + iso_extra = params.get("cdrom_extra") + if iso_extra: + iso_extra = kvm_utils.get_path(root_dir, iso_extra) + qemu_cmd += " -drive file=%s,index=3,media=cdrom" % iso_extra # We may want to add {floppy_otps} parameter for -fda # {fat:floppy:}/path/. However vvfat is not usually recommended -- 1.6.5.2