diff mbox

[Autotest,KVM-AUTOTEST] Opensuse unattended install

Message ID 1269355740-32004-2-git-send-email-anantyog@linux.vnet.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

yogi March 23, 2010, 2:49 p.m. UTC
None
diff mbox

Patch

diff --git a/client/tests/kvm/tests/unattended_install.py b/client/tests/kvm/tests/unattended_install.py
index 1ddb996..310a353 100644
--- a/client/tests/kvm/tests/unattended_install.py
+++ b/client/tests/kvm/tests/unattended_install.py
@@ -31,6 +31,7 @@  def run_unattended_install(test, params, env):
             client.connect(addr)
             msg = client.recv(1024)
             if msg == 'done':
+                time.sleep(10)
                 break
         except socket.error:
             pass
diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample
index 9963a44..3ae0d83 100644
--- a/client/tests/kvm/tests_base.cfg.sample
+++ b/client/tests/kvm/tests_base.cfg.sample
@@ -343,7 +343,7 @@  variants:
                     pxe_image = "vmlinuz"
                     pxe_initrd = "initrd.img"
                     tftp = "images/tftpboot"
-                    extra_params += " -bootp /pxelinux.0 -boot n"
+                    extra_params += " -bootp /pxelinux.0 -boot cn"
                     kernel_args = "ks=floppy nicdelay=60"
 
                 variants:
@@ -476,32 +476,95 @@  variants:
                 md5sum = 7e9e183dc11b9d39f480238e4e12bb05
                 md5sum_1m = dc7865a75db665efc86d59bca7c1fe07
 
