diff mbox

[DRAFT] KVM-TEST: Use cdrom for Linux guests in unattended_install

Message ID 20100831065216.5544.42848.stgit@z (mailing list archive)
State New, archived
Headers show

Commit Message

Amos Kong Aug. 31, 2010, 6:52 a.m. UTC
None
diff mbox

Patch

diff --git a/client/tests/kvm/scripts/unattended.py b/client/tests/kvm/scripts/unattended.py
index a0f96e7..9beff0a 100755
--- a/client/tests/kvm/scripts/unattended.py
+++ b/client/tests/kvm/scripts/unattended.py
@@ -81,8 +81,14 @@  class UnattendedInstall(object):
 
         self.kernel_args = os.environ.get('KVM_TEST_kernel_args', '')
         self.finish_program = os.environ.get('KVM_TEST_finish_program', '')
-        cdrom_iso = os.environ.get('KVM_TEST_cdrom_cd1')
         self.unattended_file = os.environ.get('KVM_TEST_unattended_file')
+        cdrom_cd1 = os.environ.get('KVM_TEST_cdrom_cd1', '')
+        cdrom_cd2 = os.environ.get('KVM_TEST_cdrom_cd2', '')
+        self.cd1_iso = os.path.join(kvm_test_dir, cdrom_cd1)
+        self.cd2_iso = os.path.join(kvm_test_dir, cdrom_cd2)
+        cd1_dir = os.path.dirname(self.cd1_iso)
+        if not os.path.isdir(cd1_dir):
+            os.makedirs(cd1_dir)
 
         install_virtio = os.environ.get('KVM_TEST_install_virtio', 'no')
         if install_virtio == 'yes':
@@ -120,16 +126,19 @@  class UnattendedInstall(object):
         self.qemu_img_bin = os.environ.get('KVM_TEST_qemu_img_binary')
         if not os.path.isabs(self.qemu_img_bin):
             self.qemu_img_bin = os.path.join(kvm_test_dir, self.qemu_img_bin)
-        self.cdrom_iso = os.path.join(kvm_test_dir, cdrom_iso)
-        self.floppy_mount = tempfile.mkdtemp(prefix='floppy_', dir='/tmp')
-        self.cdrom_mount = tempfile.mkdtemp(prefix='cdrom_', dir='/tmp')
+
+        self.cd1_mount = tempfile.mkdtemp(prefix='cd1_', dir='/tmp')
+        self.cd2_mount = tempfile.mkdtemp(prefix='cd2_', dir='/tmp')
+        self.boot_img_mount = tempfile.mkdtemp(prefix='boot_img_', dir='/tmp')
         self.nfs_mount = tempfile.mkdtemp(prefix='nfs_', dir='/tmp')
-        floppy_name = os.environ['KVM_TEST_floppy']
+
+        floppy_name = os.environ.get('KVM_TEST_floppy', '')
         self.floppy_img = os.path.join(kvm_test_dir, floppy_name)
         floppy_dir = os.path.dirname(self.floppy_img)
         if not os.path.isdir(floppy_dir):
             os.makedirs(floppy_dir)
 
+
         self.pxe_dir = os.environ.get('KVM_TEST_pxe_dir', '')
         self.pxe_image = os.environ.get('KVM_TEST_pxe_image', '')
         self.pxe_initrd = os.environ.get('KVM_TEST_pxe_initrd', '')
@@ -162,7 +171,7 @@  class UnattendedInstall(object):
             path_list = glob.glob('*')
             for path in path_list:
                 src = os.path.join(self.virtio_floppy_mount, path)
-                dst = os.path.join(self.floppy_mount, path)
+                dst = os.path.join(self.boot_img_mount, path)
                 if os.path.isdir(path):
                     shutil.copytree(src, dst)
                 elif os.path.isfile(path):
