Skip to contentSkip to conversation

KVM test: Support for Parallel install of guest OS

PATCH In review yogi 3 participants 13 messages Feb 10, 2010 KVM

lore
Share & tools
lore

yogi

author
#0 lore raw

cover KVM test: Support for Parallel install of guest OS

Hello everyone,

I like to submit a set of patches to enable installing multiple guests in parallel.

To install multiple guests in parallel the role of the host and the guest need to be changed. In this patch host acts as a client and the guest acts as server, enabling us to install multiple guest at same time.

The present unattended install file (kickstart, xml) need to be modified to make them work with this patch. So i have also included a patch for the kickstart file "RHEL-5-series.ks" and a patch to support Sles11 64-bit guests.

I will be happy to re-implement or modify the patch based to your comments and also extent support for other OS like windows.

Thanks and Regards
Yogi

author
#1 lore raw

PATCH 1/5 KVM test: Support for Parallel install of guest OS

Quoted 1 line

From b2ddf7e9d434ea33619ced976f61e59d2d20ab71 Mon Sep 17 00:00:00 2001

From: yogananth subramanian <[email protected]>
Date: Wed, 10 Feb 2010 06:15:29 -0500
Subject: [PATCH 1/5] kvm test: unattended install: change host role from server to client

By changing the role of the host from server to client, we can do unattended install in parallel. Similar change has to be made in the unattended installfile(kickstart, xml) to make them behave as server rather as client.

---
 client/tests/kvm/tests/unattended_install.py |   38
++++++++++++-------------
 1 files changed, 18 insertions(+), 20 deletions(-)
(quoted diff) +0 -0

b/client/tests/kvm/tests/unattended_install.py
index e3df72a..3978e26 100644

client/tests/kvm/tests/unattended_install.py +4 -8
@@ -13,11 +13,11 @@ def run_unattended_install(test, params, env):
     @param params: Dictionary with the test parameters.
     @param env: Dictionary with test environment.
     """
+    buf = 1024
     vm = kvm_test_utils.get_living_vm(env, params.get("main_vm"))
 
-    server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-    server.bind(('', 12323))
-    server.listen(1)
+    port = vm.get_port(int(params.get("guest_port_unattend_shell")))
+    addr = ('localhost', port)
 
     install_timeout = float(params.get("timeout", 3000))
     logging.info("Starting unattended install watch process. "
@@ -26,21 +26,19 @@ def run_unattended_install(test, params, env):
     start_time = time.time()
 
     while True:
-        server.settimeout(install_timeout)
+        client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
         try:
-            (client, addr) = server.accept()
-        except socket.timeout:
-            server.close()
-            raise error.TestFail('Timeout elapsed while waiting for

install to '
- 'finish.')

-        msg = client.recv(1024)
-        logging.debug("Received '%s' from %s", msg, addr)
-        if msg == 'done':
-            end_time = time.time()
-            time_elapsed = int(end_time - start_time)
-            logging.info('Guest reported successful installation after

%ds '
- '(%d min)', time_elapsed, time_elapsed/60)
- server.close()
- break
- else:

-            logging.error('Got invalid string from client: %s.' % msg)
+            client.connect(addr)
+            msg = client.recv(1024)
+            if msg == 'thank u for connecting':

+ break
+ else:
+ raise Exception
+ except:
+ time.sleep(1)
+ client.close()
+

+    end_time = time.time()
+    time_elapsed = int(end_time - start_time)
+    logging.info('Guest reported successful installation after %ds '

+ '(%d min)', time_elapsed, time_elapsed/60)

Signature · 1 line
1.6.2.5
author
#2 lore raw

PATCH 2/5 KVM test: Support for Parallel install of guest OS

In reply to yogi
Quoted 1 line

From 76aff8427266035867e9c73f8c2c7037a7113d1e Mon Sep 17 00:00:00 2001

From: yogananth subramanian <[email protected]>
Date: Wed, 10 Feb 2010 08:00:06 -0500
Subject: [PATCH 2/5] kvm test: test_base: enabling parallel install

Have added a new port redirection entry "guest_port_unattend_shell" for the host to communitcate with quest during unattended install.

For parallel installation to work in unattended mode, the floppy image and pxe boot path also has to be unique for each quest.

---
 client/tests/kvm/tests_base.cfg.sample |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/client/tests/kvm/tests_base.cfg.sample
index e9fdd05..26cfbd0 100644

client/tests/kvm/tests_base.cfg.sample +1 -0
@@ -33,6 +33,7 @@ used_mem = 512
 # Port redirections
 redirs = remote_shell
 guest_port_remote_shell = 22
+guest_port_unattend_shell = 12323
 
 # NIC parameters
 nic_mode = user
@@ -589,6 +590,8 @@ variants:
                         md5sum_1m = 0dbeb8f58d213752d8c029e8601abfbb
                         unattended_install:
                             unattended_file =

unattended/RHEL-5-series.ks
+ tftp = "images/rhel54-32/tftpboot"
+ floppy = "images/rhel54-32floppy.img"

- 5.4.x86_64:
no setup
@@ -598,6 +601,8 @@ variants:

                         md5sum_1m = 3e74112003e88a966754849dbb8f5c3f
                         unattended_install:
                             unattended_file =

unattended/RHEL-5-series.ks
+ tftp = "images/rhel54-64/tftpboot"
+ floppy = "images/rhel54-64floppy.img"

# Windows section
- @Windows:

Signature · 1 line
1.6.2.5
author
#3 lore raw

PATCH 3/5 KVM test: Support for Parallel install of guest OS

In reply to yogi
Quoted 1 line

From 0aa8ed40de86eb8ad5b324177b2e0986e1c32c77 Mon Sep 17 00:00:00 2001

From: yogananth subramanian <[email protected]>
Date: Wed, 10 Feb 2010 09:45:58 -0500
Subject: [PATCH 3/5] kvm test: unattended: add support for parallel install of suse and other guest OS

File extension of the unattended file ".suse", in case of Sles is used to identify the guest OS.
Since the netboot image path and the kernel name differs for both sles and Rhel, its important to identify the type of guest being installed.

The funtion "create_boot_floppy()" is called during initialization ranther from the funtion "setup", since its important to indentify the OS type being installed duiring initializatoin.

---
 client/tests/kvm/scripts/unattended.py |   30
+++++++++++++++++++++++-------
 1 files changed, 23 insertions(+), 7 deletions(-)
(quoted diff) +0 -0

b/client/tests/kvm/scripts/unattended.py
index 87a8973..2257abf 100755

client/tests/kvm/scripts/unattended.py +0 -0
@@ -59,8 +59,9 @@ class UnattendedInstall(object):
         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.floppy_img = os.path.join(images_dir, 'floppy.img')
-

+        flopy_name = os.path.basename(os.environ['KVM_TEST_floppy'])
+        self.floppy_img = os.path.join(images_dir, flopy_name)
+        self.create_boot_floppy()
     def create_boot_floppy(self):
         """