-            - openSUSE-11.0.32:
-                no setup dbench bonnie
-                image_name = openSUSE-11.0-32
-                install:
-                    steps = openSUSE-11.0-32.steps
-                    cdrom = linux/openSUSE-11.0-DVD-i386.iso
-                    md5sum = ed6a5b3feb668866df812b1c2aed9d7f
-                    md5sum_1m = c720b30557af758e69de450409516369
-
-            - openSUSE-11.1.32:
-                no setup dbench bonnie
-                image_name = openSUSE-11.1-32
-                install:
-                    steps = openSUSE-11.1-32-and-64.steps
-                    cdrom = linux/openSUSE-11.1-DVD-i586.iso
-                    md5sum = 8f51b278c0415be28c5699e465444bd3
-                    md5sum_1m = b70217417468389083429f81ba7ce2bd
-
-            - openSUSE-11.1.64:
-                no setup dbench bonnie
-                image_name = openSUSE-11.1-64
-                install:
-                    steps = openSUSE-11.1-32-and-64.steps
-                    cdrom = linux/openSUSE-11.1-DVD-x86_64.iso
-                    md5sum = 2afee1b8a87175e6dee2b8dbbd1ad8e8
-                    md5sum_1m = 768ca32503ef92c28f2d144f2a87e4d0
+            - OpenSUSE:
+                no setup
+                shell_prompt = ".*:.*\s#"
+                unattended_install:
+                    pxe_image = "linux"
+                    pxe_initrd = "initrd"
+                    tftp = "images/tftpboot"
+                    extra_params += " -bootp /pxelinux.0 -boot cn"
+                    kernel_args = "autoyast=floppy"
+
+                variants:
+                    - 11.0.32:
+                        no setup autotest linux_s3
+                        image_name = openSUSE-11.0-32
+                        cdrom = linux/openSUSE-11.0-DVD-i386.iso
+                        md5sum = ed6a5b3feb668866df812b1c2aed9d7f
+                        md5sum_1m = c720b30557af758e69de450409516369
+                        install:
+                            steps = openSUSE-11.0-32.steps
+                        unattended_install:
+                            unattended_file = unattended/OpenSUSE11.xml
+                            tftp = images/sles110-32/tftpboot
+                            floppy = images/sles110-32floppy.img
+                            pxe_dir = boot/i386/loader
+
+                    - 11.0.64:
+                        no setup autotest linux_s3
+                        image_name = openSUSE-11.0-64
+                        cdrom = linux/openSUSE-11.0-DVD-x86_64.iso
+                        md5sum = 512c8346b0f8eb35f28c4eb96454d391
+                        md5sum_1m = 661aa4cd031df2f25ea0102318a3f4d1
+                        unattended_install:
+                            unattended_file = unattended/OpenSUSE11.xml
+                            tftp = images/sles110-64/tftpboot
+                            floppy = images/sles110-64floppy.img
+                            pxe_dir = boot/x86_64/loader
+
+
+                    - 11.1.32:
+                        no setup autotest linux_s3
+                        image_name = openSUSE-11.1-32
+                        cdrom = linux/openSUSE-11.1-DVD-i586.iso
+                        md5sum = 8f51b278c0415be28c5699e465444bd3
+                        md5sum_1m = b70217417468389083429f81ba7ce2bd
+                        install:
+                            steps=openSUSE-11.1-32-and-64.steps
+                        unattended_install:
+                            unattended_file = unattended/OpenSUSE11.xml
+                            tftp = images/sles111-32/tftpboot
+                            floppy = images/sles111-32floppy.img
+                            pxe_dir = boot/i386/loader
+
+                    - 11.1.64:
+                        no setup autotest linux_s3
+                        image_name = openSUSE-11.1-64
+                        cdrom = linux/openSUSE-11.1-DVD-x86_64.iso
+                        md5sum = 2afee1b8a87175e6dee2b8dbbd1ad8e8
+                        md5sum_1m = 768ca32503ef92c28f2d144f2a87e4d0
+                        install:
+                            steps=openSUSE-11.1-32-and-64.steps
+                        unattended_install:
+                            unattended_file = unattended/OpenSUSE11.xml
+                            tftp = images/sles111-64/tftpboot
+                            floppy = images/sles111-64floppy.img
+                            pxe_dir = boot/x86_64/loader
+
+                    - 11.2.32:
+                        no setup autotest linux_s3
+                        image_name = openSUSE-11.2-32
+                        cdrom = linux/openSUSE-11.2-DVD-i586.iso
+                        md5sum = 295d713314a30ad017948f0d542c6d92
+                        md5sum_1m = 1f8767d00acb492be5a5627c834e543f
+                        unattended_install:
+                            unattended_file = unattended/OpenSUSE11.xml
+                            tftp = images/sles112-32/tftpboot
+                            floppy = images/sles112-32floppy.img
+                            pxe_dir = boot/i386/loader
+
+                    - 11.2.64:
+                        no setup autotest linux_s3
+                        image_name = openSUSE-11.2-64
+                        cdrom = linux/openSUSE-11.2-DVD-x86_64.iso
+                        md5sum = 6a09295e34dc030319d040f67f4742c6
+                        md5sum_1m = 11fd11d39744450b898f04c371dde2e7
+                        unattended_install:
+                            unattended_file = unattended/OpenSUSE11.xml
+                            tftp = images/sles112-64/tftpboot
+                            floppy = images/sles112-64floppy.img
+                            pxe_dir = boot/x86_64/loader
 
             - @Ubuntu:
                 shell_prompt = "^root@.*[\#\$]\s*$"
@@ -546,7 +609,7 @@  variants:
                     pxe_image = "vmlinuz"
                     pxe_initrd = "initrd.img"
                     tftp = "images/tftpboot"
-                    extra_params += " -bootp /pxelinux.0 -boot n"
+                    extra_params += " -bootp /pxelinux.0 -boot cn"
                     kernel_args = "ks=floppy nicdelay=60"
 
                 variants:
diff --git a/client/tests/kvm/unattended/OpenSUSE11.xml b/client/tests/kvm/unattended/OpenSUSE11.xml
new file mode 100644
index 0000000..7dd44fa
--- /dev/null
+++ b/client/tests/kvm/unattended/OpenSUSE11.xml
@@ -0,0 +1,251 @@ 
+<?xml version="1.0"?>
+<!DOCTYPE profile>
+<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
+  <bootloader>
+    <device_map config:type="list">
+      <device_map_entry>
+        <firmware>hd0</firmware>
+        <linux>/dev/vda</linux>
+      </device_map_entry>
+    </device_map>
+    <global>
+      <activate>true</activate>
+      <boot_boot>false</boot_boot>
+      <boot_extended>false</boot_extended>
+      <boot_mbr>false</boot_mbr>
+      <boot_root>true</boot_root>
+      <debug>false</debug>
+      <generic_mbr>false</generic_mbr>
+      <gfxmenu>/boot/message</gfxmenu>
+      <hiddenmenu>false</hiddenmenu>
+      <lines_cache_id>2</lines_cache_id>
+      <timeout config:type="integer">8</timeout>
+    </global>
+    <initrd_modules config:type="list">
+      <initrd_module>
+        <module>processor</module>
+      </initrd_module>
+      <initrd_module>
+        <module>thermal</module>
+      </initrd_module>
+      <initrd_module>
+        <module>ata_piix</module>
+      </initrd_module>
+      <initrd_module>
+        <module>virtio_pci</module>
+      </initrd_module>
+      <initrd_module>
+        <module>fan</module>
+      </initrd_module>
+      <initrd_module>
+        <module>jbd</module>
+      </initrd_module>
+      <initrd_module>
+        <module>ext3</module>
+      </initrd_module>
+      <initrd_module>
+        <module>virtio_blk</module>
+      </initrd_module>
+      <initrd_module>
+        <module>edd</module>
+      </initrd_module>
+    </initrd_modules>
+    <loader_type>grub</loader_type>
+    <sections config:type="list"/>
+  </bootloader>
+  <firewall>
+    <FW_DEV_DMZ></FW_DEV_DMZ>
+    <FW_DEV_EXT></FW_DEV_EXT>
+    <FW_DEV_INT></FW_DEV_INT>
+    <enable_firewall config:type="boolean">false</enable_firewall>
+    <start_firewall config:type="boolean">false</start_firewall>
+  </firewall>
+  <general>
+    <ask-list config:type="list"/>
+    <mode>
+      <confirm config:type="boolean">false</confirm>
+    </mode>
+    <mouse>
+      <id>none</id>
+    </mouse>
+    <signature-handling>
+      <accept_file_without_checksum config:type="boolean">true</accept_file_without_checksum>
+      <accept_non_trusted_gpg_key config:type="boolean">true</accept_non_trusted_gpg_key>
+      <accept_unknown_gpg_key config:type="boolean">true</accept_unknown_gpg_key>
+      <accept_unsigned_file config:type="boolean">true</accept_unsigned_file>
+      <accept_verification_failed config:type="boolean">false</accept_verification_failed>
+      <import_gpg_key config:type="boolean">true</import_gpg_key>
+    </signature-handling>
+  </general>
+  <groups config:type="list">
+    <group>
+      <gid>33</gid>
+      <group_password>x</group_password>
+      <groupname>video</groupname>
+      <userlist>linux</userlist>
+    </group>
+    <group>
+      <gid>16</gid>
+      <group_password>x</group_password>
+      <groupname>dialout</groupname>
+      <userlist>linux</userlist>
+    </group>
+  </groups>
+  <keyboard>
+    <keyboard_values>
+      <numlock>bios</numlock>
+      <tty>tty1 tty2 tty3 tty4 tty5 tty6</tty>
+    </keyboard_values>
+    <keymap>english-us</keymap>
+  </keyboard>
+  <networking>
+    <dhcp_options>
+      <dhclient_additional_options></dhclient_additional_options>
+      <dhclient_client_id></dhclient_client_id>
+      <dhclient_hostname_option>AUTO</dhclient_hostname_option>
+    </dhcp_options>
+    <dns>
+      <dhcp_hostname config:type="boolean">true</dhcp_hostname>
+      <dhcp_resolv config:type="boolean">true</dhcp_resolv>
+    </dns>
+    <interfaces config:type="list">
+      <interface>
+        <bootproto>dhcp</bootproto>
+        <device>eth0</device>
+        <startmode>auto</startmode>
+        <usercontrol>no</usercontrol>
+      </interface>
+    </interfaces>
+    <managed config:type="boolean">false</managed>
+    <routing>
+      <ip_forward config:type="boolean">false</ip_forward>
+    </routing>
+  </networking>
+  <partitioning config:type="list">
+    <drive>
+      <device>/dev/vda</device>
+      <partitions config:type="list"/>
+      <type config:type="symbol">CT_DISK</type>
+      <use>all</use>
+    </drive>
+  </partitioning>
+  <report>
+    <errors>
+      <log config:type="boolean">true</log>
+      <show config:type="boolean">true</show>
+      <timeout config:type="integer">0</timeout>
+    </errors>
+    <messages>
+      <log config:type="boolean">true</log>
+      <show config:type="boolean">true</show>
+      <timeout config:type="integer">0</timeout>
+    </messages>
+    <warnings>
+      <log config:type="boolean">true</log>
+      <show config:type="boolean">true</show>
+      <timeout config:type="integer">0</timeout>
+    </warnings>
+    <yesno_messages>
+      <log config:type="boolean">true</log>
+      <show config:type="boolean">true</show>
+      <timeout config:type="integer">0</timeout>
+    </yesno_messages>
+  </report>
+  <scripts>
+    <init-scripts config:type="list">
+      <script>
+        <debug config:type="boolean">true</debug>
+        <filename>config</filename>
+        <source><![CDATA[dhclient eth0
+chkconfig sshd on
+sed -i -e 's/\(PasswordAuthentication\s\)no/\1yes/g'  /etc/ssh/sshd_config
+cat <<EOF>server
+#!/usr/bin/python
+import socket, os
+server=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+server.bind(('',12323))
+server.listen(1)
+(client, addr) = server.accept()
+client.send("done")
+client.close()
+EOF
+python server
+]]></source>
+      </script>
+    </init-scripts>
+    <pre-scripts config:type="list">
+      <script>
+        <debug config:type="boolean">true</debug>
+        <feedback config:type="boolean">false</feedback>
+        <filename>disksetup</filename>
+        <interpreter>shell</interpreter>
+        <source><![CDATA[ if fdisk -l | grep sda -c >0;then sed  -e 's/\(.*\/dev\/\)vda\(.*\)/\1sda\2/g' /tmp/profile/autoinst.xml>/tmp/profile/modified.xml; fi
+]]></source>
+      </script>
+    </pre-scripts>
+  </scripts>
+  <software>
+    <packages config:type="list">
+      <package>autoyast2-installation</package>
+      <package>dhcp-client</package>
+      <package>dhcp-tools</package>
+      <package>autoyast2-installation</package>
+      <package>autoyast2-installation</package>
+      <package>autoyast2-installation</package>
+    </packages>
+    <patterns config:type="list">
+      <pattern>apparmor</pattern>
+      <pattern>apparmor_opt</pattern>
+      <pattern>base</pattern>
+      <pattern>console</pattern>
+      <pattern>devel_basis</pattern>
+      <pattern>enhanced_base</pattern>
+      <pattern>enhanced_base_opt</pattern>
+      <pattern>sw_management</pattern>
+      <pattern>yast2_basis</pattern>
+      <pattern>yast2_install_wf</pattern>
+    </patterns>
+  </software>
+  <user_defaults>
+    <group>100</group>
+    <groups>video,dialout</groups>
+    <home>/home</home>
+    <inactive>-1</inactive>
+    <shell>/bin/bash</shell>
+    <skel>/etc/skel</skel>
+  </user_defaults>
+  <users config:type="list">
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>linux</fullname>
+      <gid>100</gid>
+      <home>/home/linux</home>
+      <password_settings>
+        <inact>-1</inact>
+        <max>99999</max>
+        <min>0</min>
+        <warn>7</warn>
+      </password_settings>
+      <shell>/bin/bash</shell>
+      <uid>1000</uid>
+      <user_password>$2a$05$bgtKW4IJKSS04W4GdU4ckeZL9yVHZdTmZz6F.gAxw9xItSfmt.zci</user_password>
+      <username>linux</username>
+    </user>
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>root</fullname>
+      <gid>0</gid>
+      <home>/root</home>
+      <password_settings>
+        <inact>-1</inact>
+        <max>99999</max>
+        <min>0</min>
+        <warn>7</warn>
+      </password_settings>
+      <shell>/bin/bash</shell>
+      <uid>0</uid>
+      <user_password>$2a$05$yit2ieOcDslJrkEqLo8D3ej1ZNWNX79iAaT885W.aDTZ581ZwBD8S</user_password>
+      <username>root</username>
+    </user>
+  </users>
+</profile>