@@ -205,7 +214,7 @@  class UnattendedInstall(object):
         4) Re-write the config file to the disk
         """
         self.copy_virtio_drivers_floppy()
-        txtsetup_oem = os.path.join(self.floppy_mount, 'txtsetup.oem')
+        txtsetup_oem = os.path.join(self.boot_img_mount, 'txtsetup.oem')
         if not os.path.isfile(txtsetup_oem):
             raise SetupError('File txtsetup.oem not found on the install '
                              'floppy. Please verify if your floppy virtio '
@@ -223,37 +232,38 @@  class UnattendedInstall(object):
             fp.close()
 
 
-    def create_boot_floppy(self):
+    def create_boot_img(self):
         """
-        Prepares a boot floppy by creating a floppy image file, mounting it and
-        copying an answer file (kickstarts for RH based distros, answer files
-        for windows) to it. After that the image is umounted.
+        Prepares a boot floppy/iso image by creating a floppy/iso image file,
+        it contains an answer file (kickstarts for RH based distros, answer
+        files for windows). After that the image is umounted.
         """
-        print "Creating boot floppy"
-
-        if os.path.exists(self.floppy_img):
-            os.remove(self.floppy_img)
-
-        c_cmd = '%s create -f raw %s 1440k' % (self.qemu_img_bin,
-                                               self.floppy_img)
-        if os.system(c_cmd):
-            raise SetupError('Could not create floppy image.')
-
-        f_cmd = 'mkfs.msdos -s 1 %s' % self.floppy_img
-        if os.system(f_cmd):
-            raise SetupError('Error formatting floppy image.')
-
         try:
-            m_cmd = 'mount -o loop,rw %s %s' % (self.floppy_img,
-                                                self.floppy_mount)
-            if os.system(m_cmd):
-                raise SetupError('Could not mount floppy image.')
+            if self.floppy_img:
+                print "Creating boot floppy"
+
+                if os.path.exists(self.floppy_img):
+                    os.remove(self.floppy_img)
+                c_cmd = '%s create -f raw %s 1440k' % (self.qemu_img_bin,
+                                                       self.floppy_img)
+                if os.system(c_cmd):
+                    raise SetupError('Could not create floppy image.')
+
+                m_cmd = 'mount -o loop %s %s' % (self.floppy_img, self.boot_img_mount)
+                if os.system(m_cmd):
+                    raise SetupError('Could not mount floppy image.')
+
+                f_cmd = 'mkfs.msdos -s 1 %s' % self.floppy_img
+                if os.system(f_cmd):
+                    raise SetupError('Error formatting floppy image.')
+            else:
+                print "Creating boot cdrom iso"
 
             if self.unattended_file.endswith('.sif'):
                 dest_fname = 'winnt.sif'
                 setup_file = 'winnt.bat'
                 setup_file_path = os.path.join(self.unattended_dir, setup_file)
-                setup_file_dest = os.path.join(self.floppy_mount, setup_file)
+                setup_file_dest = os.path.join(self.boot_img_mount, setup_file)
                 shutil.copyfile(setup_file_path, setup_file_dest)
                 if self.install_virtio:
                     self.setup_virtio_win2003()
@@ -271,7 +281,7 @@  class UnattendedInstall(object):
                     # SUSE autoyast install
                     dest_fname = "autoinst.xml"
 
-            dest = os.path.join(self.floppy_mount, dest_fname)
+            dest = os.path.join(self.boot_img_mount, dest_fname)
 
             # Replace KVM_TEST_CDKEY (in the unattended file) with the cdkey
             # provided for this test and replace the KVM_TEST_MEDIUM with
@@ -346,20 +356,26 @@  class UnattendedInstall(object):
 
             if self.finish_program:
                 dest_fname = os.path.basename(self.finish_program)
-                dest = os.path.join(self.floppy_mount, dest_fname)
+                dest = os.path.join(self.boot_img_mount, dest_fname)
                 shutil.copyfile(self.finish_program, dest)
 
-        finally:
-            u_cmd = 'umount %s' % self.floppy_mount
-            if os.system(u_cmd):
-                raise SetupError('Could not unmount floppy at %s.' %
-                                 self.floppy_mount)
-            self.cleanup(self.floppy_mount)
-
-        os.chmod(self.floppy_img, 0755)
-
-        print "Boot floppy created successfuly"
+            if not self.floppy_img:
+                m_cmd = 'mkisofs -o %s %s/*' % (self.cd1_iso,
+                                                self.boot_img_mount)
+                if os.system(m_cmd):
+                    raise SetupError('Could not create cdrom iso.')
 
+        finally:
+            if self.floppy_img:
+                u_cmd = 'umount %s' % self.boot_img_mount
+                if os.system(u_cmd):
+                    raise SetupError('Could not unmount floppy at %s.' %
+                                     self.boot_img_mount)
+                self.cleanup(self.boot_img_mount)
+                print "Boot floppy created successfuly"
+            else:
+                os.chmod(self.cd1_iso, 0755)
+                print "Boot cdrom iso created successfuly"
 
     def setup_pxe_boot(self):
         """