@@ -93,8 +94,12 @@ class UnattendedInstall(object):
shutil.copyfile(setup_file_path, setup_file_dest)
elif self.unattended_file.endswith('.ks'):
dest_fname = 'ks.cfg'
+ self.os = "redhat"
elif self.unattended_file.endswith('.xml'):
dest_fname = "autounattend.xml"
+ elif self.unattended_file.endswith('.suse'):
+ dest_fname = "autoinst.xml"
+ self.os = "suse"

dest = os.path.join(self.floppy_mount, dest_fname)

@@ -160,10 +165,22 @@ class UnattendedInstall(object):
if os.system(m_cmd):
raise SetupError('Could not mount CD image %s.' %
self.cdrom_iso)

-        p = os.path.join('images', 'pxeboot')
-        pxe_dir = os.path.join(self.cdrom_mount, p)
-        pxe_image = os.path.join(pxe_dir, 'vmlinuz')
-        pxe_initrd = os.path.join(pxe_dir, 'initrd.img')
+        if self.os == "redhat":
+            kernel = 'vmlinuz'
+            initrd = 'initrd.img'
+            p = os.path.join('images', 'pxeboot')
+            pxe_dir = os.path.join(self.cdrom_mount, p)
+        else :
+            kernel = 'linux'
+            initrd = 'initrd'
+            p = os.path.join('boot/x86_64', 'loader')
+            pxe_dir = os.path.join(self.cdrom_mount, p)
+            if not os.path.isdir(pxe_dir):

+ p = os.path.join('boot/i386', 'loader')
+ pxe_dir = os.path.join(self.cdrom_mount, p)
+
+ pxe_image = os.path.join(pxe_dir, kernel)
+ pxe_initrd = os.path.join(pxe_dir, initrd)