@@ -388,13 +404,13 @@  class UnattendedInstall(object):
         shutil.copyfile(pxe_file, pxe_dest)
 
         try:
-            m_cmd = 'mount -t iso9660 -v -o loop,ro %s %s' % (self.cdrom_iso,
-                                                              self.cdrom_mount)
+            m_cmd = 'mount -t iso9660 -v -o loop,ro %s %s' % (self.cd1_iso,
+                                                              self.cd2_mount)
             if os.system(m_cmd):
                 raise SetupError('Could not mount CD image %s.' %
-                                 self.cdrom_iso)
+                                 self.cd1_iso)
 
-            pxe_dir = os.path.join(self.cdrom_mount, self.pxe_dir)
+            pxe_dir = os.path.join(self.cd2_mount, self.pxe_dir)
             pxe_image = os.path.join(pxe_dir, self.pxe_image)
             pxe_initrd = os.path.join(pxe_dir, self.pxe_initrd)
 
@@ -415,11 +431,11 @@  class UnattendedInstall(object):
             shutil.copyfile(pxe_initrd, tftp_initrd)
 
         finally:
-            u_cmd = 'umount %s' % self.cdrom_mount
+            u_cmd = 'umount %s' % self.cd2_mount
             if os.system(u_cmd):
                 raise SetupError('Could not unmount CD at %s.' %
-                                 self.cdrom_mount)
-            self.cleanup(self.cdrom_mount)
+                                 self.cd2_mount)
+            self.cleanup(self.cd2_mount)
 
         pxe_config_dir = os.path.join(self.tftp_root, 'pxelinux.cfg')
         if not os.path.isdir(pxe_config_dir):
@@ -511,11 +527,12 @@  class UnattendedInstall(object):
         print "Variables set:"
         print "    medium: " + str(self.medium)
         print "    qemu_img_bin: " + str(self.qemu_img_bin)
-        print "    cdrom iso: " + str(self.cdrom_iso)
+        print "    cd1_iso: " + str(self.cd1_iso)
+        print "    cd2_iso: " + str(self.cd2_iso)
         print "    unattended_file: " + str(self.unattended_file)
         print "    kernel_args: " + str(self.kernel_args)
         print "    tftp_root: " + str(self.tftp_root)
-        print "    floppy_mount: " + str(self.floppy_mount)
+        print "    boot_img_mount: " + str(self.boot_img_mount)
         print "    floppy_img: " + str(self.floppy_img)
         print "    finish_program: " + str(self.finish_program)
         print "    pxe_dir: " + str(self.pxe_dir)
@@ -528,8 +545,8 @@  class UnattendedInstall(object):
         print "    nfs_dir: " + str(self.nfs_dir)
         print "    nfs_mount: " + str(self.nfs_mount)
 
-        if self.unattended_file and self.floppy_img is not None:
-            self.create_boot_floppy()
+        if self.unattended_file and self.cd1_iso is not None:
+            self.create_boot_img()
         if self.medium == "cdrom":
             if self.tftp_root:
                 self.setup_pxe_boot()
diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample
index a10f770..624211a 100644
--- a/client/tests/kvm/tests_base.cfg.sample
+++ b/client/tests/kvm/tests_base.cfg.sample
@@ -90,7 +90,6 @@  variants:
         pre_command += " scripts/unattended.py;"
         extra_params += " -boot d"
         guest_port_unattended_install = 12323
-        floppy = "images/floppy.img"
         kernel = vmlinuz
         initrd = initrd.img
         nic_mode = tap
@@ -105,12 +104,12 @@  variants:
             # Install guest from http/ftp url
             - url:
                 medium = url
-                extra_params += " --append ks=floppy"
+                extra_params += " --append ks=cdrom"
                 url = REPLACE_THIS_WITH_TREE_URL
             # Install guest from nfs nfs_server:nfs_dir
             - nfs:
                 medium = nfs
-                extra_params += " --append ks=floppy"
+                extra_params += " --append ks=cdrom"
                 nfs_server = REPLACE_THIS_WITH_NFS_SERVER
                 nfs_dir = REPLACE_THIS_WITH_NFS_DIRECTORY
             # Install guest with a remote kickstart
@@ -645,6 +644,10 @@  variants:
                 time_command = date +'TIME: %a %m/%d/%Y %H:%M:%S.%N'
                 time_filter_re = "(?:TIME: \w\w\w )(.{19})(?:\.\d\d)"
                 time_format = "%m/%d/%Y %H:%M:%S"
+        unattended_install.(cdrom|nfs|url):
+            cdrom_cd1 = ../images/ks.iso
+        unattended_install.cdrom:
+            cdroms += " cd2"
 
         variants:
             - Fedora:
@@ -657,13 +660,13 @@  variants:
                     tftp = "images/tftpboot"
                     bootp = "/pxelinux.0"
                     extra_params += " -boot cn"
-                    kernel_args = "ks=floppy nicdelay=60 console=ttyS0,115200 console=tty0"
+                    kernel_args = "ks=cdrom nicdelay=60 console=ttyS0,115200 console=tty0"
 
                 variants:
                     - 8.32:
                         no setup
                         image_name = fc8-32
-                        cdrom_cd1 = linux/Fedora-8-i386-DVD.iso
+                        cdrom_cd2 = linux/Fedora-8-i386-DVD.iso
                         md5sum = dd6c79fddfff36d409d02242e7b10189
                         md5sum_1m = dabae451bb69fbbad0e505b25144b1f9
                         install:
@@ -676,7 +679,7 @@  variants:
                     - 8.64:
                         no setup
                         image_name = f8-64
-                        cdrom_cd1 = linux/Fedora-8-x86_64-DVD.iso
+                        cdrom_cd2 = linux/Fedora-8-x86_64-DVD.iso
                         md5sum = 2cb231a86709dec413425fd2f8bf5295
                         md5sum_1m = 145f6414e19492649a56c89f0a45e719
                         install:
@@ -688,7 +691,7 @@  variants:
 
                     - 9.32:
                         image_name = f9-32
-                        cdrom_cd1 = linux/Fedora-9-i386-DVD.iso
+                        cdrom_cd2 = linux/Fedora-9-i386-DVD.iso
                         md5sum = 72601f685ea8c808c303353d8bf4d307
                         md5sum_1m = f24fa25689e5863f1b99984c6feb787f
                         install:
@@ -700,7 +703,7 @@  variants:
 
                     - 9.64:
                         image_name = f9-64
-                        cdrom_cd1 = linux/Fedora-9-x86_64-DVD.iso
+                        cdrom_cd2 = linux/Fedora-9-x86_64-DVD.iso
                         md5sum = 05b2ebeed273ec54d6f9ed3d61ea4c96
                         md5sum_1m = 9822ab5097e37e8fe306ef2192727db4
                         install:
@@ -712,7 +715,7 @@  variants:
 
                     - 10.32:
                         image_name = f10-32
-                        cdrom_cd1 = linux/Fedora-10-i386-DVD.iso
+                        cdrom_cd2 = linux/Fedora-10-i386-DVD.iso
                         md5sum = 27e581edb392728c4a07d00d3fc5ced0
                         md5sum_1m = bd67c68bdf595e4ba7131ec702159181
                         unattended_install.cdrom:
@@ -722,7 +725,7 @@  variants:
 
                     - 10.64:
                         image_name = f10-64