if not os.path.isdir(pxe_dir):
raise SetupError('The ISO image does not have a %s dir. The
script '
@@ -229,7 +246,6 @@ class UnattendedInstall(object):
print " floppy_img: " + str(self.floppy_img)
print " finish_program: " + str(self.finish_program)

- self.create_boot_floppy()
if self.tftp_root:
self.setup_pxe_boot()
self.cleanup()

Signature · 1 line
1.6.2.5
#4 lore raw
Quoted 66 lines · Yogananth Subramanian
Quoted 1 line

From 0aa8ed40de86eb8ad5b324177b2e0986e1c32c77 Mon Sep 17 00:00:00 2001

From: yogananth subramanian <[email protected]>
Date: Wed, 10 Feb 2010 09:45:58 -0500
Subject: [PATCH 3/5] kvm test: unattended: add support for parallel install of suse and other guest OS

File extension of the unattended file ".suse", in case of Sles is used to identify the guest OS.
Since the netboot image path and the kernel name differs for both sles and Rhel, its important to identify the type of guest being installed.

The funtion "create_boot_floppy()" is called during initialization ranther from the funtion "setup", since its important to indentify the OS type being installed duiring initializatoin.

---
 client/tests/kvm/scripts/unattended.py |   30
+++++++++++++++++++++++-------
 1 files changed, 23 insertions(+), 7 deletions(-)
client/tests/kvm/scripts/unattended.py +3 -2
index 87a8973..2257abf 100755
@@ -59,8 +59,9 @@ class UnattendedInstall(object):
         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.floppy_img = os.path.join(images_dir, 'floppy.img')
-
+        flopy_name = os.path.basename(os.environ['KVM_TEST_floppy'])
+        self.floppy_img = os.path.join(images_dir, flopy_name)
+        self.create_boot_floppy()
 
     def create_boot_floppy(self):
         """
client/tests/kvm/scripts/unattended.py +7 -4
@@ -93,8 +94,12 @@ class UnattendedInstall(object):
             shutil.copyfile(setup_file_path, setup_file_dest)
         elif self.unattended_file.endswith('.ks'):
             dest_fname = 'ks.cfg'
+            self.os = "redhat"
         elif self.unattended_file.endswith('.xml'):
             dest_fname = "autounattend.xml"
+        elif self.unattended_file.endswith('.suse'):
+            dest_fname = "autoinst.xml"
+            self.os = "suse"
 
         dest = os.path.join(self.floppy_mount, dest_fname)
 
@@ -160,10 +165,22 @@ class UnattendedInstall(object):
         if os.system(m_cmd):
             raise SetupError('Could not mount CD image %s.' %
 self.cdrom_iso)
 
-        p = os.path.join('images', 'pxeboot')
-        pxe_dir = os.path.join(self.cdrom_mount, p)
-        pxe_image = os.path.join(pxe_dir, 'vmlinuz')
-        pxe_initrd = os.path.join(pxe_dir, 'initrd.img')
+        if self.os == "redhat":
+            kernel = 'vmlinuz'
+            initrd = 'initrd.img'

client/tests/kvm/scripts/unattended.py class UnattendedInstall(object): · line 181

Quoted 10 lines
client/tests/kvm/scripts/unattended.py +10 -0
+            p = os.path.join('images', 'pxeboot')
+            pxe_dir = os.path.join(self.cdrom_mount, p)
+        else :
+            kernel = 'linux'
+            initrd = 'initrd'
+            p = os.path.join('boot/x86_64', 'loader')
+            pxe_dir = os.path.join(self.cdrom_mount, p)
+            if not os.path.isdir(pxe_dir):
+                p = os.path.join('boot/i386', 'loader')
+                pxe_dir = os.path.join(self.cdrom_mount, p)

Rather than hard-coding these locations, I think the test config file should have a variable for the location of the kernel and initrd and have us read this from the config.

Quoted 19 lines
client/tests/kvm/scripts/unattended.py +3 -0
+
+        pxe_image = os.path.join(pxe_dir, kernel)
+        pxe_initrd = os.path.join(pxe_dir, initrd)
 
         if not os.path.isdir(pxe_dir):

raise SetupError('The ISO image does not have a %s dir. The
script '

client/tests/kvm/scripts/unattended.py +0 -1
@@ -229,7 +246,6 @@ class UnattendedInstall(object):
         print "    floppy_img: " + str(self.floppy_img)
         print "    finish_program: " + str(self.finish_program)
 
-        self.create_boot_floppy()
         if self.tftp_root:
             self.setup_pxe_boot()
         self.cleanup()
Signature · 1 line
1.6.2.5
Signature · 4 lines
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
[email protected]
#5 lore raw
In reply to yogi
Quoted 11 lines · yogi
Quoted 1 line

From 0aa8ed40de86eb8ad5b324177b2e0986e1c32c77 Mon Sep 17 00:00:00 2001

From: yogananth subramanian <[email protected]>
Date: Wed, 10 Feb 2010 09:45:58 -0500
Subject: [PATCH 3/5] kvm test: unattended: add support for parallel install of suse and other guest OS

File extension of the unattended file ".suse", in case of Sles is used to identify the guest OS.
Since the netboot image path and the kernel name differs for both sles and Rhel, its important to identify the type of guest being installed.

Just some quick comments on this one, because those are important to complete what I asked, which is split the patchsets in 2.

Quoted 30 lines

The funtion "create_boot_floppy()" is called during initialization ranther from the funtion "setup", since its important to indentify the OS type being installed duiring initializatoin.

---
 client/tests/kvm/scripts/unattended.py |   30
+++++++++++++++++++++++-------
 1 files changed, 23 insertions(+), 7 deletions(-)
client/tests/kvm/scripts/unattended.py +3 -2
index 87a8973..2257abf 100755
@@ -59,8 +59,9 @@ class UnattendedInstall(object):
         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.floppy_img = os.path.join(images_dir, 'floppy.img')
-
+        flopy_name = os.path.basename(os.environ['KVM_TEST_floppy'])
+        self.floppy_img = os.path.join(images_dir, flopy_name)
+        self.create_boot_floppy()
 
     def create_boot_floppy(self):
         """

client/tests/kvm/scripts/unattended.py class UnattendedInstall(object): · line 102

Quoted 9 lines
client/tests/kvm/scripts/unattended.py +4 -0
@@ -93,8 +94,12 @@ class UnattendedInstall(object):
             shutil.copyfile(setup_file_path, setup_file_dest)
         elif self.unattended_file.endswith('.ks'):
             dest_fname = 'ks.cfg'
+            self.os = "redhat"
         elif self.unattended_file.endswith('.xml'):
             dest_fname = "autounattend.xml"
+        elif self.unattended_file.endswith('.suse'):
+            dest_fname = "autoinst.xml"
+            self.os = "suse"

Perhaps .suse as a file extension should be avoided, as having the XML extension will help people with their source code editors, let's keep it an .xml file and take advantage of the fact that windows unattended install does not use TFTP setup at all, so we can just verify if self.tftp_root contains a non-empty string to tell apart windows files and SUSE files.

Quoted 14 lines
client/tests/kvm/scripts/unattended.py +3 -4
         dest = os.path.join(self.floppy_mount, dest_fname)
 
@@ -160,10 +165,22 @@ class UnattendedInstall(object):
         if os.system(m_cmd):
             raise SetupError('Could not mount CD image %s.' %
 self.cdrom_iso)
 
-        p = os.path.join('images', 'pxeboot')
-        pxe_dir = os.path.join(self.cdrom_mount, p)
-        pxe_image = os.path.join(pxe_dir, 'vmlinuz')
-        pxe_initrd = os.path.join(pxe_dir, 'initrd.img')
+        if self.os == "redhat":
+            kernel = 'vmlinuz'
+            initrd = 'initrd.img'

client/tests/kvm/scripts/unattended.py class UnattendedInstall(object): · line 181

Quoted 10 lines
client/tests/kvm/scripts/unattended.py +10 -0
+            p = os.path.join('images', 'pxeboot')
+            pxe_dir = os.path.join(self.cdrom_mount, p)
+        else :
+            kernel = 'linux'
+            initrd = 'initrd'
+            p = os.path.join('boot/x86_64', 'loader')
+            pxe_dir = os.path.join(self.cdrom_mount, p)
+            if not os.path.isdir(pxe_dir):
+                p = os.path.join('boot/i386', 'loader')
+                pxe_dir = os.path.join(self.cdrom_mount, p)

As Ryan pointed out, on the above block we could just make use of the configuration system and put the locations for kernel and initrd there, making the code generic.

Quoted 14 lines
client/tests/kvm/scripts/unattended.py +2 -0
+        pxe_image = os.path.join(pxe_dir, kernel)
+        pxe_initrd = os.path.join(pxe_dir, initrd)
 
         if not os.path.isdir(pxe_dir):
             raise SetupError('The ISO image does not have a %s dir. The

script '

client/tests/kvm/scripts/unattended.py +0 -1
@@ -229,7 +246,6 @@ class UnattendedInstall(object):
         print "    floppy_img: " + str(self.floppy_img)
         print "    finish_program: " + str(self.finish_program)
 
-        self.create_boot_floppy()
         if self.tftp_root:
             self.setup_pxe_boot()
         self.cleanup()
author
#6 lore raw
Quoted 83 lines · Lucas Meneghel Rodrigues
Quoted 11 lines · yogi
Quoted 1 line

From 0aa8ed40de86eb8ad5b324177b2e0986e1c32c77 Mon Sep 17 00:00:00 2001

From: yogananth subramanian <[email protected]>
Date: Wed, 10 Feb 2010 09:45:58 -0500
Subject: [PATCH 3/5] kvm test: unattended: add support for parallel install of suse and other guest OS

File extension of the unattended file ".suse", in case of Sles is used to identify the guest OS.
Since the netboot image path and the kernel name differs for both sles and Rhel, its important to identify the type of guest being installed.

Just some quick comments on this one, because those are important to complete what I asked, which is split the patchsets in 2.

Quoted 30 lines

The funtion "create_boot_floppy()" is called during initialization ranther from the funtion "setup", since its important to indentify the OS type being installed duiring initializatoin.

---
 client/tests/kvm/scripts/unattended.py |   30
+++++++++++++++++++++++-------
 1 files changed, 23 insertions(+), 7 deletions(-)
client/tests/kvm/scripts/unattended.py +3 -2
index 87a8973..2257abf 100755
@@ -59,8 +59,9 @@ class UnattendedInstall(object):
         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.floppy_img = os.path.join(images_dir, 'floppy.img')
-
+        flopy_name = os.path.basename(os.environ['KVM_TEST_floppy'])
+        self.floppy_img = os.path.join(images_dir, flopy_name)
+        self.create_boot_floppy()
 
     def create_boot_floppy(self):
         """

client/tests/kvm/scripts/unattended.py class UnattendedInstall(object): · line 102

Quoted 9 lines
client/tests/kvm/scripts/unattended.py +4 -0
@@ -93,8 +94,12 @@ class UnattendedInstall(object):
             shutil.copyfile(setup_file_path, setup_file_dest)
         elif self.unattended_file.endswith('.ks'):
             dest_fname = 'ks.cfg'
+            self.os = "redhat"
         elif self.unattended_file.endswith('.xml'):
             dest_fname = "autounattend.xml"
+        elif self.unattended_file.endswith('.suse'):
+            dest_fname = "autoinst.xml"
+            self.os = "suse"

Perhaps .suse as a file extension should be avoided, as having the XML extension will help people with their source code editors, let's keep it an .xml file and take advantage of the fact that windows unattended install does not use TFTP setup at all, so we can just verify if self.tftp_root contains a non-empty string to tell apart windows files and SUSE files.

Quoted 20 lines
client/tests/kvm/scripts/unattended.py +9 -4
         dest = os.path.join(self.floppy_mount, dest_fname)
 
@@ -160,10 +165,22 @@ class UnattendedInstall(object):
         if os.system(m_cmd):
             raise SetupError('Could not mount CD image %s.' %
 self.cdrom_iso)
 
-        p = os.path.join('images', 'pxeboot')
-        pxe_dir = os.path.join(self.cdrom_mount, p)
-        pxe_image = os.path.join(pxe_dir, 'vmlinuz')
-        pxe_initrd = os.path.join(pxe_dir, 'initrd.img')
+        if self.os == "redhat":
+            kernel = 'vmlinuz'
+            initrd = 'initrd.img'
+            p = os.path.join('images', 'pxeboot')
+            pxe_dir = os.path.join(self.cdrom_mount, p)
+        else :
+            kernel = 'linux'
+            initrd = 'initrd'
+            p = os.path.join('boot/x86_64', 'loader')
Quoted 8 lines

client/tests/kvm/scripts/unattended.py class UnattendedInstall(object): · line 181

Quoted 4 lines
client/tests/kvm/scripts/unattended.py +4 -0
+            pxe_dir = os.path.join(self.cdrom_mount, p)
+            if not os.path.isdir(pxe_dir):
+                p = os.path.join('boot/i386', 'loader')
+                pxe_dir = os.path.join(self.cdrom_mount, p)

As Ryan pointed out, on the above block we could just make use of the configuration system and put the locations for kernel and initrd there, making the code generic.

sure, will do that and since we are adding kernal and initrd locations to the config file, we could add their locations (images/pxeboot or boot/x86-64) too, this avoids the need to determine the type of OS and to use the .suse extension.

Quoted 17 lines
Quoted 15 lines
client/tests/kvm/scripts/unattended.py +2 -0
+        pxe_image = os.path.join(pxe_dir, kernel)
+        pxe_initrd = os.path.join(pxe_dir, initrd)
 
         if not os.path.isdir(pxe_dir):
             raise SetupError('The ISO image does not have a %s dir. The

script '

client/tests/kvm/scripts/unattended.py +0 -1
@@ -229,7 +246,6 @@ class UnattendedInstall(object):
         print "    floppy_img: " + str(self.floppy_img)
         print "    finish_program: " + str(self.finish_program)
 
-        self.create_boot_floppy()
         if self.tftp_root:
             self.setup_pxe_boot()
         self.cleanup()
author
#7 lore raw

PATCH 4/5 KVM test: Support for Parallel install of guest OS

In reply to yogi
Quoted 1 line

From 2dbcd5801c31e35a01a671082ba0a461e9d44a5c Mon Sep 17 00:00:00 2001

From: yogananth subramanian <[email protected]>
Date: Wed, 10 Feb 2010 10:02:07 -0500
Subject: [PATCH 4/5] kvm test: kickstart: modified ks.cfg file to suport parallel install

The guest acts as a server, rather then a client and this enables doing unattended install of guest in parallel. Similar modification has to be made for other kickstart and .sif/autounattend.xml for windows.

---
 client/tests/kvm/unattended/RHEL-5-series.ks |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
(quoted diff) +0 -0

b/client/tests/kvm/unattended/RHEL-5-series.ks
index 41bb391..aea4150 100644

client/tests/kvm/unattended/RHEL-5-series.ks +6 -6
@@ -28,10 +28,10 @@ os.system('dhclient')
 os.system('chkconfig sshd on')
 os.system('iptables -F')
 os.system('echo 0 > /selinux/enforce')
-port = 12323
-buf = 1024
-addr = ('10.0.2.2', port)
-client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-client.connect(addr)
-client.sendto('done', addr)
+os.system('dhclient eth0')
+server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+server.bind(('', 12323))
+server.listen(1)
+(client, addr) = server.accept()
+client.send("thank u for connecting")
 client.close()
Signature · 1 line
1.6.2.5
author
#8 lore raw

PATCH 5/5 KVM test: Support for Parallel install of guest OS

In reply to yogi
Quoted 1 line

From e9eb6ba4aa481646ac4fddb32c85423e529ff717 Mon Sep 17 00:00:00 2001

From: yogananth subramanian <[email protected]>
Date: Wed, 10 Feb 2010 10:53:45 -0500
Subject: [PATCH 5/5] kvm test: support for sles11 parallel install

Adds new entry "SUSE" in test_base file for sles and also contains autoinst file for doing unatteneded Sles11 64-bit install

---
 client/tests/kvm/tests_base.cfg.sample             |   18 +
 .../tests/kvm/unattended/Sles11-64-autoinst.suse   |  897
++++++++++++++++++++
 2 files changed, 915 insertions(+), 0 deletions(-)
 create mode 100644 client/tests/kvm/unattended/Sles11-64-autoinst.suse
(quoted diff) +0 -0

b/client/tests/kvm/tests_base.cfg.sample
index 26cfbd0..34bb9cf 100644

client/tests/kvm/tests_base.cfg.sample +15 -0
@@ -452,6 +452,24 @@ variants:
                     md5sum = 2afee1b8a87175e6dee2b8dbbd1ad8e8
                     md5sum_1m = 768ca32503ef92c28f2d144f2a87e4d0
 
+            - SUSE:
+                no setup
+                shell_prompt = "^root@.*[\#\$]\s*$|#"
+                    
+                variants:
+                    - 64:
+                        no setup
+                        image_name = sles11-64
+                        unattended_install:
+                            cdrom=linux/SLES-11-DVD-x86_64-GM-DVD.iso
+                            md5sum=50a2bd45cd12c3808c3ee48208e2586b
+                            md5sum_1m=00000951cab7c32e332362fc424c1054
+                            floppy = "images/sles11floppy.img"
+                            tftp = "images/sles11-64/tftpboot"
+                            extra_params += " -bootp /pxelinux.0 -boot

cn"
+ kernel_args = "autoyast=floppy "
+ unattended_file =
unattended/Sles11-64-autoinst.suse
+
- @Ubuntu:
shell_prompt = "^root@.*[\#\$]\s*$"

(quoted diff) +0 -0

b/client/tests/kvm/unattended/Sles11-64-autoinst.suse new file mode 100644
index 0000000..395a7b3

client/tests/kvm/unattended/Sles11-64-autoinst.suse new file +3 -0
@@ -0,0 +1,897 @@
+<?xml version="1.0"?>
+<!DOCTYPE profile>
+<profile xmlns="http://www.suse.com/1.0/yast2ns"

xmlns:config="http://www.suse.com/1.0/configns">
+ <add-on/>
+ <bootloader>
+ <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>
+      <default>SUSE Linux Enterprise Server 11 - 2.6.27.19-5</default>
+      <generic_mbr>true</generic_mbr>
+      <hiddenmenu>false</hiddenmenu>
+      <lines_cache_id>2</lines_cache_id>
+      <timeout config:type="integer">8</timeout>
+      <trusted_grub>false</trusted_grub>

+ </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>ata_generic</module>
+ </initrd_module>
+ <initrd_module>
+ <module>piix</module>
+ </initrd_module>
+ <initrd_module>
+ <module>ide_pci_generic</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>edd</module>
+ </initrd_module>

+    </initrd_modules>
+    <loader_type>grub</loader_type>
+    <sections config:type="list"/>
+  </bootloader>
+  <ca_mgm>
+    <CAName>YaST_Default_CA</CAName>
+    <ca_commonName>YaST Default CA (linux-h1i4)</ca_commonName>
+    <country>US</country>
+    <password>ENTER PASSWORD HERE</password>
+    <server_commonName>linux-h1i4.site</server_commonName>
+    <server_email>postmaster@site</server_email>
+    <takeLocalServerName

config:type="boolean">false</takeLocalServerName>
+ </ca_mgm>
+ <deploy_image>
+ <image_installation
config:type="boolean">false</image_installation>
+ </deploy_image>
+ <firewall>

+    <FW_ALLOW_FW_BROADCAST_DMZ>no</FW_ALLOW_FW_BROADCAST_DMZ>
+    <FW_ALLOW_FW_BROADCAST_EXT>no</FW_ALLOW_FW_BROADCAST_EXT>
+    <FW_ALLOW_FW_BROADCAST_INT>no</FW_ALLOW_FW_BROADCAST_INT>
+    <FW_CONFIGURATIONS_EXT>sshd</FW_CONFIGURATIONS_EXT>
+    <FW_DEV_DMZ></FW_DEV_DMZ>
+    <FW_DEV_EXT>any</FW_DEV_EXT>
+    <FW_DEV_INT></FW_DEV_INT>
+    <FW_IGNORE_FW_BROADCAST_DMZ>no</FW_IGNORE_FW_BROADCAST_DMZ>
+    <FW_IGNORE_FW_BROADCAST_EXT>yes</FW_IGNORE_FW_BROADCAST_EXT>
+    <FW_IGNORE_FW_BROADCAST_INT>no</FW_IGNORE_FW_BROADCAST_INT>
+    <FW_IPSEC_TRUST>no</FW_IPSEC_TRUST>
+    <FW_LOAD_MODULES>nf_conntrack_netbios_ns</FW_LOAD_MODULES>
+    <FW_LOG_ACCEPT_ALL>no</FW_LOG_ACCEPT_ALL>
+    <FW_LOG_ACCEPT_CRIT>yes</FW_LOG_ACCEPT_CRIT>
+    <FW_LOG_DROP_ALL>no</FW_LOG_DROP_ALL>
+    <FW_LOG_DROP_CRIT>yes</FW_LOG_DROP_CRIT>
+    <FW_MASQUERADE>no</FW_MASQUERADE>
+    <FW_PROTECT_FROM_INT>no</FW_PROTECT_FROM_INT>
+    <FW_ROUTE>no</FW_ROUTE>
+    <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>
+    <proposals config:type="list"/>
+    <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>1000</gid>
+ <group_password>$1$9ibtMhyS
$uY16P2nxSWgejk4Ffz/LB0</group_password>
+ <groupname>users</groupname>
+ <userlist></userlist>
+ </group>
+ <group>

+      <gid>19</gid>
+      <group_password>x</group_password>
+      <groupname>floppy</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>1</gid>
+      <group_password>x</group_password>
+      <groupname>bin</groupname>
+      <userlist>daemon</userlist>
+    </group>
+    <group>
+      <gid>41</gid>
+      <group_password>x</group_password>
+      <groupname>xok</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>65533</gid>
+      <group_password>x</group_password>
+      <groupname>nobody</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>43</gid>
+      <group_password>x</group_password>
+      <groupname>modem</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>5</gid>
+      <group_password>x</group_password>
+      <groupname>tty</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>7</gid>
+      <group_password>x</group_password>
+      <groupname>lp</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>104</gid>
+      <group_password>!</group_password>
+      <groupname>uuidd</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>51</gid>
+      <group_password>!</group_password>
+      <groupname>postfix</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>111</gid>
+      <group_password>!</group_password>
+      <groupname>gdm</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>65534</gid>
+      <group_password>x</group_password>
+      <groupname>nogroup</groupname>
+      <userlist>nobody</userlist>
+    </group>
+    <group>
+      <gid>101</gid>
+      <group_password>!</group_password>
+      <groupname>messagebus</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>59</gid>
+      <group_password>!</group_password>
+      <groupname>maildrop</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>33</gid>
+      <group_password>x</group_password>
+      <groupname>video</groupname>
+      <userlist>linux</userlist>
+    </group>
+    <group>
+      <gid>3</gid>
+      <group_password>x</group_password>
+      <groupname>sys</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>15</gid>
+      <group_password>x</group_password>
+      <groupname>shadow</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>20</gid>
+      <group_password>x</group_password>
+      <groupname>cdrom</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>21</gid>
+      <group_password>x</group_password>
+      <groupname>console</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>42</gid>
+      <group_password>x</group_password>
+      <groupname>trusted</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>102</gid>
+      <group_password>!</group_password>
+      <groupname>haldaemon</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>16</gid>
+      <group_password>x</group_password>
+      <groupname>dialout</groupname>
+      <userlist>linux</userlist>
+    </group>
+    <group>
+      <gid>106</gid>
+      <group_password>!</group_password>
+      <groupname>polkituser</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>10</gid>
+      <group_password>x</group_password>
+      <groupname>wheel</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>107</gid>
+      <group_password>!</group_password>
+      <groupname>pulse</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>8</gid>
+      <group_password>x</group_password>
+      <groupname>www</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>40</gid>
+      <group_password>x</group_password>
+      <groupname>games</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>6</gid>
+      <group_password>x</group_password>
+      <groupname>disk</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>17</gid>
+      <group_password>x</group_password>
+      <groupname>audio</groupname>
+      <userlist>pulse</userlist>
+    </group>
+    <group>
+      <gid>110</gid>
+      <group_password>!</group_password>
+      <groupname>suse-ncc</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>49</gid>
+      <group_password>x</group_password>
+      <groupname>ftp</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>25</gid>
+      <group_password>!</group_password>
+      <groupname>at</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>9</gid>
+      <group_password>x</group_password>
+      <groupname>kmem</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>32</gid>
+      <group_password>x</group_password>
+      <groupname>public</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>12</gid>
+      <group_password>x</group_password>
+      <groupname>mail</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>0</gid>
+      <group_password>x</group_password>
+      <groupname>root</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>2</gid>
+      <group_password>x</group_password>
+      <groupname>daemon</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>103</gid>
+      <group_password>!</group_password>
+      <groupname>sfcb</groupname>
+      <userlist>root</userlist>
+    </group>
+    <group>
+      <gid>105</gid>
+      <group_password>!</group_password>
+      <groupname>ntp</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>14</gid>
+      <group_password>x</group_password>
+      <groupname>uucp</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>109</gid>
+      <group_password>!</group_password>
+      <groupname>pulse-access</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>71</gid>
+      <group_password>!</group_password>
+      <groupname>ntadmin</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>62</gid>
+      <group_password>x</group_password>
+      <groupname>man</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>108</gid>
+      <group_password>!</group_password>
+      <groupname>pulse-rt</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>22</gid>
+      <group_password>x</group_password>
+      <groupname>utmp</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>13</gid>
+      <group_password>x</group_password>
+      <groupname>news</groupname>
+      <userlist></userlist>
+    </group>
+    <group>
+      <gid>65</gid>
+      <group_password>!</group_password>
+      <groupname>sshd</groupname>
+      <userlist></userlist>

+ </group>
+ </groups>
+ <host>
+ <hosts config:type="list">
+ <hosts_entry>
+ <host_address>127.0.0.1</host_address>
+ <names config:type="list">
+ <name>localhost</name>
+ </names>
+ </hosts_entry>
+ <hosts_entry>
+ <host_address>::1</host_address>
+ <names config:type="list">
+ <name>localhost ipv6-localhost ipv6-loopback</name>
+ </names>
+ </hosts_entry>
+ <hosts_entry>
+ <host_address>fe00::0</host_address>
+ <names config:type="list">
+ <name>ipv6-localnet</name>
+ </names>
+ </hosts_entry>
+ <hosts_entry>
+ <host_address>ff00::0</host_address>
+ <names config:type="list">
+ <name>ipv6-mcastprefix</name>
+ </names>
+ </hosts_entry>
+ <hosts_entry>
+ <host_address>ff02::1</host_address>
+ <names config:type="list">
+ <name>ipv6-allnodes</name>
+ </names>
+ </hosts_entry>
+ <hosts_entry>
+ <host_address>ff02::2</host_address>
+ <names config:type="list">
+ <name>ipv6-allrouters</name>
+ </names>
+ </hosts_entry>
+ <hosts_entry>
+ <host_address>ff02::3</host_address>
+ <names config:type="list">
+ <name>ipv6-allhosts</name>
+ </names>
+ </hosts_entry>
+ </hosts>
+ </host>
+ <iscsi-client>
+ <version>1.0</version>
+ </iscsi-client>
+ <keyboard>
+ <keymap>english-us</keymap>
+ </keyboard>
+ <language>
+ <language>en_US</language>
+ <languages>en_US</languages>
+ </language>
+ <ldap>

+    <base_config_dn></base_config_dn>
+    <bind_dn></bind_dn>
+    <create_ldap config:type="boolean">false</create_ldap>
+    <file_server config:type="boolean">false</file_server>
+    <ldap_domain>dc=example,dc=com</ldap_domain>
+    <ldap_server>127.0.0.1</ldap_server>
+    <ldap_tls config:type="boolean">true</ldap_tls>
+    <ldap_v2 config:type="boolean">false</ldap_v2>
+    <login_enabled config:type="boolean">true</login_enabled>
+    <member_attribute>member</member_attribute>
+    <nss_base_group></nss_base_group>
+    <nss_base_passwd></nss_base_passwd>
+    <nss_base_shadow></nss_base_shadow>
+    <pam_password>exop</pam_password>
+    <start_autofs config:type="boolean">false</start_autofs>
+    <start_ldap config:type="boolean">false</start_ldap>
+  </ldap>
+  <login_settings/>
+  <networking>

+ <dns>
+ <dhcp_hostname config:type="boolean">true</dhcp_hostname>
+ <resolv_conf_policy>auto</resolv_conf_policy>
+ </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>
+ <nis>

+    <netconfig_policy>auto</netconfig_policy>
+    <nis_broadcast config:type="boolean">false</nis_broadcast>
+    <nis_broken_server config:type="boolean">false</nis_broken_server>
+    <nis_local_only config:type="boolean">false</nis_local_only>
+    <start_autofs config:type="boolean">false</start_autofs>
+    <start_nis config:type="boolean">false</start_nis>
+  </nis>
+  <partitioning config:type="list">
+    <drive>
+      <initialize config:type="boolean">true</initialize>
+      <partitions config:type="list"/>
+      <pesize></pesize>
+      <type config:type="symbol">CT_DISK</type>
+      <use>all</use>
+    </drive>
+  </partitioning>
+  <proxy>
+    <enabled config:type="boolean">false</enabled>
+    <ftp_proxy></ftp_proxy>
+    <http_proxy></http_proxy>
+    <https_proxy></https_proxy>
+    <no_proxy>localhost, 127.0.0.1</no_proxy>
+    <proxy_password></proxy_password>
+    <proxy_user></proxy_user>
+  </proxy>
+  <report>
+    <errors>
+      <log config:type="boolean">true</log>
+      <show config:type="boolean">true</show>
+      <timeout config:type="integer">10</timeout>
+    </errors>
+    <messages>
+      <log config:type="boolean">true</log>
+      <show config:type="boolean">true</show>
+      <timeout config:type="integer">10</timeout>
+    </messages>
+    <warnings>
+      <log config:type="boolean">true</log>
+      <show config:type="boolean">true</show>
+      <timeout config:type="integer">10</timeout>
+    </warnings>
+    <yesno_messages>
+      <log config:type="boolean">true</log>
+      <show config:type="boolean">true</show>
+      <timeout config:type="integer">5</timeout>

+ </yesno_messages>
+ </report>
+ <runlevel>
+ <default>3</default>
+ </runlevel>
+ <scripts>
+ <post-scripts config:type="list">
+ <script>

+        <debug config:type="boolean">true</debug>
+        <feedback config:type="boolean">false</feedback>
+        <filename>server</filename>
+        <interpreter>python</interpreter>
+        <location></location>
+        <network_needed config:type="boolean">true</network_needed>
+        <source><![CDATA[import socket, os

+os.system('dhclient eth0') +server=socket.socket(socket.AF_INET, socket.SOCK_STREAM) +server.bind(('',12323))
+server.listen(1)
+(client, addr) = server.accept() +client.send("thank u for connecting") +client.close()
+]]></source>
+ </script>
+ </post-scripts>
+ </scripts>
+ <software>
+ <packages config:type="list">
+ <package>dhcp-client</package>
+ </packages>
+ <patterns config:type="list">

+      <pattern>Basis-Devel</pattern>
+      <pattern>base</pattern>
+      <pattern>laptop</pattern>
+      <pattern>Minimal</pattern>

+ </patterns>
+ </software>
+ <timezone>
+ <hwclock>UTC</hwclock>
+ <timezone>America/New_York</timezone>
+ </timezone>
+ <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>
+        <max>99999</max>
+        <min>0</min>
+        <warn>7</warn>
+      </password_settings>
+      <shell>/bin/bash</shell>
+      <uid>1000</uid>
+      <user_password>$2a$05

$FAAcDkjOVQxuDKvppCzcROelTVQeDSr9FIKSwP02wrg7SBulFkeXK</user_password>
+ <username>linux</username>
+ </user>
+ <user>

+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>Games account</fullname>
+      <gid>100</gid>
+      <home>/var/games</home>
+      <shell>/bin/bash</shell>
+      <uid>12</uid>
+      <user_password>*</user_password>
+      <username>games</username>
+    </user>
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>bin</fullname>
+      <gid>1</gid>
+      <home>/bin</home>
+      <shell>/bin/bash</shell>
+      <uid>1</uid>
+      <user_password>*</user_password>
+      <username>bin</username>
+    </user>
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>nobody</fullname>
+      <gid>65533</gid>
+      <home>/var/lib/nobody</home>
+      <shell>/bin/bash</shell>
+      <uid>65534</uid>
+      <user_password>*</user_password>
+      <username>nobody</username>
+    </user>
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>Printing daemon</fullname>
+      <gid>7</gid>
+      <home>/var/spool/lpd</home>
+      <shell>/bin/bash</shell>
+      <uid>4</uid>
+      <user_password>*</user_password>
+      <username>lp</username>
+    </user>
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>User for uuidd</fullname>
+      <gid>104</gid>
+      <home>/var/run/uuidd</home>
+      <password_settings>
+        <max>99999</max>
+        <min>0</min>
+        <warn>7</warn>
+      </password_settings>
+      <shell>/bin/false</shell>
+      <uid>102</uid>
+      <user_password>*</user_password>
+      <username>uuidd</username>
+    </user>
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>Postfix Daemon</fullname>
+      <gid>51</gid>
+      <home>/var/spool/postfix</home>
+      <password_settings>
+        <max>99999</max>
+        <min>0</min>
+        <warn>7</warn>
+      </password_settings>
+      <shell>/bin/false</shell>
+      <uid>51</uid>
+      <user_password>*</user_password>
+      <username>postfix</username>
+    </user>
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>Novell Customer Center User</fullname>
+      <gid>110</gid>
+      <home>/var/lib/YaST2/suse-ncc-fakehome</home>
+      <password_settings>
+        <max>99999</max>
+        <min>0</min>
+        <warn>7</warn>
+      </password_settings>
+      <shell>/bin/bash</shell>
+      <uid>105</uid>
+      <user_password>*</user_password>
+      <username>suse-ncc</username>
+    </user>
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>FTP account</fullname>
+      <gid>49</gid>
+      <home>/srv/ftp</home>
+      <shell>/bin/bash</shell>
+      <uid>40</uid>
+      <user_password>*</user_password>
+      <username>ftp</username>
+    </user>
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>Gnome Display Manager daemon</fullname>
+      <gid>111</gid>
+      <home>/var/lib/gdm</home>
+      <password_settings>
+        <max>99999</max>
+        <min>0</min>
+        <warn>7</warn>
+      </password_settings>
+      <shell>/bin/false</shell>
+      <uid>106</uid>
+      <user_password>*</user_password>
+      <username>gdm</username>
+    </user>
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>Batch jobs daemon</fullname>
+      <gid>25</gid>
+      <home>/var/spool/atjobs</home>
+      <password_settings>
+        <max>99999</max>
+        <min>0</min>
+        <warn>7</warn>
+      </password_settings>
+      <shell>/bin/bash</shell>
+      <uid>25</uid>
+      <user_password>*</user_password>
+      <username>at</username>
+    </user>
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>root</fullname>
+      <gid>0</gid>
+      <home>/root</home>
+      <shell>/bin/bash</shell>
+      <uid>0</uid>
+      <user_password>$2a$05

$6EDh/ymzfFidFVZ9GxPpR.QLaswYgGBxlmCoy0WUo42stJDGcPcxK</user_password>
+ <username>root</username>
+ </user>
+ <user>

+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>Mailer daemon</fullname>
+      <gid>12</gid>
+      <home>/var/spool/clientmqueue</home>
+      <shell>/bin/false</shell>
+      <uid>8</uid>
+      <user_password>*</user_password>
+      <username>mail</username>
+    </user>
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>Daemon</fullname>
+      <gid>2</gid>
+      <home>/sbin</home>
+      <shell>/bin/bash</shell>
+      <uid>2</uid>
+      <user_password>*</user_password>
+      <username>daemon</username>
+    </user>
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>NTP daemon</fullname>
+      <gid>105</gid>
+      <home>/var/lib/ntp</home>
+      <password_settings>
+        <max>99999</max>
+        <min>0</min>
+        <warn>7</warn>
+      </password_settings>
+      <shell>/bin/false</shell>
+      <uid>74</uid>
+      <user_password>*</user_password>
+      <username>ntp</username>
+    </user>
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>Unix-to-Unix CoPy system</fullname>
+      <gid>14</gid>
+      <home>/etc/uucp</home>
+      <shell>/bin/bash</shell>
+      <uid>10</uid>
+      <user_password>*</user_password>
+      <username>uucp</username>
+    </user>
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>User for D-Bus</fullname>
+      <gid>101</gid>
+      <home>/var/run/dbus</home>
+      <password_settings>
+        <min>0</min>
+        <warn>7</warn>
+      </password_settings>
+      <shell>/bin/false</shell>
+      <uid>100</uid>
+      <user_password>*</user_password>
+      <username>messagebus</username>
+    </user>
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>User for haldaemon</fullname>
+      <gid>102</gid>
+      <home>/var/run/hald</home>
+      <password_settings>
+        <min>0</min>
+        <warn>7</warn>
+      </password_settings>
+      <shell>/bin/false</shell>
+      <uid>101</uid>
+      <user_password>*</user_password>
+      <username>haldaemon</username>
+    </user>
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>WWW daemon apache</fullname>
+      <gid>8</gid>
+      <home>/var/lib/wwwrun</home>
+      <shell>/bin/false</shell>
+      <uid>30</uid>
+      <user_password>*</user_password>
+      <username>wwwrun</username>
+    </user>
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>Manual pages viewer</fullname>
+      <gid>62</gid>
+      <home>/var/cache/man</home>
+      <shell>/bin/bash</shell>
+      <uid>13</uid>
+      <user_password>*</user_password>
+      <username>man</username>
+    </user>
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>PolicyKit</fullname>
+      <gid>106</gid>
+      <home>/var/run/PolicyKit</home>
+      <password_settings>
+        <max>99999</max>
+        <min>0</min>
+        <warn>7</warn>
+      </password_settings>
+      <shell>/bin/false</shell>
+      <uid>103</uid>
+      <user_password>*</user_password>
+      <username>polkituser</username>
+    </user>
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>News system</fullname>
+      <gid>13</gid>
+      <home>/etc/news</home>
+      <shell>/bin/bash</shell>
+      <uid>9</uid>
+      <user_password>*</user_password>
+      <username>news</username>
+    </user>
+    <user>
+      <fullname>SSH daemon</fullname>
+      <gid>65</gid>
+      <home>/var/lib/sshd</home>
+      <password_settings>
+        <flag></flag>
+        <inact>-1</inact>
+        <max>99999</max>
+        <min>0</min>
+        <warn>7</warn>
+      </password_settings>
+      <shell>/bin/false</shell>
+      <uid>71</uid>
+      <username>sshd</username>
+    </user>
+    <user>
+      <encrypted config:type="boolean">true</encrypted>
+      <fullname>PulseAudio daemon</fullname>
+      <gid>107</gid>
+      <home>/var/lib/pulseaudio</home>
+      <password_settings>
+        <max>99999</max>
+        <min>0</min>
+        <warn>7</warn>
+      </password_settings>
+      <shell>/sbin/nologin</shell>
+      <uid>104</uid>
+      <user_password>*</user_password>
+      <username>pulse</username>
+    </user>
+  </users>
+  <x11>
+    <color_depth config:type="integer">16</color_depth>
+    <display_manager>gdm</display_manager>
+    <enable_3d config:type="boolean">false</enable_3d>
+    <monitor>
+      <display>
+        <max_hsync config:type="integer">38</max_hsync>
+        <max_vsync config:type="integer">60</max_vsync>
+        <min_hsync config:type="integer">31</min_hsync>
+        <min_vsync config:type="integer">50</min_vsync>
+      </display>
+      <monitor_device>800X600@60HZ</monitor_device>
+      <monitor_vendor>--&gt; VESA</monitor_vendor>
+    </monitor>
+    <resolution>800x600 (SVGA)</resolution>
+    <window_manager>gnome</window_manager>

+ </x11>
+</profile>

Signature · 1 line
1.6.2.5
#9 lore raw
In reply to yogi
Quoted 4 lines · yogi

Hello everyone,

I like to submit a set of patches to enable installing multiple guests in parallel.

Hi Yogi, great to receive your patches!

Quoted 4 lines

To install multiple guests in parallel the role of the host and the guest need to be changed. In this patch host acts as a client and the guest acts as server, enabling us to install multiple guest at same time.

I see your point, but I am concerned that we already have a parallel test execution implementation (see control.parallel), so either your patchset needs to fit in with the control.parallel approach or we might think of another approach. I have thought of some ideas, will check your approach and comment about it soon.

Quoted 4 lines

The present unattended install file (kickstart, xml) need to be modified to make them work with this patch. So i have also included a patch for the kickstart file "RHEL-5-series.ks" and a patch to support Sles11 64-bit guests.

I already gave a brief look on the SLES unattended install support and I like the approach, maybe we should split your change in:

1) Add support to SLES install + add SLES 11 autoinst XML
2) Parallel install of guest OS

1) is pretty low hanging fruit, we can benefit from it soon, 2) needs more care and thought. Even if that means modifying it a little bit later, could you split them and send me 1) first so we can get it integrated and then 2), which will pass through some rounds of review?

Quoted 2 lines

I will be happy to re-implement or modify the patch based to your comments and also extent support for other OS like windows.

That's the spirit!

Quoted 2 lines

Thanks and Regards
Yogi

Thank you very much

Lucas

#10 lore raw
Quoted 13 lines · Lucas Meneghel Rodrigues
Quoted 4 lines · yogi

Hello everyone,

I like to submit a set of patches to enable installing multiple guests in parallel.

Hi Yogi, great to receive your patches!

Quoted 4 lines

To install multiple guests in parallel the role of the host and the guest need to be changed. In this patch host acts as a client and the guest acts as server, enabling us to install multiple guest at same time.

Quoted 5 lines

I see your point, but I am concerned that we already have a parallel test execution implementation (see control.parallel), so either your patchset needs to fit in with the control.parallel approach or we might think of another approach. I have thought of some ideas, will check your approach and comment about it soon.

If I've read the patches right, I believe Yogi is relying upon control.parallel; these changes are needed to ensure that the unattended_install test invoked in parallel doesn't clobber itself. Yogi hit all of the major issues:

1) tftp code uses the same path and filename for each guest; Yogi switched that to include a per-guest path so we can have multipl kernel/initrd pairs in flight at the same time

2) only one service side listening server and no way agreeing upon a port number; Yogi moved the listen to the guest, and now the host pokes at the pre-defined port in each guest to see if it has completed.

Signature · 4 lines
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
[email protected]
#11 lore raw
Quoted 20 lines · Ryan Harper
Quoted 13 lines · Lucas Meneghel Rodrigues
Quoted 4 lines · yogi

Hello everyone,

I like to submit a set of patches to enable installing multiple guests in parallel.

Hi Yogi, great to receive your patches!

Quoted 4 lines

To install multiple guests in parallel the role of the host and the guest need to be changed. In this patch host acts as a client and the guest acts as server, enabling us to install multiple guest at same time.

Quoted 5 lines

I see your point, but I am concerned that we already have a parallel test execution implementation (see control.parallel), so either your patchset needs to fit in with the control.parallel approach or we might think of another approach. I have thought of some ideas, will check your approach and comment about it soon.

Quoted 4 lines

If I've read the patches right, I believe Yogi is relying upon control.parallel; these changes are needed to ensure that the unattended_install test invoked in parallel doesn't clobber itself. Yogi hit all of the major issues:

Yes, after reading the patches more carefully I realized that I was too hasty in making that comment :)

Quoted 7 lines

1) tftp code uses the same path and filename for each guest; Yogi switched that to include a per-guest path so we can have multipl kernel/initrd pairs in flight at the same time

2) only one service side listening server and no way agreeing upon a port number; Yogi moved the listen to the guest, and now the host pokes at the pre-defined port in each guest to see if it has completed.

Yes, the last months I've been running the tests on a internal test grid, as there were a lot of details to take care, I decided to keep serial execution until I was completely comfortable with all the tests, so I haven't run into this issue yet. Good point, let's fix this as soon as possible.

author
#12 lore raw
In reply to Lucas Meneghel Rodrigues
Quoted 13 lines · Lucas Meneghel Rodrigues
Quoted 4 lines · yogi

Hello everyone,

I like to submit a set of patches to enable installing multiple guests in parallel.

Hi Yogi, great to receive your patches!

Quoted 4 lines

To install multiple guests in parallel the role of the host and the guest need to be changed. In this patch host acts as a client and the guest acts as server, enabling us to install multiple guest at same time.

Quoted 5 lines

I see your point, but I am concerned that we already have a parallel test execution implementation (see control.parallel), so either your patchset needs to fit in with the control.parallel approach or we might think of another approach. I have thought of some ideas, will check your approach and comment about it soon.

The patchet for the control.parallel approach. The current implementation of unattended installtion using control.parallel just works for just one guest. The issue is all servers on the host try to bind to same port and only one succeeds. But making the guests as servers we could avoid this issue.

Quoted 9 lines
Quoted 5 lines

The present unattended install file (kickstart, xml) need to be modified to make them work with this patch. So i have also included a patch for the kickstart file "RHEL-5-series.ks" and a patch to support Sles11 64-bit guests.

I already gave a brief look on the SLES unattended install support and I like the approach, maybe we should split your change in:

Quoted 8 lines

1) Add support to SLES install + add SLES 11 autoinst XML
2) Parallel install of guest OS

1) is pretty low hanging fruit, we can benefit from it soon, 2) needs more care and thought. Even if that means modifying it a little bit later, could you split them and send me 1) first so we can get it integrated and then 2), which will pass through some rounds of review?

sure will split and send to you, with the changes proposed in the comments

Quoted 12 lines
Quoted 2 lines

I will be happy to re-implement or modify the patch based to your comments and also extent support for other OS like windows.

That's the spirit!

Quoted 2 lines

Thanks and Regards
Yogi

Thank you very much

Lucas