-                        cdrom_cd1 = linux/Fedora-10-x86_64-DVD.iso
+                        cdrom_cd2 = linux/Fedora-10-x86_64-DVD.iso
                         sha1sum = f1e5ae7db6a1ba227de7294c4112385922388648
                         md5sum_1m = 732857cbf40c80c34683e874601d982c
                         unattended_install.cdrom:
@@ -732,7 +735,7 @@  variants:
 
                     - 11.32:
                         image_name = f11-32
-                        cdrom_cd1 = linux/Fedora-11-i386-DVD.iso
+                        cdrom_cd2 = linux/Fedora-11-i386-DVD.iso
                         md5sum = e3b1e2d1ba42aa4705fa5f41771b3927
                         md5sum_1m = dc8ddf90648c247339c721395aa49714
                         install:
@@ -744,7 +747,7 @@  variants:
 
                     - 11.64:
                         image_name = f11-64
-                        cdrom_cd1 = linux/Fedora-11-x86_64-DVD.iso
+                        cdrom_cd2 = linux/Fedora-11-x86_64-DVD.iso
                         md5sum = 9d419844adeb93120215fe7505c9bce8
                         md5sum_1m = 405ee05e2387a2e4328b008d5bcbdd1e
                         unattended_install.cdrom:
@@ -754,7 +757,7 @@  variants:
 
                     - 12.32:
                         image_name = f12-32
-                        cdrom_cd1 = linux/Fedora-12-i386-DVD.iso
+                        cdrom_cd2 = linux/Fedora-12-i386-DVD.iso
                         md5sum = 2c4c1c0d09f2fbcfd8ee6a0c5542eeb2
                         md5sum_1m = eee935d7f0cf2ef03f6ddce3a2a50050
                         unattended_install.cdrom:
@@ -764,7 +767,7 @@  variants:
 
                     - 12.64:
                         image_name = f12-64
-                        cdrom_cd1 = linux/Fedora-12-x86_64-DVD.iso
+                        cdrom_cd2 = linux/Fedora-12-x86_64-DVD.iso
                         md5sum = 6dd31e292cc2eb1140544e9b1ba61c56
                         md5sum_1m = 514efbd7698b55ff6768c8605438bfc5
                         unattended_install.cdrom:
@@ -774,7 +777,7 @@  variants:
 
                     - 13.32:
                         image_name = f13-32
-                        cdrom_cd1 = linux/Fedora-13-i386-DVD.iso
+                        cdrom_cd2 = linux/Fedora-13-i386-DVD.iso
                         md5sum = 212fec517c2629b4b5eaf3662ac13136
                         md5sum_1m = 4e1578a6ed5a6e7cd03b8fb074030746
                         unattended_install:
@@ -784,7 +787,7 @@  variants:
 
                     - 13.64:
                         image_name = f13-64
-                        cdrom_cd1 = linux/Fedora-13-x86_64-DVD.iso
+                        cdrom_cd2 = linux/Fedora-13-x86_64-DVD.iso
                         md5sum = 6fbae6379cf27f36e1f2c7827ba7dc35
                         md5sum_1m = 68821b9de4d3b5975d6634334e7f47a6
                         unattended_install:
@@ -806,7 +809,7 @@  variants:
                 only install
                 image_name = mandriva-one-2007
                 steps = Mandriva-One-2007-32.steps
-                cdrom_cd1 = linux/mandriva-one-2007-i386.iso
+                cdrom_cd2 = linux/mandriva-one-2007-i386.iso
                 md5sum = 7e9e183dc11b9d39f480238e4e12bb05
                 md5sum_1m = dc7865a75db665efc86d59bca7c1fe07
 
@@ -825,7 +828,7 @@  variants:
                 variants:
                     - 11.0.32:
                         image_name = openSUSE-11.0-32
-                        cdrom_cd1 = linux/openSUSE-11.0-DVD-i386.iso
+                        cdrom_cd2 = linux/openSUSE-11.0-DVD-i386.iso
                         md5sum = ed6a5b3feb668866df812b1c2aed9d7f
                         md5sum_1m = c720b30557af758e69de450409516369
                         install:
@@ -838,7 +841,7 @@  variants:
 
                     - 11.0.64:
                         image_name = openSUSE-11.0-64
-                        cdrom_cd1 = linux/openSUSE-11.0-DVD-x86_64.iso
+                        cdrom_cd2 = linux/openSUSE-11.0-DVD-x86_64.iso
                         md5sum = 512c8346b0f8eb35f28c4eb96454d391
                         md5sum_1m = 661aa4cd031df2f25ea0102318a3f4d1
                         unattended_install.cdrom:
@@ -849,7 +852,7 @@  variants:
 
                     - 11.1.32:
                         image_name = openSUSE-11.1-32
-                        cdrom_cd1 = linux/openSUSE-11.1-DVD-i586.iso
+                        cdrom_cd2 = linux/openSUSE-11.1-DVD-i586.iso
                         md5sum = 8f51b278c0415be28c5699e465444bd3
                         md5sum_1m = b70217417468389083429f81ba7ce2bd
                         install:
@@ -862,7 +865,7 @@  variants:
 
                     - 11.1.64:
                         image_name = openSUSE-11.1-64
-                        cdrom_cd1 = linux/openSUSE-11.1-DVD-x86_64.iso
+                        cdrom_cd2 = linux/openSUSE-11.1-DVD-x86_64.iso
                         md5sum = 2afee1b8a87175e6dee2b8dbbd1ad8e8
                         md5sum_1m = 768ca32503ef92c28f2d144f2a87e4d0
                         install:
@@ -875,7 +878,7 @@  variants:
 
                     - 11.2.32:
                         image_name = openSUSE-11.2-32
-                        cdrom_cd1 = linux/openSUSE-11.2-DVD-i586.iso
+                        cdrom_cd2 = linux/openSUSE-11.2-DVD-i586.iso
                         md5sum = 295d713314a30ad017948f0d542c6d92
                         md5sum_1m = 1f8767d00acb492be5a5627c834e543f
                         unattended_install.cdrom:
@@ -886,7 +889,7 @@  variants:
 
                     - 11.2.64:
                         image_name = openSUSE-11.2-64
-                        cdrom_cd1 = linux/openSUSE-11.2-DVD-x86_64.iso
+                        cdrom_cd2 = linux/openSUSE-11.2-DVD-x86_64.iso
                         md5sum = 6a09295e34dc030319d040f67f4742c6
                         md5sum_1m = 11fd11d39744450b898f04c371dde2e7
                         unattended_install.cdrom:
@@ -897,7 +900,7 @@  variants:
 
                     - 11.3.32:
                         image_name = openSUSE-11.3-32
-                        cdrom_cd1 = linux/openSUSE-11.3-DVD-i586.iso
+                        cdrom_cd2 = linux/openSUSE-11.3-DVD-i586.iso
                         md5sum = 1a1da28c84e3cdad750d5cfa21c4fd17
                         md5sum_1m = 4dd26906ce6cb3946519cb0b0de4b0f8
                         unattended_install.cdrom:
@@ -908,7 +911,7 @@  variants:
 
                     - 11.3.64:
                         image_name = openSUSE-11.3-64
-                        cdrom_cd1 = linux/openSUSE-11.3-DVD-x86_64.iso
+                        cdrom_cd2 = linux/openSUSE-11.3-DVD-x86_64.iso
                         md5sum = adf5d2a0a03c1e3aaf102fd6a4771b87
                         md5sum_1m = e0dd12dac30d296417256775e1234c6e
                         unattended_install.cdrom:
@@ -930,7 +933,7 @@  variants:
                 variants:
                     - 11.0.32:
                         image_name = sles11-32
-                        cdrom_cd1 = linux/SLES-11-DVD-i586-GM-DVD1.iso
+                        cdrom_cd2 = linux/SLES-11-DVD-i586-GM-DVD1.iso
                         md5sum = 4958d4dde2575666355c8a1c5858bab0
                         md5sum_1m = 1f19d4eff5bcead2a3e5b8b4212b6796
                         unattended_install.cdrom:
@@ -941,7 +944,7 @@  variants:
 
                     - 11.0.64:
                         image_name = sles11-64
-                        cdrom_cd1 = linux/SLES-11-DVD-x86_64-GM-DVD1.iso
+                        cdrom_cd2 = linux/SLES-11-DVD-x86_64-GM-DVD1.iso
                         md5sum = 50a2bd45cd12c3808c3ee48208e2586b
                         md5sum_1m = 00000951cab7c32e332362fc424c1054
                         unattended_install.cdrom:
@@ -952,7 +955,7 @@  variants:
 
                     - 11.1.32:
                         image_name = sles11sp1-32
-                        cdrom_cd1 = linux/SLES-11-SP1-DVD-i586-GM-DVD1.iso
+                        cdrom_cd2 = linux/SLES-11-SP1-DVD-i586-GM-DVD1.iso
                         md5sum = 0dd6886858d93501c38854552b9b1b0d
                         md5sum_1m = a626a3d50813410e3ac42794e05773bb
                         unattended_install:
@@ -963,7 +966,7 @@  variants:
 
                     - 11.1.64:
                         image_name = sles11sp1-64
-                        cdrom_cd1 = linux/SLES-11-SP1-DVD-x86_64-GM-DVD1.iso
+                        cdrom_cd2 = linux/SLES-11-SP1-DVD-x86_64-GM-DVD1.iso
                         md5sum = d2e10420f3689faa49a004b60fb396b7
                         md5sum_1m = f7f67b5da46923a9f01da8a2b6909654
                         unattended_install:
@@ -1017,14 +1020,14 @@  variants:
                     tftp = "images/tftpboot"
                     bootp = "/pxelinux.0"
                     extra_params += " -boot cn"
-                    kernel_args = "ks=floppy nicdelay=60 console=ttyS0,115200 console=tty0"
+                    kernel_args = "ks=cdrom nicdelay=60 console=ttyS0,115200 console=tty0"
 
                 variants:
                     - 3.9.i386:
                         no setup autotest linux_s3 guest_s4 shutdown
                         image_name = rhel3-32
                         mem_chk_cmd = dmidecode | awk -F: '/Maximum Capacity/ {print $2}'
-                        cdrom_cd1 = linux/RHEL-3.9-i386-DVD.iso
+                        cdrom_cd2 = linux/RHEL-3.9-i386-DVD.iso
                         md5sum = ddd11a1cb104119039b0fa05df6d52b8
                         md5sum_1m = 5f10c9417c7b8372b3456c1b5f3f9ed0
                         install:
@@ -1038,7 +1041,7 @@  variants:
                         no setup autotest linux_s3 guest_s4 shutdown
                         image_name = rhel3-64
                         mem_chk_cmd = dmidecode | awk -F: '/Maximum Capacity/ {print $2}'
-                        cdrom_cd1 = linux/RHEL-3.9-x86_64-DVD.iso
+                        cdrom_cd2 = linux/RHEL-3.9-x86_64-DVD.iso
                         md5sum = bf4635e4a4bd3b43838e72bc8c329d55
                         md5sum_1m = 18ecd37b639109f1b2af05cfb57dfeaf
                         install:
@@ -1051,7 +1054,7 @@  variants:
                     - 4.7.i386:
                         no setup autotest
                         image_name = rhel4-32
-                        cdrom_cd1 = linux/RHEL-4.7-i386-DVD.iso
+                        cdrom_cd2 = linux/RHEL-4.7-i386-DVD.iso
                         md5sum = ee5092653732a88ddbaf8eef2484c500
                         md5sum_1m = 127081cbed825d7232331a2083975528
                         install:
@@ -1064,7 +1067,7 @@  variants:
                     - 4.7.x86_64:
                         no setup autotest
                         image_name = rhel4-64
-                        cdrom_cd1 = linux/RHEL-4.7-x86_64-DVD.iso
+                        cdrom_cd2 = linux/RHEL-4.7-x86_64-DVD.iso
                         md5sum = ea9dae16dd86f7d94092d0e672333292
                         md5sum_1m = 58fa63eaee68e269f4cb1d2edf479792
                         install:
@@ -1077,7 +1080,7 @@  variants:
                     - 4.8.i386:
                         no setup autotest
                         image_name = rhel4-32
-                        cdrom_cd1 = linux/RHEL-4.8-i386-DVD.iso
+                        cdrom_cd2 = linux/RHEL-4.8-i386-DVD.iso
                         md5sum = b024f0af5079539d3ef51f71fed0b194
                         md5sum_1m = 969c197402b9058f28a278c1f807d15b
                         unattended_install.cdrom:
@@ -1088,7 +1091,7 @@  variants:
                     - 4.8.x86_64:
                         no setup autotest
                         image_name = rhel4-64
-                        cdrom_cd1 = linux/RHEL-4.8-x86_64-DVD.iso
+                        cdrom_cd2 = linux/RHEL-4.8-x86_64-DVD.iso
                         md5sum = 696bc877b0200cc942626673fcc3fc09
                         md5sum_1m = b11ac0ef7fd345ad712966972db63886
                         unattended_install.cdrom:
@@ -1099,7 +1102,7 @@  variants:
                     - 5.3.i386:
                         no setup
                         image_name = rhel5-32
-                        cdrom_cd1 = linux/RHEL-5.3-i386-DVD.iso
+                        cdrom_cd2 = linux/RHEL-5.3-i386-DVD.iso
                         md5sum = 371c62851611fd32ead440df6f24a296
                         md5sum_1m = 242318dd44152210f6ff6cdda1bfbf51
                         install:
@@ -1112,7 +1115,7 @@  variants:
                     - 5.3.x86_64:
                         no setup
                         image_name = rhel5-64
-                        cdrom_cd1 = linux/RHEL-5.3-x86_64-DVD.iso
+                        cdrom_cd2 = linux/RHEL-5.3-x86_64-DVD.iso
                         md5sum = c5ed6b284410f4d8212cafc78fd7a8c5
                         md5sum_1m = b999f437583098ea5bbd56fb1de1d011
                         install:
@@ -1125,7 +1128,7 @@  variants:
                     - 5.4.i386:
                         no setup
                         image_name = rhel5-32
-                        cdrom_cd1 = linux/RHEL-5.4-i386-DVD.iso
+                        cdrom_cd2 = linux/RHEL-5.4-i386-DVD.iso
                         md5sum = 7a12ec6599527e4f3d1790b51eadbfed
                         md5sum_1m = 0dbeb8f58d213752d8c029e8601abfbb
                         unattended_install.cdrom:
@@ -1136,7 +1139,7 @@  variants:
                     - 5.4.x86_64:
                         no setup
                         image_name = rhel5-64
-                        cdrom_cd1 = linux/RHEL-5.4-x86_64-DVD.iso
+                        cdrom_cd2 = linux/RHEL-5.4-x86_64-DVD.iso
                         md5sum = 04fe3c10202402d7b389528d2bad0210
                         md5sum_1m = 3e74112003e88a966754849dbb8f5c3f
                         unattended_install.cdrom:
@@ -1147,7 +1150,7 @@  variants:
                     - 5.5.i386:
                         no setup
                         image_name = rhel5-32
-                        cdrom_cd1 = linux/RHEL-5.5-i386-DVD.iso
+                        cdrom_cd2 = linux/RHEL-5.5-i386-DVD.iso
                         md5sum = 148858b157f275d9153797efddfc83c3
                         md5sum_1m = 2502cc7ddb9d0684fe08c4a83d247902
                         unattended_install.cdrom:
@@ -1158,7 +1161,7 @@  variants:
                     - 5.5.x86_64:
                         no setup
                         image_name = rhel5-64
-                        cdrom_cd1 = linux/RHEL-5.5-x86_64-DVD.iso
+                        cdrom_cd2 = linux/RHEL-5.5-x86_64-DVD.iso
                         md5sum = f3119f883257ef9041234feda2f1cad0
                         md5sum_1m = a744084a03f6a08627f71527fc107a1e
                         unattended_install.cdrom:
@@ -1193,6 +1196,7 @@  variants:
         mem_chk_cur_cmd = wmic memphysical
 
         unattended_install.cdrom:
+            floppy = "images/floppy.img"
             timeout = 7200
             finish_program = deps/finish.exe
             cdroms += " winutilscd"