Revert "Merge remote branch 'cros/upstream' into tempbranch2"

This reverts commit 25fc6d1f28e54c46689f12d3b93c2540ef45323a.

TBR=ericli@chromium.org

Review URL: http://codereview.chromium.org/3541002

Change-Id: Ib0165b19bfdf02264f8a6a74ddf3ae74c8c0f7df
diff --git a/client/bin/job.py b/client/bin/job.py
index 6dd19d1..5adbc00 100644
--- a/client/bin/job.py
+++ b/client/bin/job.py
@@ -503,8 +503,7 @@
                 raise error.TestError("Dependency %s does not exist" % dep)
 
             os.chdir(dep_dir)
-            if execfile('%s.py' % dep, {}) is None:
-                logging.info('Dependency %s successfuly built', dep)
+            utils.system('./' + dep + '.py')
 
 
     def _runtest(self, url, tag, args, dargs):
diff --git a/client/bin/kernel.py b/client/bin/kernel.py
index da91389..b398697 100644
--- a/client/bin/kernel.py
+++ b/client/bin/kernel.py
@@ -64,51 +64,7 @@
                           root=root)
 
 
-class BootableKernel(object):
-
-    def __init__(self, job):
-        self.job = job
-        self.installed_as = None  # kernel choice in bootloader menu
-        self.image = None
-        self.initrd = ''
-
-
-    def _boot_kernel(self, args, ident_check, expected_ident, subdir, notes):
-        """
-        Boot a kernel, with post-boot kernel id check
-
-        @param args:  kernel cmdline arguments
-        @param ident_check: check kernel id after boot
-        @param expected_ident:
-        @param subdir: job-step qualifier in status log
-        @param notes:  additional comment in status log
-        """
-
-        # If we can check the kernel identity do so.
-        if ident_check:
-            when = int(time.time())
-            args += " IDENT=%d" % when
-            self.job.next_step_prepend(["job.end_reboot_and_verify", when,
-                                        expected_ident, subdir, notes])
-        else:
-            self.job.next_step_prepend(["job.end_reboot", subdir,
-                                        expected_ident, notes])
-
-        # Point bootloader to the selected tag.
-        _add_kernel_to_bootloader(self.job.bootloader,
-                                  self.job.config_get('boot.default_args'),
-                                  self.installed_as, args, self.image,
-                                  self.initrd)
-
-        # defer fsck for next reboot, to avoid reboots back to default kernel
-        utils.system('touch /fastboot')  # this file is removed automatically
-
-        # Boot it.
-        self.job.start_reboot()
-        self.job.reboot(tag=self.installed_as)
-
-
-class kernel(BootableKernel):
+class kernel(object):
     """ Class for compiling kernels.
 
     Data for the object includes the src files
@@ -153,7 +109,7 @@
         leave
                 Boolean, whether to leave existing tmpdir or not
         """
-        super(kernel, self).__init__(job)
+        self.job = job
         self.autodir = job.autodir
 
         self.src_dir    = os.path.join(tmp_dir, 'src')
@@ -164,6 +120,8 @@
         self.results_dir = os.path.join(subdir, 'results')
         self.subdir     = os.path.basename(subdir)
 
+        self.installed_as = None
+
         if not leave:
             if os.path.isdir(self.src_dir):
                 utils.system('rm -rf ' + self.src_dir)
@@ -492,6 +450,16 @@
                           self.system_map, self.initrd)
 
 
+    def add_to_bootloader(self, tag='autotest', args=''):
+        """ add this kernel to bootloader, taking an
+            optional parameter of space separated parameters
+            e.g.:  kernel.add_to_bootloader('mykernel', 'ro acpi=off')
+        """
+        _add_kernel_to_bootloader(self.job.bootloader,
+                                  self.job.config_get('boot.default_args'),
+                                  tag, args, self.image, self.initrd)
+
+
     def get_kernel_build_arch(self, arch=None):
         """
         Work out the current kernel architecture (as a kernel arch)
@@ -558,14 +526,29 @@
             just make it happen.
         """
 
-        # If the kernel has not yet been installed,
-        #   install it now as default tag.
+        # If we can check the kernel identity do so.
+        expected_ident = self.get_kernel_build_ident()
+        if ident:
+            when = int(time.time())
+            args += " IDENT=%d" % (when)
+            self.job.next_step_prepend(["job.end_reboot_and_verify", when,
+                                        expected_ident, self.subdir,
+                                        self.applied_patches])
+        else:
+            self.job.next_step_prepend(["job.end_reboot", self.subdir,
+                                        expected_ident, self.applied_patches])
+
+        # Check if the kernel has been installed, if not install
+        # as the default tag and boot that.
         if not self.installed_as:
             self.install()
 
-        expected_ident = self.get_kernel_build_ident()
-        self._boot_kernel(args, ident, expected_ident,
-                          self.subdir, self.applied_patches)
+        # Boot the selected tag.
+        self.add_to_bootloader(args=args, tag=self.installed_as)
+
+        # Boot it.
+        self.job.start_reboot()
+        self.job.reboot(tag=self.installed_as)
 
 
     def get_kernel_build_ver(self):
@@ -663,19 +646,20 @@
         pickle.dump(temp, open(filename, 'w'))
 
 
-class rpm_kernel(BootableKernel):
+class rpm_kernel(object):
     """
     Class for installing a binary rpm kernel package
     """
 
     def __init__(self, job, rpm_package, subdir):
-        super(rpm_kernel, self).__init__(job)
+        self.job = job
         self.rpm_package = rpm_package
         self.log_dir = os.path.join(subdir, 'debug')
         self.subdir = os.path.basename(subdir)
         if os.path.exists(self.log_dir):
             utils.system('rm -rf ' + self.log_dir)
         os.mkdir(self.log_dir)
+        self.installed_as = None
 
 
     def build(self, *args, **dargs):
@@ -741,23 +725,44 @@
                                       % (vmlinux, rpm_pack))
 
 
+    def add_to_bootloader(self, tag='autotest', args=''):
+        """ Add this kernel to bootloader
+        """
+        _add_kernel_to_bootloader(self.job.bootloader,
+                                  self.job.config_get('boot.default_args'),
+                                  tag, args, self.image, self.initrd)
+
+
     def boot(self, args='', ident=True):
         """ install and boot this kernel
         """
 
-        # If the kernel has not yet been installed,
-        #   install it now as default tag.
+        # Check if the kernel has been installed, if not install
+        # as the default tag and boot that.
         if not self.installed_as:
             self.install()
 
+        # If we can check the kernel identity do so.
         expected_ident = self.full_version
         if not expected_ident:
             expected_ident = '-'.join([self.version,
                                        self.rpm_flavour,
                                        self.release])
+        if ident:
+            when = int(time.time())
+            args += " IDENT=%d" % (when)
+            self.job.next_step_prepend(["job.end_reboot_and_verify",
+                                        when, expected_ident, None, 'rpm'])
+        else:
+            self.job.next_step_prepend(["job.end_reboot", None,
+                                        expected_ident, []])
 
-        self._boot_kernel(args, ident, expected_ident,
-                          None, 'rpm')
+        # Boot the selected tag.
+        self.add_to_bootloader(args=args, tag=self.installed_as)
+
+        # Boot it.
+        self.job.start_reboot()
+        self.job.reboot(tag=self.installed_as)
 
 
 class rpm_kernel_suse(rpm_kernel):
diff --git a/client/bin/kernel_unittest.py b/client/bin/kernel_unittest.py
index fe40e6a..88d822d 100755
--- a/client/bin/kernel_unittest.py
+++ b/client/bin/kernel_unittest.py
@@ -6,94 +6,6 @@
 from autotest_lib.client.bin import kernel, job, utils, kernelexpand
 from autotest_lib.client.bin import kernel_config, boottool, os_dep
 
-
-class TestAddKernelToBootLoader(unittest.TestCase):
-
-    def add_to_bootloader(self, base_args, args, bootloader_args,
-                          bootloader_root, tag='image', image='image',
-                          initrd='initrd'):
-        god = mock.mock_god()
-        bootloader = god.create_mock_class(boottool.boottool, "boottool")
-
-        # record
-        bootloader.remove_kernel.expect_call(tag)
-        bootloader.add_kernel.expect_call(image, tag, initrd=initrd,
-                                          args=bootloader_args,
-                                          root=bootloader_root)
-
-        # run and check
-        kernel._add_kernel_to_bootloader(bootloader, base_args, tag, args,
-                                         image, initrd)
-        god.check_playback()
-
-
-    def test_add_kernel_to_bootloader(self):
-        self.add_to_bootloader(base_args='baseargs', args='',
-                               bootloader_args='baseargs', bootloader_root=None)
-        self.add_to_bootloader(base_args='arg1 root=/dev/oldroot arg2',
-                               args='root=/dev/newroot arg3',
-                               bootloader_args='arg1 arg2 arg3',
-                               bootloader_root='/dev/newroot')
-
-
-class TestBootableKernel(unittest.TestCase):
-
-    def setUp(self):
-        self.god = mock.mock_god()
-        self.god.stub_function(time, "time")
-        self.god.stub_function(utils, "system")
-        self.god.stub_function(kernel, "_add_kernel_to_bootloader")
-        job_ = self.god.create_mock_class(job.job, "job")
-        self.kernel = kernel.BootableKernel(job_)
-        self.kernel.job.bootloader = self.god.create_mock_class(
-                              boottool.boottool, "boottool")
-
-
-    def tearDown(self):
-        # note: time.time() can only be unstubbed via tearDown()
-        self.god.unstub_all()
-
-
-    def boot_kernel(self, ident_check):
-        notes = "applied_patches"
-        when = 1
-        args = ''
-        base_args = 'base_args'
-        tag = 'ident'
-        subdir = 'subdir'
-        self.kernel.image = 'image'
-        self.kernel.initrd = 'initrd'
-        self.kernel.installed_as = tag
-
-        # record
-        args_ = args
-        if ident_check:
-            time.time.expect_call().and_return(when)
-            args_ += " IDENT=%d" % when
-            status = ["job.end_reboot_and_verify", when, tag, subdir, notes]
-        else:
-            status = ["job.end_reboot", subdir, tag, notes]
-        self.kernel.job.next_step_prepend.expect_call(status)
-        self.kernel.job.config_get.expect_call(
-                'boot.default_args').and_return(base_args)
-        kernel._add_kernel_to_bootloader.expect_call(
-                self.kernel.job.bootloader, base_args, tag,
-                args_, self.kernel.image, self.kernel.initrd)
-        utils.system.expect_call('touch /fastboot')
-        self.kernel.job.start_reboot.expect_call()
-        self.kernel.job.reboot.expect_call(tag=tag)
-
-        # run and check
-        self.kernel._boot_kernel(args=args, ident_check=ident_check,
-                                 expected_ident=tag, subdir=subdir, notes=notes)
-        self.god.check_playback()
-
-
-    def test_boot_kernel(self):
-        self.boot_kernel(ident_check=False)
-        self.boot_kernel(ident_check=True)
-
-
 class TestKernel(unittest.TestCase):
     def setUp(self):
         self.god = mock.mock_god()
@@ -561,6 +473,47 @@
         self.god.check_playback()
 
 
+    def _setup_add_to_bootloader(self, tag='autotest', args='', image='image',
+                                 initrd='initrd', base_args='baseargs',
+                                 bootloader_args='baseargs',
+                                 bootloader_root=None):
+        self.construct_kernel()
+
+        # setup
+        self.kernel.image = image
+        self.kernel.initrd = initrd
+
+        # record
+        self.job.config_get.expect_call(
+                'boot.default_args').and_return(base_args)
+        self.job.bootloader.remove_kernel.expect_call(tag)
+        self.job.bootloader.add_kernel.expect_call(
+                image, tag, initrd=initrd, args=bootloader_args,
+                root=bootloader_root)
+
+
+    def test_add_to_bootloader(self):
+        # setup
+        self._setup_add_to_bootloader()
+
+        # run and check
+        self.kernel.add_to_bootloader()
+        self.god.check_playback()
+
+
+    def test_add_to_bootloader_root_args(self):
+        # setup
+        args = 'root=/dev/newroot arg3'
+        self._setup_add_to_bootloader(args=args,
+                                      base_args='arg1 root=/dev/oldroot arg2',
+                                      bootloader_args='arg1 arg2 arg3',
+                                      bootloader_root='/dev/newroot')
+
+        # run and check
+        self.kernel.add_to_bootloader(args=args)
+        self.god.check_playback()
+
+
     def test_get_kernel_build_arch1(self):
         self.construct_kernel()
 
@@ -620,23 +573,51 @@
         self.construct_kernel()
         self.god.stub_function(self.kernel, "get_kernel_build_ident")
         self.god.stub_function(self.kernel, "install")
-        self.god.stub_function(self.kernel, "_boot_kernel")
+        self.god.stub_function(self.kernel, "add_to_bootloader")
         self.kernel.applied_patches = "applied_patches"
-        self.kernel.installed_as = None
+        when = 1
         args = ''
-        expected_ident = 'ident'
-        ident = True
+        self.kernel.installed_as = False
 
         # record
+        self.kernel.get_kernel_build_ident.expect_call().and_return("ident")
+        time.time.expect_call().and_return(when)
+        args += " IDENT=%d" % (when)
+        self.job.next_step_prepend.expect_call(["job.end_reboot_and_verify",
+            when, "ident", self.subdir, self.kernel.applied_patches])
         self.kernel.install.expect_call()
-        self.kernel.get_kernel_build_ident.expect_call(
-                ).and_return(expected_ident)
-        self.kernel._boot_kernel.expect_call(
-                args, ident, expected_ident,
-                self.subdir, self.kernel.applied_patches)
+        self.kernel.add_to_bootloader.expect_call(args=args,
+            tag=False)
+        self.job.start_reboot.expect_call()
+        self.job.reboot.expect_call(tag=False)
 
         # run and check
-        self.kernel.boot(args=args, ident=ident)
+        self.kernel.boot()
+        self.god.check_playback()
+
+
+    def test_boot_without_ident(self):
+        self.construct_kernel()
+        self.god.stub_function(self.kernel, "get_kernel_build_ident")
+        self.god.stub_function(self.kernel, "install")
+        self.god.stub_function(self.kernel, "add_to_bootloader")
+        self.kernel.applied_patches = "applied_patches"
+        when = 1
+        args = ''
+        self.kernel.installed_as = False
+
+        # record
+        self.kernel.get_kernel_build_ident.expect_call().and_return("ident")
+        self.job.next_step_prepend.expect_call(["job.end_reboot",
+            self.subdir, "ident", self.kernel.applied_patches])
+        self.kernel.install.expect_call()
+        self.kernel.add_to_bootloader.expect_call(args=args,
+            tag=False)
+        self.job.start_reboot.expect_call()
+        self.job.reboot.expect_call(tag=False)
+
+        # run and check
+        self.kernel.boot(ident=False)
         self.god.check_playback()
 
 
diff --git a/client/bin/partition.py b/client/bin/partition.py
index e238373..61b24c0 100644
--- a/client/bin/partition.py
+++ b/client/bin/partition.py
@@ -638,7 +638,7 @@
                 self.job.record('GOOD', None, fsck_cmd)
 
 
-    def mount(self, mountpoint=None, fstype=None, args='', record=True):
+    def mount(self, mountpoint, fstype=None, args='', record=True):
         """
         Mount this partition to a mount point
 
diff --git a/client/common_lib/log.py b/client/common_lib/log.py
index a54ad2d..4af1d3f 100644
--- a/client/common_lib/log.py
+++ b/client/common_lib/log.py
@@ -1,29 +1,17 @@
 import sys, re, traceback
 
-# these statuses are ordered such that a status earlier in the list will
-# override a status later in a list (e.g. ERROR during a test will override
-# prior GOOD results, but WARN will not override a FAIL)
+
 job_statuses = ["TEST_NA", "ABORT", "ERROR", "FAIL", "WARN", "GOOD", "ALERT",
                 "RUNNING", "NOSTATUS"]
 
 def is_valid_status(status):
-    if not re.match(r'(START|INFO|(END )?(' + '|'.join(job_statuses) + '))$',
+    if not re.match(r'(START|INFO|(END )?('+'|'.join(job_statuses)+'))$',
                     status):
         return False
     else:
         return True
 
 
-def is_failure(status):
-    if not is_valid_status(status):
-        return False
-    if status in ('START', 'INFO'):
-        return False
-    if status.startswith('END '):
-        status = status[len('END '):]
-    return job_statuses.index(status) <= job_statuses.index("FAIL")
-
-
 def record(fn):
     """
     Generic method decorator for logging calls under the
diff --git a/client/common_lib/revision_control.py b/client/common_lib/revision_control.py
deleted file mode 100644
index 931e5a5..0000000
--- a/client/common_lib/revision_control.py
+++ /dev/null
@@ -1,232 +0,0 @@
-"""
-Module with abstraction layers to revision control systems.
-
-With this library, autotest developers can handle source code checkouts and
-updates on both client as well as server code.
-"""
-
-import os, warnings, logging
-import error, utils
-from autotest_lib.client.bin import os_dep
-
-
-class GitRepo(object):
-    """
-    This class represents a git repo.
-
-    It is used to pull down a local copy of a git repo, check if the local
-    repo is up-to-date, if not update.  It delegates the install to
-    implementation classes.
-    """
-
-    def __init__(self, repodir, giturl, weburl=None):
-        if repodir is None:
-            raise ValueError('You must provide a path that will hold the'
-                             'git repository')
-        self.repodir = utils.sh_escape(repodir)
-        if giturl is None:
-            raise ValueError('You must provide a git URL repository')
-        self.giturl = giturl
-        if weburl is not None:
-            warnings.warn("Param weburl: You are no longer required to provide "
-                          "a web URL for your git repos", DeprecationWarning)
-
-        # path to .git dir
-        self.gitpath = utils.sh_escape(os.path.join(self.repodir,'.git'))
-
-        # Find git base command. If not found, this will throw an exception
-        git_base_cmd = os_dep.command('git')
-
-        # base git command , pointing to gitpath git dir
-        self.gitcmdbase = '%s --git-dir=%s' % (git_base_cmd, self.gitpath)
-
-        # default to same remote path as local
-        self._build = os.path.dirname(self.repodir)
-
-
-    def _run(self, command, timeout=None, ignore_status=False):
-        """
-        Auxiliary function to run a command, with proper shell escaping.
-
-        @param timeout: Timeout to run the command.
-        @param ignore_status: Whether we should supress error.CmdError
-                exceptions if the command did return exit code !=0 (True), or
-                not supress them (False).
-        """
-        return utils.run(r'%s' % (utils.sh_escape(command)),
-                         timeout, ignore_status)
-
-
-    def gitcmd(self, cmd, ignore_status=False):
-        """
-        Wrapper for a git command.
-
-        @param cmd: Git subcommand (ex 'clone').
-        @param ignore_status: Whether we should supress error.CmdError
-                exceptions if the command did return exit code !=0 (True), or
-                not supress them (False).
-        """
-        cmd = '%s %s' % (self.gitcmdbase, cmd)
-        return self._run(cmd, ignore_status=ignore_status)
-
-
-    def get(self, **kwargs):
-        """
-        This method overrides baseclass get so we can do proper git
-        clone/pulls, and check for updated versions.  The result of
-        this method will leave an up-to-date version of git repo at
-        'giturl' in 'repodir' directory to be used by build/install
-        methods.
-
-        @param **kwargs: Dictionary of parameters to the method get.
-        """
-        if not self.is_repo_initialized():
-            # this is your first time ...
-            logging.info('Cloning git repo %s', self.giturl)
-            cmd = 'clone %s %s ' % (self.giturl, self.repodir)
-            rv = self.gitcmd(cmd, True)
-            if rv.exit_status != 0:
-                logging.error(rv.stderr)
-                raise error.CmdError('Failed to clone git url', rv)
-            else:
-                logging.info(rv.stdout)
-
-        else:
-            # exiting repo, check if we're up-to-date
-            if self.is_out_of_date():
-                logging.info('Updating git repo %s', self.giturl)
-                rv = self.gitcmd('pull', True)
-                if rv.exit_status != 0:
-                    logging.error(rv.stderr)
-                    e_msg = 'Failed to pull git repo data'
-                    raise error.CmdError(e_msg, rv)
-            else:
-                logging.info('repo up-to-date')
-
-        # remember where the source is
-        self.source_material = self.repodir
-
-
-    def get_local_head(self):
-        """
-        Get the top commit hash of the current local git branch.
-
-        @return: Top commit hash of local git branch
-        """
-        cmd = 'log --pretty=format:"%H" -1'
-        l_head_cmd = self.gitcmd(cmd)
-        return l_head_cmd.stdout.strip()
-
-
-    def get_remote_head(self):
-        """
-        Get the top commit hash of the current remote git branch.
-
-        @return: Top commit hash of remote git branch
-        """
-        cmd1 = 'remote show'
-        origin_name_cmd = self.gitcmd(cmd1)
-        cmd2 = 'log --pretty=format:"%H" -1 ' + origin_name_cmd.stdout.strip()
-        r_head_cmd = self.gitcmd(cmd2)
-        return r_head_cmd.stdout.strip()
-
-
-    def is_out_of_date(self):
-        """
-        Return whether this branch is out of date with regards to remote branch.
-
-        @return: False, if the branch is outdated, True if it is current.
-        """
-        local_head = self.get_local_head()
-        remote_head = self.get_remote_head()
-
-        # local is out-of-date, pull
-        if local_head != remote_head:
-            return True
-
-        return False
-
-
-    def is_repo_initialized(self):
-        """
-        Return whether the git repo was already initialized (has a top commit).
-
-        @return: False, if the repo was initialized, True if it was not.
-        """
-        cmd = 'log --max-count=1'
-        rv = self.gitcmd(cmd, True)
-        if rv.exit_status == 0:
-            return True
-
-        return False
-
-
-    def get_revision(self):
-        """
-        Return current HEAD commit id
-        """
-        if not self.is_repo_initialized():
-            self.get()
-
-        cmd = 'rev-parse --verify HEAD'
-        gitlog = self.gitcmd(cmd, True)
-        if gitlog.exit_status != 0:
-            logging.error(gitlog.stderr)
-            raise error.CmdError('Failed to find git sha1 revision', gitlog)
-        else:
-            return gitlog.stdout.strip('\n')
-
-
-    def checkout(self, remote, local=None):
-        """
-        Check out the git commit id, branch, or tag given by remote.
-
-        Optional give the local branch name as local.
-
-        @param remote: Remote commit hash
-        @param local: Local commit hash
-        @note: For git checkout tag git version >= 1.5.0 is required
-        """
-        if not self.is_repo_initialized():
-            self.get()
-
-        assert(isinstance(remote, basestring))
-        if local:
-            cmd = 'checkout -b %s %s' % (local, remote)
-        else:
-            cmd = 'checkout %s' % (remote)
-        gitlog = self.gitcmd(cmd, True)
-        if gitlog.exit_status != 0:
-            logging.error(gitlog.stderr)
-            raise error.CmdError('Failed to checkout git branch', gitlog)
-        else:
-            logging.info(gitlog.stdout)
-
-
-    def get_branch(self, all=False, remote_tracking=False):
-        """
-        Show the branches.
-
-        @param all: List both remote-tracking branches and local branches (True)
-                or only the local ones (False).
-        @param remote_tracking: Lists the remote-tracking branches.
-        """
-        if not self.is_repo_initialized():
-            self.get()
-
-        cmd = 'branch --no-color'
-        if all:
-            cmd = " ".join([cmd, "-a"])
-        if remote_tracking:
-            cmd = " ".join([cmd, "-r"])
-
-        gitlog = self.gitcmd(cmd, True)
-        if gitlog.exit_status != 0:
-            logging.error(gitlog.stderr)
-            raise error.CmdError('Failed to get git branch', gitlog)
-        elif all or remote_tracking:
-            return gitlog.stdout.strip('\n')
-        else:
-            branch = [b[2:] for b in gitlog.stdout.split('\n')
-                      if b.startswith('*')][0]
-            return branch
diff --git a/client/common_lib/utils.py b/client/common_lib/utils.py
index 8a34ef1..a117cec 100644
--- a/client/common_lib/utils.py
+++ b/client/common_lib/utils.py
@@ -202,44 +202,6 @@
         f.close()
 
 
-def matrix_to_string(matrix, header=None):
-    """
-    Return a pretty, aligned string representation of a nxm matrix.
-
-    This representation can be used to print any tabular data, such as
-    database results. It works by scanning the lengths of each element
-    in each column, and determining the format string dynamically.
-
-    @param matrix: Matrix representation (list with n rows of m elements).
-    @param header: Optional tuple with header elements to be displayed.
-    """
-    lengths = []
-    for row in matrix:
-        for column in row:
-            i = row.index(column)
-            cl = len(column)
-            try:
-                ml = lengths[i]
-                if cl > ml:
-                    lengths[i] = cl
-            except IndexError:
-                lengths.append(cl)
-
-    lengths = tuple(lengths)
-    format_string = ""
-    for length in lengths:
-        format_string += "%-" + str(length) + "s "
-    format_string += "\n"
-
-    matrix_str = ""
-    if header:
-        matrix_str += format_string % header
-    for row in matrix:
-        matrix_str += format_string % tuple(row)
-
-    return matrix_str
-
-
 def read_keyval(path):
     """
     Read a key-value pair format file into a dictionary, and return it.
@@ -1268,35 +1230,3 @@
             logging.warning("args_to_dict: argument '%s' doesn't match "
                             "'%s' pattern. Ignored." % (arg, arg_re.pattern))
     return dict
-
-
-def get_unused_port():
-    """
-    Finds a semi-random available port. A race condition is still
-    possible after the port number is returned, if another process
-    happens to bind it.
-
-    Returns:
-        A port number that is unused on both TCP and UDP.
-    """
-
-    def try_bind(port, socket_type, socket_proto):
-        s = socket.socket(socket.AF_INET, socket_type, socket_proto)
-        try:
-            try:
-                s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
-                s.bind(('', port))
-                return s.getsockname()[1]
-            except socket.error:
-                return None
-        finally:
-            s.close()
-
-    # On the 2.6 kernel, calling try_bind() on UDP socket returns the
-    # same port over and over. So always try TCP first.
-    while True:
-        # Ask the OS for an unused port.
-        port = try_bind(0, socket.SOCK_STREAM, socket.IPPROTO_TCP)
-        # Check if this port is unused on the other protocol.
-        if port and try_bind(port, socket.SOCK_DGRAM, socket.IPPROTO_UDP):
-            return port
diff --git a/client/common_lib/utils_unittest.py b/client/common_lib/utils_unittest.py
index 8eef49c..b0a928b 100755
--- a/client/common_lib/utils_unittest.py
+++ b/client/common_lib/utils_unittest.py
@@ -773,22 +773,5 @@
             logger.setLevel(saved_level)
 
 
-class test_get_random_port(unittest.TestCase):
-    def do_bind(self, port, socket_type, socket_proto):
-        s = socket.socket(socket.AF_INET, socket_type, socket_proto)
-        s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
-        s.bind(('', port))
-        return s
-
-
-    def test_get_port(self):
-        for _ in xrange(100):
-            p = utils.get_unused_port()
-            s = self.do_bind(p, socket.SOCK_STREAM, socket.IPPROTO_TCP)
-            self.assert_(s.getsockname())
-            s = self.do_bind(p, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
-            self.assert_(s.getsockname())
-
-
 if __name__ == "__main__":
     unittest.main()
diff --git a/client/deps/boottool/boottool.py b/client/deps/boottool/boottool.py
index a391be3..2718af1 100755
--- a/client/deps/boottool/boottool.py
+++ b/client/deps/boottool/boottool.py
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 import os
+import common
 from autotest_lib.client.bin import utils
 
 # To use this, you have to set PERL5LIB to:
@@ -15,9 +16,9 @@
     srcdir = os.path.join(topdir, 'src')
     utils.extract_tarball_to_dir(tarball, srcdir)
     os.chdir(srcdir)
-    utils.system('perl Makefile.PL PREFIX=' + topdir)
-    utils.make()
-    utils.make('install')
+    utils.system ('perl Makefile.PL PREFIX=' + topdir)
+    utils.system ('make')
+    utils.system ('make install')
     os.chdir(topdir)
 
 
diff --git a/client/deps/boottool/common.py b/client/deps/boottool/common.py
new file mode 100644
index 0000000..0f18586
--- /dev/null
+++ b/client/deps/boottool/common.py
@@ -0,0 +1,8 @@
+import os, sys
+dirname = os.path.dirname(sys.modules[__name__].__file__)
+client_dir = os.path.abspath(os.path.join(dirname, "../../"))
+sys.path.insert(0, client_dir)
+import setup_modules
+sys.path.pop(0)
+setup_modules.setup(base_path=client_dir,
+                    root_module_name="autotest_lib.client")
diff --git a/client/deps/dejagnu/common.py b/client/deps/dejagnu/common.py
new file mode 100644
index 0000000..0f18586
--- /dev/null
+++ b/client/deps/dejagnu/common.py
@@ -0,0 +1,8 @@
+import os, sys
+dirname = os.path.dirname(sys.modules[__name__].__file__)
+client_dir = os.path.abspath(os.path.join(dirname, "../../"))
+sys.path.insert(0, client_dir)
+import setup_modules
+sys.path.pop(0)
+setup_modules.setup(base_path=client_dir,
+                    root_module_name="autotest_lib.client")
diff --git a/client/deps/dejagnu/dejagnu.py b/client/deps/dejagnu/dejagnu.py
index 33888f3..8bfe7b8 100755
--- a/client/deps/dejagnu/dejagnu.py
+++ b/client/deps/dejagnu/dejagnu.py
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 import os
+import common
 from autotest_lib.client.bin import utils
 
 version = 1
@@ -9,9 +10,9 @@
     srcdir = os.path.join(topdir, 'src')
     utils.extract_tarball_to_dir(tarball, 'src')
     os.chdir(srcdir)
-    utils.configure('--prefix=%s/dejagnu' % topdir)
-    utils.make()
-    utils.make('install')
+    utils.system ('./configure --prefix=%s/dejagnu' % topdir)
+    utils.system('make')
+    utils.system('make install')
 
     os.chdir(topdir)
 
diff --git a/client/deps/libaio/common.py b/client/deps/libaio/common.py
new file mode 100644
index 0000000..0f18586
--- /dev/null
+++ b/client/deps/libaio/common.py
@@ -0,0 +1,8 @@
+import os, sys
+dirname = os.path.dirname(sys.modules[__name__].__file__)
+client_dir = os.path.abspath(os.path.join(dirname, "../../"))
+sys.path.insert(0, client_dir)
+import setup_modules
+sys.path.pop(0)
+setup_modules.setup(base_path=client_dir,
+                    root_module_name="autotest_lib.client")
diff --git a/client/deps/libaio/libaio.py b/client/deps/libaio/libaio.py
index 5389f32..62a6ed8 100755
--- a/client/deps/libaio/libaio.py
+++ b/client/deps/libaio/libaio.py
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 import os
+import common
 from autotest_lib.client.bin import utils
 
 version = 1
@@ -10,8 +11,8 @@
     utils.extract_tarball_to_dir(tarball, srcdir)
     os.chdir(srcdir)
     utils.system('patch -p1 < ../00_arches.patch')
-    utils.make()
-    utils.make('prefix=%s install' % topdir)
+    utils.system('make')
+    utils.system('make prefix=%s install' % topdir)
     os.chdir(topdir)
 
 
diff --git a/client/deps/libcap/common.py b/client/deps/libcap/common.py
new file mode 100644
index 0000000..0f18586
--- /dev/null
+++ b/client/deps/libcap/common.py
@@ -0,0 +1,8 @@
+import os, sys
+dirname = os.path.dirname(sys.modules[__name__].__file__)
+client_dir = os.path.abspath(os.path.join(dirname, "../../"))
+sys.path.insert(0, client_dir)
+import setup_modules
+sys.path.pop(0)
+setup_modules.setup(base_path=client_dir,
+                    root_module_name="autotest_lib.client")
diff --git a/client/deps/libcap/libcap.py b/client/deps/libcap/libcap.py
index d31c8f9..d599efe 100755
--- a/client/deps/libcap/libcap.py
+++ b/client/deps/libcap/libcap.py
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 
-import os
+import os, common
 from autotest_lib.client.bin import utils
 
 version = 2
@@ -9,7 +9,7 @@
     topdir = os.getcwd()
     utils.extract_tarball_to_dir(tarball, srcdir)
     os.chdir(srcdir)
-    utils.make('-C libcap LIBATTR=no')
+    utils.system('make -C libcap LIBATTR=no')
     os.chdir(topdir)
 
 srcdir = os.path.abspath('./src')
diff --git a/client/deps/libnet/common.py b/client/deps/libnet/common.py
new file mode 100644
index 0000000..0f18586
--- /dev/null
+++ b/client/deps/libnet/common.py
@@ -0,0 +1,8 @@
+import os, sys
+dirname = os.path.dirname(sys.modules[__name__].__file__)
+client_dir = os.path.abspath(os.path.join(dirname, "../../"))
+sys.path.insert(0, client_dir)
+import setup_modules
+sys.path.pop(0)
+setup_modules.setup(base_path=client_dir,
+                    root_module_name="autotest_lib.client")
diff --git a/client/deps/libnet/libnet.py b/client/deps/libnet/libnet.py
index 0b0dd1a..32cb8ae 100755
--- a/client/deps/libnet/libnet.py
+++ b/client/deps/libnet/libnet.py
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 import os
+import common
 from autotest_lib.client.bin import utils
 
 version = 1
@@ -12,9 +13,9 @@
                        tarball)
     utils.extract_tarball_to_dir(tarball, 'src')
     os.chdir(srcdir)
-    utils.configure ('--prefix=%s/libnet' % topdir)
-    utils.make()
-    utils.make('install')
+    utils.system ('./configure --prefix=%s/libnet' % topdir)
+    utils.system('make')
+    utils.system('make install')
 
     os.chdir(topdir)
 
diff --git a/client/deps/mysql/common.py b/client/deps/mysql/common.py
new file mode 100644
index 0000000..0f18586
--- /dev/null
+++ b/client/deps/mysql/common.py
@@ -0,0 +1,8 @@
+import os, sys
+dirname = os.path.dirname(sys.modules[__name__].__file__)
+client_dir = os.path.abspath(os.path.join(dirname, "../../"))
+sys.path.insert(0, client_dir)
+import setup_modules
+sys.path.pop(0)
+setup_modules.setup(base_path=client_dir,
+                    root_module_name="autotest_lib.client")
diff --git a/client/deps/mysql/mysql.py b/client/deps/mysql/mysql.py
index 2328d30..d8f0037 100755
--- a/client/deps/mysql/mysql.py
+++ b/client/deps/mysql/mysql.py
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 import os
+import common
 from autotest_lib.client.bin import utils
 
 version = 3
@@ -11,10 +12,10 @@
         utils.get_file('http://mirror.x10.com/mirror/mysql/Downloads/MySQL-5.0/mysql-5.0.45.tar.gz', tarball)
     utils.extract_tarball_to_dir(tarball, 'src')
     os.chdir(srcdir)
-    utils.configure('--prefix=%s/mysql --enable-thread-safe-client' \
+    utils.system ('./configure --prefix=%s/mysql --enable-thread-safe-client' \
                     % topdir)
-    utils.make('-j %d' % utils.count_cpus())
-    utils.make('install')
+    utils.system('make -j %d' % utils.count_cpus())
+    utils.system('make install')
 
     #
     # MySQL doesn't create this directory on it's own.
diff --git a/client/deps/pgpool/common.py b/client/deps/pgpool/common.py
new file mode 100644
index 0000000..0f18586
--- /dev/null
+++ b/client/deps/pgpool/common.py
@@ -0,0 +1,8 @@
+import os, sys
+dirname = os.path.dirname(sys.modules[__name__].__file__)
+client_dir = os.path.abspath(os.path.join(dirname, "../../"))
+sys.path.insert(0, client_dir)
+import setup_modules
+sys.path.pop(0)
+setup_modules.setup(base_path=client_dir,
+                    root_module_name="autotest_lib.client")
diff --git a/client/deps/pgpool/pgpool.py b/client/deps/pgpool/pgpool.py
index 1c52bfb..c4caab5 100755
--- a/client/deps/pgpool/pgpool.py
+++ b/client/deps/pgpool/pgpool.py
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 import os
+import common
 from autotest_lib.client.bin import utils
 
 version = 1
@@ -15,10 +16,10 @@
     os.chdir(srcdir)
     # FIXEME - Waiting to be able to use self.autodir instead of
     # os.environ['AUTODIR']
-    utils.configure('--prefix=%s/pgpool --with-pgsql=%s/deps/pgsql/pgsql' \
+    utils.system('./configure --prefix=%s/pgpool --with-pgsql=%s/deps/pgsql/pgsql' \
                     % (topdir, os.environ['AUTODIR']))
-    utils.make('-j %d' % utils.count_cpus())
-    utils.make('install')
+    utils.system('make -j %d' % utils.count_cpus())
+    utils.system('make install')
 
     os.chdir(topdir)
 
diff --git a/client/deps/pgsql/common.py b/client/deps/pgsql/common.py
new file mode 100644
index 0000000..0f18586
--- /dev/null
+++ b/client/deps/pgsql/common.py
@@ -0,0 +1,8 @@
+import os, sys
+dirname = os.path.dirname(sys.modules[__name__].__file__)
+client_dir = os.path.abspath(os.path.join(dirname, "../../"))
+sys.path.insert(0, client_dir)
+import setup_modules
+sys.path.pop(0)
+setup_modules.setup(base_path=client_dir,
+                    root_module_name="autotest_lib.client")
diff --git a/client/deps/pgsql/pgsql.py b/client/deps/pgsql/pgsql.py
index e1aabf7..5df7a8d 100755
--- a/client/deps/pgsql/pgsql.py
+++ b/client/deps/pgsql/pgsql.py
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 import os
+import common
 from autotest_lib.client.bin import utils
 
 version = 4
@@ -11,9 +12,9 @@
         utils.get_file('ftp://ftp.postgresql.org/pub/source/v8.3.1/postgresql-8.3.1.tar.bz2', tarball)
     utils.extract_tarball_to_dir(tarball, 'src')
     os.chdir(srcdir)
-    utils.configure('--without-readline --without-zlib --enable-debug --prefix=%s/pgsql' % topdir)
-    utils.make('-j %d' % utils.count_cpus())
-    utils.make('install')
+    utils.system ('./configure --without-readline --without-zlib --enable-debug --prefix=%s/pgsql' % topdir)
+    utils.system('make -j %d' % utils.count_cpus())
+    utils.system('make install')
 
     os.chdir(topdir)
 
diff --git a/client/deps/systemtap/common.py b/client/deps/systemtap/common.py
new file mode 100644
index 0000000..0f18586
--- /dev/null
+++ b/client/deps/systemtap/common.py
@@ -0,0 +1,8 @@
+import os, sys
+dirname = os.path.dirname(sys.modules[__name__].__file__)
+client_dir = os.path.abspath(os.path.join(dirname, "../../"))
+sys.path.insert(0, client_dir)
+import setup_modules
+sys.path.pop(0)
+setup_modules.setup(base_path=client_dir,
+                    root_module_name="autotest_lib.client")
diff --git a/client/deps/systemtap/systemtap.py b/client/deps/systemtap/systemtap.py
index 4504dfa..f6c34d7 100755
--- a/client/deps/systemtap/systemtap.py
+++ b/client/deps/systemtap/systemtap.py
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 import os
+import common
 import shutil
 from autotest_lib.client.bin import utils
 
@@ -11,10 +12,10 @@
 
     os.chdir(srcdir)
 
-    utils.configure('--with-elfutils=elfutils ' \
-                    '--prefix=%s/systemtap' % topdir)
-    utils.make('-j %d' % utils.count_cpus())
-    utils.make('install')
+    utils.system('./configure --with-elfutils=elfutils ' \
+                 '--prefix=%s/systemtap' % topdir)
+    utils.system('make -j %d' % utils.count_cpus())
+    utils.system('make install')
 
     os.chdir(topdir)
 
diff --git a/client/profilers/blktrace/blktrace.py b/client/profilers/blktrace/blktrace.py
index 3fc42ed..aa8e661 100644
--- a/client/profilers/blktrace/blktrace.py
+++ b/client/profilers/blktrace/blktrace.py
@@ -30,7 +30,7 @@
         self.tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
         utils.extract_tarball_to_dir(self.tarball, self.srcdir)
         os.chdir(self.srcdir)
-        utils.make('"CFLAGS=' + self.gcc_flags + '"')
+        utils.system('make ' + '"CFLAGS=' + self.gcc_flags + '"')
 
 
     def get_device(self, test):
diff --git a/client/profilers/ftrace/__init__.py b/client/profilers/ftrace/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/client/profilers/ftrace/__init__.py
+++ /dev/null
diff --git a/client/profilers/ftrace/control b/client/profilers/ftrace/control
deleted file mode 100644
index 03da793..0000000
--- a/client/profilers/ftrace/control
+++ /dev/null
@@ -1,3 +0,0 @@
-job.profilers.add('ftrace', tracepoints=['syscalls'])
-job.run_test('sleeptest', seconds=1)
-job.profilers.delete('ftrace')
diff --git a/client/profilers/ftrace/ftrace.py b/client/profilers/ftrace/ftrace.py
deleted file mode 100644
index f385f36..0000000
--- a/client/profilers/ftrace/ftrace.py
+++ /dev/null
@@ -1,110 +0,0 @@
-"""
-Function tracer profiler for autotest.
-
-@author: David Sharp (dhsharp@google.com)
-"""
-import os, signal, subprocess
-from autotest_lib.client.bin import profiler, utils
-
-
-class ftrace(profiler.profiler):
-    """
-    ftrace profiler for autotest. It builds ftrace from souce and runs
-    trace-cmd with configurable parameters.
-
-    @see: git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
-    """
-    version = 1
-
-    mountpoint = '/sys/kernel/debug'
-    tracing_dir = os.path.join(mountpoint, 'tracing')
-
-    @staticmethod
-    def join_command(cmd):
-        """
-        Shell escape the command for BgJob. grmbl.
-
-        @param cmd: Command list.
-        """
-        result = []
-        for arg in cmd:
-            arg = '"%s"' % utils.sh_escape(arg)
-            result += [arg]
-        return ' '.join(result)
-
-
-    def setup(self, tarball='trace-cmd.tar.bz2', **kwargs):
-        """
-        Build and install trace-cmd from source.
-
-        The tarball was obtained by checking the git repo at 09-14-2010,
-        removing the Documentation and the .git folders, and compressing
-        it.
-
-        @param tarball: Path to trace-cmd tarball.
-        @param **kwargs: Dictionary with additional parameters.
-        """
-        self.tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
-        utils.extract_tarball_to_dir(self.tarball, self.srcdir)
-        os.chdir(self.srcdir)
-        utils.make("prefix='%s'" % self.builddir)
-        utils.make("prefix='%s' install" % self.builddir)
-
-
-    def initialize(self, tracepoints, buffer_size_kb=1408, **kwargs):
-        """
-        Initialize ftrace profiler.
-
-        @param tracepoints: List containing a mix of tracpoint names and
-                (tracepoint name, filter) tuples. Tracepoint names are as
-                accepted by trace-cmd -e, eg "syscalls", or
-                "syscalls:sys_enter_read". Filters are as accepted by
-                trace-cmd -f, eg "((sig >= 10 && sig < 15) || sig == 17)"
-        @param buffer_size_kb: Set the size of the ring buffer (per cpu).
-        """
-        self.job.require_gcc()
-        self.trace_cmd_args = ['-b', str(buffer_size_kb)]
-        for tracepoint in tracepoints:
-            if isinstance(tracepoint, tuple):
-                tracepoint, event_filter = tracepoint
-            else:
-                event_filter = None
-            self.trace_cmd_args += ['-e', tracepoint]
-            if event_filter:
-                self.trace_cmd_args += ['-f', event_filter]
-
-        self.builddir = os.path.join(self.bindir, 'build')
-        if not os.path.isdir(self.builddir):
-            os.makedirs(self.builddir)
-        self.trace_cmd = os.path.join(self.builddir, 'bin', 'trace-cmd')
-
-
-    def start(self, test):
-        """
-        Start ftrace profiler
-
-        @param test: Autotest test in which the profiler will operate on.
-        """
-        # Make sure debugfs is mounted.
-        utils.system('%s reset' % self.trace_cmd)
-
-        output_dir = os.path.join(test.profdir, 'ftrace')
-        if not os.path.isdir(output_dir):
-            os.makedirs(output_dir)
-        self.output = os.path.join(output_dir, 'trace.dat')
-        cmd = [self.trace_cmd, 'record', '-o', self.output]
-        cmd += self.trace_cmd_args
-        self.record_job = utils.BgJob(self.join_command(cmd))
-
-
-    def stop(self, test):
-        """
-        Stop ftrace profiler.
-
-        @param test: Autotest test in which the profiler will operate on.
-        """
-        os.kill(self.record_job.sp.pid, signal.SIGINT)
-        utils.join_bg_jobs([self.record_job])
-        # shrink the buffer to free memory.
-        utils.system('%s reset -b 1' % self.trace_cmd)
-        utils.system('bzip2 %s' % self.output)
diff --git a/client/profilers/ftrace/trace-cmd.tar.bz2 b/client/profilers/ftrace/trace-cmd.tar.bz2
deleted file mode 100644
index 37796c2..0000000
--- a/client/profilers/ftrace/trace-cmd.tar.bz2
+++ /dev/null
Binary files differ
diff --git a/client/profilers/lockmeter/lockmeter.py b/client/profilers/lockmeter/lockmeter.py
index 024e282..830946a 100644
--- a/client/profilers/lockmeter/lockmeter.py
+++ b/client/profilers/lockmeter/lockmeter.py
@@ -25,7 +25,7 @@
         utils.extract_tarball_to_dir(self.tarball, self.srcdir)
         os.chdir(self.srcdir)
 
-        utils.make()
+        utils.system('make')
         self.cmd = self.srcdir + '/lockstat'
 
 
diff --git a/client/profilers/lttng/lttng.py b/client/profilers/lttng/lttng.py
index 2519d16..8905b25 100644
--- a/client/profilers/lttng/lttng.py
+++ b/client/profilers/lttng/lttng.py
@@ -33,8 +33,8 @@
         utils.extract_tarball_to_dir(self.tarball, self.srcdir)
         os.chdir(self.srcdir)
 
-        utils.configure()
-        utils.make()
+        utils.system('./configure')
+        utils.system('make')
 
 
     # tracepoints: list of trace points to enable
diff --git a/client/profilers/oprofile/oprofile.py b/client/profilers/oprofile/oprofile.py
index 2d03e31..379e07e 100644
--- a/client/profilers/oprofile/oprofile.py
+++ b/client/profilers/oprofile/oprofile.py
@@ -40,10 +40,10 @@
 
             patch = os.path.join(self.bindir,"oprofile-69455.patch")
             utils.system('patch -p1 < %s' % patch)
-            utils.configure('--with-kernel-support --prefix=' + \
+            utils.system('./configure --with-kernel-support --prefix=' + \
                                                     self.srcdir)
-            utils.make('-j %d' % utils.count_cpus())
-            utils.make('install')
+            utils.system('make -j %d' % utils.count_cpus())
+            utils.system('make install')
         except:
             # Build from source failed.
             # But maybe can still use the local copy
diff --git a/client/profilers/perf/perf.py b/client/profilers/perf/perf.py
index 211d562..ff0a32e 100644
--- a/client/profilers/perf/perf.py
+++ b/client/profilers/perf/perf.py
@@ -5,8 +5,7 @@
 @see: http://lwn.net/Articles/310260/
 """
 
-import time, os, stat, subprocess, signal
-import logging
+import time, os, subprocess, signal
 from autotest_lib.client.bin import profiler, os_dep, utils
 
 
@@ -52,8 +51,3 @@
             p = subprocess.Popen(cmd, shell=True, stdout=outfile,
                                  stderr=subprocess.STDOUT)
             p.wait()
-        # The raw detailed perf output is HUGE.  We cannot store it by default.
-        perf_log_size = os.stat(self.logfile)[stat.ST_SIZE]
-        logging.info('Removing %s after generating reports (saving %s bytes).',
-                     self.logfile, perf_log_size)
-        os.unlink(self.logfile)
diff --git a/client/profilers/powertop/powertop.py b/client/profilers/powertop/powertop.py
index 843ae5ce..e26b4e2 100644
--- a/client/profilers/powertop/powertop.py
+++ b/client/profilers/powertop/powertop.py
@@ -13,7 +13,7 @@
     # filenames: list of filenames to cat
     def setup(self, *args, **dargs):
         os.chdir(self.srcdir)
-        utils.make()
+        utils.system('make')
 
 
     def start(self, test):
diff --git a/client/profilers/readprofile/readprofile.py b/client/profilers/readprofile/readprofile.py
index 7763033..247317f 100644
--- a/client/profilers/readprofile/readprofile.py
+++ b/client/profilers/readprofile/readprofile.py
@@ -21,9 +21,9 @@
         utils.extract_tarball_to_dir(self.tarball, self.srcdir)
         os.chdir(self.srcdir)
 
-        utils.configure()
+        utils.system('./configure')
         os.chdir('sys-utils')
-        utils.make('readprofile')
+        utils.system('make readprofile')
 
 
     def initialize(self):
diff --git a/client/samples/filesystem b/client/samples/filesystem
index 2fd1b9d..87abe0f 100644
--- a/client/samples/filesystem
+++ b/client/samples/filesystem
@@ -1,9 +1,9 @@
 # Uncomment this line, and replace the device with something sensible
 # for you ...
-# fs = job.partition('/dev/hda2', job.tmpdir)
+# fs = job.filesystem('/dev/hda2', job.tmpdir)
 # or ...
 
-part = job.partition('/tmp/looped', 1024, job.tmpdir)
+fs = job.filesystem('/tmp/looped', job.tmpdir, loop_size = 1024)
 
 # dbench 1024, ltp, 1024-byte blocksize, a few other things.  Lots of fscking.
 # I haven't tested nobh mode yet, 
@@ -11,15 +11,15 @@
 # (different mount options for ext3)
 
 def test_fs():
-	part.mkfs(fstype)
-	part.mount()
+	fs.mkfs(fstype)
+	fs.mount()
 	try:
-		job.run_test('fsx', dir=part.mountpoint, tag=fstype)
-		job.run_test('iozone', dir=part.mountpoint, tag=fstype)
-		job.run_test('dbench', dir=part.mountpoint, tag=fstype)
+		job.run_test('fsx', dir=job.tmpdir, tag=fstype)
+		job.run_test('iozone', dir=job.tmpdir, tag=fstype)
+		job.run_test('dbench', dir=job.tmpdir, tag=fstype)
 	finally:
-		part.unmount()
-		part.fsck()
+		fs.unmount()
+		fs.fsck()
 
 for fstype in ('ext2', 'ext3', 'jfs', 'xfs', 'reiserfs'):
 	job.run_group(test_fs)
diff --git a/client/tests/aio_dio_bugs/aio_dio_bugs.py b/client/tests/aio_dio_bugs/aio_dio_bugs.py
index 4324111..41ea0b9 100644
--- a/client/tests/aio_dio_bugs/aio_dio_bugs.py
+++ b/client/tests/aio_dio_bugs/aio_dio_bugs.py
@@ -26,7 +26,7 @@
 
     def setup(self):
         os.chdir(self.srcdir)
-        utils.make('"CFLAGS=' + self.gcc_flags + '"')
+        utils.system('make ' + '"CFLAGS=' + self.gcc_flags + '"')
 
 
     def execute(self, args = ''):
diff --git a/client/tests/bash_shared_mapping/bash_shared_mapping.py b/client/tests/bash_shared_mapping/bash_shared_mapping.py
index e8f604f..40c0df2 100644
--- a/client/tests/bash_shared_mapping/bash_shared_mapping.py
+++ b/client/tests/bash_shared_mapping/bash_shared_mapping.py
@@ -10,7 +10,7 @@
         utils.extract_tarball_to_dir(self.tarball, self.srcdir)
 
         os.chdir(self.srcdir)
-        utils.make('bash-shared-mapping usemem')
+        utils.system('make bash-shared-mapping usemem')
 
 
     def initialize(self):
diff --git a/client/tests/bonnie/bonnie.py b/client/tests/bonnie/bonnie.py
index e7f4917..af58b4c 100644
--- a/client/tests/bonnie/bonnie.py
+++ b/client/tests/bonnie/bonnie.py
@@ -38,8 +38,8 @@
 
         os_dep.command('g++')
         utils.system('patch -p1 < ../bonnie++-1.03a-gcc43.patch')
-        utils.configure()
-        utils.make()
+        utils.system('./configure')
+        utils.system('make')
 
 
     def run_once(self, dir=None, extra_args='', user='root'):
diff --git a/client/tests/cerberus/cerberus.py b/client/tests/cerberus/cerberus.py
index 64ad916..c8a0b19 100644
--- a/client/tests/cerberus/cerberus.py
+++ b/client/tests/cerberus/cerberus.py
@@ -53,7 +53,7 @@
             p2 = 'patch -p1 < ../0002-Fix-CTCS2-build-in-64-bit-boxes.patch'
             utils.system(p2)
 
-        utils.make()
+        utils.system('make')
 
         # Here we define the cerberus suite control file that will be used.
         # It will be kept on the debug directory for further analysis.
diff --git a/client/tests/cyclictest/cyclictest.py b/client/tests/cyclictest/cyclictest.py
index 8e1b40d..a4399d5 100644
--- a/client/tests/cyclictest/cyclictest.py
+++ b/client/tests/cyclictest/cyclictest.py
@@ -14,7 +14,7 @@
 
     def setup(self):
         os.chdir(self.srcdir)
-        utils.make()
+        utils.system('make')
 
 
     def execute(self, args = '-t 10 -l 100000'):
diff --git a/client/tests/dbt2/dbt2.py b/client/tests/dbt2/dbt2.py
index 5a74262..9f341ef 100644
--- a/client/tests/dbt2/dbt2.py
+++ b/client/tests/dbt2/dbt2.py
@@ -23,16 +23,18 @@
         #
         utils.system('cp -pR ' + self.srcdir + ' ' + self.srcdir + '.mysql')
         os.chdir(self.srcdir + '.mysql')
-        utils.configure('--with-mysql=%s/deps/mysql/mysql' % self.autodir)
-        utils.make()
+        utils.system('./configure --with-mysql=%s/deps/mysql/mysql' \
+                        % self.autodir)
+        utils.system('make')
 
         #
         # Extract one copy of the kit for PostgreSQL.
         #
         utils.system('cp -pR ' + self.srcdir + ' ' + self.srcdir + '.pgsql')
         os.chdir(self.srcdir + '.pgsql')
-        utils.configure('--with-postgresql=%s/deps/pgsql/pgsql' % self.autodir)
-        utils.make()
+        utils.system('./configure --with-postgresql=%s/deps/pgsql/pgsql' \
+                        % self.autodir)
+        utils.system('make')
 
         # Create symlinks to autotest's results directory from dbt-2's
         # preferred results directory to self.resultsdir
diff --git a/client/tests/ebizzy/ebizzy.py b/client/tests/ebizzy/ebizzy.py
index 50d6473..a594e39 100644
--- a/client/tests/ebizzy/ebizzy.py
+++ b/client/tests/ebizzy/ebizzy.py
@@ -16,7 +16,7 @@
         os.chdir(self.srcdir)
 
         utils.system('[ -x configure ] && ./configure')
-        utils.make()
+        utils.system('make')
 
 
     # Note: default we use always mmap()
diff --git a/client/tests/flail/control b/client/tests/flail/control
deleted file mode 100644
index 82a27bd..0000000
--- a/client/tests/flail/control
+++ /dev/null
@@ -1,17 +0,0 @@
-AUTHOR = "Pradeep Kumar Surisetty <psuriset@linux.vnet.ibm.com>"
-NAME = "flail"
-TEST_CATEGORY = "Stress"
-TEST_CLASS = "General"
-TEST_TYPE = "client"
-TIME = 'MEDIUM'
-EXPERIMENTAL = "True"
-
-DOC='''
-flail is a  systemcall fuzzer tool. This test simply runs flail.
-Fuzzing is slang for fault injection . It runs all system calls
-for that kernel version with random args.
-The goal is to find bugs in software without reading code or
-designing detailed test cases.
-'''
-
-job.run_test('flail')
diff --git a/client/tests/flail/flail-0.2.0.tar.gz b/client/tests/flail/flail-0.2.0.tar.gz
deleted file mode 100644
index a95c5a4..0000000
--- a/client/tests/flail/flail-0.2.0.tar.gz
+++ /dev/null
Binary files differ
diff --git a/client/tests/flail/flail.py b/client/tests/flail/flail.py
deleted file mode 100644
index 5b32fe6..0000000
--- a/client/tests/flail/flail.py
+++ /dev/null
@@ -1,42 +0,0 @@
-import os
-from autotest_lib.client.bin import test, utils
-
-
-class flail(test.test):
-    """
-    This autotest module runs the flail system call fuzzer.
-
-    Fuzzing is slang for fault injection . It runs all system calls for that
-    kernel version with random args. The goal is to find bugs in software
-    without reading code or designing detailed test cases.
-
-    @author: Pradeep K Surisetty (psuriset@linux.vnet.ibm.com)
-    @see: http://www.risesecurity.org/ (Website of Ramon Valle, flail's creator)
-    """
-    version = 1
-
-    def initialize(self):
-        self.job.require_gcc()
-
-
-    def setup(self, tarball = 'flail-0.2.0.tar.gz'):
-        """
-        Compiles flail with the appropriate parameters.
-
-        @param tarball: Path or URL for the flail tarball.
-        """
-        tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
-        utils.extract_tarball_to_dir(tarball, self.srcdir)
-        os.chdir(self.srcdir)
-        utils.make()
-
-
-    def run_once(self, fstype = 'iso9660'):
-        """
-        Runs flail with the appropriate parameters.
-
-        @param fstype: Filesystem type you wish to run flail on.
-        """
-        args = fstype + ' 1'
-        flail_cmd = os.path.join(self.srcdir, 'flail %s' % args)
-        utils.system(flail_cmd)
diff --git a/client/tests/fs_mark/fs_mark.py b/client/tests/fs_mark/fs_mark.py
index 6bebd13..937694e 100644
--- a/client/tests/fs_mark/fs_mark.py
+++ b/client/tests/fs_mark/fs_mark.py
@@ -15,7 +15,7 @@
         utils.extract_tarball_to_dir(tarball, self.srcdir)
         os.chdir(self.srcdir)
 
-        utils.make()
+        utils.system('make')
 
 
     def run_once(self, dir, args = None):
diff --git a/client/tests/fsfuzzer/fsfuzzer.py b/client/tests/fsfuzzer/fsfuzzer.py
index ca67f84..1c6e5e8 100644
--- a/client/tests/fsfuzzer/fsfuzzer.py
+++ b/client/tests/fsfuzzer/fsfuzzer.py
@@ -15,7 +15,7 @@
         utils.extract_tarball_to_dir(tarball, self.srcdir)
         os.chdir(self.srcdir)
 
-        utils.make()
+        utils.system('make')
 
 
     def run_once(self, fstype = 'iso9660'):
diff --git a/client/tests/fsstress/fsstress.py b/client/tests/fsstress/fsstress.py
index f6dedef..9f81af6 100644
--- a/client/tests/fsstress/fsstress.py
+++ b/client/tests/fsstress/fsstress.py
@@ -16,7 +16,7 @@
 
         os.chdir(self.srcdir)
         utils.system('patch -p1 < ../fsstress-ltp.patch')
-        utils.make('fsstress')
+        utils.system('make fsstress')
 
 
     def run_once(self, testdir = None, extra_args = '', nproc = '1000', nops = '1000'):
diff --git a/client/tests/interbench/interbench.py b/client/tests/interbench/interbench.py
index a32d5f2..e988882 100644
--- a/client/tests/interbench/interbench.py
+++ b/client/tests/interbench/interbench.py
@@ -14,7 +14,7 @@
         tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
         utils.extract_tarball_to_dir(tarball, self.srcdir)
         os.chdir(self.srcdir)
-        utils.make()
+        utils.system('make')
 
 
     def run_once(self, args = ''):
diff --git a/client/tests/iosched_bugs/iosched_bugs.py b/client/tests/iosched_bugs/iosched_bugs.py
index f919fcc..2b2b304 100644
--- a/client/tests/iosched_bugs/iosched_bugs.py
+++ b/client/tests/iosched_bugs/iosched_bugs.py
@@ -14,7 +14,7 @@
 
     def setup(self):
         os.chdir(self.srcdir)
-        utils.make()
+        utils.system('make')
 
 
     def execute(self):
diff --git a/client/tests/iozone/iozone.py b/client/tests/iozone/iozone.py
index 4fbec26..79178e1 100755
--- a/client/tests/iozone/iozone.py
+++ b/client/tests/iozone/iozone.py
@@ -37,13 +37,13 @@
 
         arch = utils.get_current_kernel_arch()
         if (arch == 'ppc'):
-            utils.make('linux-powerpc')
+            utils.system('make linux-powerpc')
         elif (arch == 'ppc64'):
-            utils.make('linux-powerpc64')
+            utils.system('make linux-powerpc64')
         elif (arch == 'x86_64'):
-            utils.make('linux-AMD64')
+            utils.system('make linux-AMD64')
         else:
-            utils.make('linux')
+            utils.system('make linux')
 
 
     def run_once(self, dir=None, args=None):
diff --git a/client/tests/iperf/iperf.py b/client/tests/iperf/iperf.py
index a240122..c487e8c 100644
--- a/client/tests/iperf/iperf.py
+++ b/client/tests/iperf/iperf.py
@@ -19,7 +19,7 @@
 
         os.chdir(self.srcdir)
         utils.configure()
-        utils.make()
+        utils.system('make')
         utils.system('sync')
 
 
diff --git a/client/tests/kvm/deps/whql_delete_machine_15.cs b/client/tests/kvm/deps/whql_delete_machine_15.cs
deleted file mode 100644
index c7015cc..0000000
--- a/client/tests/kvm/deps/whql_delete_machine_15.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-// DTM machine deletion tool
-// Author: Michael Goldish <mgoldish@redhat.com>
-// Based on sample code by Microsoft.
-
-using System;
-using System.Collections.Generic;
-using System.Text.RegularExpressions;
-using Microsoft.DistributedAutomation.DeviceSelection;
-using Microsoft.DistributedAutomation.SqlDataStore;
-
-namespace automate0
-{
-    class AutoJob
-    {
-        static int Main(string[] args)
-        {
-            if (args.Length != 2)
-            {
-                Console.WriteLine("Error: incorrect number of command line arguments");
-                Console.WriteLine("Usage: {0} serverName clientName",
-                    System.Environment.GetCommandLineArgs()[0]);
-                return 1;
-            }
-            string serverName = args[0];
-            string clientName = args[1];
-
-            try
-            {
-                // Initialize DeviceScript and connect to data store
-                Console.WriteLine("Initializing DeviceScript object");
-                DeviceScript script = new DeviceScript();
-                Console.WriteLine("Connecting to data store");
-                script.ConnectToNamedDataStore(serverName);
-
-                // Find the client machine
-                IResourcePool rootPool = script.GetResourcePoolByName("$");
-                Console.WriteLine("Looking for client machine '{0}'", clientName);
-                IResource machine = rootPool.GetResourceByName(clientName);
-                if (machine == null)
-                {
-                    Console.WriteLine("Client machine not found");
-                    return 0;
-                }
-                Console.WriteLine("Client machine '{0}' found ({1}, {2})",
-                    clientName, machine.OperatingSystem, machine.ProcessorArchitecture);
-
-                // Change the client machine's status to 'unsafe'
-                Console.WriteLine("Changing the client machine's status to 'Unsafe'");
-                try
-                {
-                    machine.ChangeResourceStatus("Unsafe");
-                }
-                catch (Exception e)
-                {
-                    Console.WriteLine("Warning: " + e.Message);
-                }
-                while (machine.Status != "Unsafe")
-                {
-                    try
-                    {
-                        machine = rootPool.GetResourceByName(clientName);
-                    }
-                    catch (Exception e)
-                    {
-                        Console.WriteLine("Warning: " + e.Message);
-                    }
-                    System.Threading.Thread.Sleep(1000);
-                }
-
-                // Delete the client machine from datastore
-                Console.WriteLine("Deleting client machine from data store");
-                script.DeleteResource(machine.Id);
-                return 0;
-            }
-            catch (Exception e)
-            {
-                Console.WriteLine("Error: " + e.Message);
-                return 1;
-            }
-        }
-    }
-}
diff --git a/client/tests/kvm/deps/whql_delete_machine_15.exe b/client/tests/kvm/deps/whql_delete_machine_15.exe
deleted file mode 100755
index 7f57134..0000000
--- a/client/tests/kvm/deps/whql_delete_machine_15.exe
+++ /dev/null
Binary files differ
diff --git a/client/tests/kvm/deps/whql_submission_15.cs b/client/tests/kvm/deps/whql_submission_15.cs
deleted file mode 100644
index 8fa6856..0000000
--- a/client/tests/kvm/deps/whql_submission_15.cs
+++ /dev/null
@@ -1,289 +0,0 @@
-// DTM submission automation program
-// Author: Michael Goldish <mgoldish@redhat.com>
-// Based on sample code by Microsoft.
-
-// Note: this program has only been tested with DTM version 1.5.
-// It might fail to work with other versions, specifically because it uses
-// a few undocumented methods/attributes.
-
-using System;
-using System.Collections.Generic;
-using System.Text.RegularExpressions;
-using Microsoft.DistributedAutomation.DeviceSelection;
-using Microsoft.DistributedAutomation.SqlDataStore;
-
-namespace automate0
-{
-    class AutoJob
-    {
-        static int Main(string[] args)
-        {
-            if (args.Length != 5)
-            {
-                Console.WriteLine("Error: incorrect number of command line arguments");
-                Console.WriteLine("Usage: {0} serverName clientName machinePoolName submissionName timeout",
-                    System.Environment.GetCommandLineArgs()[0]);
-                return 1;
-            }
-            string serverName = args[0];
-            string clientName = args[1];
-            string machinePoolName = args[2];
-            string submissionName = args[3];
-            double timeout = Convert.ToDouble(args[4]);
-
-            try
-            {
-                // Initialize DeviceScript and connect to data store
-                Console.WriteLine("Initializing DeviceScript object");
-                DeviceScript script = new DeviceScript();
-                Console.WriteLine("Connecting to data store");
-
-                script.ConnectToNamedDataStore(serverName);
-
-                // Find client machine
-                IResourcePool rootPool = script.GetResourcePoolByName("$");
-                Console.WriteLine("Looking for client machine '{0}'", clientName);
-                IResource machine = null;
-                while (true)
-                {
-                    try
-                    {
-                        machine = rootPool.GetResourceByName(clientName);
-                    }
-                    catch (Exception e)
-                    {
-                        Console.WriteLine("Warning: " + e.Message);
-                    }
-                    // Make sure the machine is valid
-                    if (machine != null &&
-                        machine.OperatingSystem != null &&
-                        machine.OperatingSystem.Length > 0 &&
-                        machine.ProcessorArchitecture != null &&
-                        machine.ProcessorArchitecture.Length > 0 &&
-                        machine.GetDevices().Length > 0)
-                        break;
-                    System.Threading.Thread.Sleep(1000);
-                }
-                Console.WriteLine("Client machine '{0}' found ({1}, {2})",
-                    clientName, machine.OperatingSystem, machine.ProcessorArchitecture);
-
-                // Create machine pool and add client machine to it
-                // (this must be done because jobs cannot be scheduled for machines in the
-                // default pool)
-                try
-                {
-                    script.CreateResourcePool(machinePoolName, rootPool.ResourcePoolId);
-                }
-                catch (Exception e)
-                {
-                    Console.WriteLine("Warning: " + e.Message);
-                }
-                IResourcePool newPool = script.GetResourcePoolByName(machinePoolName);
-                Console.WriteLine("Moving the client machine to pool '{0}'", machinePoolName);
-                machine.ChangeResourcePool(newPool);
-
-                // Reset client machine
-                if (machine.Status != "Ready")
-                {
-                    Console.WriteLine("Changing the client machine's status to 'Reset'");
-                    while (true)
-                    {
-                        try
-                        {
-                            machine = rootPool.GetResourceByName(clientName);
-                            machine.ChangeResourceStatus("Unsafe");
-                            System.Threading.Thread.Sleep(5000);
-                            machine.ChangeResourceStatus("Reset");
-                            break;
-                        }
-                        catch (Exception e)
-                        {
-                            Console.WriteLine("Warning: " + e.Message);
-                        }
-                        System.Threading.Thread.Sleep(5000);
-                    }
-                    Console.WriteLine("Waiting for client machine to be ready");
-                    while (machine.Status != "Ready")
-                    {
-                        try
-                        {
-                            machine = rootPool.GetResourceByName(clientName);
-                        }
-                        catch (Exception e)
-                        {
-                            Console.WriteLine("Warning: " + e.Message);
-                        }
-                        System.Threading.Thread.Sleep(1000);
-                    }
-                }
-                Console.WriteLine("Client machine is ready");
-
-                // Get requested device regex and look for a matching device
-                Console.WriteLine("Device to test: ");
-                Regex deviceRegex = new Regex(Console.ReadLine(), RegexOptions.IgnoreCase);
-                Console.WriteLine("Looking for device '{0}'", deviceRegex);
-                IDevice device;
-                DateTime endTime = DateTime.Now.AddSeconds(120);
-                while (DateTime.Now < endTime)
-                {
-                    machine = rootPool.GetResourceByName(clientName);
-                    Console.WriteLine("(Client machine has {0} devices)", machine.GetDevices().Length);
-                    foreach (IDevice d in machine.GetDevices())
-                    {
-                        if (deviceRegex.IsMatch(d.FriendlyName))
-                        {
-                            device = d;
-                            goto deviceFound;
-                        }
-                    }
-                    System.Threading.Thread.Sleep(5000);
-                }
-                Console.WriteLine("Error: device '{0}' not found", deviceRegex);
-                return 1;
-
-            deviceFound:
-                Console.WriteLine("Found device '{0}'", device.FriendlyName);
-
-                // Get requested jobs regex
-                Console.WriteLine("Jobs to run: ");
-                Regex jobRegex = new Regex(Console.ReadLine(), RegexOptions.IgnoreCase);
-
-                // Create submission
-                Object[] existingSubmissions = script.GetSubmissionByName(submissionName);
-                if (existingSubmissions.Length > 0)
-                {
-                    Console.WriteLine("Submission '{0}' already exists -- removing it",
-                        submissionName);
-                    script.DeleteSubmission(((ISubmission)existingSubmissions[0]).Id);
-                }
-                Console.WriteLine("Creating submission '{0}'", submissionName);
-                ISubmission submission = script.CreateHardwareSubmission(submissionName,
-                    newPool.ResourcePoolId, device.InstanceId);
-
-                // Get DeviceData objects from the user
-                List<Object> deviceDataList = new List<Object>();
-                while (true)
-                {
-                    ISubmissionDeviceData dd = script.CreateNewSubmissionDeviceData();
-                    Console.WriteLine("DeviceData name: ");
-                    dd.Name = Console.ReadLine();
-                    if (dd.Name.Length == 0)
-                        break;
-                    Console.WriteLine("DeviceData data: ");
-                    dd.Data = Console.ReadLine();
-                    deviceDataList.Add(dd);
-                }
-
-                // Set the submission's DeviceData
-                submission.SetDeviceData(deviceDataList.ToArray());
-
-                // Get descriptors from the user
-                List<Object> descriptorList = new List<Object>();
-                while (true)
-                {
-                    Console.WriteLine("Descriptor path: ");
-                    string descriptorPath = Console.ReadLine();
-                    if (descriptorPath.Length == 0)
-                        break;
-                    descriptorList.Add(script.GetDescriptorByPath(descriptorPath));
-                }
-
-                // Set the submission's descriptors
-                submission.SetLogoDescriptors(descriptorList.ToArray());
-
-                // Create a schedule
-                ISchedule schedule = script.CreateNewSchedule();
-                Console.WriteLine("Scheduling jobs:");
-                int jobCount = 0;
-                foreach (IJob j in submission.GetJobs())
-                {
-                    if (jobRegex.IsMatch(j.Name))
-                     {
-                        Console.WriteLine("  " + j.Name);
-                        schedule.AddDeviceJob(device, j);
-                        jobCount++;
-                    }
-                }
-                if (jobCount == 0)
-                {
-                    Console.WriteLine("Error: no submission jobs match pattern '{0}'", jobRegex);
-                    return 1;
-                }
-                schedule.AddSubmission(submission);
-                schedule.SetResourcePool(newPool);
-                script.RunSchedule(schedule);
-
-                // Wait for jobs to complete
-                Console.WriteLine("Waiting for all jobs to complete (timeout={0})", timeout);
-                endTime = DateTime.Now.AddSeconds(timeout);
-                int numCompleted = 0, numFailed = 0;
-                while (numCompleted < submission.GetResults().Length && DateTime.Now < endTime)
-                {
-                    // Sleep for 30 seconds
-                    System.Threading.Thread.Sleep(30000);
-                    // Count completed submission jobs
-                    numCompleted = 0;
-                    foreach (IResult r in submission.GetResults())
-                        if (r.ResultStatus != "InProgress")
-                            numCompleted++;
-                    // Report results in a Python readable format and count failed schedule jobs
-                    // (submission jobs are a subset of schedule jobs)
-                    Console.WriteLine();
-                    Console.WriteLine("---- [");
-                    numFailed = 0;
-                    foreach (IResult r in schedule.GetResults())
-                    {
-                        Console.WriteLine("  {");
-                        Console.WriteLine("    'id': {0}, 'job': r'''{1}''',", r.Job.Id, r.Job.Name);
-                        Console.WriteLine("    'logs': r'''{0}''',", r.LogLocation);
-                        if (r.ResultStatus != "InProgress")
-                            Console.WriteLine("    'report': r'''{0}''',",
-                                submission.GetSubmissionResultReport(r));
-                        Console.WriteLine("    'status': '{0}',", r.ResultStatus);
-                        Console.WriteLine("    'pass': {0}, 'fail': {1}, 'notrun': {2}, 'notapplicable': {3}",
-                            r.Pass, r.Fail, r.NotRun, r.NotApplicable);
-                        Console.WriteLine("  },");
-                        numFailed += r.Fail;
-                    }
-                    Console.WriteLine("] ----");
-                }
-                Console.WriteLine();
-
-                // Cancel incomplete jobs
-                foreach (IResult r in schedule.GetResults())
-                    if (r.ResultStatus == "InProgress")
-                        r.Cancel();
-
-                // Set the machine's status to Unsafe and then Reset
-                try
-                {
-                    machine = rootPool.GetResourceByName(clientName);
-                    machine.ChangeResourceStatus("Unsafe");
-                    System.Threading.Thread.Sleep(5000);
-                    machine.ChangeResourceStatus("Reset");
-                }
-                catch (Exception e)
-                {
-                    Console.WriteLine("Warning: " + e.Message);
-                }
-
-                // Report failures
-                if (numCompleted < submission.GetResults().Length)
-                    Console.WriteLine("Some jobs did not complete on time.");
-                if (numFailed > 0)
-                    Console.WriteLine("Some jobs failed.");
-
-                if (numFailed > 0 || numCompleted < submission.GetResults().Length)
-                    return 1;
-
-                Console.WriteLine("All jobs completed.");
-                return 0;
-            }
-            catch (Exception e)
-            {
-                Console.WriteLine("Error: " + e.Message);
-                return 1;
-            }
-        }
-    }
-}
diff --git a/client/tests/kvm/deps/whql_submission_15.exe b/client/tests/kvm/deps/whql_submission_15.exe
deleted file mode 100755
index 4f30aa8..0000000
--- a/client/tests/kvm/deps/whql_submission_15.exe
+++ /dev/null
Binary files differ
diff --git a/client/tests/kvm/kvm_test_utils.py b/client/tests/kvm/kvm_test_utils.py
index 5412aac..53c11ae 100644
--- a/client/tests/kvm/kvm_test_utils.py
+++ b/client/tests/kvm/kvm_test_utils.py
@@ -259,47 +259,23 @@
             result of the regex filter.
     @return: A tuple containing the host time and guest time.
     """
-    if len(re.findall("ntpdate|w32tm", time_command)) == 0:
-        host_time = time.time()
-        session.sendline(time_command)
-        (match, s) = session.read_up_to_prompt()
-        if not match:
-            raise error.TestError("Could not get guest time")
+    host_time = time.time()
+    session.sendline(time_command)
+    (match, s) = session.read_up_to_prompt()
+    if not match:
+        raise error.TestError("Could not get guest time")
 
-        try:
-            s = re.findall(time_filter_re, s)[0]
-        except IndexError:
-            logging.debug("The time string from guest is:\n%s" % s)
-            raise error.TestError("The time string from guest is unexpected.")
-        except Exception, e:
-            logging.debug("(time_filter_re, time_string): (%s, %s)" %
-                           (time_filter_re, s))
-            raise e
+    try:
+        s = re.findall(time_filter_re, s)[0]
+    except IndexError:
+        logging.debug("The time string from guest is:\n%s" % s)
+        raise error.TestError("The time string from guest is unexpected.")
+    except Exception, e:
+        logging.debug("(time_filter_re, time_string): (%s, %s)" %
+                       (time_filter_re, s))
+        raise e
 
-        guest_time = time.mktime(time.strptime(s, time_format))
-    else:
-        s , o = session.get_command_status_output(time_command)
-        if s != 0:
-            raise error.TestError("Could not get guest time")
-        if re.match('ntpdate', time_command):
-            offset = re.findall('offset (.*) sec',o)[0]
-            host_main, host_mantissa = re.findall(time_filter_re, o)[0]
-            host_time = time.mktime(time.strptime(host_main, time_format)) \
-                        + float("0.%s" % host_mantissa)
-            guest_time = host_time + float(offset)
-        else:
-            guest_time =  re.findall(time_filter_re, o)[0]
-            offset = re.findall("o:(.*)s", o)[0]
-            if re.match('PM', guest_time):
-                hour = re.findall('\d+ (\d+):', guest_time)[0]
-                hour = str(int(hour) + 12)
-                guest_time = re.sub('\d+\s\d+:', "\d+\s%s:" % hour,
-                                    guest_time)[:-3]
-            else:
-                guest_time = guest_time[:-3]
-            guest_time = time.mktime(time.strptime(guest_time, time_format))
-            host_time = guest_time - float(offset)
-
+    guest_time = time.mktime(time.strptime(s, time_format))
     return (host_time, guest_time)
 
 
diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
index 135d08e..bdc9aab 100755
--- a/client/tests/kvm/kvm_vm.py
+++ b/client/tests/kvm/kvm_vm.py
@@ -235,10 +235,9 @@
             return cmd
 
         def add_nic(help, vlan, model=None, mac=None, netdev_id=None):
+            cmd = " -net nic,vlan=%d" % vlan
             if has_option(help, "netdev"):
-                cmd = " -net nic,netdev=%s" % netdev_id
-            else:
-                cmd = " -net nic,vlan=%d" % vlan
+                cmd +=",netdev=%s" % netdev_id
             if model: cmd += ",model=%s" % model
             if mac: cmd += ",macaddr='%s'" % mac
             return cmd
diff --git a/client/tests/kvm/scripts/unattended.py b/client/tests/kvm/scripts/unattended.py
index ba7d80b..a630fbc 100755
--- a/client/tests/kvm/scripts/unattended.py
+++ b/client/tests/kvm/scripts/unattended.py
@@ -3,14 +3,10 @@
 Simple script to setup unattended installs on KVM guests.
 """
 # -*- coding: utf-8 -*-
-import os, sys, shutil, tempfile, re, ConfigParser, glob, inspect
+import os, sys, shutil, tempfile, re
 import common
 
 
-SCRIPT_DIR = os.path.dirname(sys.modules[__name__].__file__)
-KVM_TEST_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, ".."))
-
-
 class SetupError(Exception):
     """
     Simple wrapper for the builtin Exception class.
@@ -18,227 +14,6 @@
     pass
 
 
-def find_command(cmd):
-    """
-    Searches for a command on common paths, error if it can't find it.
-
-    @param cmd: Command to be found.
-    """
-    for dir in ["/usr/local/sbin", "/usr/local/bin",
-                "/usr/sbin", "/usr/bin", "/sbin", "/bin"]:
-        file = os.path.join(dir, cmd)
-        if os.path.exists(file):
-            return file
-    raise ValueError('Missing command: %s' % cmd)
-
-
-def run(cmd, info=None):
-    """
-    Run a command and throw an exception if it fails.
-    Optionally, you can provide additional contextual info.
-
-    @param cmd: Command string.
-    @param reason: Optional string that explains the context of the failure.
-
-    @raise: SetupError if command fails.
-    """
-    print "Running '%s'" % cmd
-    cmd_name = cmd.split(' ')[0]
-    find_command(cmd_name)
-    if os.system(cmd):
-        e_msg = 'Command failed: %s' % cmd
-        if info is not None:
-            e_msg += '. %s' % info
-        raise SetupError(e_msg)
-
-
-def cleanup(dir):
-    """
-    If dir is a mountpoint, do what is possible to unmount it. Afterwards,
-    try to remove it.
-
-    @param dir: Directory to be cleaned up.
-    """
-    print "Cleaning up directory %s" % dir
-    if os.path.ismount(dir):
-        os.system('fuser -k %s' % dir)
-        run('umount %s' % dir, info='Could not unmount %s' % dir)
-    if os.path.isdir(dir):
-        shutil.rmtree(dir)
-
-
-def clean_old_image(image):
-    """
-    Clean a leftover image file from previous processes. If it contains a
-    mounted file system, do the proper cleanup procedures.
-
-    @param image: Path to image to be cleaned up.
-    """
-    if os.path.exists(image):
-        mtab = open('/etc/mtab', 'r')
-        mtab_contents = mtab.read()
-        mtab.close()
-        if image in mtab_contents:
-            os.system('fuser -k %s' % image)
-            os.system('umount %s' % image)
-        os.remove(image)
-
-
-class Disk(object):
-    """
-    Abstract class for Disk objects, with the common methods implemented.
-    """
-    def __init__(self):
-        self.path = None
-
-
-    def setup_answer_file(self, filename, contents):
-        answer_file = open(os.path.join(self.mount, filename), 'w')
-        answer_file.write(contents)
-        answer_file.close()
-
-
-    def copy_to(self, src):
-        dst = os.path.join(self.mount, os.path.basename(src))
-        if os.path.isdir(src):
-            shutil.copytree(src, dst)
-        elif os.path.isfile(src):
-            shutil.copyfile(src, dst)
-
-
-    def close(self):
-        os.chmod(self.path, 0755)
-        cleanup(self.mount)
-        print "Disk %s successfuly set" % self.path
-
-
-class FloppyDisk(Disk):
-    """
-    Represents a 1.44 MB floppy disk. We can copy files to it, and setup it in
-    convenient ways.
-    """
-    def __init__(self, path):
-        print "Creating floppy unattended image %s" % path
-        try:
-            qemu_img_binary = os.environ['KVM_TEST_qemu_img_binary']
-        except KeyError:
-            qemu_img_binary = os.path.join(KVM_TEST_DIR, qemu_img_binary)
-        if not os.path.exists(qemu_img_binary):
-            raise SetupError('The qemu-img binary that is supposed to be used '
-                             '(%s) does not exist. Please verify your '
-                             'configuration' % qemu_img_binary)
-
-        self.mount = tempfile.mkdtemp(prefix='floppy_', dir='/tmp')
-        self.virtio_mount = None
-        self.path = path
-        clean_old_image(path)
-        if not os.path.isdir(os.path.dirname(path)):
-            os.makedirs(os.path.dirname(path))
-
-        try:
-            c_cmd = '%s create -f raw %s 1440k' % (qemu_img_binary, path)
-            run(c_cmd, info='Could not create floppy image')
-            f_cmd = 'mkfs.msdos -s 1 %s' % path
-            run(f_cmd, info='Error formatting floppy image')
-            m_cmd = 'mount -o loop,rw %s %s' % (path, self.mount)
-            run(m_cmd, info='Could not mount floppy image')
-        except:
-            cleanup(self.mount)
-
-
-    def _copy_virtio_drivers(self, virtio_floppy):
-        """
-        Copy the virtio drivers on the virtio floppy to the install floppy.
-
-        1) Mount the floppy containing the viostor drivers
-        2) Copy its contents to the root of the install floppy
-        """
-        virtio_mount = tempfile.mkdtemp(prefix='virtio_floppy_', dir='/tmp')
-
-        pwd = os.getcwd()
-        try:
-            m_cmd = 'mount -o loop %s %s' % (virtio_floppy, virtio_mount)
-            run(m_cmd, info='Could not mount virtio floppy driver')
-            os.chdir(virtio_mount)
-            path_list = glob.glob('*')
-            for path in path_list:
-                self.copy_to(path)
-        finally:
-            os.chdir(pwd)
-            cleanup(virtio_mount)
-
-
-    def setup_virtio_win2003(self, virtio_floppy, virtio_oemsetup_id):
-        """
-        Setup the install floppy with the virtio storage drivers, win2003 style.
-
-        Win2003 and WinXP depend on the file txtsetup.oem file to install
-        the virtio drivers from the floppy, which is a .ini file.
-        Process:
-
-        1) Copy the virtio drivers on the virtio floppy to the install floppy
-        2) Parse the ini file with config parser
-        3) Modify the identifier of the default session that is going to be
-           executed on the config parser object
-        4) Re-write the config file to the disk
-        """
-        self._copy_virtio_drivers(virtio_floppy)
-        txtsetup_oem = os.path.join(self.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 '
-                             'driver image has this file')
-        parser = ConfigParser.ConfigParser()
-        parser.read(txtsetup_oem)
-        if not parser.has_section('Defaults'):
-            raise SetupError('File txtsetup.oem does not have the session '
-                             '"Defaults". Please check txtsetup.oem')
-        default_driver = parser.get('Defaults', 'SCSI')
-        if default_driver != virtio_oemsetup_id:
-            parser.set('Defaults', 'SCSI', virtio_oemsetup_id)
-            fp = open(txtsetup_oem, 'w')
-            parser.write(fp)
-            fp.close()
-
-
-    def setup_virtio_win2008(self, virtio_floppy):
-        """
-        Setup the install floppy with the virtio storage drivers, win2008 style.
-
-        Win2008, Vista and 7 require people to point out the path to the drivers
-        on the unattended file, so we just need to copy the drivers to the
-        driver floppy disk.
-        Process:
-
-        1) Copy the virtio drivers on the virtio floppy to the install floppy
-        """
-        self._copy_virtio_drivers(virtio_floppy)
-
-
-class CdromDisk(Disk):
-    """
-    Represents a CDROM disk that we can master according to our needs.
-    """
-    def __init__(self, path):
-        print "Creating ISO unattended image %s" % path
-        self.mount = tempfile.mkdtemp(prefix='cdrom_unattended_', dir='/tmp')
-        self.path = path
-        clean_old_image(path)
-        if not os.path.isdir(os.path.dirname(path)):
-            os.makedirs(os.path.dirname(path))
-
-
-    def close(self):
-        g_cmd = ('mkisofs -o %s -max-iso9660-filenames '
-                 '-relaxed-filenames -D --input-charset iso8859-1 '
-                 '%s' % (self.path, self.mount))
-        run(g_cmd, info='Could not generate iso with answer file')
-
-        os.chmod(self.path, 0755)
-        cleanup(self.mount)
-        print "Disk %s successfuly set" % self.path
-
-
 class UnattendedInstall(object):
     """
     Creates a floppy disk image that will contain a config file for unattended
@@ -250,188 +25,144 @@
         """
         Gets params from environment variables and sets class attributes.
         """
-        images_dir = os.path.join(KVM_TEST_DIR, 'images')
-        self.deps_dir = os.path.join(KVM_TEST_DIR, 'deps')
-        self.unattended_dir = os.path.join(KVM_TEST_DIR, 'unattended')
+        script_dir = os.path.dirname(sys.modules[__name__].__file__)
+        kvm_test_dir = os.path.abspath(os.path.join(script_dir, ".."))
+        images_dir = os.path.join(kvm_test_dir, 'images')
+        self.deps_dir = os.path.join(kvm_test_dir, 'deps')
+        self.unattended_dir = os.path.join(kvm_test_dir, 'unattended')
 
-        attributes = ['kernel_args', 'finish_program', 'cdrom_cd1',
-                      'unattended_file', 'medium', 'url', 'kernel', 'initrd',
-                      'nfs_server', 'nfs_dir', 'pxe_dir', 'pxe_image',
-                      'pxe_initrd', 'install_virtio', 'tftp',
-                      'floppy', 'cdrom_unattended']
-        for a in attributes:
-            self._setattr(a)
+        tftp_root = os.environ.get('KVM_TEST_tftp', '')
+        if tftp_root:
+            self.tftp_root = os.path.join(kvm_test_dir, tftp_root)
+            if not os.path.isdir(self.tftp_root):
+                os.makedirs(self.tftp_root)
+        else:
+            self.tftp_root = tftp_root
 
-        if self.install_virtio == 'yes':
-            v_attributes = ['virtio_floppy', 'virtio_storage_path',
-                            'virtio_network_path', 'virtio_oemsetup_id',
-                            'virtio_network_installer']
-            for va in v_attributes:
-                self._setattr(va)
+        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')
 
-        # Silly attribution just to calm pylint down...
-        self.tftp = self.tftp
-        if self.tftp:
-            self.tftp = os.path.join(KVM_TEST_DIR, self.tftp)
-            if not os.path.isdir(self.tftp):
-                os.makedirs(self.tftp)
+        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.nfs_mount = tempfile.mkdtemp(prefix='nfs_', dir='/tmp')
+        floppy_name = os.environ['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.cdrom_cd1 = os.path.join(KVM_TEST_DIR, self.cdrom_cd1)
-        self.cdrom_cd1_mount = tempfile.mkdtemp(prefix='cdrom_cd1_', dir='/tmp')
-        if self.medium == 'nfs':
-            self.nfs_mount = tempfile.mkdtemp(prefix='nfs_', dir='/tmp')
+        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', '')
 
-        self.floppy = os.path.join(KVM_TEST_DIR, self.floppy)
-        if not os.path.isdir(os.path.dirname(self.floppy)):
-            os.makedirs(os.path.dirname(self.floppy))
-
-        self.image_path = KVM_TEST_DIR
+        self.medium = os.environ.get('KVM_TEST_medium', '')
+        self.url = os.environ.get('KVM_TEST_url', '')
+        self.kernel = os.environ.get('KVM_TEST_kernel', '')
+        self.initrd = os.environ.get('KVM_TEST_initrd', '')
+        self.nfs_server = os.environ.get('KVM_TEST_nfs_server', '')
+        self.nfs_dir = os.environ.get('KVM_TEST_nfs_dir', '')
+        self.image_path = kvm_test_dir
         self.kernel_path = os.path.join(self.image_path, self.kernel)
         self.initrd_path = os.path.join(self.image_path, self.initrd)
 
 
-    def _setattr(self, key):
+    def create_boot_floppy(self):
         """
-        Populate class attributes with contents of environment variables.
-
-        Example: KVM_TEST_medium will populate self.medium.
-
-        @param key: Name of the class attribute we desire to have.
+        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.
         """
-        env_name = 'KVM_TEST_%s' % key
-        value = os.environ.get(env_name, '')
-        setattr(self, key, value)
+        print "Creating boot floppy"
 
+        if os.path.exists(self.floppy_img):
+            os.remove(self.floppy_img)
 
-    def render_answer_file(self):
-        # Replace KVM_TEST_CDKEY (in the unattended file) with the cdkey
-        # provided for this test and replace the KVM_TEST_MEDIUM with
-        # the tree url or nfs address provided for this test.
-        unattended_contents = open(self.unattended_file).read()
-        dummy_cdkey_re = r'\bKVM_TEST_CDKEY\b'
-        real_cdkey = os.environ.get('KVM_TEST_cdkey')
-        if re.search(dummy_cdkey_re, unattended_contents):
-            if real_cdkey:
-                unattended_contents = re.sub(dummy_cdkey_re, real_cdkey,
-                                             unattended_contents)
-            else:
-                print ("WARNING: 'cdkey' required but not specified for "
-                       "this unattended installation")
+        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.')
 
-        dummy_medium_re = r'\bKVM_TEST_MEDIUM\b'
-        if self.medium == "cdrom":
-            content = "cdrom"
-        elif self.medium == "url":
-            content = "url --url %s" % self.url
-        elif self.medium == "nfs":
-            content = "nfs --server=%s --dir=%s" % (self.nfs_server,
-                                                    self.nfs_dir)
-        else:
-            raise SetupError("Unexpected installation medium %s" % self.url)
+        f_cmd = 'mkfs.msdos -s 1 %s' % self.floppy_img
+        if os.system(f_cmd):
+            raise SetupError('Error formatting floppy image.')
 
-        unattended_contents = re.sub(dummy_medium_re, content,
-                                     unattended_contents)
+        try:
+            m_cmd = 'mount -o loop %s %s' % (self.floppy_img, self.floppy_mount)
+            if os.system(m_cmd):
+                raise SetupError('Could not mount floppy image.')
 
-        def replace_virtio_key(contents, dummy_re, env):
-            """
-            Replace a virtio dummy string with contents.
-
-            If install_virtio is not set, replace it with a dummy string.
-
-            @param contents: Contents of the unattended file
-            @param dummy_re: Regular expression used to search on the.
-                    unattended file contents.
-            @param env: Name of the environment variable.
-            """
-            dummy_path = "C:"
-            driver = os.environ.get(env, '')
-
-            if re.search(dummy_re, contents):
-                if self.install_virtio == "yes":
-                    if driver.endswith("msi"):
-                        driver = 'msiexec /passive /package ' + driver
-                    else:
-                        try:
-                            # Let's escape windows style paths properly
-                            drive, path = driver.split(":")
-                            driver = drive + ":" + re.escape(path)
-                        except:
-                            pass
-                    contents = re.sub(dummy_re, driver, contents)
+            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)
+                shutil.copyfile(setup_file_path, setup_file_dest)
+            elif self.unattended_file.endswith('.ks'):
+                # Red Hat kickstart install
+                dest_fname = 'ks.cfg'
+            elif self.unattended_file.endswith('.xml'):
+                if  self.tftp_root is '':
+                    # Windows unattended install
+                    dest_fname = "autounattend.xml"
                 else:
-                    contents = re.sub(dummy_re, dummy_path, contents)
-            return contents
+                    # SUSE autoyast install
+                    dest_fname = "autoinst.xml"
 
-        vdict = {r'\bKVM_TEST_STORAGE_DRIVER_PATH\b':
-                 'KVM_TEST_virtio_storage_path',
-                 r'\bKVM_TEST_NETWORK_DRIVER_PATH\b':
-                 'KVM_TEST_virtio_network_path',
-                 r'\bKVM_TEST_VIRTIO_NETWORK_INSTALLER\b':
-                 'KVM_TEST_virtio_network_installer_path'}
+            dest = os.path.join(self.floppy_mount, dest_fname)
 
-        for vkey in vdict:
-            unattended_contents = replace_virtio_key(unattended_contents,
-                                                     vkey, vdict[vkey])
-
-        print "Unattended install contents:"
-        print unattended_contents
-        return unattended_contents
-
-
-    def setup_boot_disk(self):
-        answer_contents = self.render_answer_file()
-
-        if self.unattended_file.endswith('.sif'):
-            dest_fname = 'winnt.sif'
-            setup_file = 'winnt.bat'
-            boot_disk = FloppyDisk(self.floppy)
-            boot_disk.setup_answer_file(dest_fname, answer_contents)
-            setup_file_path = os.path.join(self.unattended_dir, setup_file)
-            boot_disk.copy_to(setup_file_path)
-            if self.install_virtio == "yes":
-                boot_disk.setup_virtio_win2003(self.virtio_floppy,
-                                               self.virtio_oemsetup_id)
-            boot_disk.copy_to(self.finish_program)
-
-        elif self.unattended_file.endswith('.ks'):
-            # Red Hat kickstart install
-            dest_fname = 'ks.cfg'
-            if self.cdrom_unattended:
-                boot_disk = CdromDisk(self.cdrom_unattended)
-            elif self.floppy:
-                boot_disk = FloppyDisk(self.floppy)
-            else:
-                raise SetupError("Neither cdrom_unattended nor floppy set "
-                                 "on the config file, please verify")
-            boot_disk.setup_answer_file(dest_fname, answer_contents)
-
-        elif self.unattended_file.endswith('.xml'):
-            if self.tftp:
-                # SUSE autoyast install
-                dest_fname = "autoinst.xml"
-                if self.cdrom_unattended:
-                    boot_disk = CdromDisk(self.cdrom_unattended)
-                elif self.floppy:
-                    boot_disk = FloppyDisk(self.floppy)
+            # Replace KVM_TEST_CDKEY (in the unattended file) with the cdkey
+            # provided for this test and replace the KVM_TEST_MEDIUM with
+            # the tree url or nfs address provided for this test.
+            unattended_contents = open(self.unattended_file).read()
+            dummy_cdkey_re = r'\bKVM_TEST_CDKEY\b'
+            real_cdkey = os.environ.get('KVM_TEST_cdkey')
+            if re.search(dummy_cdkey_re, unattended_contents):
+                if real_cdkey:
+                    unattended_contents = re.sub(dummy_cdkey_re, real_cdkey,
+                                                 unattended_contents)
                 else:
-                    raise SetupError("Neither cdrom_unattended nor floppy set "
-                                     "on the config file, please verify")
-                boot_disk.setup_answer_file(dest_fname, answer_contents)
+                    print ("WARNING: 'cdkey' required but not specified for "
+                           "this unattended installation")
 
+            dummy_re = r'\bKVM_TEST_MEDIUM\b'
+            if self.medium == "cdrom":
+                content = "cdrom"
+            elif self.medium == "url":
+                content = "url --url %s" % self.url
+            elif self.medium == "nfs":
+                content = "nfs --server=%s --dir=%s" % (self.nfs_server, self.nfs_dir)
             else:
-                # Windows unattended install
-                dest_fname = "autounattend.xml"
-                boot_disk = FloppyDisk(self.floppy)
-                boot_disk.setup_answer_file(dest_fname, answer_contents)
-                if self.install_virtio == "yes":
-                    boot_disk.setup_virtio_win2008(self.virtio_floppy)
-                boot_disk.copy_to(self.finish_program)
+                raise SetupError("Unexpected installation medium %s" % self.url)
 
-        else:
-            raise SetupError('Unknown answer file %s' %
-                             self.unattended_file)
+            unattended_contents = re.sub(dummy_re, content, unattended_contents)
 
-        boot_disk.close()
+            print
+            print "Unattended install %s contents:" % dest_fname
+            print unattended_contents
+            # Write the unattended file contents to 'dest'
+            open(dest, 'w').write(unattended_contents)
+
+            if self.finish_program:
+                dest_fname = os.path.basename(self.finish_program)
+                dest = os.path.join(self.floppy_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"
 
 
     def setup_pxe_boot(self):
@@ -442,7 +173,7 @@
         initrd.img files from the CD to a directory that qemu will serve trough
         TFTP to the VM.
         """
-        print "Setting up PXE boot using TFTP root %s" % self.tftp
+        print "Setting up PXE boot using TFTP root %s" % self.tftp_root
 
         pxe_file = None
         pxe_paths = ['/usr/lib/syslinux/pxelinux.0',
@@ -457,15 +188,17 @@
                              'sure pxelinux or equivalent package for your '
                              'distro is installed.')
 
-        pxe_dest = os.path.join(self.tftp, 'pxelinux.0')
+        pxe_dest = os.path.join(self.tftp_root, 'pxelinux.0')
         shutil.copyfile(pxe_file, pxe_dest)
 
         try:
-            m_cmd = ('mount -t iso9660 -v -o loop,ro %s %s' %
-                     (self.cdrom_cd1, self.cdrom_cd1_mount))
-            run(m_cmd, info='Could not mount CD image %s.' % self.cdrom_cd1)
+            m_cmd = 'mount -t iso9660 -v -o loop,ro %s %s' % (self.cdrom_iso,
+                                                              self.cdrom_mount)
+            if os.system(m_cmd):
+                raise SetupError('Could not mount CD image %s.' %
+                                 self.cdrom_iso)
 
-            pxe_dir = os.path.join(self.cdrom_cd1_mount, self.pxe_dir)
+            pxe_dir = os.path.join(self.cdrom_mount, self.pxe_dir)
             pxe_image = os.path.join(pxe_dir, self.pxe_image)
             pxe_initrd = os.path.join(pxe_dir, self.pxe_initrd)
 
@@ -480,15 +213,19 @@
                                  'or a initrd.img file. Cannot find a PXE '
                                  'image to proceed.' % self.pxe_dir)
 
-            tftp_image = os.path.join(self.tftp, 'vmlinuz')
-            tftp_initrd = os.path.join(self.tftp, 'initrd.img')
+            tftp_image = os.path.join(self.tftp_root, 'vmlinuz')
+            tftp_initrd = os.path.join(self.tftp_root, 'initrd.img')
             shutil.copyfile(pxe_image, tftp_image)
             shutil.copyfile(pxe_initrd, tftp_initrd)
 
         finally:
-            cleanup(self.cdrom_cd1_mount)
+            u_cmd = 'umount %s' % self.cdrom_mount
+            if os.system(u_cmd):
+                raise SetupError('Could not unmount CD at %s.' %
+                                 self.cdrom_mount)
+            self.cleanup(self.cdrom_mount)
 
-        pxe_config_dir = os.path.join(self.tftp, 'pxelinux.cfg')
+        pxe_config_dir = os.path.join(self.tftp_root, 'pxelinux.cfg')
         if not os.path.isdir(pxe_config_dir):
             os.makedirs(pxe_config_dir)
         pxe_config_path = os.path.join(pxe_config_dir, 'default')
@@ -508,7 +245,7 @@
 
     def setup_url(self):
         """
-        Download the vmlinuz and initrd.img from URL.
+        Download the vmlinuz and initrd.img from URL
         """
         print "Downloading the vmlinuz and initrd.img"
         os.chdir(self.image_path)
@@ -521,11 +258,12 @@
         if os.path.exists(self.initrd):
             os.unlink(self.initrd)
 
-        run(kernel_fetch_cmd, info="Could not fetch vmlinuz from %s" % self.url)
-        run(initrd_fetch_cmd, info=("Could not fetch initrd.img from %s" %
-                                    self.url))
-        print "Download of vmlinuz and initrd.img finished"
+        if os.system(kernel_fetch_cmd) != 0:
+            raise SetupError("Could not fetch vmlinuz from %s" % self.url)
+        if os.system(initrd_fetch_cmd) != 0:
+            raise SetupError("Could not fetch initrd.img from %s" % self.url)
 
+        print "Downloading finish"
 
     def setup_nfs(self):
         """
@@ -533,44 +271,71 @@
         """
         print "Copying the vmlinuz and initrd.img from nfs"
 
-        m_cmd = ("mount %s:%s %s -o ro" %
-                 (self.nfs_server, self.nfs_dir, self.nfs_mount))
-        run(m_cmd, info='Could not mount nfs server')
+        m_cmd = "mount %s:%s %s -o ro" % (self.nfs_server, self.nfs_dir, self.nfs_mount)
+        if os.system(m_cmd):
+            raise SetupError('Could not mount nfs server.')
+
+        kernel_fetch_cmd = "cp %s/isolinux/%s %s" % (self.nfs_mount,
+                                                     self.kernel,
+                                                     self.image_path)
+        initrd_fetch_cmd = "cp %s/isolinux/%s %s" % (self.nfs_mount,
+                                                     self.initrd,
+                                                     self.image_path)
 
         try:
-            kernel_fetch_cmd = ("cp %s/isolinux/%s %s" %
-                                (self.nfs_mount, self.kernel, self.image_path))
-            run(kernel_fetch_cmd, info=("Could not copy the vmlinuz from %s" %
-                                        self.nfs_mount))
-            initrd_fetch_cmd = ("cp %s/isolinux/%s %s" %
-                                (self.nfs_mount, self.initrd, self.image_path))
-            run(initrd_fetch_cmd, info=("Could not copy the initrd.img from "
-                                        "%s" % self.nfs_mount))
+            if os.system(kernel_fetch_cmd):
+                raise SetupError("Could not copy the vmlinuz from %s" %
+                                 self.nfs_mount)
+            if os.system(initrd_fetch_cmd):
+                raise SetupError("Could not copy the initrd.img from %s" %
+                                 self.nfs_mount)
         finally:
-            cleanup(self.nfs_mount)
+            u_cmd = "umount %s" % self.nfs_mount
+            if os.system(u_cmd):
+                raise SetupError("Could not unmont nfs at %s" % self.nfs_mount)
+            self.cleanup(self.nfs_mount)
+
+    def cleanup(self, mount):
+        """
+        Clean up a previously used mountpoint.
+
+        @param mount: Mountpoint to be cleaned up.
+        """
+        if os.path.isdir(mount):
+            if os.path.ismount(mount):
+                print "Path %s is still mounted, please verify" % mount
+            else:
+                print "Removing mount point %s" % mount
+                os.rmdir(mount)
 
 
     def setup(self):
-        """
-        Configure the environment for unattended install.
-
-        Uses an appropriate strategy according to each install model.
-        """
         print "Starting unattended install setup"
-        print
 
         print "Variables set:"
-        for member in inspect.getmembers(self):
-            name, value = member
-            attribute = getattr(self, name)
-            if not (name.startswith("__") or callable(attribute) or not value):
-                print "    %s: %s" % (name, value)
-        print
+        print "    medium: " + str(self.medium)
+        print "    qemu_img_bin: " + str(self.qemu_img_bin)
+        print "    cdrom iso: " + str(self.cdrom_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 "    floppy_img: " + str(self.floppy_img)
+        print "    finish_program: " + str(self.finish_program)
+        print "    pxe_dir: " + str(self.pxe_dir)
+        print "    pxe_image: " + str(self.pxe_image)
+        print "    pxe_initrd: " + str(self.pxe_initrd)
+        print "    url: " + str(self.url)
+        print "    kernel: " + str(self.kernel)
+        print "    initrd: " + str(self.initrd)
+        print "    nfs_server: " + str(self.nfs_server)
+        print "    nfs_dir: " + str(self.nfs_dir)
+        print "    nfs_mount: " + str(self.nfs_mount)
 
-        if self.unattended_file and (self.floppy or self.cdrom_unattended):
-            self.setup_boot_disk()
+        if self.unattended_file and self.floppy_img is not None:
+            self.create_boot_floppy()
         if self.medium == "cdrom":
-            if self.tftp:
+            if self.tftp_root:
                 self.setup_pxe_boot()
         elif self.medium == "url":
             self.setup_url()
@@ -578,7 +343,7 @@
             self.setup_nfs()
         else:
             raise SetupError("Unexpected installation method %s" %
-                             self.medium)
+                                   self.medium)
         print "Unattended install setup finished successfuly"
 
 
diff --git a/client/tests/kvm/scripts/virtio_guest.py b/client/tests/kvm/scripts/virtio_guest.py
deleted file mode 100644
index 4862ef2..0000000
--- a/client/tests/kvm/scripts/virtio_guest.py
+++ /dev/null
@@ -1,513 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-"""
-Auxiliary script used to send data between ports on guests.
-
-@copyright: 2008-2009 Red Hat Inc.
-@author: Jiri Zupka (jzupka@redhat.com)
-@author: Lukas Doktor (ldoktor@redhat.com)
-"""
-#from _pydev_SimpleXMLRPCServer import fcntl
-
-"""
-TODO:
-virt.init([consoles])   # sysfs, udev, OK
-virt.open(name)
-virt.close(name)
-virt.poll(name, eventmask, timeout) # poll.register(), poll.poll(),
-return event
-virt.send(name, length) # host disconnected
-virt.recv(name, length) # host disconnected
-virt.blocking(name, true)   # true = blocking, false = nonblocking
-virt.loopback(in_names, out_names, type="None")  # use select/poll
-"""
-
-import threading
-from threading import Thread
-import os, time, select, re, random, sys, array, fcntl, array, subprocess
-
-DEBUGPATH = "/sys/kernel/debug"
-SYSFSPATH = "/sys/class/virtio-ports/"
-
-
-class virtio_guest():
-
-    LOOP_NONE = 0
-    LOOP_POLL = 1
-    LOOP_SELECT = 2
-
-    def __init__(self):
-        self.files = {}
-        self.exit_thread = threading.Event()
-        self.threads = []
-        self.ports = {}
-
-
-    def _readfile(self, name):
-        """
-        Read file and return content as string
-
-        @param name: Name of file
-        @return: Content of file as string
-        """
-        out = ""
-        try:
-            f = open(name, "r")
-            out = f.read()
-            f.close()
-        except:
-            print "FAIL: Cannot open file %s" % (name)
-
-        return out
-
-
-    def _get_port_status(self):
-        """
-        Get info about ports from kernel debugfs.
-
-        @return: Ports dictionary of port properties
-        """
-        ports = {}
-        not_present_msg = "FAIL: There's no virtio-ports dir in debugfs"
-        if (not os.path.ismount(DEBUGPATH)):
-            os.system('mount -t debugfs none %s' % (DEBUGPATH))
-        try:
-            if not os.path.isdir('%s/virtio-ports' % (DEBUGPATH)):
-                print not_present_msg
-        except:
-            print not_present_msg
-        else:
-            viop_names = os.listdir('%s/virtio-ports' % (DEBUGPATH))
-            for name in viop_names:
-                f = open("%s/virtio-ports/%s" % (DEBUGPATH, name), 'r')
-                port = {}
-                for line in iter(f):
-                    m = re.match("(\S+): (\S+)", line)
-                    port[m.group(1)] = m.group(2)
-
-                if (port['is_console'] == "yes"):
-                    port["path"] = "/dev/hvc%s" % (port["console_vtermno"])
-                    # Console works like a serialport
-                else:
-                    port["path"] = "/dev/%s" % name
-
-                if (not os.path.exists(port['path'])):
-                    print "FAIL: %s not exist" % port['path']
-
-                sysfspath = SYSFSPATH + name
-                if (not os.path.isdir(sysfspath)):
-                    print "FAIL: %s not exist" % (sysfspath)
-
-                info_name = sysfspath + "/name"
-                port_name = self._readfile(info_name).strip()
-                if (port_name != port["name"]):
-                    print ("FAIL: Port info not match \n%s - %s\n%s - %s" %
-                           (info_name , port_name,
-                            "%s/virtio-ports/%s" % (DEBUGPATH, name),
-                            port["name"]))
-
-                ports[port['name']] = port
-                f.close()
-
-        return ports
-
-
-    def init(self, in_files):
-        """
-        Init and check port properties.
-        """
-        self.ports = self._get_port_status()
-
-        for item in in_files:
-            if (item[1] != self.ports[item[0]]["is_console"]):
-                print self.ports
-                print "FAIL: Host console is not like console on guest side\n"
-        print "PASS: Init and check virtioconsole files in system."
-
-
-    class switch(Thread):
-        """
-        Thread that sends data between ports.
-        """
-        def __init__ (self, in_files, out_files, event,
-                      cachesize=1024, method=0):
-            """
-            @param in_files: Array of input files.
-            @param out_files: Array of output files.
-            @param method: Method of read/write access.
-            @param cachesize: Block to receive and send.
-            """
-            Thread.__init__(self)
-
-            self.in_files = in_files
-            self.out_files = out_files
-            self.exit_thread = event
-            self.method = method
-
-            self.cachesize = cachesize
-
-
-        def _none_mode(self):
-            """
-            Read and write to device in blocking mode
-            """
-            data = ""
-            while not self.exit_thread.isSet():
-                data = ""
-                for desc in self.in_files:
-                    data += os.read(desc, self.cachesize)
-                if data != "":
-                    for desc in self.out_files:
-                        os.write(desc, data)
-
-
-        def _poll_mode(self):
-            """
-            Read and write to device in polling mode.
-            """
-
-            pi = select.poll()
-            po = select.poll()
-
-            for fd in self.in_files:
-                pi.register(fd, select.POLLIN)
-
-            for fd in self.out_files:
-                po.register(fd, select.POLLOUT)
-
-            while not self.exit_thread.isSet():
-                data = ""
-                t_out = self.out_files
-
-                readyf = pi.poll(1.0)
-                for i in readyf:
-                    data += os.read(i[0], self.cachesize)
-
-                if data != "":
-                    while ((len(t_out) != len(readyf)) and not
-                           self.exit_thread.isSet()):
-                        readyf = po.poll(1.0)
-                    for desc in t_out:
-                        os.write(desc, data)
-
-
-        def _select_mode(self):
-            """
-            Read and write to device in selecting mode.
-            """
-            while not self.exit_thread.isSet():
-                ret = select.select(self.in_files, [], [], 1.0)
-                data = ""
-                if ret[0] != []:
-                    for desc in ret[0]:
-                        data += os.read(desc, self.cachesize)
-                if data != "":
-                    ret = select.select([], self.out_files, [], 1.0)
-                    while ((len(self.out_files) != len(ret[1])) and not
-                           self.exit_thread.isSet()):
-                        ret = select.select([], self.out_files, [], 1.0)
-                    for desc in ret[1]:
-                        os.write(desc, data)
-
-
-        def run(self):
-            if (self.method == virtio_guest.LOOP_POLL):
-                self._poll_mode()
-            elif (self.method == virtio_guest.LOOP_SELECT):
-                self._select_mode()
-            else:
-                self._none_mode()
-
-
-    class sender(Thread):
-        """
-        Creates a thread which sends random blocks of data to dst port.
-        """
-        def __init__(self, port, event, length):
-            """
-            @param port: Destination port
-            @param length: Length of the random data block
-            """
-            Thread.__init__(self)
-            self.port = port
-            self.exit_thread = event
-            self.data = array.array('L')
-            for i in range(max(length / self.data.itemsize, 1)):
-                self.data.append(random.randrange(sys.maxint))
-
-        def run(self):
-            while not self.exit_thread.isSet():
-                os.write(self.port, self.data)
-
-
-    def _open(self, in_files):
-        """
-        Open devices and return array of descriptors
-
-        @param in_files: Files array
-        @return: Array of descriptor
-        """
-        f = []
-
-        for item in in_files:
-            name = self.ports[item]["path"]
-            if (name in self.files):
-                f.append(self.files[name])
-            else:
-                try:
-                    self.files[name] = os.open(name, os.O_RDWR)
-                    if (self.ports[item]["is_console"] == "yes"):
-                        print os.system("stty -F %s raw -echo" % (name))
-                        print os.system("stty -F %s -a" % (name))
-                    f.append(self.files[name])
-                except Exception as inst:
-                    print "FAIL: Failed to open file %s" % (name)
-                    raise inst
-        return f
-
-
-    def poll(self, port, expected, timeout=500):
-        """
-        Pool event from device and print event like text.
-
-        @param file: Device.
-        """
-        in_f = self._open([port])
-
-        p = select.poll()
-        p.register(in_f[0])
-
-        mask = p.poll(timeout)
-
-        str = ""
-        if (mask[0][1] & select.POLLIN):
-            str += "IN "
-        if (mask[0][1] & select.POLLPRI):
-            str += "PRI IN "
-        if (mask[0][1] & select.POLLOUT):
-            str += "OUT "
-        if (mask[0][1] & select.POLLERR):
-            str += "ERR "
-        if (mask[0][1] & select.POLLHUP):
-            str += "HUP "
-        if (mask[0][1] & select.POLLMSG):
-            str += "MSG "
-
-        if (mask[0][1] & expected) == expected:
-            print "PASS: Events: " + str
-        else:
-            print "FAIL: Events: " + str
-
-
-    def blocking(self, port, mode=False):
-        """
-        Set port function mode blocking/nonblocking
-
-        @param port: port to set mode
-        @param mode: False to set nonblock mode, True for block mode
-        """
-        path = self.ports[port]["path"]
-        fd = self.files[path]
-
-        try:
-            fl = fcntl.fcntl(fd, fcntl.F_GETFL)
-            if not mode:
-                fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NONBLOCK)
-            else:
-                fcntl.fcntl(fd, fcntl.F_SETFL, fl & ~os.O_NONBLOCK)
-
-        except Exception as inst:
-            print "FAIL: Setting (non)blocking mode: " + str(inst)
-            return
-
-        print ("PASS: set blocking mode to %s mode" %
-               ("blocking" if mode else "nonblocking"))
-
-
-    def close(self, file):
-        """
-        Close open port.
-
-        @param file: File to close.
-        """
-        descriptor = None
-        path = self.ports[file]["path"]
-        if path != None:
-            if path in self.files.keys():
-                descriptor = self.files[path]
-                del self.files[path]
-        try:
-            os.close(descriptor)
-        except Exception as inst:
-            print "FAIL: Closing the file: " + str(inst)
-            return
-        print "PASS: Close"
-
-
-    def open(self, in_files):
-        """
-        Direct open devices.
-
-        @param in_files: Array of files.
-        @return: Array of descriptors.
-        """
-        name = self.ports[in_files]["path"]
-        try:
-            self.files[name] = os.open(name, os.O_RDWR)
-            print "PASS: Open all filles correctly."
-        except Exception as inst:
-            print "%s\nFAIL: Failed open file %s" % (str(inst), name)
-
-
-    def loopback(self, in_files, out_files, cachesize=1024, mode=LOOP_NONE):
-        """
-        Start a switch thread.
-
-        (There is a problem with multiple opens of a single file).
-
-        @param in_files: Array of input files.
-        @param out_files: Array of output files.
-        @param cachesize: Cachesize.
-        """
-        self.ports = self._get_port_status()
-
-        in_f = self._open(in_files)
-        out_f = self._open(out_files)
-
-        s = self.switch(in_f, out_f, self.exit_thread, cachesize, mode)
-        s.start()
-        self.threads.append(s)
-        print "PASS: Start switch"
-
-
-    def exit_threads(self):
-        """
-        Function end all running data switch.
-        """
-        self.exit_thread.set()
-        for th in self.threads:
-            print "join"
-            th.join()
-        self.exit_thread.clear()
-
-        del self.threads[:]
-        for desc in self.files.itervalues():
-            os.close(desc)
-        self.files.clear()
-        print "PASS: All threads finished."
-
-
-    def die(self):
-        """
-        Quit consoleswitch.
-        """
-        self.exit_threads()
-        exit()
-
-
-    def send_loop_init(self, port, length):
-        """
-        Prepares the sender thread. Requires clean thread structure.
-        """
-        self.ports = self._get_port_status()
-        in_f = self._open([port])
-
-        self.threads.append(self.sender(in_f[0], self.exit_thread, length))
-        print "PASS: Sender prepare"
-
-
-    def send_loop(self):
-        """
-        Start sender data transfer. Requires senderprepare run first.
-        """
-        self.threads[0].start()
-        print "PASS: Sender start"
-
-
-    def send(self, port, length=1, mode=True):
-        """
-        Send a data of some length
-
-        @param port: Port to write data
-        @param length: Length of data
-        @param mode: True = loop mode, False = one shoot mode
-        """
-        in_f = self._open([port])
-
-        data = ""
-        while len(data) < length:
-            data += "%c" % random.randrange(255)
-        try:
-            writes = os.write(in_f[0], data)
-        except Exception as inst:
-            print inst
-        if not writes:
-            writes = 0
-        if mode:
-            while (writes < length):
-                try:
-                    writes += os.write(in_f[0], data)
-                except Exception as inst:
-                    print inst
-        if writes >= length:
-            print "PASS: Send data length %d" % writes
-        else:
-            print ("FAIL: Partial send: desired %d, transfered %d" %
-                   (length, writes))
-
-
-    def recv(self, port, length=1, buffer=1024, mode=True):
-        """
-        Recv a data of some length
-
-        @param port: Port to write data
-        @param length: Length of data
-        @param mode: True = loop mode, False = one shoot mode
-        """
-        in_f = self._open([port])
-
-        recvs = ""
-        try:
-            recvs = os.read(in_f[0], buffer)
-        except Exception as inst:
-            print inst
-        if mode:
-            while (len(recvs) < length):
-                try:
-                    recvs += os.read(in_f[0], buffer)
-                except Exception as inst:
-                    print inst
-        if len(recvs) >= length:
-            print "PASS: Recv data length %d" % len(recvs)
-        else:
-            print ("FAIL: Partial recv: desired %d, transfered %d" %
-                   (length, len(recvs)))
-
-
-def compile():
-    """
-    Compile virtio_guest.py to speed up.
-    """
-    import py_compile
-    py_compile.compile(sys.path[0] + "/virtio_guest.py")
-    print "PASS: compile"
-    exit(0)
-
-
-def main():
-    """
-    Main (infinite) loop of virtio_guest.
-    """
-    if (len(sys.argv) > 1) and (sys.argv[1] == "-c"):
-        compile()
-
-    virt = virtio_guest()
-    print "PASS: Start"
-
-    while True:
-        str = raw_input()
-        exec str
-
-
-if __name__ == "__main__":
-    main()
diff --git a/client/tests/kvm/tests.cfg.sample b/client/tests/kvm/tests.cfg.sample
index ce3e307..e01406e 100644
--- a/client/tests/kvm/tests.cfg.sample
+++ b/client/tests/kvm/tests.cfg.sample
@@ -58,29 +58,21 @@
         only Fedora.13.64
         only unattended_install.cdrom boot shutdown
         # qemu needs -enable-kvm on the cmdline
-        extra_params += ' -enable-kvm'
+        extra_params = ' -enable-kvm'
 
     # Runs qemu-kvm, f13 64 bit guest OS, install, boot, shutdown
     - @qemu_kvm_f13_quick:
         # We want qemu-kvm for this run
         qemu_binary = /usr/bin/qemu-kvm
         only qcow2
-        only virtio_net
-        only virtio_blk
+        only rtl8139
+        only ide
         only smp2
         only no_pci_assignable
         only smallpages
         only Fedora.13.64
         only unattended_install.cdrom boot shutdown
 
-# You may provide information about the DTM server for WHQL tests here:
-#whql:
-#    server_address = 10.20.30.40
-#    server_shell_port = 10022
-#    server_file_transfer_port = 10023
-# Note that the DTM server must run rss.exe (available under deps/),
-# preferably with administrator privileges.
-
 # Uncomment the following lines to enable abort-on-error mode:
 #abort_on_error = yes
 #kill_vm.* ?= no
diff --git a/client/tests/kvm/tests/build.py b/client/tests/kvm/tests/build.py
index f39371a..5a8f3b0 100644
--- a/client/tests/kvm/tests/build.py
+++ b/client/tests/kvm/tests/build.py
@@ -495,22 +495,18 @@
         kernel_repo = params.get("git_repo")
         user_repo = params.get("user_git_repo")
         kmod_repo = params.get("kmod_repo")
-        test_repo = params.get("test_git_repo")
 
         kernel_branch = params.get("kernel_branch", "master")
         user_branch = params.get("user_branch", "master")
         kmod_branch = params.get("kmod_branch", "master")
-        test_branch = params.get("test_branch", "master")
 
         kernel_lbranch = params.get("kernel_lbranch", "master")
         user_lbranch = params.get("user_lbranch", "master")
         kmod_lbranch = params.get("kmod_lbranch", "master")
-        test_lbranch = params.get("test_lbranch", "master")
 
         kernel_commit = params.get("kernel_commit", None)
         user_commit = params.get("user_commit", None)
         kmod_commit = params.get("kmod_commit", None)
-        test_commit = params.get("test_commit", None)
 
         kernel_patches = eval(params.get("kernel_patches", "[]"))
         user_patches = eval(params.get("user_patches", "[]"))
@@ -533,16 +529,8 @@
                                                    os.path.basename(patch)))
                 utils.system('patch -p1 %s' % os.path.basename(patch))
 
-        if test_repo:
-            test_srcdir = os.path.join(self.srcdir, "kvm-unit-tests")
-            kvm_utils.get_git_branch(test_repo, test_branch, test_srcdir,
-                                     test_commit, test_lbranch)
-            unittest_cfg = os.path.join(test_srcdir, 'x86',
-                                        'unittests.cfg')
-            self.test_srcdir = test_srcdir
-        else:
-            unittest_cfg = os.path.join(userspace_srcdir, 'kvm', 'test', 'x86',
-                                        'unittests.cfg')
+        unittest_cfg = os.path.join(userspace_srcdir, 'kvm', 'test', 'x86',
+                                    'unittests.cfg')
 
         self.unittest_cfg = None
         if os.path.isfile(unittest_cfg):
diff --git a/client/tests/kvm/tests/ksm_overcommit.py b/client/tests/kvm/tests/ksm_overcommit.py
index dd4a30d..2b49a65 100644
--- a/client/tests/kvm/tests/ksm_overcommit.py
+++ b/client/tests/kvm/tests/ksm_overcommit.py
@@ -372,11 +372,6 @@
         utils.run("echo 50 > /sys/kernel/mm/ksm/sleep_millisecs")
         utils.run("echo 5000 > /sys/kernel/mm/ksm/pages_to_scan")
         utils.run("echo 1 > /sys/kernel/mm/ksm/run")
-
-        if (os.path.exists("/sys/kernel/mm/transparent_hugepage/enabled")):
-            utils.run("echo 'never' > /sys/kernel/mm/transparent_hugepage/enabled ")
-        if (os.path.exists("/sys/kernel/mm/redhat_transparent_hugepage/enabled")):
-            utils.run("echo 'never' > /sys/kernel/mm/redhat_transparent_hugepage/enabled ")
         new_ksm = True
     else:
         try:
diff --git a/client/tests/kvm/tests/pci_hotplug.py b/client/tests/kvm/tests/pci_hotplug.py
index 55cf666..2c459d7 100644
--- a/client/tests/kvm/tests/pci_hotplug.py
+++ b/client/tests/kvm/tests/pci_hotplug.py
@@ -1,22 +1,20 @@
-import logging, os, commands, re
+import logging, os
 from autotest_lib.client.common_lib import error
 import kvm_subprocess, kvm_test_utils, kvm_utils, kvm_vm
 
 
 def run_pci_hotplug(test, params, env):
     """
-    Test hotplug of PCI devices.
-
-    (Elements between [] are configurable test parameters)
+    Test pci devices' hotplug
     1) PCI add a deivce (NIC / block)
-    2) Compare output of monitor command 'info pci'.
-    3) Compare output of guest command [reference_cmd].
-    4) Verify whether pci_model is shown in [pci_find_cmd].
-    5) Check whether the newly added PCI device works fine.
-    6) PCI delete the device, verify whether could remove the PCI device.
+    2) Compare output of hypervisor command `info pci`
+    3) Compare output of guest command `reference_cmd`
+    4) Verify whether pci_model is shown in `pci_find_cmd`
+    5) Check whether the newly added pci device works fine
+    6) PCI delete the device, verify whether could remove the pci device
 
-    @param test:   KVM test object.
-    @param params: Dictionary with the test parameters.
+    @param test:   kvm test object
+    @param params: Dictionary with the test parameters
     @param env:    Dictionary with test environment.
     """
     vm = kvm_test_utils.get_living_vm(env, params.get("main_vm"))
@@ -37,79 +35,26 @@
 
     tested_model = params.get("pci_model")
     test_type = params.get("pci_type")
-    image_format = params.get("image_format_stg")
 
-    # Probe qemu to verify what is the supported syntax for PCI hotplug
-    cmd_output = vm.monitor.cmd("?")
-    if len(re.findall("\ndevice_add", cmd_output)) > 0:
-        cmd_type = "device_add"
-    elif len(re.findall("\npci_add", cmd_output)) > 0:
-        cmd_type = "pci_add"
-    else:
-        raise error.TestError("Unknow version of qemu")
+    if test_type == "nic":
+        pci_add_cmd = "pci_add pci_addr=auto nic model=%s" % tested_model
+    elif test_type == "block":
+        image_params = kvm_utils.get_sub_dict(params, "stg")
+        image_filename = kvm_vm.get_image_filename(image_params, test.bindir)
+        pci_add_cmd = ("pci_add pci_addr=auto storage file=%s,if=%s" %
+                       (image_filename, tested_model))
 
-    if cmd_type == "pci_add":
-        if test_type == "nic":
-            pci_add_cmd = "pci_add pci_addr=auto nic model=%s" % tested_model
-        elif test_type == "block":
-            image_params = kvm_utils.get_sub_dict(params, "stg")
-            image_filename = kvm_vm.get_image_filename(image_params,
-                                                       test.bindir)
-            pci_add_cmd = ("pci_add pci_addr=auto storage file=%s,if=%s" %
-                           (image_filename, tested_model))
-        # Execute pci_add (should be replaced by a proper monitor method call)
-        add_output = vm.monitor.cmd(pci_add_cmd)
-        if not "OK domain" in add_output:
-            raise error.TestFail("Add PCI device failed. "
-                                 "Monitor command is: %s, Output: %r" %
-                                 (pci_add_cmd, add_output))
-        after_add = vm.monitor.info("pci")
-
-    elif cmd_type == "device_add":
-        driver_id = test_type + "-" + kvm_utils.generate_random_id()
-        id = test_type + "-" + kvm_utils.generate_random_id()
-        if test_type == "nic":
-            if tested_model == "virtio":
-                tested_model = "virtio-net-pci"
-            pci_add_cmd = "device_add id=%s,driver=%s" % (id, tested_model)
-
-        elif test_type == "block":
-            image_params = kvm_utils.get_sub_dict(params, "stg")
-            image_filename = kvm_vm.get_image_filename(image_params,
-                                                       test.bindir)
-            if tested_model == "virtio":
-                tested_model = "virtio-blk-pci"
-
-            if tested_model == "scsi":
-                tested_model = "scsi-disk"
-
-            driver_add_cmd = (" __com.redhat_drive_add "
-                              "file=%s,format=%s,id=%s" %
-                              (image_filename, image_format, driver_id))
-            pci_add_cmd = ("device_add id=%s,driver=%s,drive=%s" %
-                           (id, tested_model, driver_id))
-            driver_output = vm.monitor.cmd(driver_add_cmd)
-
-        # Check if the device is support in qemu
-        devices_support = vm.monitor.cmd("%s ?" % cmd_type)
-        if len(re.findall(tested_model, devices_support)) > 0:
-            add_output = vm.monitor.cmd(pci_add_cmd)
-        else:
-            raise error.TestError("%s doesn't support device: %s" %
-                                  (cmd_type, tested_model))
-        after_add = vm.monitor.info("pci")
-
-        if not id in after_add:
-            raise error.TestFail("Add device failed. Monitor command is: %s"
-                                 ". Output: %r" % (pci_add_cmd, add_output))
+    # Execute pci_add (should be replaced by a proper monitor method call)
+    add_output = vm.monitor.cmd(pci_add_cmd)
+    if not "OK domain" in add_output:
+        raise error.TestFail("Add device failed. Hypervisor command is: %s. "
+                             "Output: %r" % (pci_add_cmd, add_output))
+    after_add = vm.monitor.info("pci")
 
     # Define a helper function to delete the device
     def pci_del(ignore_failure=False):
-        if cmd_type == "pci_add":
-            slot_id = "0" + add_output.split(",")[2].split()[1]
-            cmd = "pci_del pci_addr=%s" % slot_id
-        elif cmd_type == "device_add":
-            cmd = "device_del %s" % id
+        slot_id = "0" + add_output.split(",")[2].split()[1]
+        cmd = "pci_del pci_addr=%s" % slot_id
         # This should be replaced by a proper monitor method call
         vm.monitor.cmd(cmd)
 
@@ -120,14 +65,14 @@
         if (not kvm_utils.wait_for(device_removed, 10, 0, 1)
             and not ignore_failure):
             raise error.TestFail("Failed to hot remove PCI device: %s. "
-                                 "Monitor command: %s" %
-                                 (tested_model, cmd))
+                                 "Hypervisor command: %s" % (tested_model,
+                                                             cmd))
 
     try:
         # Compare the output of 'info pci'
         if after_add == info_pci_ref:
             raise error.TestFail("No new PCI device shown after executing "
-                                 "monitor command: 'info pci'")
+                                 "hypervisor command: 'info pci'")
 
         # Define a helper function to compare the output
         def new_shown():
diff --git a/client/tests/kvm/tests/unittest.py b/client/tests/kvm/tests/unittest.py
index 54e5f73..69c4b43 100644
--- a/client/tests/kvm/tests/unittest.py
+++ b/client/tests/kvm/tests/unittest.py
@@ -73,7 +73,6 @@
         smp = None
         if parser.has_option(t, 'smp'):
             smp = int(parser.get(t, 'smp'))
-            params['smp'] = smp
 
         extra_params = None
         if parser.has_option(t, 'extra_params'):
diff --git a/client/tests/kvm/tests/virtio_console.py b/client/tests/kvm/tests/virtio_console.py
deleted file mode 100644
index 008ec63..0000000
--- a/client/tests/kvm/tests/virtio_console.py
+++ /dev/null
@@ -1,951 +0,0 @@
-"""
-virtio_console test
-
-@copyright: Red Hat 2010
-"""
-import array, logging, os, random, re, select, shutil, socket, sys, tempfile
-import threading, time
-from collections import deque
-from threading import Thread
-
-import kvm_subprocess, kvm_test_utils, kvm_utils, kvm_preprocessing
-from autotest_lib.client.common_lib import error
-
-
-def run_virtio_console(test, params, env):
-    """
-    KVM virtio_console test
-
-    1) Starts VMs with the specified number of virtio console devices
-    2) Start smoke test
-    3) Start loopback test
-    4) Start performance test
-
-    This test uses an auxiliary script, console_switch.py, that is copied to
-    guests. This script has functions to send and write data to virtio console
-    ports. Details of each test can be found on the docstrings for the test_*
-    functions.
-
-    @param test: kvm test object
-    @param params: Dictionary with the test parameters
-    @param env: Dictionary with test environment
-    """
-    class th_send(Thread):
-        """
-        Random data sender thread.
-        """
-        def __init__(self, port, data, event):
-            """
-            @param port: Destination port.
-            @param data: The data intend to be send in a loop.
-            @param event: Exit event.
-            """
-            Thread.__init__(self)
-            self.port = port
-            # FIXME: socket.send(data>>127998) without read blocks thread
-            if len(data) > 102400:
-                data = data[0:102400]
-                logging.error("Data is too long, using only first %d bytes",
-                              len(data))
-            self.data = data
-            self.exitevent = event
-            self.idx = 0
-
-
-        def run(self):
-            logging.debug("th_send %s: run", self.getName())
-            while not self.exitevent.isSet():
-                self.idx += self.port.send(self.data)
-            logging.debug("th_send %s: exit(%d)", self.getName(),
-                          self.idx)
-
-
-    class th_send_check(Thread):
-        """
-        Random data sender thread.
-        """
-        def __init__(self, port, event, queues, blocklen=1024):
-            """
-            @param port: Destination port
-            @param event: Exit event
-            @param queues: Queues for the control data (FIFOs)
-            @param blocklen: Block length
-            """
-            Thread.__init__(self)
-            self.port = port
-            self.queues = queues
-            # FIXME: socket.send(data>>127998) without read blocks thread
-            if blocklen > 102400:
-                blocklen = 102400
-                logging.error("Data is too long, using blocklen = %d",
-                              blocklen)
-            self.blocklen = blocklen
-            self.exitevent = event
-            self.idx = 0
-
-
-        def run(self):
-            logging.debug("th_send_check %s: run", self.getName())
-            too_much_data = False
-            while not self.exitevent.isSet():
-                # FIXME: workaround the problem with qemu-kvm stall when too
-                # much data is sent without receiving
-                for queue in self.queues:
-                    while not self.exitevent.isSet() and len(queue) > 1048576:
-                        too_much_data = True
-                        time.sleep(0.1)
-                ret = select.select([], [self.port], [], 1.0)
-                if ret[1]:
-                    # Generate blocklen of random data add them to the FIFO
-                    # and send them over virtio_console
-                    buf = ""
-                    for i in range(self.blocklen):
-                        ch = "%c" % random.randrange(255)
-                        buf += ch
-                        for queue in self.queues:
-                            queue.append(ch)
-                    target = self.idx + self.blocklen
-                    while not self.exitevent.isSet() and self.idx < target:
-                        idx = self.port.send(buf)
-                        buf = buf[idx:]
-                        self.idx += idx
-            logging.debug("th_send_check %s: exit(%d)", self.getName(),
-                          self.idx)
-            if too_much_data:
-                logging.error("th_send_check: workaround the 'too_much_data'"
-                              "bug")
-
-
-    class th_recv(Thread):
-        """
-        Recieves data and throws it away.
-        """
-        def __init__(self, port, event, blocklen=1024):
-            """
-            @param port: Data source port.
-            @param event: Exit event.
-            @param blocklen: Block length.
-            """
-            Thread.__init__(self)
-            self.port = port
-            self._port_timeout = self.port.gettimeout()
-            self.port.settimeout(0.1)
-            self.exitevent = event
-            self.blocklen = blocklen
-            self.idx = 0
-        def run(self):
-            logging.debug("th_recv %s: run", self.getName())
-            while not self.exitevent.isSet():
-                # TODO: Workaround, it didn't work with select :-/
-                try:
-                    self.idx += len(self.port.recv(self.blocklen))
-                except socket.timeout:
-                    pass
-            self.port.settimeout(self._port_timeout)
-            logging.debug("th_recv %s: exit(%d)", self.getName(), self.idx)
-
-
-    class th_recv_check(Thread):
-        """
-        Random data receiver/checker thread.
-        """
-        def __init__(self, port, buffer, event, blocklen=1024):
-            """
-            @param port: Source port.
-            @param buffer: Control data buffer (FIFO).
-            @param length: Amount of data we want to receive.
-            @param blocklen: Block length.
-            """
-            Thread.__init__(self)
-            self.port = port
-            self.buffer = buffer
-            self.exitevent = event
-            self.blocklen = blocklen
-            self.idx = 0
-
-
-        def run(self):
-            logging.debug("th_recv_check %s: run", self.getName())
-            while not self.exitevent.isSet():
-                ret = select.select([self.port], [], [], 1.0)
-                if ret and (not self.exitevent.isSet()):
-                    buf = self.port.recv(self.blocklen)
-                    if buf:
-                        # Compare the recvd data with the control data
-                        for ch in buf:
-                            ch_ = self.buffer.popleft()
-                            if not ch == ch_:
-                                self.exitevent.set()
-                                logging.error("Failed to recv %dth character",
-                                              self.idx)
-                                logging.error("%s != %s", repr(ch), repr(ch_))
-                                logging.error("Recv = %s", repr(buf))
-                                # sender might change the buffer :-(
-                                time.sleep(1)
-                                ch_ = ""
-                                for buf in self.buffer:
-                                    ch_ += buf
-                                logging.error("Queue = %s", repr(ch_))
-                                raise error.TestFail("th_recv_check: incorrect "
-                                                     "data")
-                        self.idx += len(buf)
-            logging.debug("th_recv_check %s: exit(%d)", self.getName(),
-                          self.idx)
-
-
-    class cpu_load():
-        """
-        Get average cpu load between start and get_load.
-        """
-        def __init__ (self):
-            self.old_load = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
-            self.startTime = 0
-            self.endTime = 0
-
-
-        def _get_cpu_load(self):
-            # Let's see if we can calc system load.
-            try:
-                f = open("/proc/stat", "r")
-                tmp = f.readlines(200)
-                f.close()
-            except:
-                logging.critical("Error reading /proc/stat")
-                error.TestFail("average_cpu_load: Error reading /proc/stat")
-
-            # 200 bytes should be enough because the information we need
-            # is typically stored in the first line
-            # Info about individual processors (not yet supported) is in
-            # the second (third, ...?) line
-            for line in tmp:
-                if line[0:4] == "cpu ":
-                    reg = re.compile('[0-9]+')
-                    load_values = reg.findall(line)
-                    # extract values from /proc/stat
-                    load = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
-                    for i in range(8):
-                        load[i] = int(load_values[i]) - self.old_load[i]
-
-                    for i in range(8):
-                        self.old_load[i] = int(load_values[i])
-                    return load
-
-
-        def start (self):
-            """
-            Start CPU usage measurement
-            """
-            self.old_load = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
-            self.startTime = time.time()
-            self._get_cpu_load()
-
-
-        def get_load(self):
-            """
-            Get and reset CPU usage
-
-            @return: return group cpu (user[%], system[%], sum[%], testTime[s])
-            """
-            self.endTime = time.time()
-            testTime = self.endTime - self.startTime
-            load = self._get_cpu_load()
-
-            user = load[0] / testTime
-            system = load[2] / testTime
-            sum = user + system
-
-            return (user, system, sum, testTime)
-
-
-    class pid_load():
-        """
-        Get average process cpu load between start and get_load
-        """
-        def __init__ (self, pid, name):
-            self.old_load = [0, 0]
-            self.startTime = 0
-            self.endTime = 0
-            self.pid = pid
-            self.name = name
-
-
-        def _get_cpu_load(self, pid):
-            # Let's see if we can calc system load.
-            try:
-                f = open("/proc/%d/stat" % (pid), "r")
-                line = f.readline()
-                f.close()
-            except:
-                logging.critical("Error reading /proc/%d/stat", pid)
-                error.TestFail("average_process_cpu_load: Error reading "
-                               "/proc/stat")
-            else:
-                reg = re.compile('[0-9]+')
-                load_values = reg.findall(line)
-                del load_values[0:11]
-                # extract values from /proc/stat
-                load = [0, 0]
-                for i in range(2):
-                    load[i] = int(load_values[i]) - self.old_load[i]
-
-                for i in range(2):
-                    self.old_load[i] = int(load_values[i])
-                return load
-
-
-        def start (self):
-            """
-            Start CPU usage measurement
-            """
-            self.old_load = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
-            self.startTime = time.time()
-            self._get_cpu_load(self.pid)
-
-
-        def get_load(self):
-            """
-            Get and reset CPU usage.
-
-            @return: Group cpu
-                    (pid, user[%], system[%], sum[%], testTime[s])
-            """
-            self.endTime = time.time()
-            testTime = self.endTime - self.startTime
-            load = self._get_cpu_load(self.pid)
-
-            user = load[0] / testTime
-            system = load[1] / testTime
-            sum = user + system
-
-            return (self.name, self.pid, user, system, sum, testTime)
-
-
-    def print_load(process, system):
-        """
-        Print load in tabular mode.
-
-        @param process: List of process statistic tuples.
-        @param system: Tuple of system cpu usage.
-        """
-
-        logging.info("%-10s %6s %5s %5s %5s %11s",
-                     "NAME", "PID", "USER", "SYS", "SUM", "TIME")
-        for pr in process:
-            logging.info("%-10s %6d %4.0f%% %4.0f%% %4.0f%% %10.3fs" % pr)
-        logging.info("TOTAL:     ------ %4.0f%% %4.0f%% %4.0f%% %10.3fs" %
-                     system)
-
-
-    def process_stats(stats, scale=1.0):
-        """
-        Process and print the statistic.
-
-        @param stats: List of measured data.
-        """
-        if not stats:
-            return None
-        for i in range((len(stats) - 1), 0, -1):
-            stats[i] = stats[i] - stats[i - 1]
-            stats[i] /= scale
-        stats[0] /= scale
-        stats = sorted(stats)
-        return stats
-
-
-    def init_guest(vm, timeout=2):
-        """
-        Execute virtio_guest.py on guest, wait until it is initialized.
-
-        @param vm: Informations about the guest.
-        @param timeout: Timeout that will be used to verify if the script
-                started properly.
-        """
-        logging.debug("compile virtio_guest.py on guest %s", vm[0].name)
-        vm[1].sendline("python -OO /tmp/virtio_guest.py -c &&"
-                       "echo -n 'PASS: Compile virtio_guest finished' ||"
-                       "echo -n 'FAIL: Compile virtio_guest failed'")
-        (match, data) = vm[1].read_until_last_line_matches(["PASS:", "FAIL:"],
-                                                           timeout)
-        if match == 1 or match is None:
-            raise error.TestFail("Command console_switch.py on guest %s failed."
-                                 "\nreturn code: %s\n output:\n%s" %
-                                 (vm[0].name, match, data))
-        logging.debug("Starting virtio_guest.py on guest %s", vm[0].name)
-        vm[1].sendline("python /tmp/virtio_guest.pyo &&"
-                       "echo -n 'PASS: virtio_guest finished' ||"
-                       "echo -n 'FAIL: virtio_guest failed'")
-        (match, data) = vm[1].read_until_last_line_matches(["PASS:", "FAIL:"],
-                                                           timeout)
-        if match == 1 or match is None:
-            raise error.TestFail("Command console_switch.py on guest %s failed."
-                                 "\nreturn code: %s\n output:\n%s" %
-                                 (vm[0].name, match, data))
-        # Let the system rest
-        time.sleep(2)
-
-
-    def _on_guest(command, vm, timeout=2):
-        """
-        Execute given command inside the script's main loop, indicating the vm
-        the command was executed on.
-
-        @param command: Command that will be executed.
-        @param vm: Informations about the guest.
-        @param timeout: Timeout used to verify expected output.
-
-        @return: Tuple (match index, data)
-        """
-        logging.debug("Executing '%s' on virtio_guest.py loop, vm: %s," +
-                      "timeout: %s", command, vm[0].name, timeout)
-        vm[1].sendline(command)
-        (match, data) = vm[1].read_until_last_line_matches(["PASS:", 
-                                                    "FAIL:[Failed to execute]"],
-                                                    timeout)
-        return (match, data)
-
-
-    def on_guest(command, vm, timeout=2):
-        """
-        Wrapper around the _on_guest command which executes the command on
-        guest. Unlike _on_guest command when the command fails it raises the
-        test error.
-
-        @param command: Command that will be executed.
-        @param vm: Informations about the guest.
-        @param timeout: Timeout used to verify expected output.
-
-        @return: Tuple (match index, data)
-        """
-        match, data = _on_guest(command, vm, timeout)
-        if match == 1 or match is None:
-            raise error.TestFail("Failed to execute '%s' on virtio_guest.py, "
-                                 "vm: %s, output:\n%s" %
-                                 (command, vm[0].name, data))
-
-        return (match, data)
-
-
-    def socket_readall(sock, read_timeout, mesagesize):
-        """
-        Read everything from the socket.
-
-        @param sock: Socket.
-        @param read_timeout: Read timeout.
-        @param mesagesize: Size of message.
-        """
-        sock_decriptor = sock.fileno()
-        sock.settimeout(read_timeout)
-        message = ""
-        try:
-            while (len(message) < mesagesize):
-                message += sock.recv(mesagesize)
-        except Exception as inst:
-            if (inst.args[0] == "timed out"):
-                logging.debug("Reading timeout")
-            else:
-                logging.debug(inst)
-        sock.setblocking(1)
-        return message
-
-
-    def _guest_exit_threads(vm, send_pts, recv_pts):
-        """
-        Safely executes on_guest("virt.exit_threads()") using workaround of
-        the stuck thread in loopback in mode=virt.LOOP_NONE .
-
-        @param vm: Informations about the guest.
-        @param send_pts: list of possible send sockets we need to work around.
-        @param recv_pts: list of possible recv sockets we need to read-out.
-        """
-        # in LOOP_NONE mode it might stuck in read/write
-        match, tmp = _on_guest("virt.exit_threads()", vm, 10)
-        if match == None:
-            logging.debug("Workaround the stuck thread on guest")
-            # Thread is stucked in read/write
-            for send_pt in send_pts:
-                send_pt[0].sendall(".")
-        elif match != 0:
-            # Something else
-            raise error.TestFail("Unexpected fail\nMatch: %s\nData:\n%s"
-                                 % (match, tmp))
-
-        # Read-out all remaining data
-        for recv_pt in recv_pts:
-            while select.select([recv_pt[0]], [], [], 0.1)[0]:
-                recv_pt[0].recv(1024)
-
-        # This will cause fail in case anything went wrong.
-        on_guest("print 'PASS: nothing'", vm, 10)
-
-
-    def _vm_create(no_console=3, no_serialport=3):
-        """
-        Creates the VM and connects the specified number of consoles and serial
-        ports.
-
-        @param no_console: Number of desired virtconsoles.
-        @param no_serialport: Number of desired virtserialports.
-        @return: Tuple with (guest information, consoles information)
-                guest informations = [vm, session, tmp_dir]
-                consoles informations = [consoles[], serialports[]]
-        """
-        consoles = []
-        serialports = []
-        tmp_dir = tempfile.mkdtemp(prefix="virtio-console-", dir="/tmp/")
-        if not params.get('extra_params'):
-            params['extra_params'] = ''
-        params['extra_params'] += " -device virtio-serial"
-
-        for i in  range(0, no_console):
-            params['extra_params'] += (" -chardev socket,path=%s/%d,id=vc%d,"
-                                       "server,nowait" % (tmp_dir, i, i))
-            params['extra_params'] += (" -device virtconsole,chardev=vc%d,"
-                                      "name=console-%d,id=c%d" % (i, i, i))
-
-        for i in  range(no_console, no_console + no_serialport):
-            params['extra_params'] += (" -chardev socket,path=%s/%d,id=vs%d,"
-                                       "server,nowait" % (tmp_dir, i, i))
-            params['extra_params'] += (" -device virtserialport,chardev=vs%d,"
-                                       "name=serialport-%d,id=p%d" % (i, i, i))
-
-
-        logging.debug("Booting first guest %s", params.get("main_vm"))
-        kvm_preprocessing.preprocess_vm(test, params, env,
-                                        params.get("main_vm"))
-
-
-        vm = kvm_utils.env_get_vm(env, params.get("main_vm"))
-
-        session = kvm_test_utils.wait_for_login(vm, 0,
-                                         float(params.get("boot_timeout", 240)),
-                                         0, 2)
-
-        # connect the sockets
-        for i in range(0, no_console):
-            sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
-            sock.connect("%s/%d" % (tmp_dir, i))
-            consoles.append([sock, "console-%d" % i, "yes"])
-        for i in range(no_console, no_console + no_serialport):
-            sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
-            sock.connect("%s/%d" % (tmp_dir, i))
-            serialports.append([sock, "serialport-%d" % i, "no"])
-
-        return [vm, session, tmp_dir], [consoles, serialports]
-
-
-    def test_smoke(vm, consoles, params):
-        """
-        Virtio console smoke test.
-
-        Tests the basic functionalities (poll, read/write with and without
-        connected host, etc.
-
-        @param vm: target virtual machine [vm, session, tmp_dir]
-        @param consoles: a field of virtio ports with the minimum of 2 items
-        @param params: test parameters '$console_type:$data;...'
-        """
-        logging.info("Smoke test: Tests the basic capabilities of "
-                     "virtio_consoles.")
-        # PREPARE
-        for param in params.split(';'):
-            if not param:
-                continue
-            logging.info("test_smoke: params: %s", param)
-            param = param.split(':')
-            if len(param) > 1:
-                data = param[1]
-            else:
-                data = "Smoke test data"
-            param = (param[0] == 'serialport')
-            send_pt = consoles[param][0]
-            recv_pt = consoles[param][1]
-
-            # TEST
-            # Poll (OUT)
-            on_guest("virt.poll('%s', %s)" % (send_pt[1], select.POLLOUT), vm,
-                     2)
-
-            # Poll (IN, OUT)
-            send_pt[0].sendall("test")
-            for test in [select.POLLIN, select.POLLOUT]:
-                on_guest("virt.poll('%s', %s)" % (send_pt[1], test), vm, 2)
-
-            # Poll (IN HUP)
-            # I store the socket informations and close the socket
-            sock = send_pt[0]
-            send_pt[0] = sock.getpeername()
-            sock.shutdown(2)
-            sock.close()
-            del sock
-            for test in [select.POLLIN, select.POLLHUP]:
-                on_guest("virt.poll('%s', %s)" % (send_pt[1], test), vm, 2)
-
-            # Poll (HUP)
-            on_guest("virt.recv('%s', 4, 1024, False)" % (send_pt[1]), vm, 2)
-            on_guest("virt.poll('%s', %s)" % (send_pt[1], select.POLLHUP), vm,
-                     2)
-
-            # Reconnect the socket
-            sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
-            sock.connect(send_pt[0])
-            send_pt[0] = sock
-            # Redefine socket in consoles
-            consoles[param][0] = send_pt
-            on_guest("virt.poll('%s', %s)" % (send_pt[1], select.POLLOUT), vm,
-                     2)
-
-            # Read/write without host connected
-            # I store the socket informations and close the socket
-            sock = send_pt[0]
-            send_pt[0] = sock.getpeername()
-            sock.shutdown(2)
-            sock.close()
-            del sock
-            # Read should pass
-            on_guest("virt.recv('%s', 0, 1024, False)" % send_pt[1], vm, 2)
-            # Write should timed-out
-            match, tmp = _on_guest("virt.send('%s', 10, False)"
-                                    % send_pt[1], vm, 2)
-            if match != None:
-                raise error.TestFail("Read on guest while host disconnected "
-                                     "didn't timed out.\nOutput:\n%s"
-                                     % tmp)
-            sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
-            sock.connect(send_pt[0])
-            send_pt[0] = sock
-
-            # Redefine socket in consoles
-            consoles[param][0] = send_pt
-            if (send_pt[0].recv(1024) < 10):
-                raise error.TestFail("Didn't received data from guest")
-            # Now the _on_guest("virt.send('%s'... command should be finished
-            on_guest("print 'PASS: nothing'", vm, 2)
-
-            # Non-blocking mode
-            on_guest("virt.blocking('%s', False)" % send_pt[1], vm, 2)
-            # Recv should return FAIL with 0 received data
-            match, tmp = _on_guest("virt.recv('%s', 10, 1024, False)" %
-                                   send_pt[1], vm, 2)
-            if match == 0:
-                raise error.TestFail("Received data even when non were sent\n"
-                                     "Data:\n%s" % tmp)
-            elif match == None:
-                raise error.TestFail("Timed out, probably in blocking mode\n"
-                                     "Data:\n%s" % tmp)
-            elif match != 1:
-                raise error.TestFail("Unexpected fail\nMatch: %s\nData:\n%s" %
-                                     (match, tmp))
-            send_pt[0].sendall("1234567890")
-            on_guest("virt.recv('%s', 10, 1024, False)" % send_pt[1], vm, 2)
-
-            # Blocking mode
-            on_guest("virt.blocking('%s', True)" % send_pt[1], vm, 2)
-            # Recv should timed out
-            match, tmp = _on_guest("virt.recv('%s', 10, 1024, False)" %
-                                   send_pt[1], vm, 2)
-            if match == 0:
-                raise error.TestFail("Received data even when non were sent\n"
-                                     "Data:\n%s" % tmp)
-            elif match != None:
-                raise error.TestFail("Unexpected fail\nMatch: %s\nData:\n%s" %
-                                     (match, tmp))
-            send_pt[0].sendall("1234567890")
-            # Now guest received the data end escaped from the recv()
-            on_guest("print 'PASS: nothing'", vm, 2)
-
-            # Basic loopback test
-            on_guest("virt.loopback(['%s'], ['%s'], 1024, virt.LOOP_NONE)" %
-                     (send_pt[1], recv_pt[1]), vm, 2)
-            send_pt[0].sendall(data)
-            tmp = ""
-            i = 0
-            while i <= 10:
-                i += 1
-                ret = select.select([recv_pt[0]], [], [], 1.0)
-                if ret:
-                    tmp += recv_pt[0].recv(1024)
-                if len(tmp) >= len(data):
-                    break
-            if tmp != data:
-                raise error.TestFail("Incorrect data: '%s' != '%s'",
-                                     data, tmp)
-            _guest_exit_threads(vm, [send_pt], [recv_pt])
-
-        return consoles
-
-
-    def test_loopback(vm, consoles, params):
-        """
-        Virtio console loopback test.
-
-        Creates loopback on the vm machine between send_pt and recv_pts
-        ports and sends length amount of data through this connection.
-        It validates the correctness of the data sent.
-
-        @param vm: target virtual machine [vm, session, tmp_dir]
-        @param consoles: a field of virtio ports with the minimum of 2 items
-        @param params: test parameters, multiple recievers allowed.
-            '$source_console_type@buffer_length:
-             $destination_console_type1@$buffer_length:...:
-             $loopback_buffer_length;...'
-        """
-        logging.info("Loopback test: Creates a loopback between sender port "
-                     "and receiving port, send data through this connection, "
-                     "verify data correctness.")
-        # PREPARE
-        for param in params.split(';'):
-            if not param:
-                continue
-            logging.info("test_loopback: params: %s", param)
-            param = param.split(':')
-            idx_serialport = 0
-            idx_console = 0
-            buf_len = []
-            if (param[0].startswith('console')):
-                send_pt = consoles[0][idx_console]
-                idx_console += 1
-            else:
-                send_pt = consoles[1][idx_serialport]
-                idx_serialport += 1
-            if (len(param[0].split('@')) == 2):
-                buf_len.append(int(param[0].split('@')[1]))
-            else:
-                buf_len.append(1024)
-            recv_pts = []
-            for parm in param[1:]:
-                if (parm.isdigit()):
-                    buf_len.append(int(parm))
-                    break   # buf_len is the last portion of param
-                if (parm.startswith('console')):
-                    recv_pts.append(consoles[0][idx_console])
-                    idx_console += 1
-                else:
-                    recv_pts.append(consoles[1][idx_serialport])
-                    idx_serialport += 1
-                if (len(parm[0].split('@')) == 2):
-                    buf_len.append(int(parm[0].split('@')[1]))
-                else:
-                    buf_len.append(1024)
-            # There must be sum(idx_*) consoles + last item as loopback buf_len
-            if len(buf_len) == (idx_console + idx_serialport):
-                buf_len.append(1024)
-
-            if len(recv_pts) == 0:
-                raise error.TestFail("test_loopback: incorrect recv consoles"
-                                     "definition")
-
-            threads = []
-            queues = []
-            for i in range(0, len(recv_pts)):
-                queues.append(deque())
-
-            tmp = "'%s'" % recv_pts[0][1]
-            for recv_pt in recv_pts[1:]:
-                tmp += ", '%s'" % (recv_pt[1])
-            on_guest("virt.loopback(['%s'], [%s], %d, virt.LOOP_POLL)"
-                     % (send_pt[1], tmp, buf_len[-1]), vm, 2)
-
-            exit_event = threading.Event()
-
-            # TEST
-            thread = th_send_check(send_pt[0], exit_event, queues, buf_len[0])
-            thread.start()
-            threads.append(thread)
-
-            for i in range(len(recv_pts)):
-                thread = th_recv_check(recv_pts[i][0], queues[i], exit_event,
-                                       buf_len[i + 1])
-                thread.start()
-                threads.append(thread)
-
-            time.sleep(60)
-            exit_event.set()
-            threads[0].join()
-            tmp = "%d data sent; " % threads[0].idx
-            for thread in threads[1:]:
-                thread.join()
-                tmp += "%d, " % thread.idx
-            logging.info("test_loopback: %s data received and verified",
-                         tmp[:-2])
-
-            # Read-out all remaining data
-            for recv_pt in recv_pts:
-                while select.select([recv_pt[0]], [], [], 0.1)[0]:
-                    recv_pt[0].recv(1024)
-
-            _guest_exit_threads(vm, [send_pt], recv_pts)
-
-            del exit_event
-            del threads[:]
-
-
-    def test_perf(vm, consoles, params):
-        """
-        Tests performance of the virtio_console tunel. First it sends the data
-        from host to guest and than back. It provides informations about
-        computer utilisation and statistic informations about the troughput.
-
-        @param vm: target virtual machine [vm, session, tmp_dir]
-        @param consoles: a field of virtio ports with the minimum of 2 items
-        @param params: test parameters:
-                '$console_type@$buffer_length:$test_duration;...'
-        """
-        logging.info("Performance test: Measure performance for the "
-                     "virtio console tunnel")
-        for param in params.split(';'):
-            if not param:
-                continue
-            logging.info("test_perf: params: %s", param)
-            param = param.split(':')
-            duration = 60.0
-            if len(param) > 1:
-                try:
-                    duration = float(param[1])
-                except:
-                    pass
-            param = param[0].split('@')
-            if len(param) > 1 and param[1].isdigit():
-                buf_len = int(param[1])
-            else:
-                buf_len = 1024
-            param = (param[0] == 'serialport')
-            port = consoles[param][0]
-
-            data = ""
-            for i in range(buf_len):
-                data += "%c" % random.randrange(255)
-
-            exit_event = threading.Event()
-            slice = float(duration)/100
-
-            # HOST -> GUEST
-            on_guest('virt.loopback(["%s"], [], %d, virt.LOOP_NONE)' %
-                     (port[1], buf_len), vm, 2)
-            thread = th_send(port[0], data, exit_event)
-            stats = array.array('f', [])
-            loads = []
-            loads.append(cpu_load())
-            loads.append(pid_load(os.getpid(), 'autotest'))
-            loads.append(pid_load(vm[0].get_pid(), 'VM'))
-
-            for load in loads:
-                load.start()
-            _time = time.time()
-            thread.start()
-            for i in range(100):
-                stats.append(thread.idx)
-                time.sleep(slice)
-            _time = time.time() - _time - duration
-            print_load([loads[1].get_load(), loads[2].get_load()],
-                       loads[0].get_load())
-            exit_event.set()
-            thread.join()
-
-            # Let the guest read-out all the remaining data
-            while not _on_guest("virt.poll('%s', %s)" %
-                                (port[1], select.POLLIN), vm, 2)[0]:
-                time.sleep(1)
-
-            _guest_exit_threads(vm, [port], [])
-
-            if (_time > slice):
-                logging.error(
-                "Test ran %fs longer which is more than one slice", _time)
-            else:
-                logging.debug("Test ran %fs longer", _time)
-            stats = process_stats(stats[1:], slice*1048576)
-            logging.debug("Stats = %s", stats)
-            logging.info("Host -> Guest [MB/s] (min/med/max) = %.3f/%.3f/%.3f",
-                         stats[0], stats[len(stats)/2], stats[-1])
-
-            del thread
-
-            # GUEST -> HOST
-            exit_event.clear()
-            stats = array.array('f', [])
-            on_guest("virt.send_loop_init('%s', %d)" % (port[1], buf_len),
-                     vm, 30)
-            thread = th_recv(port[0], exit_event, buf_len)
-            thread.start()
-            for load in loads:
-                load.start()
-            on_guest("virt.send_loop()", vm, 2)
-            _time = time.time()
-            for i in range(100):
-                stats.append(thread.idx)
-                time.sleep(slice)
-            _time = time.time() - _time - duration
-            print_load([loads[1].get_load(), loads[2].get_load()],
-                       loads[0].get_load())
-            on_guest("virt.exit_threads()", vm, 2)
-            exit_event.set()
-            thread.join()
-            if (_time > slice): # Deviation is higher than 1 slice
-                logging.error(
-                "Test ran %fs longer which is more than one slice", _time)
-            else:
-                logging.debug("Test ran %fs longer" % _time)
-            stats = process_stats(stats[1:], slice*1048576)
-            logging.debug("Stats = %s", stats)
-            logging.info("Guest -> Host [MB/s] (min/med/max) = %.3f/%.3f/%.3f",
-                         stats[0], stats[len(stats)/2], stats[-1])
-
-            del thread
-
-            del exit_event
-            del loads[:]
-
-
-    # INITIALIZE
-    test_smoke_params = params.get('virtio_console_smoke', '')
-    test_loopback_params = params.get('virtio_console_loopback', '')
-    test_perf_params = params.get('virtio_console_perf', '')
-
-    no_serialports = 0
-    no_consoles = 0
-    # consoles required for Smoke test
-    if (test_smoke_params.count('serialport')):
-        no_serialports = max(2, no_serialports)
-    if (test_smoke_params.count('console')):
-        no_consoles = max(2, no_consoles)
-    # consoles required for Loopback test
-    for param in test_loopback_params.split(';'):
-        no_serialports = max(no_serialports, param.count('serialport'))
-        no_consoles = max(no_consoles, param.count('console'))
-    # consoles required for Performance test
-    if (test_perf_params.count('serialport')):
-        no_serialports = max(1, no_serialports)
-    if (test_perf_params.count('console')):
-        no_consoles = max(1, no_consoles)
-
-    if (no_serialports + no_consoles) == 0:
-        raise error.TestFail("No tests defined, probably incorrect "
-                             "configuration in tests_base.cfg")
-
-    vm, consoles = _vm_create(no_consoles, no_serialports)
-
-    # Copy allocator.py into guests
-    pwd = os.path.join(os.environ['AUTODIR'], 'tests/kvm')
-    vksmd_src = os.path.join(pwd, "scripts/virtio_guest.py")
-    dst_dir = "/tmp"
-    if not vm[0].copy_files_to(vksmd_src, dst_dir):
-        raise error.TestFail("copy_files_to failed %s" % vm[0].name)
-
-    # ACTUAL TESTING
-    # Defines all available consoles; tests udev and sysfs
-    conss = []
-    for mode in consoles:
-        for cons in mode:
-            conss.append(cons[1:3])
-    init_guest(vm, 10)
-    on_guest("virt.init(%s)" % (conss), vm, 10)
-
-    consoles = test_smoke(vm, consoles, test_smoke_params)
-    test_loopback(vm, consoles, test_loopback_params)
-    test_perf(vm, consoles, test_perf_params)
-
-    # CLEANUP
-    vm[1].close()
-    vm[0].destroy(gracefully=False)
-    shutil.rmtree(vm[2])
-
diff --git a/client/tests/kvm/tests/whql_client_install.py b/client/tests/kvm/tests/whql_client_install.py
deleted file mode 100644
index d866df7..0000000
--- a/client/tests/kvm/tests/whql_client_install.py
+++ /dev/null
@@ -1,116 +0,0 @@
-import logging, time, os, re
-from autotest_lib.client.common_lib import error
-import kvm_subprocess, kvm_test_utils, kvm_utils, rss_file_transfer
-
-
-def run_whql_client_install(test, params, env):
-    """
-    WHQL DTM client installation:
-    1) Log into the guest (the client machine) and into a DTM server machine
-    2) Stop the DTM client service (wttsvc) on the client machine
-    3) Delete the client machine from the server's data store
-    4) Rename the client machine (give it a randomly generated name)
-    5) Move the client machine into the server's workgroup
-    6) Reboot the client machine
-    7) Install the DTM client software
-
-    @param test: kvm test object
-    @param params: Dictionary with the test parameters
-    @param env: Dictionary with test environment.
-    """
-    vm = kvm_test_utils.get_living_vm(env, params.get("main_vm"))
-    session = kvm_test_utils.wait_for_login(vm, 0, 240)
-
-    # Collect test params
-    server_address = params.get("server_address")
-    server_shell_port = int(params.get("server_shell_port"))
-    server_file_transfer_port = int(params.get("server_file_transfer_port"))
-    server_studio_path = params.get("server_studio_path", "%programfiles%\\ "
-                                    "Microsoft Driver Test Manager\\Studio")
-    server_username = params.get("server_username")
-    server_password = params.get("server_password")
-    dsso_delete_machine_binary = params.get("dsso_delete_machine_binary",
-                                            "deps/whql_delete_machine_15.exe")
-    dsso_delete_machine_binary = kvm_utils.get_path(test.bindir,
-                                                    dsso_delete_machine_binary)
-    install_timeout = float(params.get("install_timeout", 600))
-    install_cmd = params.get("install_cmd")
-    wtt_services = params.get("wtt_services")
-
-    # Stop WTT service(s) on client
-    for svc in wtt_services.split():
-        kvm_test_utils.stop_windows_service(session, svc)
-
-    # Copy dsso_delete_machine_binary to server
-    rss_file_transfer.upload(server_address, server_file_transfer_port,
-                             dsso_delete_machine_binary, server_studio_path,
-                             timeout=60)
-
-    # Open a shell session with server
-    server_session = kvm_utils.remote_login("nc", server_address,
-                                            server_shell_port, "", "",
-                                            session.prompt, session.linesep)
-
-    # Get server and client information
-    cmd = "echo %computername%"
-    server_name = server_session.get_command_output(cmd).strip()
-    client_name = session.get_command_output(cmd).strip()
-    cmd = "wmic computersystem get domain"
-    server_workgroup = server_session.get_command_output(cmd).strip()
-    server_workgroup = server_workgroup.splitlines()[-1]
-    regkey = r"HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters"
-    cmd = "reg query %s /v Domain" % regkey
-    server_dns_suffix = server_session.get_command_output(cmd).split()[-1]
-
-    # Delete the client machine from the server's data store (if it's there)
-    server_session.get_command_output("cd %s" % server_studio_path)
-    cmd = "%s %s %s" % (os.path.basename(dsso_delete_machine_binary),
-                        server_name, client_name)
-    server_session.get_command_output(cmd, print_func=logging.info)
-    server_session.close()
-
-    # Rename the client machine
-    client_name = "autotest_%s" % kvm_utils.generate_random_string(4)
-    logging.info("Renaming client machine to '%s'" % client_name)
-    cmd = ('wmic computersystem where name="%%computername%%" rename name="%s"'
-           % client_name)
-    if session.get_command_status(cmd, timeout=600) != 0:
-        raise error.TestError("Could not rename the client machine")
-
-    # Join the server's workgroup
-    logging.info("Joining workgroup '%s'" % server_workgroup)
-    cmd = ('wmic computersystem where name="%%computername%%" call '
-           'joindomainorworkgroup name="%s"' % server_workgroup)
-    if session.get_command_status(cmd, timeout=600) != 0:
-        raise error.TestError("Could not change the client's workgroup")
-
-    # Set the client machine's DNS suffix
-    logging.info("Setting DNS suffix to '%s'" % server_dns_suffix)
-    cmd = "reg add %s /v Domain /d %s /f" % (regkey, server_dns_suffix)
-    if session.get_command_status(cmd, timeout=300) != 0:
-        raise error.TestError("Could not set the client's DNS suffix")
-
-    # Reboot
-    session = kvm_test_utils.reboot(vm, session)
-
-    # Access shared resources on the server machine
-    logging.info("Attempting to access remote share on server")
-    cmd = r"net use \\%s /user:%s %s" % (server_name, server_username,
-                                         server_password)
-    end_time = time.time() + 120
-    while time.time() < end_time:
-        s = session.get_command_status(cmd)
-        if s == 0:
-            break
-        time.sleep(5)
-    else:
-        raise error.TestError("Could not access server share from client "
-                              "machine")
-
-    # Install
-    logging.info("Installing DTM client (timeout=%ds)", install_timeout)
-    install_cmd = r"cmd /c \\%s\%s" % (server_name, install_cmd.lstrip("\\"))
-    if session.get_command_status(install_cmd, timeout=install_timeout) != 0:
-        raise error.TestError("Client installation failed")
-
-    session.close()
diff --git a/client/tests/kvm/tests/whql_submission.py b/client/tests/kvm/tests/whql_submission.py
deleted file mode 100644
index 1fe27c9..0000000
--- a/client/tests/kvm/tests/whql_submission.py
+++ /dev/null
@@ -1,188 +0,0 @@
-import logging, time, os, re
-from autotest_lib.client.common_lib import error
-import kvm_subprocess, kvm_test_utils, kvm_utils, rss_file_transfer
-
-
-def run_whql_submission(test, params, env):
-    """
-    WHQL submission test:
-    1) Log into the guest (the client machine) and into a DTM server machine
-    2) Copy the automation program binary (dsso_test_binary) to the server machine
-    3) Run the automation program
-    4) Pass the program all relevant parameters (e.g. device_data)
-    5) Wait for the program to terminate
-    6) Parse and report job results
-    (logs and HTML reports are placed in test.bindir)
-
-    @param test: kvm test object
-    @param params: Dictionary with the test parameters
-    @param env: Dictionary with test environment.
-    """
-    vm = kvm_test_utils.get_living_vm(env, params.get("main_vm"))
-    session = kvm_test_utils.wait_for_login(vm, 0, 240)
-
-    # Collect parameters
-    server_address = params.get("server_address")
-    server_shell_port = int(params.get("server_shell_port"))
-    server_file_transfer_port = int(params.get("server_file_transfer_port"))
-    server_studio_path = params.get("server_studio_path", "%programfiles%\\ "
-                                    "Microsoft Driver Test Manager\\Studio")
-    dsso_test_binary = params.get("dsso_test_binary",
-                                  "deps/whql_submission_15.exe")
-    dsso_test_binary = kvm_utils.get_path(test.bindir, dsso_test_binary)
-    test_device = params.get("test_device")
-    job_filter = params.get("job_filter", ".*")
-    test_timeout = float(params.get("test_timeout", 600))
-    wtt_services = params.get("wtt_services")
-
-    # Restart WTT service(s) on the client
-    logging.info("Restarting WTT services on client")
-    for svc in wtt_services.split():
-        kvm_test_utils.stop_windows_service(session, svc)
-    for svc in wtt_services.split():
-        kvm_test_utils.start_windows_service(session, svc)
-
-    # Copy dsso_test_binary to the server
-    rss_file_transfer.upload(server_address, server_file_transfer_port,
-                             dsso_test_binary, server_studio_path, timeout=60)
-
-    # Open a shell session with the server
-    server_session = kvm_utils.remote_login("nc", server_address,
-                                            server_shell_port, "", "",
-                                            session.prompt, session.linesep)
-
-    # Get the computer names of the server and client
-    cmd = "echo %computername%"
-    server_name = server_session.get_command_output(cmd).strip()
-    client_name = session.get_command_output(cmd).strip()
-    session.close()
-
-    # Run the automation program on the server
-    server_session.get_command_output("cd %s" % server_studio_path)
-    cmd = "%s %s %s %s %s %s" % (os.path.basename(dsso_test_binary),
-                                 server_name,
-                                 client_name,
-                                 "%s_pool" % client_name,
-                                 "%s_submission" % client_name,
-                                 test_timeout)
-    server_session.sendline(cmd)
-
-    # Helper function: wait for a given prompt and raise an exception if an
-    # error occurs
-    def find_prompt(prompt):
-        m, o = server_session.read_until_last_line_matches(
-            [prompt, server_session.prompt], print_func=logging.info,
-            timeout=600)
-        if m != 0:
-            errors = re.findall("^Error:.*$", o, re.I | re.M)
-            if errors:
-                raise error.TestError(errors[0])
-            else:
-                raise error.TestError("Error running automation program: could "
-                                      "not find '%s' prompt" % prompt)
-
-    # Tell the automation program which device to test
-    find_prompt("Device to test:")
-    server_session.sendline(test_device)
-
-    # Tell the automation program which jobs to run
-    find_prompt("Jobs to run:")
-    server_session.sendline(job_filter)
-
-    # Give the automation program all the device data supplied by the user
-    find_prompt("DeviceData name:")
-    for dd in kvm_utils.get_sub_dict_names(params, "device_data"):
-        dd_params = kvm_utils.get_sub_dict(params, dd)
-        if dd_params.get("dd_name") and dd_params.get("dd_data"):
-            server_session.sendline(dd_params.get("dd_name"))
-            server_session.sendline(dd_params.get("dd_data"))
-    server_session.sendline()
-
-    # Give the automation program all the descriptor information supplied by
-    # the user
-    find_prompt("Descriptor path:")
-    for desc in kvm_utils.get_sub_dict_names(params, "descriptors"):
-        desc_params = kvm_utils.get_sub_dict(params, desc)
-        if desc_params.get("desc_path"):
-            server_session.sendline(desc_params.get("desc_path"))
-    server_session.sendline()
-
-    # Wait for the automation program to terminate
-    m, o = server_session.read_up_to_prompt(print_func=logging.info,
-                                            timeout=test_timeout + 300)
-    # (test_timeout + 300 is used here because the automation program is
-    # supposed to terminate cleanly on its own when test_timeout expires)
-    server_session.close()
-
-    # Look for test results in the automation program's output
-    result_summaries = re.findall(r"---- \[.*?\] ----", o, re.DOTALL)
-    if not result_summaries:
-        raise error.TestError("The automation program did not return any "
-                              "results")
-    results = result_summaries[-1].strip("-")
-    results = eval("".join(results.splitlines()))
-
-    # Download logs and HTML reports from the server
-    for i, r in enumerate(results):
-        if "report" in r:
-            try:
-                rss_file_transfer.download(server_address,
-                                           server_file_transfer_port,
-                                           r["report"], test.debugdir)
-            except rss_file_transfer.FileTransferNotFoundError:
-                pass
-        if "logs" in r:
-            try:
-                rss_file_transfer.download(server_address,
-                                           server_file_transfer_port,
-                                           r["logs"], test.debugdir)
-            except rss_file_transfer.FileTransferNotFoundError:
-                pass
-            else:
-                try:
-                    # Create symlinks to test log dirs to make it easier
-                    # to access them (their original names are not human
-                    # readable)
-                    link_name = "logs_%s" % r["report"].split("\\")[-1]
-                    link_name = link_name.replace(" ", "_")
-                    link_name = link_name.replace("/", "_")
-                    os.symlink(r["logs"].split("\\")[-1],
-                               os.path.join(test.debugdir, link_name))
-                except (KeyError, OSError):
-                    pass
-
-    # Print result summary
-    logging.info("")
-    logging.info("Result summary:")
-    name_length = max(len(r.get("job", "")) for r in results)
-    fmt = "%%-6s %%-%ds %%-15s %%-8s %%-8s %%-8s %%-15s" % name_length
-    logging.info(fmt % ("ID", "Job", "Status", "Pass", "Fail", "NotRun",
-                        "NotApplicable"))
-    logging.info(fmt % ("--", "---", "------", "----", "----", "------",
-                        "-------------"))
-    for r in results:
-        logging.info(fmt % (r.get("id"), r.get("job"), r.get("status"),
-                            r.get("pass"), r.get("fail"), r.get("notrun"),
-                            r.get("notapplicable")))
-    logging.info("(see logs and HTML reports in %s)" % test.debugdir)
-
-    # Kill the VM and fail if the automation program did not terminate on time
-    if not m:
-        vm.destroy()
-        raise error.TestFail("The automation program did not terminate "
-                             "on time")
-
-    # Fail if there are failed or incomplete jobs (kill the VM if there are
-    # incomplete jobs)
-    failed_jobs = [r.get("job") for r in results
-                   if r.get("status", "").lower() == "investigate"]
-    running_jobs = [r.get("job") for r in results
-                    if r.get("status", "").lower() == "inprogress"]
-    errors = []
-    if failed_jobs:
-        errors += ["Jobs failed: %s." % failed_jobs]
-    if running_jobs:
-        vm.destroy()
-        errors += ["Jobs did not complete on time: %s." % running_jobs]
-    if errors:
-        raise error.TestFail(" ".join(errors))
diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample
index 167e86d..cb727c4 100644
--- a/client/tests/kvm/tests_base.cfg.sample
+++ b/client/tests/kvm/tests_base.cfg.sample
@@ -90,6 +90,7 @@
         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
@@ -204,66 +205,34 @@
 
     - timedrift:    install setup unattended_install.cdrom
         variants:
-            - ntp:
-                variants:
-                    - with_load:
-                        type = timedrift
-                        # Pin the VM and host load to CPU #0
-                        cpu_mask = 0x1
-                        # Set the load and rest durations
-                        load_duration = 20
-                        rest_duration = 20
-                        # Fail if the drift after load is higher than 50%
-                        drift_threshold = 50
-                        # Fail if the drift after the rest period is higher than 10%
-                        drift_threshold_after_rest = 10
-                        # For now, make sure this test is executed alone
-                        used_cpus = 100
-                    - with_migration:
-                        type = timedrift_with_migration
-                        migration_iterations = 3
-                        drift_threshold = 10
-                        drift_threshold_single = 3
-                    - with_reboot:
-                        type = timedrift_with_reboot
-                        reboot_iterations = 1
-                        drift_threshold = 10
-                        drift_threshold_single = 3
-                    - with_stop:
-                        type = timedrift_with_stop
-                        stop_interations = 1
-                        drift_threshold = 10
-                        drift_threshold_single = 3
-            - date:
-                variants:
-                    - with_load:
-                        type = timedrift
-                        # Pin the VM and host load to CPU #0
-                        cpu_mask = 0x1
-                        # Set the load and rest durations
-                        load_duration = 20
-                        rest_duration = 20
-                        # Fail if the drift after load is higher than 50%
-                        drift_threshold = 50
-                        # Fail if the drift after the rest period is higher than 10%
-                        drift_threshold_after_rest = 10
-                        # For now, make sure this test is executed alone
-                        used_cpus = 100
-                    - with_migration:
-                        type = timedrift_with_migration
-                        migration_iterations = 3
-                        drift_threshold = 10
-                        drift_threshold_single = 3
-                    - with_reboot:
-                        type = timedrift_with_reboot
-                        reboot_iterations = 1
-                        drift_threshold = 10
-                        drift_threshold_single = 3
-                    - with_stop:
-                        type = timedrift_with_stop
-                        stop_interations = 1
-                        drift_threshold = 10
-                        drift_threshold_single = 3
+            - with_load:
+                type = timedrift
+                # Pin the VM and host load to CPU #0
+                cpu_mask = 0x1
+                # Set the load and rest durations
+                load_duration = 20
+                rest_duration = 20
+                # Fail if the drift after load is higher than 50%
+                drift_threshold = 50
+                # Fail if the drift after the rest period is higher than 10%
+                drift_threshold_after_rest = 10
+                # For now, make sure this test is executed alone
+                used_cpus = 100
+            - with_migration:
+                type = timedrift_with_migration
+                migration_iterations = 3
+                drift_threshold = 10
+                drift_threshold_single = 3
+            - with_reboot:
+                type = timedrift_with_reboot
+                reboot_iterations = 1
+                drift_threshold = 10
+                drift_threshold_single = 3
+            - with_stop:
+                type = timedrift_with_stop
+                stop_interations = 1
+                drift_threshold = 10
+                drift_threshold_single = 3
 
     - balloon_check:  install setup unattended_install.cdrom
         type = balloon_check
@@ -317,90 +286,6 @@
         iozone_cmd = "D:\IOzone\iozone.exe -a"
         iozone_timeout = 3600
 
-    - @whql:         install setup unattended_install.cdrom
-        nic_mode = tap
-        # Replace this with the address of an installed DTM server
-        server_address = 10.20.30.40
-        # The server should run rss.exe like a regular Windows VM, preferably
-        # with administrator privileges (or at least with permission to write
-        # to the DTM studio directory)
-        server_shell_port = 10022
-        server_file_transfer_port = 10023
-        server_studio_path = %programfiles%\Microsoft Driver Test Manager\Studio
-        wtt_services = wttsvc
-        variants:
-            - whql_client_install:
-                type = whql_client_install
-                dsso_delete_machine_binary = deps/whql_delete_machine_15.exe
-                # The username and password are required for accessing the DTM client
-                # installer binary shared by the server
-                server_username = administrator
-                server_password = 1q2w3eP
-                # This path refers to a shared directory on the server
-                # (the final cmd will be something like \\servername\DTMInstall\...)
-                install_cmd = \DTMInstall\Client\Setup.exe /passive
-                install_timeout = 3600
-            - whql_submission:    whql_client_install
-                type = whql_submission
-                extra_params += " -snapshot"
-                dsso_test_binary = deps/whql_submission_15.exe
-                test_timeout = 3600
-                device_data = cat0 cat1 cat2 cat3 logoarch logoos whqlos whqlqual prog desc filter virt
-                descriptors = desc1 desc2 desc3
-                # DeviceData names
-                dd_name_cat0     = Category
-                dd_name_cat1     = Category
-                dd_name_cat2     = Category
-                dd_name_cat3     = Category
-                dd_name_logoarch = LogoProcessorArchitecture
-                dd_name_logoos   = LogoOperatingSystem
-                dd_name_whqlos   = WhqlOs
-                dd_name_whqlqual = WhqlQualification
-                dd_name_prog     = LogoProgramId
-                dd_name_desc     = LogoProgramDescription
-                dd_name_filter   = WDKFilterAttribute
-                dd_name_virt     = ParaVirtualizationDriver
-                # Common DeviceData data
-                dd_data_filter   = FilterIfNoInf
-                dd_data_virt     = True
-                variants:
-                    - keyboard:
-                        # test_device is a regular expression that should match a device's
-                        # name as it appears in device manager.  The first device that matches
-                        # is used.
-                        test_device = keyboard
-                        # Set timeout to 10 hours
-                        test_timeout = 36000
-                        dd_data_cat0 = Input\Keyboard
-                        dd_data_cat1 = Device Fundamentals
-                        dd_data_cat2 = System Fundamentals\Dynamic Partitioning
-                        dd_data_prog = InputKbd
-                        dd_data_desc = Input > Keyboard
-                    - hdd:
-                        test_device = qemu harddisk
-                        device_data += " ex0 ex1 ex2 ex3"
-                        dd_data_cat0 = Storage\Device Class\Disk\Disk
-                        dd_data_cat1 = Storage\Device Class\Disk\Fixed
-                        dd_data_cat2 = Storage\Device Class\Disk\Bus\ATA
-                        dd_data_cat3 = Device Fundamentals
-                        dd_data_prog = StorHDD
-                        dd_data_desc = Storage > Hard Disk Drive (HDD)
-                        dd_name_ex0 = Storage_bus_type
-                        dd_data_ex0 = ATA/ATAPI
-                        dd_name_ex1 = Hybrid_HDD_Support
-                        dd_data_ex1 = 0
-                        dd_name_ex2 = Non_Rotating_Media
-                        dd_data_ex2 = 0
-                        dd_name_ex3 = Secure_Storage
-                        dd_data_ex3 = 0
-                        variants:
-                            - full:
-                                # Yes, 100 hours, this is not a mistake
-                                test_timeout = 360000
-                            - syscache_test:
-                                job_filter = syscache test
-                                test_timeout = 7200
-
     - guest_s4:     install setup unattended_install.cdrom
         type = guest_s4
         check_s4_support_cmd = grep -q disk /sys/power/state
@@ -493,24 +378,9 @@
                 ksm_mode = "serial"
             - ksm_parallel:
                 ksm_mode = "parallel"
-
     - iofuzz:
         type = iofuzz
 
-    - virtio_console:
-        vms = ''
-        type = virtio_console
-        # smoke params - $console_type:data_string
-        # FIXME: test_smoke doesn't work with console yet (virtio_console bug)
-        # "serialport;console:Custom data"
-        virtio_console_smoke = "serialport"
-        # loopback params - '$source_console_type@buffer_length:$destination_console_type1@buffer_length:...:$loopback_buffer_length;...'
-        virtio_console_loopback = "serialport:serialport;serialport@1024:serialport@32:console@1024:console@8:16"
-        # perf params - $console_type@buffer_length:$test_duration
-        # FIXME: test_perf doesn't work with console yet (virtio_console bug)
-        # virtio_console_perf = "serialport;serialport@1000000:120;console@1024:60"
-        virtio_console_perf = "serialport;serialport@1000000:120"
-
     # This unit test module is for older branches of KVM that use the
     # kvmctl test harness (such as the code shipped with RHEL 5.x)
     - unit_test_kvmctl:
@@ -620,7 +490,7 @@
         nic_model = rtl8139
     - e1000:
         nic_model = e1000
-    - virtio_net:
+    - virtio:
         nic_model = virtio
 
 
@@ -628,7 +498,7 @@
 variants:
     # Linux section
     - @Linux:
-        no autoit iozone_windows whql
+        no autoit iozone_windows
         shutdown_command = shutdown -h now
         reboot_command = shutdown -r now
         status_test_command = echo $?
@@ -641,12 +511,6 @@
         mem_chk_cmd = dmidecode -t 17 | awk -F: '/Size/ {print $2}'
         mem_chk_cur_cmd = grep MemTotal /proc/meminfo
         cpu_chk_cmd = grep -c processor /proc/cpuinfo
-        unattended_install.cdrom:
-            # If you want to use floppy to hold kickstarts,
-            # comment the 3 lines below
-            cdroms += " unattended"
-            drive_index_unattended = 1
-            drive_index_cd1 = 2
         timedrift:
             extra_params += " -no-kvm-pit-reinjection"
             time_command = date +'TIME: %a %m/%d/%Y %H:%M:%S.%N'
@@ -657,14 +521,6 @@
             guest_load_stop_command = "killall -9 dd"
             host_load_command = "bzip2 -c --best /dev/urandom > /dev/null"
             host_load_instances = 8
-            ntp:
-                time_command = "ntpdate -d -q ns1.nay.redhat.com"
-                time_filter_re = "originate timestamp:.*, (.\w+\s+\d+\s+\d+\s+\d+:\d+:\d+)\.(.\d+)"
-                time_format = "%b %d %Y %H:%M:%S"
-            date:
-                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"
 
         variants:
             - Fedora:
@@ -677,10 +533,7 @@
                     tftp = "images/tftpboot"
                     bootp = "/pxelinux.0"
                     extra_params += " -boot cn"
-                    # You have to use ks=floppy if you want to use floppies to
-                    # hold your kickstart file
-                    #kernel_args = "ks=floppy nicdelay=60 console=ttyS0,115200 console=tty0"
-                    kernel_args = "ks=cdrom nicdelay=60 console=ttyS0,115200 console=tty0"
+                    kernel_args = "ks=floppy nicdelay=60 console=ttyS0,115200 console=tty0"
 
                 variants:
                     - 8.32:
@@ -694,8 +547,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/Fedora-8.ks
                             tftp = images/f8-32/tftpboot
-                            #floppy = images/f8-32/ks.vfd
-                            cdrom_unattended = images/f8-32/ks.iso
+                            floppy = images/f8-32/floppy.img
 
                     - 8.64:
                         no setup
@@ -708,8 +560,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/Fedora-8.ks
                             tftp = images/f8-64/tftpboot
-                            #floppy = images/f8-64/ks.vfd
-                            cdrom_unattended = images/f8-64/ks.iso
+                            floppy = images/f8-64/floppy.img
 
                     - 9.32:
                         image_name = f9-32
@@ -721,8 +572,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/Fedora-9.ks
                             tftp = images/f9-32/tftpboot
-                            #floppy = images/f9-32/ks.vfd
-                            cdrom_unattended = images/f9-32/ks.iso
+                            floppy = images/f9-32/floppy.img
 
                     - 9.64:
                         image_name = f9-64
@@ -734,8 +584,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/Fedora-9.ks
                             tftp = images/f9-64/tftpboot
-                            #floppy = images/f9-64/ks.vfd
-                            cdrom_unattended = images/f9-64/ks.iso
+                            floppy = images/f9-64/floppy.img
 
                     - 10.32:
                         image_name = f10-32
@@ -745,8 +594,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/Fedora-10.ks
                             tftp = images/f10-32/tftpboot
-                            #floppy = images/f10-32/ks.vfd
-                            cdrom_unattended = images/f10-32/ks.iso
+                            floppy = images/f10-32/floppy.img
 
                     - 10.64:
                         image_name = f10-64
@@ -756,8 +604,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/Fedora-10.ks
                             tftp = images/f10-64/tftpboot
-                            #floppy = images/f10-64/ks.vfd
-                            cdrom_unattended = images/f10-64/ks.iso
+                            floppy = images/f10-64/floppy.img
 
                     - 11.32:
                         image_name = f11-32
@@ -769,8 +616,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/Fedora-11.ks
                             tftp = images/f11-32/tftpboot
-                            #floppy = images/f11-32/ks.vfd
-                            cdrom_unattended = images/f11-32/ks.iso
+                            floppy = images/f11-32/floppy.img
 
                     - 11.64:
                         image_name = f11-64
@@ -780,8 +626,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/Fedora-11.ks
                             tftp = images/f11-64/tftpboot
-                            #floppy = images/f11-64/ks.vfd
-                            cdrom_unattended = images/f11-64/ks.iso
+                            floppy = images/f11-64/floppy.img
 
                     - 12.32:
                         image_name = f12-32
@@ -791,8 +636,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/Fedora-12.ks
                             tftp = images/f12-32/tftpboot
-                            #floppy = images/f12-32/ks.vfd
-                            cdrom_unattended = images/f12-32/ks.iso
+                            floppy = images/f12-32/floppy.img
 
                     - 12.64:
                         image_name = f12-64
@@ -802,30 +646,27 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/Fedora-12.ks
                             tftp = images/f12-64/tftpboot
-                            #floppy = images/f12-64/ks.vfd
-                            cdrom_unattended = images/f12-64/ks.iso
+                            floppy = images/f12-64/floppy.img
 
                     - 13.32:
                         image_name = f13-32
                         cdrom_cd1 = linux/Fedora-13-i386-DVD.iso
                         md5sum = 212fec517c2629b4b5eaf3662ac13136
                         md5sum_1m = 4e1578a6ed5a6e7cd03b8fb074030746
-                        unattended_install.cdrom:
+                        unattended_install:
                             unattended_file = unattended/Fedora-13.ks
                             tftp = images/f13-32/tftpboot
-                            #floppy = images/f13-32/ks.vfd
-                            cdrom_unattended = images/f13-32/ks.iso
+                            floppy = images/f13-32/floppy.img
 
                     - 13.64:
                         image_name = f13-64
                         cdrom_cd1 = linux/Fedora-13-x86_64-DVD.iso
                         md5sum = 6fbae6379cf27f36e1f2c7827ba7dc35
                         md5sum_1m = 68821b9de4d3b5975d6634334e7f47a6
-                        unattended_install.cdrom:
+                        unattended_install:
                             unattended_file = unattended/Fedora-13.ks
                             tftp = images/f13-64/tftpboot
-                            #floppy = images/f13-64/ks.vfd
-                            cdrom_unattended = images/f13-64/ks.iso
+                            floppy = images/f13-64/floppy.img
 
 
             - DSL-4.2.5:
@@ -854,10 +695,7 @@
                     tftp = "images/tftpboot"
                     bootp = "/pxelinux.0"
                     extra_params += " -boot cn"
-                    # You have to use autoyast=floppy if you want to use floppies to
-                    # hold your autoyast file
-                    #kernel_args = "autoyast=floppy console=ttyS0,115200 console=tty0"
-                    kernel_args = "autoyast=cdrom console=ttyS0,115200 console=tty0"
+                    kernel_args = "autoyast=floppy console=ttyS0,115200 console=tty0"
                     post_install_delay = 10
 
                 variants:
@@ -882,8 +720,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/OpenSUSE-11.xml
                             tftp = images/opensuse-11-0-64/tftpboot
-                            #floppy = images/opensuse-11-0-64/autoyast.vfd
-                            cdrom_unattended = images/opensuse-11-0-64/autoyast.iso
+                            floppy = images/opensuse-11-0-64/floppy.img
                             pxe_dir = boot/x86_64/loader
 
                     - 11.1.32:
@@ -896,8 +733,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/OpenSUSE-11.xml
                             tftp = images/opensuse-11-1-32/tftpboot
-                            #floppy = images/opensuse-11-1-32/autoyast.vfd
-                            cdrom_unattended = images/opensuse-11-1-32/autoyast.iso
+                            floppy = images/opensuse-11-1-32/floppy.img
                             pxe_dir = boot/i386/loader
 
                     - 11.1.64:
@@ -910,8 +746,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/OpenSUSE-11.xml
                             tftp = images/opensuse-11-1-64/tftpboot
-                            #floppy = images/opensuse-11-1-64/autoyast.vfd
-                            cdrom_unattended = images/opensuse-11-1-64/autoyast.iso
+                            floppy = images/opensuse-11-1-64/floppy.img
                             pxe_dir = boot/x86_64/loader
 
                     - 11.2.32:
@@ -922,8 +757,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/OpenSUSE-11.xml
                             tftp = images/opensuse-11-2-32/tftpboot
-                            #floppy = images/opensuse-11-2-32/autoyast.vfd
-                            cdrom_unattended = images/opensuse-11-2-32/autoyast.iso
+                            floppy = images/opensuse-11-2-32/floppy.img
                             pxe_dir = boot/i386/loader
 
                     - 11.2.64:
@@ -934,8 +768,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/OpenSUSE-11.xml
                             tftp = images/opensuse-11-2-64/tftpboot
-                            #floppy = images/opensuse11-2-64/autoyast.vfd
-                            cdrom_unattended = images/opensuse11-2-64/autoyast.iso
+                            floppy = images/opensuse11-2-64/floppy.img
                             pxe_dir = boot/x86_64/loader
 
                     - 11.3.32:
@@ -946,8 +779,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/OpenSUSE-11.xml
                             tftp = images/opensuse-11-3-32/tftpboot
-                            #floppy = images/opensuse-11-3-32/autoyast.vfd
-                            cdrom_unattended = images/opensuse-11-3-32/autoyast.iso
+                            floppy = images/opensuse-11-3-32/floppy.img
                             pxe_dir = boot/i386/loader
 
                     - 11.3.64:
@@ -958,8 +790,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/OpenSUSE-11.xml
                             tftp = images/opensuse-11-3-64/tftpboot
-                            #floppy = images/opensuse-11-3-64/autoyast.vfd
-                            cdrom_unattended = images/opensuse-11-3-64/autoyast.iso
+                            floppy = images/opensuse-11-3-64/floppy.img
                             pxe_dir = boot/x86_64/loader
 
             - SLES:
@@ -969,10 +800,7 @@
                     pxe_initrd = "initrd"
                     bootp = "/pxelinux.0"
                     extra_params += " -boot cn"
-                    # You have to use autoyast=floppy if you want to use floppies to
-                    # hold your autoyast file
-                    #kernel_args = "autoyast=floppy console=ttyS0,115200 console=tty0"
-                    kernel_args = "autoyast=cdrom console=ttyS0,115200 console=tty0"
+                    kernel_args = "autoyast=floppy console=ttyS0,115200 console=tty0"
                     post_install_delay = 10
 
                 variants:
@@ -983,10 +811,9 @@
                         md5sum_1m = 1f19d4eff5bcead2a3e5b8b4212b6796
                         unattended_install.cdrom:
                             unattended_file = unattended/SLES-11.xml
-                            tftp = images/sles-11-0-32/tftpboot
-                            #floppy = images/sles-11-0-32/autoyast.vfd
-                            cdrom_unattended = images/sles-11-0-32/autoyast.iso
-                            pxe_dir = boot/i386/loader
+                            tftp = "images/sles-11-0-32/tftpboot"
+                            floppy = "images/sles-11-0-32/floppy.img"
+                            pxe_dir = "boot/i386/loader"
 
                     - 11.0.64:
                         image_name = sles11-64
@@ -995,10 +822,9 @@
                         md5sum_1m = 00000951cab7c32e332362fc424c1054
                         unattended_install.cdrom:
                             unattended_file = unattended/SLES-11.xml
-                            tftp = images/sles-11-0-64/tftpboot
-                            #floppy = images/sles-11-0-64/autoyast.vfd
-                            cdrom_unattended = images/sles-11-0-64/autoyast.iso
-                            pxe_dir = boot/x86_64/loader
+                            tftp = "images/sles-11-0-64/tftpboot"
+                            floppy = "images/sles-11-0-64/floppy.img"
+                            pxe_dir = "boot/x86_64/loader"
 
                     - 11.1.32:
                         image_name = sles11sp1-32
@@ -1007,10 +833,9 @@
                         md5sum_1m = a626a3d50813410e3ac42794e05773bb
                         unattended_install:
                             unattended_file = unattended/SLES-11.xml
-                            tftp = images/sles-11-1-32/tftpboot
-                            #floppy = images/sles-11-1-32/autoyast.vfd
-                            cdrom_unattended = images/sles-11-1-32/autoyast.iso
-                            pxe_dir = boot/i386/loader
+                            tftp = "images/sles-11-1-32/tftpboot"
+                            floppy = "images/sles-11-1-32/floppy.img"
+                            pxe_dir = "boot/i386/loader"
 
                     - 11.1.64:
                         image_name = sles11sp1-64
@@ -1019,10 +844,9 @@
                         md5sum_1m = f7f67b5da46923a9f01da8a2b6909654
                         unattended_install:
                             unattended_file = unattended/SLES-11.xml
-                            tftp = images/sles-11-1-64/tftpboot
-                            #floppy = images/sles-11-1-64/autoyast.vfd
-                            cdrom_unattended = images/sles-11-1-64/autoyast.iso
-                            pxe_dir = boot/x86_64/loader
+                            tftp = "images/sles-11-1-64/tftpboot"
+                            floppy = "images/sles-11-1-64/floppy.img"
+                            pxe_dir = "boot/x86_64/loader"
 
             - @Ubuntu:
                 shell_prompt = "^root@.*[\#\$]\s*$"
@@ -1069,10 +893,7 @@
                     tftp = "images/tftpboot"
                     bootp = "/pxelinux.0"
                     extra_params += " -boot cn"
-                    # You have to use ks=floppy if you want to use floppies to
-                    # hold your kickstart file
-                    #kernel_args = "ks=floppy nicdelay=60 console=ttyS0,115200 console=tty0"
-                    kernel_args = "ks=cdrom nicdelay=60 console=ttyS0,115200 console=tty0"
+                    kernel_args = "ks=floppy nicdelay=60 console=ttyS0,115200 console=tty0"
 
                 variants:
                     - 3.9.i386:
@@ -1087,8 +908,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/RHEL-3-series.ks
                             tftp = images/rhel39-32/tftpboot
-                            #floppy = images/rhel39-32/ks.vfd
-                            cdrom_unattended = images/rhel39-32/ks.iso
+                            floppy = images/rhel39-32/floppy.img
 
                     - 3.9.x86_64:
                         no setup autotest linux_s3 guest_s4 shutdown
@@ -1102,8 +922,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/RHEL-3-series.ks
                             tftp = images/rhel39-64/tftpboot
-                            #floppy = images/rhel39-64/ks.vfd
-                            cdrom_unattended = images/rhel39-64/ks.iso
+                            floppy = images/rhel39-64/floppy.img
 
                     - 4.7.i386:
                         no setup autotest
@@ -1116,8 +935,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/RHEL-4-series.ks
                             tftp = images/rhel47-32/tftpboot
-                            #floppy = images/rhel47-32/ks.vfd
-                            cdrom_unattended = images/rhel47-32/ks.iso
+                            floppy = images/rhel47-32/floppy.img
 
                     - 4.7.x86_64:
                         no setup autotest
@@ -1130,8 +948,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/RHEL-4-series.ks
                             tftp = images/rhel47-64/tftpboot
-                            #floppy = images/rhel47-64/ks.vfd
-                            cdrom_unattended = images/rhel47-64/ks.iso
+                            floppy = images/rhel47-64/floppy.img
 
                     - 4.8.i386:
                         no setup autotest
@@ -1142,8 +959,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/RHEL-4-series.ks
                             tftp = images/rhel48-32/tftpboot
-                            #floppy = images/rhel48-32/ks.vfd
-                            cdrom_unattended = images/rhel48-32/ks.iso
+                            floppy = images/rhel48-32/floppy.img
 
                     - 4.8.x86_64:
                         no setup autotest
@@ -1154,8 +970,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/RHEL-4-series.ks
                             tftp = images/rhel48-64/tftpboot
-                            #floppy = images/rhel48-64/ks.vfd
-                            cdrom_unattended = images/rhel48-64/ks.iso
+                            floppy = images/rhel48-64/floppy.img
 
                     - 5.3.i386:
                         no setup
@@ -1168,8 +983,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/RHEL-5-series.ks
                             tftp = images/rhel53-32/tftpboot
-                            #floppy = images/rhel53-32/ks.vfd
-                            cdrom_unattended = images/rhel53-32/ks.iso
+                            floppy = images/rhel53-32/floppy.img
 
                     - 5.3.x86_64:
                         no setup
@@ -1182,8 +996,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/RHEL-5-series.ks
                             tftp = images/rhel53-64/tftpboot
-                            #floppy = images/rhel53-64/ks.vfd
-                            cdrom_unattended = images/rhel53-64/ks.iso
+                            floppy = images/rhel53-64/floppy.img
 
                     - 5.4.i386:
                         no setup
@@ -1194,8 +1007,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/RHEL-5-series.ks
                             tftp = images/rhel54-32/tftpboot
-                            #floppy = images/rhel54-32/ks.vfd
-                            cdrom_unattended = images/rhel54-32/ks.iso
+                            floppy = images/rhel54-32/floppy.img
 
                     - 5.4.x86_64:
                         no setup
@@ -1206,8 +1018,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/RHEL-5-series.ks
                             tftp = images/rhel54-64/tftpboot
-                            #floppy = images/rhel54-64/ks.vfd
-                            cdrom_unattended = images/rhel54-64/ks.iso
+                            floppy = images/rhel54-64/floppy.img
 
                     - 5.5.i386:
                         no setup
@@ -1218,8 +1029,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/RHEL-5-series.ks
                             tftp = images/rhel55-32/tftpboot
-                            #floppy = images/rhel55-32/ks.vfd
-                            cdrom_unattended = images/rhel55-32/ks.iso
+                            floppy = images/rhel55-32/floppy.img
 
                     - 5.5.x86_64:
                         no setup
@@ -1230,8 +1040,7 @@
                         unattended_install.cdrom:
                             unattended_file = unattended/RHEL-5-series.ks
                             tftp = images/rhel55-64/tftpboot
-                            #floppy = images/rhel55-64/ks.vfd
-                            cdrom_unattended = images/rhel55-64/ks.iso
+                            floppy = images/rhel55-64/floppy.img
 
 
     # Windows section
@@ -1262,16 +1071,9 @@
         unattended_install.cdrom:
             timeout = 7200
             finish_program = deps/finish.exe
-            cdroms += " winutils"
-            cdrom_winutils = windows/winutils.iso
-            drive_index_winutils = 2
-            # Turn install_virtio = yes if you want to install the
-            # Windows virtio drivers. It might be a lot of setup though :)
-            #install_virtio = no
-            #cdroms += " virtio"
-            #cdrom_virtio = windows/virtio-win.iso
-            #drive_index_virtio = 3
-            #virtio_floppy = /usr/share/virtio-win/virtio-drivers.vfd
+            cdroms += " winutilscd"
+            cdrom_winutilscd = windows/winutils.iso
+            drive_index_winutilscd = 2
         migrate:
             migration_test_command = ver && vol
             migration_bg_command = start ping -t localhost
@@ -1296,15 +1098,6 @@
             # Alternative host load:
             #host_load_command = "dd if=/dev/urandom of=/dev/null"
             host_load_instances = 8
-            ntp:
-                time_command = "w32tm /stripchart /samples:1 /computer:ns1.nay.redhat.com"
-                time_filter_re = "\d+/\d+/\d+\s\d+:\d+:\d+ [AP]M"
-                time_format = "%m/%d/%Y %H:%M:%S"
-            date:
-                time_command = "echo TIME: %date% %time%"
-                time_filter_re = "(?<=TIME: \w\w\w ).{19}(?=\.\d\d)"
-                time_format = "%m/%d/%Y %H:%M:%S"
-
         guest_s4:
             check_s4_support_cmd = powercfg /hibernate on
             test_s4_cmd = start ping -t localhost
@@ -1330,7 +1123,7 @@
 
         variants:
             - Win2000:
-                no reboot whql
+                no reboot
                 image_name = win2000-32
                 kill_vm_gracefully = no
                 install:
@@ -1346,7 +1139,7 @@
                     md5sum = dda6039f3a9173f0f6bfae40f5efdfea
                     md5sum_1m = dd28fba196d366d56fe774bd93df5527
                     unattended_file = unattended/win2000-32.sif
-                    floppy = images/win2000-32/answer.vfd
+                    floppy = images/win2000-32/floppy.img
 
             - WinXP:
                 image_name = winXP
@@ -1366,20 +1159,7 @@
                             md5sum = 743450644b1d9fe97b3cf379e22dceb0
                             md5sum_1m = b473bf75af2d1269fec8958cf0202bfd
                             unattended_file = unattended/winxp32.sif
-                            floppy = images/winXP-32/answer.vfd
-                            # Uncomment virtio_network_installer_path line if
-                            # you have an msi installer, also make sure the
-                            # paths are properly set in your virtio driver iso.
-                            virtio_oemsetup_id = WXP32
-                            virtio_network_path = 'F:\NetKVM\xp\x86'
-                            #virtio_network_installer_path = 'F:\RHEV-Network32.msi'
-                        whql_submission:
-                            desc_path_desc1 = $\WDK\Logo Type\Device Logo\Windows XP
-                            desc_path_desc2 = $\WDK\Logo Type\Systems Logo\Windows XP
-                            dd_data_logoarch = X86
-                            dd_data_logoos = Windows XP
-                            dd_data_whqlos = Windows XP
-                            dd_data_whqlqual = Basic
+                            floppy = images/winXP-32/floppy.img
 
                     - 64:
                         image_name += -64
@@ -1396,20 +1176,7 @@
                             md5sum = 8d3f007ec9c2060cec8a50ee7d7dc512
                             md5sum_1m = e812363ff427effc512b7801ee70e513
                             unattended_file = unattended/winxp64.sif
-                            floppy = images/winXP-64/answer.vfd
-                            # Uncomment virtio_network_installer_path line if
-                            # you have an msi installer, also make sure the
-                            # paths are properly set in your virtio driver iso.
-                            virtio_oemsetup_id = WNET64
-                            virtio_network_path = 'F:\NetKVM\xp\amd64'
-                            #virtio_network_installer_path = 'F:\RHEV-Network64.msi'
-                        whql_submission:
-                            desc_path_desc1 = $\WDK\Logo Type\Device Logo\Windows XP
-                            desc_path_desc2 = $\WDK\Logo Type\Systems Logo\Windows XP
-                            dd_data_logoarch = AMD64
-                            dd_data_logoos = Windows XP 64-Bit Edition Version 2003
-                            dd_data_whqlos = Windows XP x64
-                            dd_data_whqlqual = Basic
+                            floppy = images/winXP-64/floppy.img
 
             - Win2003:
                 image_name = win2003
@@ -1431,19 +1198,7 @@
                             md5sum = 03e921e9b4214773c21a39f5c3f42ef7
                             md5sum_1m = 37c2fdec15ac4ec16aa10fdfdb338aa3
                             unattended_file = unattended/win2003-32.sif
-                            floppy = images/win2003-32/answer.vfd
-                            # Uncomment virtio_network_installer_path line if
-                            # you have an msi installer, also make sure the
-                            # paths are properly set in your virtio driver iso.
-                            virtio_oemsetup_id = WNET32
-                            virtio_network_path = 'F:\NetKVM\2k3\x86'
-                            #virtio_network_installer_path = 'F:\RHEV-Network32.msi'
-                        whql_submission:
-                            desc_path_desc1 = $\WDK\Logo Type\Device Logo\Windows Server 2003
-                            dd_data_logoarch = X86
-                            dd_data_logoos = Windows Server 2003
-                            dd_data_whqlos = Windows Server 2003
-                            dd_data_whqlqual = Basic
+                            floppy = images/win2003-32/floppy.img
 
                     - 64:
                         image_name += -64
@@ -1460,240 +1215,145 @@
                             md5sum = 5703f87c9fd77d28c05ffadd3354dbbd
                             md5sum_1m = 439393c384116aa09e08a0ad047dcea8
                             unattended_file = unattended/win2003-64.sif
-                            floppy = images/win2003-64/answer.vfd
-                            # Uncomment virtio_network_installer_path line if
-                            # you have an msi installer, also make sure the
-                            # paths are properly set in your virtio driver iso.
-                            virtio_oemsetup_id = WNET64
-                            virtio_network_path = 'F:\NetKVM\2k3\amd64'
-                            #virtio_network_installer_path = 'F:\RHEV-Network64.msi'
-
-                        whql_submission:
-                            desc_path_desc1 = $\WDK\Logo Type\Device Logo\Windows Server 2003
-                            dd_data_logoarch = AMD64
-                            dd_data_logoos = Windows Server 2003
-                            dd_data_whqlos = Windows Server 2003 x64
-                            dd_data_whqlqual = Basic
+                            floppy = images/win2003-64/floppy.img
 
             - WinVista:
                 image_name = winvista
                 image_size = 20G
-                whql_submission:
-                    desc_path_desc1 = $\WDK\Logo Type\Device Logo\Vista Client\Device Premium
-                    desc_path_desc2 = $\WDK\Logo Type\Device Logo\Vista Client\Device Standard
-                    desc_path_desc3 = $\WDK\Logo Type\Device Logo\Vista Client
 
                 variants:
-                    - 32:
-                        whql_submission:
-                            dd_data_logoarch = X86
-                            dd_data_logoos = Windows Vista
-                            dd_data_whqlos = Windows Vista Client
-                            dd_data_whqlqual = Premium
-                        variants:
-                            - sp1:
-                                image_name += -sp1-32
-                                install:
-                                    cdrom_cd1 = windows/WindowsVista-32.iso
-                                    md5sum = 1008f323d5170c8e614e52ccb85c0491
-                                    md5sum_1m = c724e9695da483bc0fd59e426eaefc72
-                                    steps = Win-Vista-32.steps
-                                setup:
-                                    steps = WinVista-32-rss.steps
-                                unattended_install.cdrom:
-                                    cdrom_cd1 = windows/WindowsVista-32.iso
-                                    md5sum = 1008f323d5170c8e614e52ccb85c0491
-                                    md5sum_1m = c724e9695da483bc0fd59e426eaefc72
-                                    unattended_file = unattended/winvista-32-autounattend.xml
-                                    floppy = images/winvista-sp1-32/answer.vfd
-                                    # Uncomment virtio_network_installer_path line if
-                                    # you have an msi installer, also make sure the
-                                    # paths are properly set in your virtio driver iso.
-                                    virtio_storage_path = 'F:\viostor\w7\x86'
-                                    virtio_network_path = 'F:\NetKVM\w7\x86'
-                                    #virtio_network_installer_path = 'F:\RHEV-Network32.msi'
+                    - 32sp1:
+                        image_name += sp1-32
+                        install:
+                            cdrom_cd1 = windows/WindowsVista-32.iso
+                            md5sum = 1008f323d5170c8e614e52ccb85c0491
+                            md5sum_1m = c724e9695da483bc0fd59e426eaefc72
+                            steps = Win-Vista-32.steps
+                        setup:
+                            steps = WinVista-32-rss.steps
+                        unattended_install.cdrom:
+                            cdrom_cd1 = windows/WindowsVista-32.iso
+                            md5sum = 1008f323d5170c8e614e52ccb85c0491
+                            md5sum_1m = c724e9695da483bc0fd59e426eaefc72
+                            unattended_file = unattended/winvista-32-autounattend.xml
+                            floppy = images/winvista-sp1-32/floppy.img
 
-                            - sp2:
-                                image_name += -sp2-32
-                                unattended_install.cdrom:
-                                    cdrom_cd1 = windows/en_windows_vista_with_sp2_x86_dvd_342266.iso
-                                    md5sum = 19ca90a425667812977bab6f4ce24175
-                                    md5sum_1m = 89c15020e0e6125be19acf7a2e5dc614
-                                    sha1sum = 25ad9a776503e6a583bec07879dbcc5dfd20cd6e
-                                    sha1sum_1m = a2afa4cffdc1c362dbf9e62942337f4f875a22cf
-                                    unattended_file = unattended/winvista-32-autounattend.xml
-                                    floppy = images/winvista-sp2-32/answer.vfd
-                                    # Uncomment virtio_network_installer_path line if
-                                    # you have an msi installer, also make sure the
-                                    # paths are properly set in your virtio driver iso.
-                                    virtio_storage_path = 'F:\viostor\w7\x86'
-                                    virtio_network_path = 'F:\NetKVM\w7\x86'
-                                    #virtio_network_installer_path = 'F:\RHEV-Network32.msi'
+                    - 64sp1:
+                        image_name += sp1-64
+                        install:
+                            cdrom_cd1 = windows/WindowsVista-64.iso
+                            md5sum = 11e2010d857fffc47813295e6be6d58d
+                            md5sum_1m = 0947bcd5390546139e25f25217d6f165
+                            steps = Win-Vista-64.steps
+                        setup:
+                            steps = WinVista-64-rss.steps
+                        unattended_install.cdrom:
+                            cdrom_cd1 = windows/WindowsVista-64.iso
+                            md5sum = 11e2010d857fffc47813295e6be6d58d
+                            md5sum_1m = 0947bcd5390546139e25f25217d6f165
+                            unattended_file = unattended/winvista-64-autounattend.xml
+                            floppy = images/winvista-sp1-64/floppy.img
 
-                    - 64:
-                        whql_submission:
-                            dd_data_logoarch = AMD64
-                            dd_data_logoos = Windows Vista
-                            dd_data_whqlos = Windows Vista Client x64
-                            dd_data_whqlqual = Premium
-                        variants:
-                            - sp1:
-                                image_name += -sp1-64
-                                install:
-                                    cdrom_cd1 = windows/WindowsVista-64.iso
-                                    md5sum = 11e2010d857fffc47813295e6be6d58d
-                                    md5sum_1m = 0947bcd5390546139e25f25217d6f165
-                                    steps = Win-Vista-64.steps
-                                setup:
-                                    steps = WinVista-64-rss.steps
-                                unattended_install.cdrom:
-                                    cdrom_cd1 = windows/WindowsVista-64.iso
-                                    md5sum = 11e2010d857fffc47813295e6be6d58d
-                                    md5sum_1m = 0947bcd5390546139e25f25217d6f165
-                                    unattended_file = unattended/winvista-64-autounattend.xml
-                                    floppy = images/winvista-sp1-64/answer.vfd
-                                    # Uncomment virtio_network_installer_path line if
-                                    # you have an msi installer, also make sure the
-                                    # paths are properly set in your virtio driver iso.
-                                    virtio_storage_path = 'F:\viostor\w7\amd64'
-                                    virtio_network_path = 'F:\NetKVM\w7\amd64'
-                                    #virtio_network_installer_path = 'F:\RHEV-Network64.msi'
-                            - sp2:
-                                image_name += -sp2-64
-                                unattended_install.cdrom:
-                                    cdrom_cd1 = windows/en_windows_vista_sp2_x64_dvd_342267.iso
-                                    md5sum = a1c024d7abaf34bac3368e88efbc2574
-                                    md5sum_1m = 3d84911a80f3df71d1026f7adedc2181
-                                    sha1sum = aaee3c04533899f9f8c4ae0c4250ef5fafbe29a3
-                                    sha1sum_1m = 1fd21bd3ce2a4de8856c7b8fe6fdf80260f6d1c7
-                                    unattended_file = unattended/winvista-64-autounattend.xml
-                                    floppy = images/winvista-sp2-64/answer.vfd
-                                    # Uncomment virtio_network_installer_path line if
-                                    # you have an msi installer, also make sure the
-                                    # paths are properly set in your virtio driver iso.
-                                    virtio_storage_path = 'F:\viostor\w7\amd64'
-                                    virtio_network_path = 'F:\NetKVM\w7\amd64'
-                                    #virtio_network_installer_path = 'F:\RHEV-Network64.msi'
+                    - 32sp2:
+                        image_name += sp2-32
+                        unattended_install.cdrom:
+                            cdrom_cd1 = windows/en_windows_vista_with_sp2_x86_dvd_342266.iso
+                            md5sum = 19ca90a425667812977bab6f4ce24175
+                            md5sum_1m = 89c15020e0e6125be19acf7a2e5dc614
+                            sha1sum = 25ad9a776503e6a583bec07879dbcc5dfd20cd6e
+                            sha1sum_1m = a2afa4cffdc1c362dbf9e62942337f4f875a22cf
+                            unattended_file = unattended/winvista-32-autounattend.xml
+                            floppy = images/winvista-sp2-32/floppy.img
+
+                    - 64sp2:
+                        image_name += sp2-64
+                        unattended_install.cdrom:
+                            cdrom_cd1 = windows/en_windows_vista_sp2_x64_dvd_342267.iso
+                            md5sum = a1c024d7abaf34bac3368e88efbc2574
+                            md5sum_1m = 3d84911a80f3df71d1026f7adedc2181
+                            sha1sum = aaee3c04533899f9f8c4ae0c4250ef5fafbe29a3
+                            sha1sum_1m = 1fd21bd3ce2a4de8856c7b8fe6fdf80260f6d1c7
+                            unattended_file = unattended/winvista-64-autounattend.xml
+                            floppy = images/winvista-sp2-64/floppy.img
 
             - Win2008:
-                no whql
                 image_name = win2008
                 image_size = 20G
 
                 variants:
-                    - 32:
-                        variants:
-                            - sp1:
-                                image_name += -sp1-32
-                                install:
-                                    cdrom_cd1 = windows/Windows2008-x86.iso
-                                    #en_windows_server_2008_datacenter_enterprise_standard_x86_dvd_X14-26710.iso
-                                    md5sum=0bfca49f0164de0a8eba236ced47007d
-                                    md5sum_1m=07d7f5006393f74dc76e6e2e943e2440
-                                    sha1sum = 6ca018ff96f1e9b2b310a36546b6fded99a421e6
-                                    steps = Win2008-32.steps
-                                setup:
-                                    steps = Win2008-32-rss.steps
-                                unattended_install.cdrom:
-                                    cdrom_cd1 = windows/Windows2008-x86.iso
-                                    md5sum=0bfca49f0164de0a8eba236ced47007d
-                                    md5sum_1m=07d7f5006393f74dc76e6e2e943e2440
-                                    unattended_file = unattended/win2008-32-autounattend.xml
-                                    floppy = images/win2008-sp1-32/answer.vfd
-                                    # Uncomment virtio_network_installer_path line if
-                                    # you have an msi installer, also make sure the
-                                    # paths are properly set in your virtio driver iso.
-                                    virtio_storage_path = 'F:\viostor\2k8\x86'
-                                    virtio_network_path = 'F:\NetKVM\2k8\x86'
-                                    #virtio_network_installer_path = 'F:\RHEV-Network32.msi'
+                    - 32sp1:
+                        image_name += sp1-32
+                        install:
+                            cdrom_cd1 = windows/Windows2008-x86.iso
+                            #en_windows_server_2008_datacenter_enterprise_standard_x86_dvd_X14-26710.iso
+                            md5sum=0bfca49f0164de0a8eba236ced47007d
+                            md5sum_1m=07d7f5006393f74dc76e6e2e943e2440
+                            sha1sum = 6ca018ff96f1e9b2b310a36546b6fded99a421e6
+                            steps = Win2008-32.steps
+                        setup:
+                            steps = Win2008-32-rss.steps
+                        unattended_install.cdrom:
+                            cdrom_cd1 = windows/Windows2008-x86.iso
+                            md5sum=0bfca49f0164de0a8eba236ced47007d
+                            md5sum_1m=07d7f5006393f74dc76e6e2e943e2440
+                            unattended_file = unattended/win2008-32-autounattend.xml
+                            floppy = images/win2008-sp1-32/floppy.img
 
-                            - sp2:
-                                image_name += -sp2-32
-                                unattended_install.cdrom:
-                                    cdrom_cd1 = windows/en_windows_server_2008_datacenter_enterprise_standard_sp2_x86_dvd_342333.iso
-                                    md5sum = b9201aeb6eef04a3c573d036a8780bdf
-                                    md5sum_1m = b7a9d42e55ea1e85105a3a6ad4da8e04
-                                    sha1sum = 49d0d6917c1256fe81048d414fa473bbc76a8724
-                                    sha1sum_1m = 9662ff7ed715faa00407e4befc484ea52a92a9fb
-                                    unattended_file = unattended/win2008-32-autounattend.xml
-                                    floppy = images/win2008-sp2-32/answer.vfd
-                                    # Uncomment virtio_network_installer_path line if
-                                    # you have an msi installer, also make sure the
-                                    # paths are properly set in your virtio driver iso.
-                                    virtio_storage_path = 'F:\viostor\2k8\x86'
-                                    virtio_network_path = 'F:\NetKVM\2k8\x86'
-                                    #virtio_network_installer_path = 'F:\RHEV-Network32.msi'
+                    - 64sp1:
+                        image_name += sp1-64
+                        install:
+                            steps = Win2008-64.steps
+                            cdrom_cd1 = windows/Windows2008-x64.iso
+                            #en_windows_server_2008_datacenter_enterprise_standard_x64_dvd_X14-26714.iso
+                            md5sum=27c58cdb3d620f28c36333a5552f271c
+                            md5sum_1m=efdcc11d485a1ef9afa739cb8e0ca766
+                            sha1sum = bd000374709f67e9358814db6ec8f0ddaaa16f70
+                            passwd = 1q2w3eP
+                        setup:
+                            steps = Win2008-64-rss.steps
+                        unattended_install.cdrom:
+                            cdrom_cd1 = windows/Windows2008-x64.iso
+                            md5sum=27c58cdb3d620f28c36333a5552f271c
+                            md5sum_1m=efdcc11d485a1ef9afa739cb8e0ca766
+                            unattended_file = unattended/win2008-64-autounattend.xml
+                            floppy = images/win2008-sp1-64/floppy.img
 
-                    - 64:
-                        variants:
-                            -sp1:
-                                image_name += -sp1-64
-                                install:
-                                    steps = Win2008-64.steps
-                                    cdrom_cd1 = windows/Windows2008-x64.iso
-                                    #en_windows_server_2008_datacenter_enterprise_standard_x64_dvd_X14-26714.iso
-                                    md5sum=27c58cdb3d620f28c36333a5552f271c
-                                    md5sum_1m=efdcc11d485a1ef9afa739cb8e0ca766
-                                    sha1sum = bd000374709f67e9358814db6ec8f0ddaaa16f70
-                                    passwd = 1q2w3eP
-                                setup:
-                                    steps = Win2008-64-rss.steps
-                                unattended_install.cdrom:
-                                    cdrom_cd1 = windows/Windows2008-x64.iso
-                                    md5sum=27c58cdb3d620f28c36333a5552f271c
-                                    md5sum_1m=efdcc11d485a1ef9afa739cb8e0ca766
-                                    unattended_file = unattended/win2008-64-autounattend.xml
-                                    floppy = images/win2008-sp1-64/answer.vfd
-                                    # Uncomment virtio_network_installer_path line if
-                                    # you have an msi installer, also make sure the
-                                    # paths are properly set in your virtio driver iso.
-                                    virtio_storage_path = 'F:\viostor\2k8\amd64'
-                                    virtio_network_path = 'F:\NetKVM\2k8\amd64'
-                                    #virtio_network_installer_path = 'F:\RHEV-Network64.msi'
+                    - 32sp2:
+                        image_name += sp2-32
+                        unattended_install.cdrom:
+                            cdrom_cd1 = windows/en_windows_server_2008_datacenter_enterprise_standard_sp2_x86_dvd_342333.iso
+                            md5sum = b9201aeb6eef04a3c573d036a8780bdf
+                            md5sum_1m = b7a9d42e55ea1e85105a3a6ad4da8e04
+                            sha1sum = 49d0d6917c1256fe81048d414fa473bbc76a8724
+                            sha1sum_1m = 9662ff7ed715faa00407e4befc484ea52a92a9fb
+                            unattended_file = unattended/win2008-32-autounattend.xml
+                            floppy = images/win2008-sp2-32/floppy.img
 
-                            - sp2:
-                                image_name += -sp2-64
-                                unattended_install.cdrom:
-                                    cdrom_cd1 = windows/en_windows_server_2008_datacenter_enterprise_standard_sp2_x64_dvd_342336.iso
-                                    md5sum = e94943ef484035b3288d8db69599a6b5
-                                    md5sum_1m = ee55506823d0efffb5532ddd88a8e47b
-                                    sha1sum = 34c7d726c57b0f8b19ba3b40d1b4044c15fc2029
-                                    sha1sum_1m = 8fe08b03e3531906855a60a78020ac9577dff5ba
-                                    unattended_file = unattended/win2008-64-autounattend.xml
-                                    floppy = images/win2008-sp2-64/answer.vfd
-                                    # Uncomment virtio_network_installer_path line if
-                                    # you have an msi installer, also make sure the
-                                    # paths are properly set in your virtio driver iso.
-                                    virtio_storage_path = 'F:\viostor\2k8\amd64'
-                                    virtio_network_path = 'F:\NetKVM\2k8\amd64'
-                                    #virtio_network_installer_path = 'F:\RHEV-Network64.msi'
+                    - 64sp2:
+                        image_name += sp2-64
+                        unattended_install.cdrom:
+                            cdrom_cd1 = windows/en_windows_server_2008_datacenter_enterprise_standard_sp2_x64_dvd_342336.iso
+                            md5sum = e94943ef484035b3288d8db69599a6b5
+                            md5sum_1m = ee55506823d0efffb5532ddd88a8e47b
+                            sha1sum = 34c7d726c57b0f8b19ba3b40d1b4044c15fc2029
+                            sha1sum_1m = 8fe08b03e3531906855a60a78020ac9577dff5ba
+                            unattended_file = unattended/win2008-64-autounattend.xml
+                            floppy = images/win2008-sp2-64/floppy.img
 
-                            - r2:
-                                image_name += -r2-64
-                                unattended_install.cdrom:
-                                    cdrom_cd1 = windows/en_windows_server_2008_r2_standard_enterprise_datacenter_and_web_x64_dvd_x15-59754.iso
-                                    md5sum = 0207ef392c60efdda92071b0559ca0f9
-                                    md5sum_1m = a5a22ce25008bd7109f6d830d627e3ed
-                                    sha1sum = ad855ea913aaec3f1d0e1833c1aef7a0de326b0a
-                                    sha1sum_1m = 9194a3aabae25b36e5f73cad001314b2c8d07d14
-                                    unattended_file = unattended/win2008-r2-autounattend.xml
-                                    floppy = images/win2008-r2-64/answer.vfd
-                                    # Uncomment virtio_network_installer_path line if
-                                    # you have an msi installer, also make sure the
-                                    # paths are properly set in your virtio driver iso.
-                                    virtio_storage_path = 'F:\viostor\2k8\amd64'
-                                    virtio_network_path = 'F:\NetKVM\2k8\amd64'
-                                    #virtio_network_installer_path = 'F:\RHEV-Network64.msi'
+                    - r2:
+                        image_name += -r2
+                        unattended_install.cdrom:
+                            cdrom_cd1 = windows/en_windows_server_2008_r2_standard_enterprise_datacenter_and_web_x64_dvd_x15-59754.iso
+                            md5sum = 0207ef392c60efdda92071b0559ca0f9
+                            md5sum_1m = a5a22ce25008bd7109f6d830d627e3ed
+                            sha1sum = ad855ea913aaec3f1d0e1833c1aef7a0de326b0a
+                            sha1sum_1m = 9194a3aabae25b36e5f73cad001314b2c8d07d14
+                            unattended_file = unattended/win2008-r2-autounattend.xml
+                            floppy = images/win2008-r2-64/floppy.img
 
             - Win7:
                 image_name = win7
                 image_size = 20G
-                whql_submission:
-                    desc_path_desc1 = $\WDK\Logo Type\Device Logo\Windows 7 Client\Logo
-                    desc_path_desc2 = $\WDK\Logo Type\Device Logo\Windows 7 Client
-                    device_data += " adq"
-                    dd_name_adq = AdditionalQualificationGroup
-                    dd_data_adq = Windows 7
 
                 variants:
                     - 32:
@@ -1705,18 +1365,7 @@
                             sha1sum = 5395dc4b38f7bdb1e005ff414deedfdb16dbf610
                             sha1sum_1m = 9f9c3780aebeb28a9bf22188eed6bc15475dc9c5
                             unattended_file = unattended/win7-32-autounattend.xml
-                            floppy = images/win7-32/answer.vfd
-                            # Uncomment virtio_network_installer_path line if
-                            # you have an msi installer, also make sure the
-                            # paths are properly set in your virtio driver iso.
-                            virtio_storage_path = 'F:\viostor\w7\x86'
-                            virtio_network_path = 'F:\NetKVM\w7\x86'
-                            #virtio_network_installer_path = 'F:\RHEV-Network32.msi'
-                        whql_submission:
-                            dd_data_logoarch = X86
-                            dd_data_logoos = Windows 7
-                            dd_data_whqlos = Windows 7 Client
-                            dd_data_whqlqual = Logo
+                            floppy = images/win7-32/floppy.img
 
                     - 64:
                         image_name += -64
@@ -1735,18 +1384,7 @@
                             sha1sum = 326327cc2ff9f05379f5058c41be6bc5e004baa7
                             sha1sum_1m = 4a3903bd5157de54f0702e5263e0a683c5775515
                             unattended_file = unattended/win7-64-autounattend.xml
-                            floppy = images/win7-64/answer.vfd
-                            # Uncomment virtio_network_installer_path line if
-                            # you have an msi installer, also make sure the
-                            # paths are properly set in your virtio driver iso.
-                            virtio_storage_path = 'F:\viostor\w7\amd64'
-                            virtio_network_path = 'F:\NetKVM\w7\amd64'
-                            #virtio_network_installer_path = 'F:\RHEV-Network64.msi'
-                        whql_submission:
-                            dd_data_logoarch = AMD64
-                            dd_data_logoos = Windows 7
-                            dd_data_whqlos = Windows 7 Client x64
-                            dd_data_whqlqual = Logo
+                            floppy = images/win7-64/floppy.img
 
 
     # Unix/BSD section
@@ -1825,9 +1463,8 @@
         image_boot=yes
 
 
-virtio_net|virtio_blk|e1000|balloon_check:
-    only Fedora.11 Fedora.12 Fedora.13 RHEL.5 OpenSUSE.11 SLES.11 Ubuntu-8.10-server
-    # only WinXP Win2003 Win2008 WinVista Win7 Fedora.11 Fedora.12 Fedora.13 RHEL.5 OpenSUSE.11 SLES.11 Ubuntu-8.10-server
+virtio|virtio_blk|e1000|balloon_check:
+    only Fedora.11 Fedora.12 Win2008 WinVista Win7 OpenSUSE.11 SLES.11 Ubuntu-8.10-server
 
 
 variants:
diff --git a/client/tests/kvm/unattended/Fedora-10.ks b/client/tests/kvm/unattended/Fedora-10.ks
index 26965af..03163c3 100644
--- a/client/tests/kvm/unattended/Fedora-10.ks
+++ b/client/tests/kvm/unattended/Fedora-10.ks
@@ -11,7 +11,7 @@
 selinux --enforcing
 timezone --utc America/New_York
 firstboot --disable
-bootloader --location=mbr --append="console=tty0 console=ttyS0,115200"
+bootloader --location=mbr --append="console=ttyS0,115200 console=tty0"
 zerombr
 clearpart --all --initlabel
 autopart
diff --git a/client/tests/kvm/unattended/Fedora-11.ks b/client/tests/kvm/unattended/Fedora-11.ks
index 861546b..443e2c3 100644
--- a/client/tests/kvm/unattended/Fedora-11.ks
+++ b/client/tests/kvm/unattended/Fedora-11.ks
@@ -10,7 +10,7 @@
 selinux --enforcing
 timezone --utc America/New_York
 firstboot --disable
-bootloader --location=mbr --append="console=tty0 console=ttyS0,115200"
+bootloader --location=mbr --append="console=ttyS0,115200 console=tty0"
 zerombr
 
 clearpart --all --initlabel
diff --git a/client/tests/kvm/unattended/Fedora-12.ks b/client/tests/kvm/unattended/Fedora-12.ks
index 861546b..443e2c3 100644
--- a/client/tests/kvm/unattended/Fedora-12.ks
+++ b/client/tests/kvm/unattended/Fedora-12.ks
@@ -10,7 +10,7 @@
 selinux --enforcing
 timezone --utc America/New_York
 firstboot --disable
-bootloader --location=mbr --append="console=tty0 console=ttyS0,115200"
+bootloader --location=mbr --append="console=ttyS0,115200 console=tty0"
 zerombr
 
 clearpart --all --initlabel
diff --git a/client/tests/kvm/unattended/Fedora-13.ks b/client/tests/kvm/unattended/Fedora-13.ks
index 0949e40..ef978e8 100644
--- a/client/tests/kvm/unattended/Fedora-13.ks
+++ b/client/tests/kvm/unattended/Fedora-13.ks
@@ -10,7 +10,7 @@
 selinux --enforcing
 timezone --utc America/New_York
 firstboot --disable
-bootloader --location=mbr --append="console=tty0 console=ttyS0,115200"
+bootloader --location=mbr --append="console=ttyS0,115200 console=tty0"
 zerombr
 
 clearpart --all --initlabel
diff --git a/client/tests/kvm/unattended/Fedora-8.ks b/client/tests/kvm/unattended/Fedora-8.ks
index 92ff727..3e9d387 100644
--- a/client/tests/kvm/unattended/Fedora-8.ks
+++ b/client/tests/kvm/unattended/Fedora-8.ks
@@ -11,7 +11,7 @@
 selinux --enforcing
 timezone --utc America/New_York
 firstboot --disable
-bootloader --location=mbr --append="console=tty0 console=ttyS0,115200"
+bootloader --location=mbr --append="console=ttyS0,115200 console=tty0"
 zerombr
 clearpart --all --initlabel
 autopart
diff --git a/client/tests/kvm/unattended/Fedora-9.ks b/client/tests/kvm/unattended/Fedora-9.ks
index 92ff727..3e9d387 100644
--- a/client/tests/kvm/unattended/Fedora-9.ks
+++ b/client/tests/kvm/unattended/Fedora-9.ks
@@ -11,7 +11,7 @@
 selinux --enforcing
 timezone --utc America/New_York
 firstboot --disable
-bootloader --location=mbr --append="console=tty0 console=ttyS0,115200"
+bootloader --location=mbr --append="console=ttyS0,115200 console=tty0"
 zerombr
 clearpart --all --initlabel
 autopart
diff --git a/client/tests/kvm/unattended/OpenSUSE-11.xml b/client/tests/kvm/unattended/OpenSUSE-11.xml
index 0ade836..64140bf 100644
--- a/client/tests/kvm/unattended/OpenSUSE-11.xml
+++ b/client/tests/kvm/unattended/OpenSUSE-11.xml
@@ -50,7 +50,7 @@
         <module>edd</module>
       </initrd_module>
     </initrd_modules>
-    <append>console=tty0 console=ttyS0,115200</append>
+    <append>console=ttyS0,115200 console=tty0</append>
     <loader_type>grub</loader_type>
     <sections config:type="list"/>
   </bootloader>
diff --git a/client/tests/kvm/unattended/RHEL-3-series.ks b/client/tests/kvm/unattended/RHEL-3-series.ks
index 79d9605..413890a 100644
--- a/client/tests/kvm/unattended/RHEL-3-series.ks
+++ b/client/tests/kvm/unattended/RHEL-3-series.ks
@@ -10,7 +10,7 @@
 firewall --enabled --ssh
 timezone America/New_York
 firstboot --disable
-bootloader --location=mbr --append="console=tty0 console=ttyS0,115200"
+bootloader --location=mbr --append="console=ttyS0,115200 console=tty0"
 clearpart --all --initlabel
 autopart
 reboot
diff --git a/client/tests/kvm/unattended/RHEL-4-series.ks b/client/tests/kvm/unattended/RHEL-4-series.ks
index d791e0f..213914d 100644
--- a/client/tests/kvm/unattended/RHEL-4-series.ks
+++ b/client/tests/kvm/unattended/RHEL-4-series.ks
@@ -11,7 +11,7 @@
 selinux --enforcing
 timezone --utc America/New_York
 firstboot --disable
-bootloader --location=mbr --append="console=tty0 console=ttyS0,115200"
+bootloader --location=mbr --append="console=ttyS0,115200 console=tty0"
 zerombr
 clearpart --all --initlabel
 autopart
diff --git a/client/tests/kvm/unattended/RHEL-5-series.ks b/client/tests/kvm/unattended/RHEL-5-series.ks
index 92ff727..3e9d387 100644
--- a/client/tests/kvm/unattended/RHEL-5-series.ks
+++ b/client/tests/kvm/unattended/RHEL-5-series.ks
@@ -11,7 +11,7 @@
 selinux --enforcing
 timezone --utc America/New_York
 firstboot --disable
-bootloader --location=mbr --append="console=tty0 console=ttyS0,115200"
+bootloader --location=mbr --append="console=ttyS0,115200 console=tty0"
 zerombr
 clearpart --all --initlabel
 autopart
diff --git a/client/tests/kvm/unattended/SLES-11.xml b/client/tests/kvm/unattended/SLES-11.xml
index c694a31..61151d9 100644
--- a/client/tests/kvm/unattended/SLES-11.xml
+++ b/client/tests/kvm/unattended/SLES-11.xml
@@ -49,7 +49,7 @@
         <module>edd</module>
       </initrd_module>
     </initrd_modules>
-    <append>console=tty0 console=ttyS0,115200</append>
+    <append>console=ttyS0,115200 console=tty0</append>
     <loader_type>grub</loader_type>
     <sections config:type="list"/>
   </bootloader>
diff --git a/client/tests/kvm/unattended/win2003-32.sif b/client/tests/kvm/unattended/win2003-32.sif
index fab2cf5..f58b0b0 100644
--- a/client/tests/kvm/unattended/win2003-32.sif
+++ b/client/tests/kvm/unattended/win2003-32.sif
@@ -10,7 +10,6 @@
     UnattendSwitch = Yes
     CrashDumpSetting = 1
     DriverSigningPolicy = ignore
-    OemPnPDriversPath="KVM_TEST_NETWORK_DRIVER_PATH"
     WaitForReboot = no
     Repartition = yes
 
@@ -57,10 +56,9 @@
     YResolution=768
 
 [GuiRunOnce]
-    Command0="cmd /c KVM_TEST_VIRTIO_NETWORK_INSTALLER"
-    Command1="cmd /c sc config TlntSvr start= auto"
-    Command2="cmd /c netsh firewall set opmode disable"
-    Command3="cmd /c net start telnet"
-    Command4="cmd /c E:\setuprss.bat"
-    Command5="cmd /c netsh interface ip set address local dhcp"
-    Command6="cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe"
+    Command0="cmd /c sc config TlntSvr start= auto"
+    Command1="cmd /c netsh firewall set opmode disable"
+    Command2="cmd /c net start telnet"
+    Command3="cmd /c E:\setuprss.bat"
+    Command4="cmd /c netsh interface ip set address local dhcp"
+    Command5="cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe"
diff --git a/client/tests/kvm/unattended/win2003-64.sif b/client/tests/kvm/unattended/win2003-64.sif
index fab2cf5..f58b0b0 100644
--- a/client/tests/kvm/unattended/win2003-64.sif
+++ b/client/tests/kvm/unattended/win2003-64.sif
@@ -10,7 +10,6 @@
     UnattendSwitch = Yes
     CrashDumpSetting = 1
     DriverSigningPolicy = ignore
-    OemPnPDriversPath="KVM_TEST_NETWORK_DRIVER_PATH"
     WaitForReboot = no
     Repartition = yes
 
@@ -57,10 +56,9 @@
     YResolution=768
 
 [GuiRunOnce]
-    Command0="cmd /c KVM_TEST_VIRTIO_NETWORK_INSTALLER"
-    Command1="cmd /c sc config TlntSvr start= auto"
-    Command2="cmd /c netsh firewall set opmode disable"
-    Command3="cmd /c net start telnet"
-    Command4="cmd /c E:\setuprss.bat"
-    Command5="cmd /c netsh interface ip set address local dhcp"
-    Command6="cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe"
+    Command0="cmd /c sc config TlntSvr start= auto"
+    Command1="cmd /c netsh firewall set opmode disable"
+    Command2="cmd /c net start telnet"
+    Command3="cmd /c E:\setuprss.bat"
+    Command4="cmd /c netsh interface ip set address local dhcp"
+    Command5="cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe"
diff --git a/client/tests/kvm/unattended/win2008-32-autounattend.xml b/client/tests/kvm/unattended/win2008-32-autounattend.xml
index 89af07f..44a9fc4 100644
--- a/client/tests/kvm/unattended/win2008-32-autounattend.xml
+++ b/client/tests/kvm/unattended/win2008-32-autounattend.xml
@@ -15,20 +15,6 @@
 			<UILanguageFallback>en-us</UILanguageFallback>
 			<UserLocale>en-us</UserLocale>
 		</component>
-		<component name="Microsoft-Windows-PnpCustomizationsWinPE"
-			processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
-			language="neutral" versionScope="nonSxS"
-			xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
-			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-			<DriverPaths>
-				<PathAndCredentials wcm:keyValue="1" wcm:action="add">
-					<Path>KVM_TEST_STORAGE_DRIVER_PATH</Path>
-				</PathAndCredentials>
-				<PathAndCredentials wcm:keyValue="2" wcm:action="add">
-					<Path>KVM_TEST_NETWORK_DRIVER_PATH</Path>
-				</PathAndCredentials>
-			</DriverPaths>
-		</component>
 		<component name="Microsoft-Windows-Setup"
 			processorArchitecture="x86" publicKeyToken="31bf3856ad364e35"
 			language="neutral" versionScope="nonSxS"
@@ -129,36 +115,32 @@
 			</AutoLogon>
 			<FirstLogonCommands>
 				<SynchronousCommand wcm:action="add">
-					<CommandLine>%WINDIR%\System32\cmd /c KVM_TEST_VIRTIO_NETWORK_INSTALLER"</CommandLine>
 					<Order>1</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c start /w pkgmgr /iu:"TelnetServer"</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>2</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c sc config TlntSvr start= auto</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>3</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c netsh firewall set opmode disable</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>4</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c net start telnet</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>5</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c E:\setuprss.bat</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>6</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" dhcp</CommandLine>
-					<Order>7</Order>
 				</SynchronousCommand>
 				<SynchronousCommand wcm:action="add">
+					<Order>7</Order>
 					<CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe</CommandLine>
-					<Order>8</Order>
 				</SynchronousCommand>
 			</FirstLogonCommands>
 			<OOBE>
diff --git a/client/tests/kvm/unattended/win2008-64-autounattend.xml b/client/tests/kvm/unattended/win2008-64-autounattend.xml
index 98f5589..ea0a524 100644
--- a/client/tests/kvm/unattended/win2008-64-autounattend.xml
+++ b/client/tests/kvm/unattended/win2008-64-autounattend.xml
@@ -70,20 +70,6 @@
 			<UserLocale>en-us</UserLocale>
 			<UILanguageFallback>en-us</UILanguageFallback>
 		</component>
-		<component name="Microsoft-Windows-PnpCustomizationsWinPE"
-			processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
-			language="neutral" versionScope="nonSxS"
-			xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
-			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-			<DriverPaths>
-				<PathAndCredentials wcm:keyValue="1" wcm:action="add">
-					<Path>KVM_TEST_STORAGE_DRIVER_PATH</Path>
-				</PathAndCredentials>
-				<PathAndCredentials wcm:keyValue="2" wcm:action="add">
-					<Path>KVM_TEST_NETWORK_DRIVER_PATH</Path>
-				</PathAndCredentials>
-			</DriverPaths>
-		</component>
 	</settings>
 	<settings pass="specialize">
 		<component name="Microsoft-Windows-Deployment"
@@ -138,36 +124,32 @@
 			</AutoLogon>
 			<FirstLogonCommands>
 				<SynchronousCommand wcm:action="add">
-					<CommandLine>%WINDIR%\System32\cmd /c KVM_TEST_VIRTIO_NETWORK_INSTALLER"</CommandLine>
 					<Order>1</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c start /w pkgmgr /iu:"TelnetServer"</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>2</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c sc config TlntSvr start= auto</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>3</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c netsh firewall set opmode disable</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>4</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c net start telnet</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>5</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c E:\setuprss.bat</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>6</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" dhcp</CommandLine>
-					<Order>7</Order>
 				</SynchronousCommand>
 				<SynchronousCommand wcm:action="add">
+					<Order>7</Order>
 					<CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe</CommandLine>
-					<Order>8</Order>
 				</SynchronousCommand>
 			</FirstLogonCommands>
 			<OOBE>
diff --git a/client/tests/kvm/unattended/win2008-r2-autounattend.xml b/client/tests/kvm/unattended/win2008-r2-autounattend.xml
index b624d10..ea0a524 100644
--- a/client/tests/kvm/unattended/win2008-r2-autounattend.xml
+++ b/client/tests/kvm/unattended/win2008-r2-autounattend.xml
@@ -100,20 +100,6 @@
 			<UILanguage>en-US</UILanguage>
 			<UserLocale>en-US</UserLocale>
 		</component>
-		<component name="Microsoft-Windows-PnpCustomizationsWinPE"
-			processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
-			language="neutral" versionScope="nonSxS"
-			xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
-			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-			<DriverPaths>
-				<PathAndCredentials wcm:keyValue="1" wcm:action="add">
-					<Path>KVM_TEST_STORAGE_DRIVER_PATH</Path>
-				</PathAndCredentials>
-				<PathAndCredentials wcm:keyValue="2" wcm:action="add">
-					<Path>KVM_TEST_NETWORK_DRIVER_PATH</Path>
-				</PathAndCredentials>
-			</DriverPaths>
-		</component>
 	</settings>
 	<settings pass="oobeSystem">
 		<component name="Microsoft-Windows-Shell-Setup"
@@ -138,36 +124,32 @@
 			</AutoLogon>
 			<FirstLogonCommands>
 				<SynchronousCommand wcm:action="add">
-					<CommandLine>%WINDIR%\System32\cmd /c KVM_TEST_VIRTIO_NETWORK_INSTALLER"</CommandLine>
 					<Order>1</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c start /w pkgmgr /iu:"TelnetServer"</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>2</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c sc config TlntSvr start= auto</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>3</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c netsh firewall set opmode disable</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>4</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c net start telnet</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>5</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c E:\setuprss.bat</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>6</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" dhcp</CommandLine>
-					<Order>7</Order>
 				</SynchronousCommand>
 				<SynchronousCommand wcm:action="add">
+					<Order>7</Order>
 					<CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe</CommandLine>
-					<Order>8</Order>
 				</SynchronousCommand>
 			</FirstLogonCommands>
 			<OOBE>
diff --git a/client/tests/kvm/unattended/win7-32-autounattend.xml b/client/tests/kvm/unattended/win7-32-autounattend.xml
index a16cdd7..a577a91 100644
--- a/client/tests/kvm/unattended/win7-32-autounattend.xml
+++ b/client/tests/kvm/unattended/win7-32-autounattend.xml
@@ -15,20 +15,6 @@
 			<UILanguageFallback>en-us</UILanguageFallback>
 			<UserLocale>en-us</UserLocale>
 		</component>
-		<component name="Microsoft-Windows-PnpCustomizationsWinPE"
-			processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
-			language="neutral" versionScope="nonSxS"
-			xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
-			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-			<DriverPaths>
-				<PathAndCredentials wcm:keyValue="1" wcm:action="add">
-					<Path>KVM_TEST_STORAGE_DRIVER_PATH</Path>
-				</PathAndCredentials>
-				<PathAndCredentials wcm:keyValue="2" wcm:action="add">
-					<Path>KVM_TEST_NETWORK_DRIVER_PATH</Path>
-				</PathAndCredentials>
-			</DriverPaths>
-		</component>
 		<component name="Microsoft-Windows-Setup"
 			processorArchitecture="x86" publicKeyToken="31bf3856ad364e35"
 			language="neutral" versionScope="nonSxS"
@@ -136,36 +122,32 @@
 			</AutoLogon>
 			<FirstLogonCommands>
 				<SynchronousCommand wcm:action="add">
-					<CommandLine>%WINDIR%\System32\cmd /c KVM_TEST_VIRTIO_NETWORK_INSTALLER"</CommandLine>
+					<CommandLine>%WINDIR%\System32\cmd /c start /w pkgmgr /iu:"TelnetServer"</CommandLine>
 					<Order>1</Order>
 				</SynchronousCommand>
 				<SynchronousCommand wcm:action="add">
-					<CommandLine>%WINDIR%\System32\cmd /c start /w pkgmgr /iu:"TelnetServer"</CommandLine>
+					<CommandLine>%WINDIR%\System32\cmd /c sc config TlntSvr start= auto</CommandLine>
 					<Order>2</Order>
 				</SynchronousCommand>
 				<SynchronousCommand wcm:action="add">
-					<CommandLine>%WINDIR%\System32\cmd /c sc config TlntSvr start= auto</CommandLine>
+					<CommandLine>%WINDIR%\System32\cmd /c netsh firewall set opmode disable</CommandLine>
 					<Order>3</Order>
 				</SynchronousCommand>
 				<SynchronousCommand wcm:action="add">
-					<CommandLine>%WINDIR%\System32\cmd /c netsh firewall set opmode disable</CommandLine>
+					<CommandLine>%WINDIR%\System32\cmd /c net start telnet</CommandLine>
 					<Order>4</Order>
 				</SynchronousCommand>
 				<SynchronousCommand wcm:action="add">
-					<CommandLine>%WINDIR%\System32\cmd /c net start telnet</CommandLine>
+					<CommandLine>%WINDIR%\System32\cmd /c E:\setuprss.bat</CommandLine>
 					<Order>5</Order>
 				</SynchronousCommand>
 				<SynchronousCommand wcm:action="add">
-					<CommandLine>%WINDIR%\System32\cmd /c E:\setuprss.bat</CommandLine>
+					<CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" dhcp</CommandLine> 
 					<Order>6</Order>
 				</SynchronousCommand>
 				<SynchronousCommand wcm:action="add">
-					<CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" dhcp</CommandLine>
-					<Order>7</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe</CommandLine>
-					<Order>8</Order>
+					<Order>7</Order>
 				</SynchronousCommand>
 			</FirstLogonCommands>
 		</component>
diff --git a/client/tests/kvm/unattended/win7-64-autounattend.xml b/client/tests/kvm/unattended/win7-64-autounattend.xml
index 65873f6..fec8017 100644
--- a/client/tests/kvm/unattended/win7-64-autounattend.xml
+++ b/client/tests/kvm/unattended/win7-64-autounattend.xml
@@ -15,20 +15,6 @@
 			<UILanguageFallback>en-us</UILanguageFallback>
 			<UserLocale>en-us</UserLocale>
 		</component>
-		<component name="Microsoft-Windows-PnpCustomizationsWinPE"
-			processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
-			language="neutral" versionScope="nonSxS"
-			xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
-			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-			<DriverPaths>
-				<PathAndCredentials wcm:keyValue="1" wcm:action="add">
-					<Path>KVM_TEST_STORAGE_DRIVER_PATH</Path>
-				</PathAndCredentials>
-				<PathAndCredentials wcm:keyValue="2" wcm:action="add">
-					<Path>KVM_TEST_NETWORK_DRIVER_PATH</Path>
-				</PathAndCredentials>
-			</DriverPaths>
-		</component>
 		<component name="Microsoft-Windows-Setup"
 			processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
 			language="neutral" versionScope="nonSxS"
@@ -136,36 +122,32 @@
 			</AutoLogon>
 			<FirstLogonCommands>
 				<SynchronousCommand wcm:action="add">
-					<CommandLine>%WINDIR%\System32\cmd /c KVM_TEST_VIRTIO_NETWORK_INSTALLER"</CommandLine>
+					<CommandLine>%WINDIR%\System32\cmd /c start /w pkgmgr /iu:"TelnetServer"</CommandLine>
 					<Order>1</Order>
 				</SynchronousCommand>
 				<SynchronousCommand wcm:action="add">
-					<CommandLine>%WINDIR%\System32\cmd /c start /w pkgmgr /iu:"TelnetServer"</CommandLine>
+					<CommandLine>%WINDIR%\System32\cmd /c sc config TlntSvr start= auto</CommandLine>
 					<Order>2</Order>
 				</SynchronousCommand>
 				<SynchronousCommand wcm:action="add">
-					<CommandLine>%WINDIR%\System32\cmd /c sc config TlntSvr start= auto</CommandLine>
+					<CommandLine>%WINDIR%\System32\cmd /c netsh firewall set opmode disable</CommandLine>
 					<Order>3</Order>
 				</SynchronousCommand>
 				<SynchronousCommand wcm:action="add">
-					<CommandLine>%WINDIR%\System32\cmd /c netsh firewall set opmode disable</CommandLine>
+					<CommandLine>%WINDIR%\System32\cmd /c net start telnet</CommandLine>
 					<Order>4</Order>
 				</SynchronousCommand>
 				<SynchronousCommand wcm:action="add">
-					<CommandLine>%WINDIR%\System32\cmd /c net start telnet</CommandLine>
+					<CommandLine>%WINDIR%\System32\cmd /c E:\setuprss.bat</CommandLine>
 					<Order>5</Order>
 				</SynchronousCommand>
 				<SynchronousCommand wcm:action="add">
-					<CommandLine>%WINDIR%\System32\cmd /c E:\setuprss.bat</CommandLine>
+					<CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" dhcp</CommandLine> 
 					<Order>6</Order>
 				</SynchronousCommand>
 				<SynchronousCommand wcm:action="add">
-					<CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" dhcp</CommandLine>
-					<Order>7</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe</CommandLine>
-					<Order>8</Order>
+					<Order>7</Order>
 				</SynchronousCommand>
 			</FirstLogonCommands>
 		</component>
diff --git a/client/tests/kvm/unattended/winvista-32-autounattend.xml b/client/tests/kvm/unattended/winvista-32-autounattend.xml
index d4e8c5c..7835a64 100644
--- a/client/tests/kvm/unattended/winvista-32-autounattend.xml
+++ b/client/tests/kvm/unattended/winvista-32-autounattend.xml
@@ -15,20 +15,6 @@
 			<UILanguageFallback>en-us</UILanguageFallback>
 			<UserLocale>en-us</UserLocale>
 		</component>
-		<component name="Microsoft-Windows-PnpCustomizationsWinPE"
-			processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
-			language="neutral" versionScope="nonSxS"
-			xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
-			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-			<DriverPaths>
-				<PathAndCredentials wcm:keyValue="1" wcm:action="add">
-					<Path>KVM_TEST_STORAGE_DRIVER_PATH</Path>
-				</PathAndCredentials>
-				<PathAndCredentials wcm:keyValue="2" wcm:action="add">
-					<Path>KVM_TEST_NETWORK_DRIVER_PATH</Path>
-				</PathAndCredentials>
-			</DriverPaths>
-		</component>
 		<component name="Microsoft-Windows-Setup"
 			processorArchitecture="x86" publicKeyToken="31bf3856ad364e35"
 			language="neutral" versionScope="nonSxS"
@@ -136,36 +122,32 @@
 			</AutoLogon>
 			<FirstLogonCommands>
 				<SynchronousCommand wcm:action="add">
-					<CommandLine>%WINDIR%\System32\cmd /c KVM_TEST_VIRTIO_NETWORK_INSTALLER"</CommandLine>
 					<Order>1</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c start /w pkgmgr /iu:"TelnetServer"</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>2</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c sc config TlntSvr start= auto</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>3</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c netsh firewall set opmode disable</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>4</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c net start telnet</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>5</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c E:\setuprss.bat</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>6</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" dhcp</CommandLine>
-					<Order>7</Order>
 				</SynchronousCommand>
 				<SynchronousCommand wcm:action="add">
+					<Order>7</Order>
 					<CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe</CommandLine>
-					<Order>8</Order>
 				</SynchronousCommand>
 			</FirstLogonCommands>
 		</component>
diff --git a/client/tests/kvm/unattended/winvista-64-autounattend.xml b/client/tests/kvm/unattended/winvista-64-autounattend.xml
index 16d4850..ad68bf9 100644
--- a/client/tests/kvm/unattended/winvista-64-autounattend.xml
+++ b/client/tests/kvm/unattended/winvista-64-autounattend.xml
@@ -62,20 +62,6 @@
 			<UserLocale>en-us</UserLocale>
 			<UILanguageFallback>en-us</UILanguageFallback>
 		</component>
-		<component name="Microsoft-Windows-PnpCustomizationsWinPE"
-			processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
-			language="neutral" versionScope="nonSxS"
-			xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
-			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-			<DriverPaths>
-				<PathAndCredentials wcm:keyValue="1" wcm:action="add">
-					<Path>KVM_TEST_STORAGE_DRIVER_PATH</Path>
-				</PathAndCredentials>
-				<PathAndCredentials wcm:keyValue="2" wcm:action="add">
-					<Path>KVM_TEST_NETWORK_DRIVER_PATH</Path>
-				</PathAndCredentials>
-			</DriverPaths>
-		</component>
 	</settings>
 	<settings pass="specialize">
 		<component name="Microsoft-Windows-Deployment"
@@ -137,36 +123,32 @@
 			</OOBE>
 			<FirstLogonCommands>
 				<SynchronousCommand wcm:action="add">
-					<CommandLine>%WINDIR%\System32\cmd /c KVM_TEST_VIRTIO_NETWORK_INSTALLER"</CommandLine>
 					<Order>1</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c start /w pkgmgr /iu:"TelnetServer"</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>2</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c sc config TlntSvr start= auto</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>3</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c netsh firewall set opmode disable</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>4</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c net start telnet</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>5</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c E:\setuprss.bat</CommandLine>
+				</SynchronousCommand>
+				<SynchronousCommand wcm:action="add">
 					<Order>6</Order>
-				</SynchronousCommand>
-				<SynchronousCommand wcm:action="add">
 					<CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" dhcp</CommandLine>
-					<Order>7</Order>
 				</SynchronousCommand>
 				<SynchronousCommand wcm:action="add">
+					<Order>7</Order>
 					<CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe</CommandLine>
-					<Order>8</Order>
 				</SynchronousCommand>
 			</FirstLogonCommands>
 		</component>
diff --git a/client/tests/kvm/unattended/winxp32.sif b/client/tests/kvm/unattended/winxp32.sif
index b9a2ab6..7562846 100644
--- a/client/tests/kvm/unattended/winxp32.sif
+++ b/client/tests/kvm/unattended/winxp32.sif
@@ -13,7 +13,6 @@
     UnattendSwitch=Yes
     CrashDumpSetting=1
     DriverSigningPolicy=ignore
-    OemPnPDriversPath="KVM_TEST_NETWORK_DRIVER_PATH"
     WaitForReboot=no
 
 [GuiUnattended]
@@ -69,7 +68,6 @@
     YResolution=768
 
 [GuiRunOnce]
-   Command0="cmd /c KVM_TEST_VIRTIO_NETWORK_INSTALLER"
-   Command1="cmd /c E:\setuprss.bat"
-   Command2="cmd /c netsh interface ip set address local dhcp"
-   Command3="cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe"
+   Command0="cmd /c E:\setuprss.bat"
+   Command1="cmd /c netsh interface ip set address local dhcp"
+   Command2="cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe"
diff --git a/client/tests/kvm/unattended/winxp64.sif b/client/tests/kvm/unattended/winxp64.sif
index b9a2ab6..7562846 100644
--- a/client/tests/kvm/unattended/winxp64.sif
+++ b/client/tests/kvm/unattended/winxp64.sif
@@ -13,7 +13,6 @@
     UnattendSwitch=Yes
     CrashDumpSetting=1
     DriverSigningPolicy=ignore
-    OemPnPDriversPath="KVM_TEST_NETWORK_DRIVER_PATH"
     WaitForReboot=no
 
 [GuiUnattended]
@@ -69,7 +68,6 @@
     YResolution=768
 
 [GuiRunOnce]
-   Command0="cmd /c KVM_TEST_VIRTIO_NETWORK_INSTALLER"
-   Command1="cmd /c E:\setuprss.bat"
-   Command2="cmd /c netsh interface ip set address local dhcp"
-   Command3="cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe"
+   Command0="cmd /c E:\setuprss.bat"
+   Command1="cmd /c netsh interface ip set address local dhcp"
+   Command2="cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe"
diff --git a/client/tests/kvm/unittests.cfg.sample b/client/tests/kvm/unittests.cfg.sample
index 3d32cb2..7ea0674 100644
--- a/client/tests/kvm/unittests.cfg.sample
+++ b/client/tests/kvm/unittests.cfg.sample
@@ -58,7 +58,6 @@
                 user_git_repo = git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
                 user_branch = next
                 user_lbranch = next
-                test_git_repo = git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git
 
     - unittest:
         type = unittest
diff --git a/client/tests/libhugetlbfs/libhugetlbfs.py b/client/tests/libhugetlbfs/libhugetlbfs.py
index 373a5ba..2fe6b45 100644
--- a/client/tests/libhugetlbfs/libhugetlbfs.py
+++ b/client/tests/libhugetlbfs/libhugetlbfs.py
@@ -44,9 +44,9 @@
         # make might fail if there are no proper headers for the 32 bit
         # version, in that case try only for the 64 bit version
         try:
-            utils.make()
+            utils.system('make')
         except:
-            utils.make('OBJDIRS=obj64')
+            utils.system('make OBJDIRS=obj64')
 
 
     def run_once(self):
@@ -54,9 +54,9 @@
         # make check might fail for 32 bit if the 32 bit compile earlier
         # had failed. See if it passes for 64 bit in that case.
         try:
-            utils.make('check')
+            utils.system('make check')
         except:
-            utils.make('check OBJDIRS=obj64')
+            utils.system('make check OBJDIRS=obj64')
 
 
     def cleanup(self):
diff --git a/client/tests/lmbench/lmbench.py b/client/tests/lmbench/lmbench.py
index 0883258..33a86b4 100644
--- a/client/tests/lmbench/lmbench.py
+++ b/client/tests/lmbench/lmbench.py
@@ -34,7 +34,7 @@
         utils.system(p2)
 
         # build lmbench
-        utils.make()
+        utils.system('make')
 
         # configure lmbench
         utils.system('yes "" | make config')
@@ -62,11 +62,11 @@
 
     def run_once(self):
         os.chdir(self.srcdir)
-        utils.make('rerun')
+        utils.system('make rerun')
 
 
     def postprocess(self):
         # Get the results:
         outputdir = self.srcdir + "/results"
         results = self.resultsdir + "/summary.txt"
-        utils.make("-C " + outputdir + " summary > " + results)
+        utils.system("make -C " + outputdir + " summary > " + results)
diff --git a/client/tests/ltp/ltp.py b/client/tests/ltp/ltp.py
index fb2df01..0d0e763 100644
--- a/client/tests/ltp/ltp.py
+++ b/client/tests/ltp/ltp.py
@@ -40,9 +40,9 @@
             utils.system('patch -p1 < ../ltp_capability.patch')
 
         utils.system('cp ../scan.c pan/')   # saves having lex installed
-        utils.make('autotools')
+        utils.system('make autotools')
         utils.configure('--prefix=%s' % ltpbin_dir)
-        utils.make('-j %d all' % utils.count_cpus())
+        utils.system('make -j %d all' % utils.count_cpus())
         utils.system('yes n | make SKIP_IDCHECK=1 install')
 
 
diff --git a/client/tests/monotonic_time/monotonic_time.py b/client/tests/monotonic_time/monotonic_time.py
index ce49110..1814c2d 100644
--- a/client/tests/monotonic_time/monotonic_time.py
+++ b/client/tests/monotonic_time/monotonic_time.py
@@ -9,7 +9,7 @@
 
     def setup(self):
         os.chdir(self.srcdir)
-        utils.make()
+        utils.system('make')
 
 
     def initialize(self):
diff --git a/client/tests/netperf2/netperf2.py b/client/tests/netperf2/netperf2.py
index 179757a..b82aa5c 100644
--- a/client/tests/netperf2/netperf2.py
+++ b/client/tests/netperf2/netperf2.py
@@ -18,7 +18,7 @@
 
         utils.system('patch -p0 < ../wait_before_data.patch')
         utils.configure()
-        utils.make()
+        utils.system('make')
         utils.system('sync')
 
         self.job.setup_dep(['sysstat'])
diff --git a/client/tests/netpipe/netpipe.py b/client/tests/netpipe/netpipe.py
index 948065c..9937456 100644
--- a/client/tests/netpipe/netpipe.py
+++ b/client/tests/netpipe/netpipe.py
@@ -13,7 +13,7 @@
         utils.extract_tarball_to_dir(tarball, self.srcdir)
         os.chdir(self.srcdir)
         utils.system('patch -p1 < ../makefile.patch')
-        utils.make()
+        utils.system('make')
 
 
     def initialize(self):
diff --git a/client/tests/perfmon/perfmon.py b/client/tests/perfmon/perfmon.py
index 207d68a..ec1145f 100644
--- a/client/tests/perfmon/perfmon.py
+++ b/client/tests/perfmon/perfmon.py
@@ -10,7 +10,7 @@
         tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
         utils.extract_tarball_to_dir(tarball, self.srcdir)
         os.chdir(self.srcdir)
-        utils.make()
+        utils.system('make')
 
 
     def initialize(self):
diff --git a/client/tests/pi_tests/pi_tests.py b/client/tests/pi_tests/pi_tests.py
index a68581a..f6f9020 100644
--- a/client/tests/pi_tests/pi_tests.py
+++ b/client/tests/pi_tests/pi_tests.py
@@ -15,7 +15,7 @@
         tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
         utils.extract_tarball_to_dir(tarball, self.srcdir)
         os.chdir(self.srcdir)
-        utils.make()
+        utils.system('make')
 
 
     def execute(self, args = '1 300'):
diff --git a/client/tests/posixtest/posixtest.py b/client/tests/posixtest/posixtest.py
index c8e3e19..cf68e6d 100644
--- a/client/tests/posixtest/posixtest.py
+++ b/client/tests/posixtest/posixtest.py
@@ -21,7 +21,7 @@
         # Applying a small patch that introduces some linux specific
         # linking options
         utils.system('patch -p1 < ../posix-linux.patch')
-        utils.make()
+        utils.system('make')
 
 
     def execute(self):
diff --git a/client/tests/qemu_iotests/qemu_iotests.py b/client/tests/qemu_iotests/qemu_iotests.py
index 1a036b9..33b24c3 100644
--- a/client/tests/qemu_iotests/qemu_iotests.py
+++ b/client/tests/qemu_iotests/qemu_iotests.py
@@ -34,7 +34,7 @@
         tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
         utils.extract_tarball_to_dir(tarball, self.srcdir)
         os.chdir(self.srcdir)
-        utils.make('clean')
+        utils.system("make clean")
 
 
     def run_once(self, options='', testlist=''):
diff --git a/client/tests/rtc/rtc.py b/client/tests/rtc/rtc.py
index 5345db1..49b2a9d 100644
--- a/client/tests/rtc/rtc.py
+++ b/client/tests/rtc/rtc.py
@@ -8,8 +8,8 @@
 
     def setup(self):
         os.chdir(self.srcdir)
-        utils.make('clobber')
-        utils.make()
+        utils.system('make clobber')
+        utils.system('make')
 
 
     def initialize(self):
diff --git a/client/tests/scrashme/scrashme.py b/client/tests/scrashme/scrashme.py
index 822d4d2..89b60b3 100644
--- a/client/tests/scrashme/scrashme.py
+++ b/client/tests/scrashme/scrashme.py
@@ -43,7 +43,7 @@
         tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
         utils.extract_tarball_to_dir(tarball, self.srcdir)
         os.chdir(self.srcdir)
-        utils.make()
+        utils.system('make')
 
 
     def run_once(self, args_list=''):
diff --git a/client/tests/signaltest/signaltest.py b/client/tests/signaltest/signaltest.py
index d8d047a..39303a1 100644
--- a/client/tests/signaltest/signaltest.py
+++ b/client/tests/signaltest/signaltest.py
@@ -14,7 +14,7 @@
     # git://git.kernel.org/pub/scm/linux/kernel/git/tglx/rt-tests.git
     def setup(self):
         os.chdir(self.srcdir)
-        utils.make()
+        utils.system('make')
 
 
     def execute(self, args = '-t 10 -l 100000'):
diff --git a/client/tests/sparse/sparse.py b/client/tests/sparse/sparse.py
index 53a0679..2a9d68c 100644
--- a/client/tests/sparse/sparse.py
+++ b/client/tests/sparse/sparse.py
@@ -15,7 +15,7 @@
         utils.extract_tarball_to_dir(tarball, self.srcdir)
         os.chdir(self.srcdir)
 
-        utils.make()
+        utils.system('make')
         utils.system('ln check sparse')
 
         self.top_dir = self.job.tmpdir+'/sparse'
diff --git a/client/tests/spew/spew.py b/client/tests/spew/spew.py
index 0c04bb0..8da0d28 100644
--- a/client/tests/spew/spew.py
+++ b/client/tests/spew/spew.py
@@ -15,8 +15,8 @@
         utils.extract_tarball_to_dir(self.tarball, self.srcdir)
 
         os.chdir(self.srcdir)
-        utils.configure()
-        utils.make()
+        utils.system('./configure')
+        utils.system('make')
 
 
     def run_once(self, testdir = None, filesize='100M', type='write',
diff --git a/client/tests/stress/stress.py b/client/tests/stress/stress.py
index 9b254da..c0447b2 100644
--- a/client/tests/stress/stress.py
+++ b/client/tests/stress/stress.py
@@ -23,8 +23,8 @@
         utils.extract_tarball_to_dir(tarball, self.srcdir)
         os.chdir(self.srcdir)
 
-        utils.configure()
-        utils.make()
+        utils.system('./configure')
+        utils.system('make')
 
 
     def run_once(self, args = '', stress_length=60):
diff --git a/client/tests/synctest/synctest.py b/client/tests/synctest/synctest.py
index 37d5143..2e5dd31 100644
--- a/client/tests/synctest/synctest.py
+++ b/client/tests/synctest/synctest.py
@@ -13,7 +13,7 @@
 
     def setup(self):
         os.chdir(self.srcdir)
-        utils.make()
+        utils.system('make')
 
 
     def run_once(self, len, loop, testdir=None):
diff --git a/client/tests/sysbench/sysbench.py b/client/tests/sysbench/sysbench.py
index 8a5400c..1db0ba1 100644
--- a/client/tests/sysbench/sysbench.py
+++ b/client/tests/sysbench/sysbench.py
@@ -25,7 +25,7 @@
         utils.system(
             'PATH=%s/bin:$PATH ./configure --with-mysql=%s --with-pgsql'
             % (pgsql_dir, mysql_dir))
-        utils.make('-j %d' % utils.count_cpus())
+        utils.system('make -j %d' % utils.count_cpus())
 
 
     def run_once(self, db_type = 'pgsql', build = 1, \
diff --git a/client/tests/systemtap/systemtap.py b/client/tests/systemtap/systemtap.py
index 08720c1..f220045 100644
--- a/client/tests/systemtap/systemtap.py
+++ b/client/tests/systemtap/systemtap.py
@@ -43,8 +43,8 @@
         testsuite = os.path.join(self.srcdir, 'testsuite')
         os.chdir(testsuite)
 
-        utils.configure()
-        utils.make()
+        utils.system('./configure')
+        utils.system('make')
 
         # Run a simple systemtap script to make sure systemtap and the
         # kernel debuginfo packages are correctly installed
diff --git a/client/tests/tbench/tbench.py b/client/tests/tbench/tbench.py
index 510bc2f..6e98807 100644
--- a/client/tests/tbench/tbench.py
+++ b/client/tests/tbench/tbench.py
@@ -15,8 +15,8 @@
         utils.extract_tarball_to_dir(tarball, self.srcdir)
         os.chdir(self.srcdir)
 
-        utils.configure()
-        utils.make()
+        utils.system('./configure')
+        utils.system('make')
 
 
     def run_once(self, nprocs = None, args = ''):
diff --git a/client/tests/tsc/tsc.py b/client/tests/tsc/tsc.py
index 1c1058d..2bac609 100644
--- a/client/tests/tsc/tsc.py
+++ b/client/tests/tsc/tsc.py
@@ -9,7 +9,7 @@
 
     def setup(self):
         os.chdir(self.srcdir)
-        utils.make()
+        utils.system('make')
 
 
     def initialize(self):
diff --git a/client/tests/unixbench/unixbench.py b/client/tests/unixbench/unixbench.py
index 1db49ac..b3fe920 100644
--- a/client/tests/unixbench/unixbench.py
+++ b/client/tests/unixbench/unixbench.py
@@ -19,7 +19,7 @@
 
         utils.system('patch -p1 < ../unixbench.patch')
         utils.system('patch -p1 < ../Makefile.patch')
-        utils.make()
+        utils.system('make')
         utils.system('rm pgms/select')
 
 
diff --git a/client/tests/xmtest/xmtest.py b/client/tests/xmtest/xmtest.py
index eb873de..d5f8040 100644
--- a/client/tests/xmtest/xmtest.py
+++ b/client/tests/xmtest/xmtest.py
@@ -26,8 +26,8 @@
         os.chdir(self.srcdir)
 
         utils.system('./autogen')
-        utils.configure()
-        utils.make('existing')
+        utils.system('./configure')
+        utils.system('make existing')
 
 
     def execute(self, args = ''):
diff --git a/frontend/client/src/autotest/afe/AfeClient.java b/frontend/client/src/autotest/afe/AfeClient.java
index bea6484..3546708 100644
--- a/frontend/client/src/autotest/afe/AfeClient.java
+++ b/frontend/client/src/autotest/afe/AfeClient.java
@@ -1,13 +1,12 @@
 package autotest.afe;
 
+import autotest.afe.CreateJobView.JobCreateListener;
 import autotest.afe.HostDetailView.HostDetailListener;
 import autotest.afe.HostListView.HostListListener;
 import autotest.afe.JobDetailView.JobDetailListener;
 import autotest.afe.JobListView.JobSelectListener;
 import autotest.afe.RecurringView.RecurringSelectListener;
 import autotest.afe.UserPreferencesView.UserPreferencesListener;
-import autotest.afe.create.CreateJobViewPresenter.JobCreateListener;
-import autotest.afe.create.CreateJobViewTab;
 import autotest.common.CustomHistory;
 import autotest.common.JsonRpcProxy;
 import autotest.common.SiteCommonClassFactory;
@@ -25,7 +24,7 @@
     private JobListView jobList;
     private JobDetailView jobDetail;
     private RecurringView recurringView;
-    private CreateJobViewTab createJob;
+    private CreateJobView createJob;
     private HostListView hostListView;
     private HostDetailView hostDetailView;
     private UserPreferencesView userPreferencesView;
@@ -38,7 +37,7 @@
     public void onModuleLoad() {
         JsonRpcProxy.setDefaultBaseUrl(JsonRpcProxy.AFE_BASE_URL);
         NotifyManager.getInstance().initialize();
-
+        
         // initialize static data, and don't show main UI until that's done
         StaticDataRepository.getRepository().refresh(
                                  new StaticDataRepository.FinishedCallback() {
@@ -47,13 +46,13 @@
             }
         });
     }
-
+    
     private JobCreateListener jobCreateListener = new JobCreateListener() {
         public void onJobCreated(int jobId) {
             showJob(jobId);
         }
     };
-
+    
     protected void finishLoading() {
         SiteCommonClassFactory.globalInitialize();
 
@@ -66,59 +65,59 @@
             public void onHostSelected(String hostname) {
                 showHost(hostname);
             }
-
+            
             public void onCloneJob(JSONValue cloneInfo) {
                 createJob.ensureInitialized();
                 createJob.cloneJob(cloneInfo);
                 mainTabPanel.selectTabView(createJob);
             }
-
+            
             public void onCreateRecurringJob(int jobId) {
                 recurringView.ensureInitialized();
                 recurringView.createRecurringJob(jobId);
                 mainTabPanel.selectTabView(recurringView);
             }
         });
-
-        recurringView = new RecurringView(new RecurringSelectListener() {
+        
+        recurringView = new RecurringView(new RecurringSelectListener() {                                                                                      
             public void onRecurringSelected(int jobId) {
             	showJob(jobId);
             }
         });
-
+            
         createJob = AfeUtils.factory.getCreateJobView(jobCreateListener);
-
+        
         hostListView = new HostListView(new HostListListener() {
             public void onHostSelected(String hostname) {
                 showHost(hostname);
             }
         }, jobCreateListener);
-
+        
         hostDetailView = new HostDetailView(new HostDetailListener() {
             public void onJobSelected(int jobId) {
                 showJob(jobId);
             }
         }, jobCreateListener);
-
+        
         userPreferencesView = new UserPreferencesView(new UserPreferencesListener() {
             public void onPreferencesChanged() {
                 createJob.onPreferencesChanged();
             }
         });
-
-        TabView[] tabViews = new TabView[] {jobList, jobDetail, recurringView, createJob,
+        
+        TabView[] tabViews = new TabView[] {jobList, jobDetail, recurringView, createJob, 
                                             hostListView, hostDetailView, userPreferencesView};
-        for (TabView tabView : tabViews) {
-            mainTabPanel.addTabView(tabView);
+        for(int i = 0; i < tabViews.length; i++) {
+            mainTabPanel.addTabView(tabViews[i]);
         }
-
+        
         final RootPanel tabsRoot = RootPanel.get("tabs");
         tabsRoot.add(mainTabPanel);
         CustomHistory.processInitialToken();
         mainTabPanel.initialize();
         tabsRoot.setStyleName("");
     }
-
+    
     protected void showJob(int jobId) {
         jobDetail.ensureInitialized();
         jobDetail.updateObjectId(Integer.toString(jobId));
diff --git a/frontend/client/src/autotest/afe/AfeUtils.java b/frontend/client/src/autotest/afe/AfeUtils.java
index f435a0a..3445b3c 100644
--- a/frontend/client/src/autotest/afe/AfeUtils.java
+++ b/frontend/client/src/autotest/afe/AfeUtils.java
@@ -1,6 +1,6 @@
 package autotest.afe;
 
-import autotest.afe.create.CreateJobViewPresenter.JobCreateListener;
+import autotest.afe.CreateJobView.JobCreateListener;
 import autotest.common.JSONArrayList;
 import autotest.common.JsonRpcCallback;
 import autotest.common.JsonRpcProxy;
@@ -10,7 +10,6 @@
 import autotest.common.table.JSONObjectSet;
 import autotest.common.ui.NotifyManager;
 import autotest.common.ui.RadioChooser;
-import autotest.common.ui.SimplifiedList;
 
 import com.google.gwt.json.client.JSONArray;
 import com.google.gwt.json.client.JSONBoolean;
@@ -61,7 +60,7 @@
 
     protected static String[] getFilteredLabelStrings(boolean onlyPlatforms,
                                                       boolean onlyNonPlatforms) {
-        assert !(onlyPlatforms && onlyNonPlatforms);
+        assert( !(onlyPlatforms && onlyNonPlatforms));
         JSONArray labels = staticData.getData("labels").isArray();
         List<String> result = new ArrayList<String>();
         for (int i = 0; i < labels.size(); i++) {
@@ -72,8 +71,8 @@
             if (atomicGroup != null) {
                 name += ATOMIC_GROUP_SUFFIX;
             }
-            if (onlyPlatforms && labelIsPlatform ||
-                onlyNonPlatforms && !labelIsPlatform) {
+            if ((onlyPlatforms && labelIsPlatform) ||
+                (onlyNonPlatforms && !labelIsPlatform)) {
                     result.add(name);
             } else if (!onlyPlatforms && !onlyNonPlatforms) {
                 if (labelIsPlatform) {
@@ -320,21 +319,13 @@
         }
     }
 
-    public static void populateListBox(ListBox box, String staticDataKey) {
+    public static void popualateListBox(ListBox box, String staticDataKey) {
         JSONArray options = staticData.getData(staticDataKey).isArray();
         for (JSONString jsonOption : new JSONArrayList<JSONString>(options)) {
             box.addItem(Utils.jsonToString(jsonOption));
         }
     }
 
-    public static void populateListBox(SimplifiedList box, String staticDataKey) {
-        JSONArray options = staticData.getData(staticDataKey).isArray();
-        for (JSONString jsonOption : new JSONArrayList<JSONString>(options)) {
-            String option = Utils.jsonToString(jsonOption);
-            box.addItem(option, option);
-        }
-    }
-
     public static void setSelectedItem(ListBox box, String item) {
         box.setSelectedIndex(0);
         for (int i = 0; i < box.getItemCount(); i++) {
diff --git a/frontend/client/src/autotest/afe/CheckBoxPanel.java b/frontend/client/src/autotest/afe/CheckBoxPanel.java
deleted file mode 100644
index 83776e4..0000000
--- a/frontend/client/src/autotest/afe/CheckBoxPanel.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package autotest.afe;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class CheckBoxPanel {
-    public static interface Display {
-        public ICheckBox generateCheckBox(int index);
-    }
-
-    private List<ICheckBox> checkBoxes = new ArrayList<ICheckBox>();
-    private Display display;
-
-    public void bindDisplay(Display display) {
-        this.display = display;
-    }
-
-    public ICheckBox generateCheckBox() {
-        return display.generateCheckBox(checkBoxes.size());
-    }
-
-    public void add(ICheckBox checkBox) {
-        checkBoxes.add(checkBox);
-    }
-
-    public List<ICheckBox> getChecked() {
-        List<ICheckBox> result = new ArrayList<ICheckBox>();
-        for(ICheckBox checkBox : checkBoxes) {
-            if (checkBox.getValue()) {
-                result.add(checkBox);
-            }
-        }
-        return result;
-    }
-
-    public void setEnabled(boolean enabled) {
-        for(ICheckBox thisBox : checkBoxes) {
-            thisBox.setEnabled(enabled);
-        }
-    }
-
-    public void reset() {
-        for (ICheckBox thisBox : checkBoxes) {
-            thisBox.setValue(false);
-        }
-    }
-}
diff --git a/frontend/client/src/autotest/afe/CheckBoxPanelDisplay.java b/frontend/client/src/autotest/afe/CheckBoxPanelDisplay.java
deleted file mode 100644
index 19618ed..0000000
--- a/frontend/client/src/autotest/afe/CheckBoxPanelDisplay.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package autotest.afe;
-
-import autotest.afe.ICheckBox.CheckBoxImpl;
-
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.FlexTable;
-
-public class CheckBoxPanelDisplay extends Composite implements CheckBoxPanel.Display {
-    private int numColumns;
-    private FlexTable table = new FlexTable();
-
-    public CheckBoxPanelDisplay(int numColumns) {
-        this.numColumns = numColumns;
-        initWidget(table);
-    }
-
-    public ICheckBox generateCheckBox(int index) {
-        CheckBoxImpl checkbox = new CheckBoxImpl();
-
-        int row = index / numColumns;
-        int col = index % numColumns;
-        table.setWidget(row, col, checkbox);
-
-        return checkbox;
-    }
-}
diff --git a/frontend/client/src/autotest/afe/ClassFactory.java b/frontend/client/src/autotest/afe/ClassFactory.java
index 4f5ae64..11b090c 100644
--- a/frontend/client/src/autotest/afe/ClassFactory.java
+++ b/frontend/client/src/autotest/afe/ClassFactory.java
@@ -1,10 +1,9 @@
 package autotest.afe;
 
-import autotest.afe.create.CreateJobViewPresenter.JobCreateListener;
-import autotest.afe.create.CreateJobViewTab;
+import autotest.afe.CreateJobView.JobCreateListener;
 
 class ClassFactory {
-    public CreateJobViewTab getCreateJobView(JobCreateListener listener) {
-        return new CreateJobViewTab(listener);
+    public CreateJobView getCreateJobView(JobCreateListener listener) {
+        return new CreateJobView(listener);
     }
 }
diff --git a/frontend/client/src/autotest/afe/ControlTypeSelect.java b/frontend/client/src/autotest/afe/ControlTypeSelect.java
deleted file mode 100644
index 342509f..0000000
--- a/frontend/client/src/autotest/afe/ControlTypeSelect.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package autotest.afe;
-
-public class ControlTypeSelect {
-    public static interface Display {
-        public IRadioButton getClient();
-        public IRadioButton getServer();
-    }
-
-    private Display display;
-
-    public void bindDisplay(Display display) {
-        this.display = display;
-        display.getClient().setText(TestSelector.CLIENT_TYPE);
-        display.getServer().setText(TestSelector.SERVER_TYPE);
-    }
-
-    public String getControlType() {
-        if (display.getClient().getValue()) {
-            return display.getClient().getText();
-        }
-        return display.getServer().getText();
-    }
-
-    public void setControlType(String type) {
-        if (display.getClient().getText().equals(type)) {
-            display.getClient().setValue(true);
-        } else if (display.getServer().getText().equals(type)) {
-            display.getServer().setValue(true);
-        } else {
-            throw new IllegalArgumentException("Invalid control type");
-        }
-    }
-
-    public void setEnabled(boolean enabled) {
-        display.getClient().setEnabled(enabled);
-        display.getServer().setEnabled(enabled);
-    }
-}
diff --git a/frontend/client/src/autotest/afe/ControlTypeSelectDisplay.java b/frontend/client/src/autotest/afe/ControlTypeSelectDisplay.java
deleted file mode 100644
index dd431e3..0000000
--- a/frontend/client/src/autotest/afe/ControlTypeSelectDisplay.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package autotest.afe;
-
-import autotest.afe.IRadioButton.RadioButtonImpl;
-
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.Panel;
-
-public class ControlTypeSelectDisplay extends Composite implements ControlTypeSelect.Display {
-    public static final String RADIO_GROUP = "controlTypeGroup";
-
-    private RadioButtonImpl client = new RadioButtonImpl(RADIO_GROUP);
-    private RadioButtonImpl server = new RadioButtonImpl(RADIO_GROUP);
-    private Panel panel = new HorizontalPanel();
-
-    public ControlTypeSelectDisplay() {
-        panel.add(client);
-        panel.add(server);
-        client.setValue(true); // client is default
-        initWidget(panel);
-    }
-
-    public IRadioButton getClient() {
-        return client;
-    }
-
-    public IRadioButton getServer() {
-        return server;
-    }
-}
diff --git a/frontend/client/src/autotest/afe/CreateJobView.java b/frontend/client/src/autotest/afe/CreateJobView.java
new file mode 100644
index 0000000..8b9e1fe
--- /dev/null
+++ b/frontend/client/src/autotest/afe/CreateJobView.java
@@ -0,0 +1,813 @@
+package autotest.afe;
+
+import autotest.afe.TestSelector.TestSelectorListener;
+import autotest.afe.UserPreferencesView.UserPreferencesListener;
+import autotest.common.JSONArrayList;
+import autotest.common.JsonRpcCallback;
+import autotest.common.JsonRpcProxy;
+import autotest.common.SimpleCallback;
+import autotest.common.StaticDataRepository;
+import autotest.common.Utils;
+import autotest.common.ui.NotifyManager;
+import autotest.common.ui.RadioChooser;
+import autotest.common.ui.TabView;
+
+import com.google.gwt.event.dom.client.BlurEvent;
+import com.google.gwt.event.dom.client.BlurHandler;
+import com.google.gwt.event.dom.client.ChangeEvent;
+import com.google.gwt.event.dom.client.ChangeHandler;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.dom.client.KeyCodes;
+import com.google.gwt.event.dom.client.KeyPressEvent;
+import com.google.gwt.event.dom.client.KeyPressHandler;
+import com.google.gwt.event.logical.shared.CloseEvent;
+import com.google.gwt.event.logical.shared.CloseHandler;
+import com.google.gwt.event.logical.shared.OpenEvent;
+import com.google.gwt.event.logical.shared.OpenHandler;
+import com.google.gwt.json.client.JSONArray;
+import com.google.gwt.json.client.JSONBoolean;
+import com.google.gwt.json.client.JSONNull;
+import com.google.gwt.json.client.JSONNumber;
+import com.google.gwt.json.client.JSONObject;
+import com.google.gwt.json.client.JSONString;
+import com.google.gwt.json.client.JSONValue;
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.ui.Anchor;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.CheckBox;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.DisclosurePanel;
+import com.google.gwt.user.client.ui.FlexTable;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.ListBox;
+import com.google.gwt.user.client.ui.Panel;
+import com.google.gwt.user.client.ui.RadioButton;
+import com.google.gwt.user.client.ui.TextArea;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.VerticalPanel;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class CreateJobView extends TabView
+                           implements TestSelectorListener, UserPreferencesListener {
+    public static final int TEST_COLUMNS = 5;
+
+    protected static final String EDIT_CONTROL_STRING = "Edit control file";
+    protected static final String UNEDIT_CONTROL_STRING= "Revert changes";
+    protected static final String VIEW_CONTROL_STRING = "View control file";
+    protected static final String HIDE_CONTROL_STRING = "Hide control file";
+
+    public interface JobCreateListener {
+        public void onJobCreated(int jobId);
+    }
+
+    protected JsonRpcProxy rpcProxy = JsonRpcProxy.getProxy();
+    protected JobCreateListener listener;
+
+    private static class CheckBoxPanel<T extends CheckBox> extends Composite {
+        protected int numColumns;
+        protected FlexTable table = new FlexTable();
+        protected List<T> testBoxes = new ArrayList<T>();
+
+        public CheckBoxPanel(int columns) {
+            numColumns = columns;
+            initWidget(table);
+        }
+
+        public void add(T checkBox) {
+            int row = testBoxes.size() / numColumns;
+            int col = testBoxes.size() % numColumns;
+            table.setWidget(row, col, checkBox);
+            testBoxes.add(checkBox);
+        }
+
+        public List<T> getChecked() {
+            List<T> result = new ArrayList<T>();
+            for(T checkBox : testBoxes) {
+                if (checkBox.getValue())
+                    result.add(checkBox);
+            }
+            return result;
+        }
+
+        public void setEnabled(boolean enabled) {
+            for(T thisBox : testBoxes) {
+                thisBox.setEnabled(enabled);
+            }
+        }
+
+        public void reset() {
+            for (T thisBox : testBoxes) {
+                thisBox.setValue(false);
+            }
+        }
+    }
+
+    private static class ControlTypeSelect extends Composite {
+        public static final String RADIO_GROUP = "controlTypeGroup";
+        protected RadioButton client, server;
+        protected Panel panel = new HorizontalPanel();
+
+        public ControlTypeSelect() {
+            client = new RadioButton(RADIO_GROUP, TestSelector.CLIENT_TYPE);
+            server = new RadioButton(RADIO_GROUP, TestSelector.SERVER_TYPE);
+            panel.add(client);
+            panel.add(server);
+            client.setValue(true); // client is default
+            initWidget(panel);
+
+            client.addClickHandler(new ClickHandler() {
+                public void onClick(ClickEvent event) {
+                    onChanged();
+                }
+            });
+            server.addClickHandler(new ClickHandler() {
+                public void onClick(ClickEvent event) {
+                    onChanged();
+                }
+            });
+        }
+
+        public String getControlType() {
+            if (client.getValue())
+                return client.getText();
+            return server.getText();
+        }
+
+        public void setControlType(String type) {
+            if (client.getText().equals(type))
+                client.setValue(true);
+            else if (server.getText().equals(type))
+                server.setValue(true);
+            else
+                throw new IllegalArgumentException("Invalid control type");
+            onChanged();
+        }
+
+        public void setEnabled(boolean enabled) {
+            client.setEnabled(enabled);
+            server.setEnabled(enabled);
+        }
+
+        protected void onChanged() {
+        }
+    }
+
+    protected StaticDataRepository staticData = StaticDataRepository.getRepository();
+
+    protected TextBox jobName = new TextBox();
+    protected ListBox priorityList = new ListBox();
+    protected TextBox kernel = new TextBox();
+    protected TextBox kernel_cmdline = new TextBox();
+    protected TextBox timeout = new TextBox();
+    private TextBox maxRuntime = new TextBox();
+    protected TextBox emailList = new TextBox();
+    protected CheckBox skipVerify = new CheckBox();
+    private RadioChooser rebootBefore = new RadioChooser();
+    private RadioChooser rebootAfter = new RadioChooser();
+    private CheckBox parseFailedRepair = new CheckBox();
+    private CheckBox hostless = new CheckBox();
+    protected TestSelector testSelector;
+    protected CheckBoxPanel<CheckBox> profilersPanel =
+        new CheckBoxPanel<CheckBox>(TEST_COLUMNS);
+    private CheckBox runNonProfiledIteration =
+        new CheckBox("Run each test without profilers first");
+    private ListBox droneSet = new ListBox();
+    protected TextArea controlFile = new TextArea();
+    protected DisclosurePanel controlFilePanel = new DisclosurePanel();
+    protected ControlTypeSelect controlTypeSelect;
+    protected TextBox synchCountInput = new TextBox();
+    protected Button editControlButton = new Button(EDIT_CONTROL_STRING);
+    protected HostSelector hostSelector;
+    protected Button submitJobButton = new Button("Submit Job");
+    protected Button createTemplateJobButton = new Button("Create Template Job");
+    private Button resetButton = new Button("Reset");
+
+    protected boolean controlEdited = false;
+    protected boolean controlReadyForSubmit = false;
+    private JSONArray dependencies = new JSONArray();
+
+    public CreateJobView(JobCreateListener listener) {
+        this.listener = listener;
+    }
+
+    @Override
+    public String getElementId() {
+        return "create_job";
+    }
+
+    public void cloneJob(JSONValue cloneInfo) {
+        // reset() fires the TestSelectorListener, which will generate a new control file. We do
+        // no want this, so we'll stop listening to it for a bit.
+        testSelector.setListener(null);
+        reset();
+        testSelector.setListener(this);
+
+        disableInputs();
+        openControlFileEditor();
+        JSONObject cloneObject = cloneInfo.isObject();
+        JSONObject jobObject = cloneObject.get("job").isObject();
+
+        jobName.setText(jobObject.get("name").isString().stringValue());
+
+        String priority = jobObject.get("priority").isString().stringValue();
+        for (int i = 0; i < priorityList.getItemCount(); i++) {
+            if (priorityList.getItemText(i).equals(priority)) {
+                priorityList.setSelectedIndex(i);
+                break;
+            }
+        }
+
+        timeout.setText(Utils.jsonToString(jobObject.get("timeout")));
+        maxRuntime.setText(Utils.jsonToString(jobObject.get("max_runtime_hrs")));
+        emailList.setText(
+                jobObject.get("email_list").isString().stringValue());
+
+        skipVerify.setValue(!jobObject.get("run_verify").isBoolean().booleanValue());
+        rebootBefore.setSelectedChoice(Utils.jsonToString(jobObject.get("reboot_before")));
+        rebootAfter.setSelectedChoice(Utils.jsonToString(jobObject.get("reboot_after")));
+        parseFailedRepair.setValue(
+                jobObject.get("parse_failed_repair").isBoolean().booleanValue());
+        hostless.setValue(cloneObject.get("hostless").isBoolean().booleanValue());
+        if (hostless.getValue()) {
+            hostSelector.setEnabled(false);
+        }
+        if (cloneObject.get("drone_set").isNull() == null) {
+            AfeUtils.setSelectedItem(droneSet, Utils.jsonToString(cloneObject.get("drone_set")));
+        }
+
+        controlTypeSelect.setControlType(
+                jobObject.get("control_type").isString().stringValue());
+        synchCountInput.setText(Utils.jsonToString(jobObject.get("synch_count")));
+        setSelectedDependencies(jobObject.get("dependencies").isArray());
+        controlFile.setText(
+                jobObject.get("control_file").isString().stringValue());
+        controlReadyForSubmit = true;
+
+        JSONArray hostInfo = cloneObject.get("hosts").isArray();
+        List<String> hostnames = new ArrayList<String>();
+        for (JSONObject host : new JSONArrayList<JSONObject>(hostInfo)) {
+            hostnames.add(Utils.jsonToString(host.get("hostname")));
+        }
+        hostSelector.setSelectedHostnames(hostnames, true);
+
+        JSONObject metaHostCounts = cloneObject.get("meta_host_counts").isObject();
+
+        for (String label : metaHostCounts.keySet()) {
+            String number = Integer.toString(
+                (int) metaHostCounts.get(label).isNumber().doubleValue());
+            hostSelector.addMetaHosts(label, number);
+        }
+
+        hostSelector.refresh();
+    }
+
+    protected void openControlFileEditor() {
+        controlFile.setReadOnly(false);
+        editControlButton.setText(UNEDIT_CONTROL_STRING);
+        controlFilePanel.setOpen(true);
+        controlTypeSelect.setEnabled(true);
+        synchCountInput.setEnabled(true);
+        editControlButton.setEnabled(true);
+    }
+
+    protected void populatePriorities(JSONArray priorities) {
+        for(int i = 0; i < priorities.size(); i++) {
+            JSONArray priorityData = priorities.get(i).isArray();
+            String priority = priorityData.get(1).isString().stringValue();
+            priorityList.addItem(priority);
+        }
+
+        resetPriorityToDefault();
+    }
+
+    protected void resetPriorityToDefault() {
+        JSONValue defaultValue = staticData.getData("default_priority");
+        String defaultPriority = defaultValue.isString().stringValue();
+        for(int i = 0; i < priorityList.getItemCount(); i++) {
+            if (priorityList.getItemText(i).equals(defaultPriority))
+                priorityList.setSelectedIndex(i);
+        }
+    }
+
+    protected void populateProfilers() {
+        JSONArray tests = staticData.getData("profilers").isArray();
+
+        for(JSONObject profiler : new JSONArrayList<JSONObject>(tests)) {
+            String name = profiler.get("name").isString().stringValue();
+            CheckBox checkbox = new CheckBox(name);
+            checkbox.addClickHandler(new ClickHandler() {
+                public void onClick(ClickEvent event) {
+                    updateNonProfiledRunControl();
+                    generateControlFile(false);
+                    setInputsEnabled();
+                }
+            });
+            profilersPanel.add(checkbox);
+        }
+
+        runNonProfiledIteration.addClickHandler(new ClickHandler() {
+            @Override
+            public void onClick(ClickEvent event) {
+                generateControlFile(false);
+            }
+        });
+        // default to checked -- run a non-profiled iteration by default
+        runNonProfiledIteration.setValue(true);
+    }
+
+    private void updateNonProfiledRunControl() {
+        boolean anyProfilersChecked = !profilersPanel.getChecked().isEmpty();
+        runNonProfiledIteration.setVisible(anyProfilersChecked);
+    }
+
+    private void populateRebootChoices() {
+        AfeUtils.populateRadioChooser(rebootBefore, "reboot_before");
+        AfeUtils.populateRadioChooser(rebootAfter, "reboot_after");
+    }
+
+
+    private JSONArray getKernelParams(String kernel_list, String cmdline) {
+        JSONArray result = new JSONArray();
+
+        for(String version: kernel_list.split("[, ]+")) {
+            Map<String, String> item = new HashMap<String, String>();
+
+            item.put("version", version);
+            // if there is a cmdline part, put it for all versions in the map
+            if (cmdline.length() > 0) {
+                item.put("cmdline", cmdline);
+            }
+
+            result.set(result.size(), Utils.mapToJsonObject(item));
+        }
+
+        return result;
+    }
+    /**
+     * Get parameters to submit to the generate_control_file RPC.
+     * @param readyForSubmit are we getting a control file that's ready to submit for a job, or just
+     * an intermediate control file to be viewed by the user?
+     */
+    protected JSONObject getControlFileParams(boolean readyForSubmit) {
+        JSONObject params = new JSONObject();
+
+        String kernelString = kernel.getText();
+        if (!kernelString.equals("")) {
+            params.put("kernel", getKernelParams(kernelString, kernel_cmdline.getText()));
+        }
+
+        JSONArray tests = new JSONArray();
+        for (JSONObject test : testSelector.getSelectedTests()) {
+            tests.set(tests.size(), test.get("id"));
+        }
+
+        JSONArray profilers = new JSONArray();
+        for (CheckBox profiler : profilersPanel.getChecked()) {
+            profilers.set(profilers.size(), new JSONString(profiler.getText()));
+        }
+
+        params.put("tests", tests);
+        params.put("profilers", profilers);
+
+        if (runNonProfiledIteration.isVisible()) {
+            boolean profileOnly = !runNonProfiledIteration.getValue();
+            params.put("profile_only", JSONBoolean.getInstance(profileOnly));
+        }
+
+        return params;
+    }
+
+    protected void generateControlFile(final boolean readyForSubmit,
+                                       final SimpleCallback finishedCallback,
+                                       final SimpleCallback errorCallback) {
+        JSONObject params = getControlFileParams(readyForSubmit);
+        rpcProxy.rpcCall("generate_control_file", params, new JsonRpcCallback() {
+            @Override
+            public void onSuccess(JSONValue result) {
+                JSONObject controlInfo = result.isObject();
+                String controlFileText = controlInfo.get("control_file").isString().stringValue();
+                boolean isServer = controlInfo.get("is_server").isBoolean().booleanValue();
+                String synchCount = Utils.jsonToString(controlInfo.get("synch_count"));
+                setSelectedDependencies(controlInfo.get("dependencies").isArray());
+                controlFile.setText(controlFileText);
+                controlTypeSelect.setControlType(isServer ? TestSelector.SERVER_TYPE :
+                                                            TestSelector.CLIENT_TYPE);
+                synchCountInput.setText(synchCount);
+                controlReadyForSubmit = readyForSubmit;
+                if (finishedCallback != null)
+                    finishedCallback.doCallback(this);
+            }
+
+            @Override
+            public void onError(JSONObject errorObject) {
+                super.onError(errorObject);
+                if (errorCallback != null)
+                    errorCallback.doCallback(this);
+            }
+        });
+    }
+
+    protected void generateControlFile(boolean readyForSubmit) {
+        generateControlFile(readyForSubmit, null, null);
+    }
+
+    public void handleSkipVerify() {
+        boolean shouldSkipVerify = false;
+        for (JSONObject test : testSelector.getSelectedTests()) {
+            boolean runVerify = test.get("run_verify").isBoolean().booleanValue();
+            if (!runVerify) {
+                shouldSkipVerify = true;
+                break;
+            }
+        }
+
+        if (shouldSkipVerify) {
+            skipVerify.setValue(true);
+            skipVerify.setEnabled(false);
+        } else {
+            skipVerify.setEnabled(true);
+        }
+    }
+
+    protected void setInputsEnabled() {
+        testSelector.setEnabled(true);
+        profilersPanel.setEnabled(true);
+        handleSkipVerify();
+        kernel.setEnabled(true);
+        kernel_cmdline.setEnabled(true);
+    }
+
+    protected  boolean isClientTypeSelected() {
+        return testSelector.getSelectedTestType().equals(TestSelector.CLIENT_TYPE);
+    }
+
+    protected void disableInputs() {
+        testSelector.setEnabled(false);
+        profilersPanel.setEnabled(false);
+        kernel.setEnabled(false);
+        kernel_cmdline.setEnabled(false);
+    }
+
+    @Override
+    public void initialize() {
+        super.initialize();
+
+        populatePriorities(staticData.getData("priorities").isArray());
+
+        BlurHandler kernelBlurHandler = new BlurHandler() {
+            public void onBlur(BlurEvent event) {
+                generateControlFile(false);
+            }
+        };
+
+        kernel.addBlurHandler(kernelBlurHandler);
+        kernel_cmdline.addBlurHandler(kernelBlurHandler);
+
+        KeyPressHandler kernelKeyPressHandler = new KeyPressHandler() {
+            public void onKeyPress(KeyPressEvent event) {
+                if (event.getCharCode() == (char) KeyCodes.KEY_ENTER)
+                    generateControlFile(false);
+            }
+        };
+
+        kernel.addKeyPressHandler(kernelKeyPressHandler);
+        kernel_cmdline.addKeyPressHandler(kernelKeyPressHandler);
+
+        populateProfilers();
+        Panel profilerControls = new VerticalPanel();
+        profilerControls.add(profilersPanel);
+        profilerControls.add(runNonProfiledIteration);
+        updateNonProfiledRunControl();
+
+        testSelector = new TestSelector();
+
+        populateRebootChoices();
+        onPreferencesChanged();
+
+        controlFile.setSize("50em", "30em");
+        controlTypeSelect = new ControlTypeSelect();
+        HorizontalPanel controlOptionsPanel = new HorizontalPanel();
+        controlOptionsPanel.setVerticalAlignment(HorizontalPanel.ALIGN_BOTTOM);
+        controlOptionsPanel.add(controlTypeSelect);
+        Label useLabel = new Label("Use");
+        useLabel.getElement().getStyle().setProperty("marginLeft", "1em");
+        synchCountInput.setSize("3em", ""); // set width only
+        synchCountInput.getElement().getStyle().setProperty("margin", "0 0.5em 0 0.5em");
+        controlOptionsPanel.add(useLabel);
+        controlOptionsPanel.add(synchCountInput);
+        controlOptionsPanel.add(new Label("host(s) per execution"));
+        Panel controlEditPanel = new VerticalPanel();
+        controlEditPanel.add(controlOptionsPanel);
+        controlEditPanel.add(controlFile);
+
+        Panel controlHeaderPanel = new HorizontalPanel();
+        final Anchor viewLink = new Anchor(VIEW_CONTROL_STRING);
+        controlHeaderPanel.add(viewLink);
+        controlHeaderPanel.add(editControlButton);
+
+        if (parameterizedJobsEnabled()) {
+            editControlButton.setEnabled(false);
+        }
+
+        controlFilePanel.setHeader(controlHeaderPanel);
+        controlFilePanel.add(controlEditPanel);
+
+        editControlButton.addClickHandler(new ClickHandler() {
+            public void onClick(ClickEvent event) {
+                DOM.eventCancelBubble(DOM.eventGetCurrentEvent(), true);
+
+                if (editControlButton.getText().equals(EDIT_CONTROL_STRING)) {
+                    disableInputs();
+                    editControlButton.setEnabled(false);
+                    SimpleCallback onGotControlFile = new SimpleCallback() {
+                        public void doCallback(Object source) {
+                            openControlFileEditor();
+                        }
+                    };
+                    SimpleCallback onControlFileError = new SimpleCallback() {
+                        public void doCallback(Object source) {
+                            setInputsEnabled();
+                            editControlButton.setEnabled(true);
+                        }
+                    };
+                    generateControlFile(true, onGotControlFile, onControlFileError);
+                }
+                else {
+                    if (controlEdited &&
+                        !Window.confirm("Are you sure you want to revert your" +
+                                        " changes?"))
+                        return;
+                    generateControlFile(false);
+                    controlFile.setReadOnly(true);
+                    setInputsEnabled();
+                    editControlButton.setText(EDIT_CONTROL_STRING);
+                    controlTypeSelect.setEnabled(false);
+                    synchCountInput.setEnabled(false);
+                    controlEdited = false;
+                }
+            }
+        });
+
+        controlFile.addChangeHandler(new ChangeHandler() {
+            public void onChange(ChangeEvent event) {
+                controlEdited = true;
+            }
+        });
+
+        controlFilePanel.addCloseHandler(new CloseHandler<DisclosurePanel>() {
+            public void onClose(CloseEvent<DisclosurePanel> event) {
+                viewLink.setText(VIEW_CONTROL_STRING);
+            }
+        });
+
+        controlFilePanel.addOpenHandler(new OpenHandler<DisclosurePanel>() {
+            public void onOpen(OpenEvent<DisclosurePanel> event) {
+                viewLink.setText(HIDE_CONTROL_STRING);
+            }
+        });
+
+        hostSelector = new HostSelector();
+        HostSelectorDisplay hostSelectorDisplay = new HostSelectorDisplay();
+        hostSelector.initialize();
+        hostSelector.bindDisplay(hostSelectorDisplay);
+
+        submitJobButton.addClickHandler(new ClickHandler() {
+            public void onClick(ClickEvent event) {
+                submitJob(false);
+            }
+        });
+
+        createTemplateJobButton.addClickHandler(new ClickHandler() {
+            public void onClick(ClickEvent event) {
+                submitJob(true);
+            }
+        });
+
+        resetButton.addClickHandler(new ClickHandler() {
+            public void onClick(ClickEvent event) {
+                reset();
+            }
+        });
+
+        hostless.addClickHandler(new ClickHandler() {
+            @Override
+            public void onClick(ClickEvent event) {
+                hostSelector.setEnabled(!hostless.getValue());
+            }
+        });
+
+        reset();
+
+        addWidget(jobName, "create_job_name");
+        addWidget(kernel, "create_kernel");
+        addWidget(kernel_cmdline, "create_kernel_cmdline");
+        addWidget(timeout, "create_timeout");
+        addWidget(maxRuntime, "create_max_runtime");
+        addWidget(emailList, "create_email_list");
+        addWidget(priorityList, "create_priority");
+        addWidget(skipVerify, "create_skip_verify");
+        addWidget(rebootBefore, "create_reboot_before");
+        addWidget(rebootAfter, "create_reboot_after");
+        addWidget(parseFailedRepair, "create_parse_failed_repair");
+        addWidget(hostless, "create_hostless");
+        addWidget(testSelector, "create_tests");
+        addWidget(profilerControls, "create_profilers");
+        addWidget(controlFilePanel, "create_edit_control");
+        addWidget(hostSelectorDisplay, "create_host_selector");
+        addWidget(submitJobButton, "create_submit");
+        addWidget(createTemplateJobButton, "create_template_job");
+        addWidget(resetButton, "create_reset");
+
+        if (staticData.getData("drone_sets_enabled").isBoolean().booleanValue()) {
+            AfeUtils.popualateListBox(droneSet, "drone_sets");
+            addWidget(droneSet, "create_drone_set");
+        } else {
+            AfeUtils.removeElement("create_drone_set_wrapper");
+        }
+
+        testSelector.setListener(this);
+    }
+
+    public void reset() {
+        StaticDataRepository repository = StaticDataRepository.getRepository();
+
+        jobName.setText("");
+        resetPriorityToDefault();
+        rebootBefore.reset();
+        rebootAfter.reset();
+        parseFailedRepair.setValue(
+                repository.getData("parse_failed_repair_default").isBoolean().booleanValue());
+        hostless.setValue(false);
+        kernel.setText("");
+        kernel_cmdline.setText("");
+        timeout.setText(Utils.jsonToString(repository.getData("job_timeout_default")));
+        maxRuntime.setText(Utils.jsonToString(repository.getData("job_max_runtime_hrs_default")));
+        emailList.setText("");
+        testSelector.reset();
+        skipVerify.setValue(false);
+        profilersPanel.reset();
+        setInputsEnabled();
+        controlTypeSelect.setControlType(TestSelector.CLIENT_TYPE);
+        controlTypeSelect.setEnabled(false);
+        synchCountInput.setEnabled(false);
+        synchCountInput.setText("1");
+        controlFile.setText("");
+        controlFile.setReadOnly(true);
+        controlEdited = false;
+        controlFilePanel.setOpen(false);
+        editControlButton.setText(EDIT_CONTROL_STRING);
+        hostSelector.reset();
+        dependencies = new JSONArray();
+    }
+
+    protected void submitJob(final boolean isTemplate) {
+        final int timeoutValue, maxRuntimeValue;
+        final JSONValue synchCount;
+        try {
+            timeoutValue = parsePositiveIntegerInput(timeout.getText(), "timeout");
+            maxRuntimeValue = parsePositiveIntegerInput(maxRuntime.getText(), "max runtime");
+
+            if (hostless.getValue()) {
+                synchCount = JSONNull.getInstance();
+            } else {
+                synchCount = new JSONNumber(parsePositiveIntegerInput(
+                    synchCountInput.getText(), "number of machines used per execution"));
+            }
+        } catch (IllegalArgumentException exc) {
+            return;
+        }
+
+        // disallow accidentally clicking submit twice
+        submitJobButton.setEnabled(false);
+
+        final SimpleCallback doSubmit = new SimpleCallback() {
+            public void doCallback(Object source) {
+                JSONObject args = new JSONObject();
+                args.put("name", new JSONString(jobName.getText()));
+                String priority = priorityList.getItemText(priorityList.getSelectedIndex());
+                args.put("priority", new JSONString(priority));
+                args.put("control_file", new JSONString(controlFile.getText()));
+                args.put("control_type",
+                         new JSONString(controlTypeSelect.getControlType()));
+                args.put("synch_count", synchCount);
+                args.put("timeout", new JSONNumber(timeoutValue));
+                args.put("max_runtime_hrs", new JSONNumber(maxRuntimeValue));
+                args.put("email_list", new JSONString(emailList.getText()));
+                args.put("run_verify", JSONBoolean.getInstance(!skipVerify.getValue()));
+                args.put("is_template", JSONBoolean.getInstance(isTemplate));
+                args.put("dependencies", getSelectedDependencies());
+                args.put("reboot_before", new JSONString(rebootBefore.getSelectedChoice()));
+                args.put("reboot_after", new JSONString(rebootAfter.getSelectedChoice()));
+                args.put("parse_failed_repair",
+                         JSONBoolean.getInstance(parseFailedRepair.getValue()));
+                args.put("hostless", JSONBoolean.getInstance(hostless.getValue()));
+
+                if (staticData.getData("drone_sets_enabled").isBoolean().booleanValue()) {
+                    args.put("drone_set",
+                            new JSONString(droneSet.getItemText(droneSet.getSelectedIndex())));
+                }
+
+                HostSelector.HostSelection hosts = hostSelector.getSelectedHosts();
+                args.put("hosts", Utils.stringsToJSON(hosts.hosts));
+                args.put("meta_hosts", Utils.stringsToJSON(hosts.metaHosts));
+                args.put("one_time_hosts",
+                    Utils.stringsToJSON(hosts.oneTimeHosts));
+
+                rpcProxy.rpcCall("create_job", args, new JsonRpcCallback() {
+                    @Override
+                    public void onSuccess(JSONValue result) {
+                        int id = (int) result.isNumber().doubleValue();
+                        NotifyManager.getInstance().showMessage(
+                                    "Job " + Integer.toString(id) + " created");
+                        reset();
+                        if (listener != null)
+                            listener.onJobCreated(id);
+                        submitJobButton.setEnabled(true);
+                    }
+
+                    @Override
+                    public void onError(JSONObject errorObject) {
+                        super.onError(errorObject);
+                        submitJobButton.setEnabled(true);
+                    }
+                });
+            }
+        };
+
+        // ensure control file is ready for submission
+        if (!controlReadyForSubmit)
+            generateControlFile(true, doSubmit, new SimpleCallback() {
+                public void doCallback(Object source) {
+                    submitJobButton.setEnabled(true);
+                }
+            });
+        else
+            doSubmit.doCallback(this);
+    }
+
+    private JSONArray getSelectedDependencies() {
+        return dependencies;
+    }
+
+    private void setSelectedDependencies(JSONArray dependencies) {
+        this.dependencies = dependencies;
+    }
+
+    private int parsePositiveIntegerInput(String input, String fieldName) {
+        final int parsedInt;
+        try {
+            if (input.equals("") ||
+                (parsedInt = Integer.parseInt(input)) <= 0) {
+                    String error = "Please enter a positive " + fieldName;
+                    NotifyManager.getInstance().showError(error);
+                    throw new IllegalArgumentException();
+            }
+        } catch (NumberFormatException e) {
+            String error = "Invalid " + fieldName + ": \"" + input + "\"";
+            NotifyManager.getInstance().showError(error);
+            throw new IllegalArgumentException();
+        }
+        return parsedInt;
+    }
+
+    @Override
+    public void refresh() {
+        super.refresh();
+        hostSelector.refresh();
+    }
+
+    public void onTestSelectionChanged() {
+        generateControlFile(false);
+        setInputsEnabled();
+    }
+
+    private void setRebootSelectorDefault(RadioChooser chooser, String name) {
+        JSONObject user = staticData.getData("current_user").isObject();
+        String defaultOption = Utils.jsonToString(user.get(name));
+        chooser.setDefaultChoice(defaultOption);
+    }
+
+    private void selectPreferredDroneSet() {
+        JSONObject user = staticData.getData("current_user").isObject();
+        String preference = Utils.jsonToString(user.get("drone_set"));
+        AfeUtils.setSelectedItem(droneSet, preference);
+    }
+
+    public void onPreferencesChanged() {
+        setRebootSelectorDefault(rebootBefore, "reboot_before");
+        setRebootSelectorDefault(rebootAfter, "reboot_after");
+        selectPreferredDroneSet();
+        testSelector.reset();
+    }
+
+    private boolean parameterizedJobsEnabled() {
+        return staticData.getData("parameterized_jobs").isBoolean().booleanValue();
+    }
+}
diff --git a/frontend/client/src/autotest/afe/HostDetailView.java b/frontend/client/src/autotest/afe/HostDetailView.java
index 8e8f5f6..54acf1a 100644
--- a/frontend/client/src/autotest/afe/HostDetailView.java
+++ b/frontend/client/src/autotest/afe/HostDetailView.java
@@ -1,20 +1,20 @@
 package autotest.afe;
 
-import autotest.afe.create.CreateJobViewPresenter.JobCreateListener;
+import autotest.afe.CreateJobView.JobCreateListener;
 import autotest.common.SimpleCallback;
 import autotest.common.Utils;
 import autotest.common.table.DataSource;
+import autotest.common.table.DataTable;
+import autotest.common.table.DynamicTable;
+import autotest.common.table.RpcDataSource;
+import autotest.common.table.SelectionManager;
+import autotest.common.table.SimpleFilter;
+import autotest.common.table.TableDecorator;
 import autotest.common.table.DataSource.DataCallback;
 import autotest.common.table.DataSource.Query;
 import autotest.common.table.DataSource.SortDirection;
-import autotest.common.table.DataTable;
-import autotest.common.table.DynamicTable;
 import autotest.common.table.DynamicTable.DynamicTableListener;
-import autotest.common.table.RpcDataSource;
-import autotest.common.table.SelectionManager;
 import autotest.common.table.SelectionManager.SelectableRowFilter;
-import autotest.common.table.SimpleFilter;
-import autotest.common.table.TableDecorator;
 import autotest.common.ui.ContextMenu;
 import autotest.common.ui.DetailView;
 import autotest.common.ui.NotifyManager;
@@ -33,19 +33,19 @@
 
 import java.util.List;
 
-public class HostDetailView extends DetailView
+public class HostDetailView extends DetailView 
                             implements DataCallback, TableActionsListener, SelectableRowFilter {
     private static final String[][] HOST_JOBS_COLUMNS = {
-            {DataTable.WIDGET_COLUMN, ""}, {"type", "Type"}, {"job__id", "Job ID"},
+            {DataTable.WIDGET_COLUMN, ""}, {"type", "Type"}, {"job__id", "Job ID"}, 
             {"job_owner", "Job Owner"}, {"job_name", "Job Name"}, {"started_on", "Time started"},
             {"status", "Status"}
     };
     public static final int JOBS_PER_PAGE = 20;
-
+    
     public interface HostDetailListener {
         public void onJobSelected(int jobId);
     }
-
+    
     private static class HostQueueEntryDataSource extends RpcDataSource {
         public HostQueueEntryDataSource() {
             super("get_host_queue_entries", "get_num_host_queue_entries");
@@ -62,10 +62,10 @@
             return resultArray;
         }
     }
-
+    
     private static class HostJobsTable extends DynamicTable {
         private static final DataSource normalDataSource = new HostQueueEntryDataSource();
-        private static final DataSource dataSourceWithSpecialTasks =
+        private static final DataSource dataSourceWithSpecialTasks = 
             new RpcDataSource("get_host_queue_entries_and_special_tasks",
                               "get_num_host_queue_entries_and_special_tasks");
 
@@ -76,7 +76,7 @@
             super(HOST_JOBS_COLUMNS, normalDataSource);
             addFilter(hostFilter);
         }
-
+        
         public void setHostname(String hostname) {
             this.hostname = hostname;
             updateFilter();
@@ -95,14 +95,14 @@
             hostFilter.clear();
             hostFilter.setParameter(key, new JSONString(hostname));
         }
-
+        
         public void setSpecialTasksEnabled(boolean enabled) {
             if (enabled) {
                 setDataSource(dataSourceWithSpecialTasks);
             } else {
                 setDataSource(normalDataSource);
             }
-
+            
             updateFilter();
         }
 
@@ -123,7 +123,7 @@
             row.put("job_name", name);
         }
     }
-
+    
     private String hostname = "";
     private DataSource hostDataSource = new HostDataSource();
     private HostJobsTable jobsTable = new HostJobsTable();
@@ -131,9 +131,9 @@
     private HostDetailListener hostDetailListener = null;
     private JobCreateListener jobCreateListener = null;
     private SelectionManager selectionManager;
-
+    
     private JSONObject currentHostObject;
-
+    
     private Button lockButton = new Button();
     private Button reverifyButton = new Button("Reverify");
     private Button reinstallButton = new Button("Reinstall");
@@ -154,12 +154,12 @@
     protected String getFetchControlsElementId() {
         return "view_host_fetch_controls";
     }
-
+    
     @Override
     protected String getDataElementId() {
         return "view_host_data";
     }
-
+    
     @Override
     protected String getTitleElementId() {
         return "view_host_title";
@@ -169,20 +169,19 @@
     protected String getNoObjectText() {
         return "No host selected";
     }
-
+    
     @Override
     protected String getObjectId() {
         return hostname;
     }
-
+    
     @Override
     protected void setObjectId(String id) {
-        if (id.length() == 0) {
+        if (id.length() == 0)
             throw new IllegalArgumentException();
-        }
         this.hostname = id;
     }
-
+    
     @Override
     protected void fetchData() {
         JSONObject params = new JSONObject();
@@ -208,14 +207,14 @@
             resetPage();
             return;
         }
-
+        
         String lockedText = Utils.jsonToString(currentHostObject.get(HostDataSource.LOCKED_TEXT));
         if (currentHostObject.get("locked").isBoolean().booleanValue()) {
             String lockedBy = Utils.jsonToString(currentHostObject.get("locked_by"));
             String lockedTime = Utils.jsonToString(currentHostObject.get("lock_time"));
             lockedText += ", by " + lockedBy + " on " + lockedTime;
         }
-
+        
         showField(currentHostObject, "status", "view_host_status");
         showField(currentHostObject, "platform", "view_host_platform");
         showField(currentHostObject, HostDataSource.HOST_ACLS, "view_host_acls");
@@ -225,15 +224,15 @@
         String pageTitle = "Host " + hostname;
         updateLockButton();
         displayObjectData(pageTitle);
-
+        
         jobsTable.setHostname(hostname);
         jobsTable.refresh();
     }
-
+    
     @Override
     public void initialize() {
         super.initialize();
-
+        
         jobsTable.setRowsPerPage(JOBS_PER_PAGE);
         jobsTable.setClickable(true);
         jobsTable.addListener(new DynamicTableListener() {
@@ -257,26 +256,26 @@
         tableDecorator.addTableActionsPanel(this, true);
         tableDecorator.addControl("Show verifies, repairs and cleanups", showSpecialTasks);
         addWidget(tableDecorator, "view_host_jobs_table");
-
+        
         showSpecialTasks.addClickHandler(new ClickHandler() {
             public void onClick(ClickEvent event) {
                 jobsTable.setSpecialTasksEnabled(showSpecialTasks.getValue());
                 jobsTable.refresh();
             }
         });
-
+        
         lockButton.addClickHandler(new ClickHandler() {
             public void onClick(ClickEvent event) {
                boolean locked = currentHostObject.get("locked").isBoolean().booleanValue();
                changeLock(!locked);
-            }
+            } 
         });
         addWidget(lockButton, "view_host_lock_button");
-
+        
         reverifyButton.addClickHandler(new ClickHandler() {
             public void onClick(ClickEvent event) {
                 JSONObject params = new JSONObject();
-
+                
                 params.put("id", currentHostObject.get("id"));
                 AfeUtils.callReverify(params, new SimpleCallback() {
                     public void doCallback(Object source) {
@@ -286,7 +285,7 @@
             }
         });
         addWidget(reverifyButton, "view_host_reverify_button");
-
+        
         reinstallButton.addClickHandler(new ClickHandler() {
             public void onClick(ClickEvent event) {
                 JSONArray array = new JSONArray();
@@ -315,10 +314,10 @@
         AfeUtils.abortHostQueueEntries(selectionManager.getSelectedObjects(), new SimpleCallback() {
             public void doCallback(Object source) {
                 refresh();
-            }
+            } 
         });
     }
-
+    
     private void updateLockButton() {
         boolean locked = currentHostObject.get("locked").isBoolean().booleanValue();
         if (locked) {
@@ -327,18 +326,18 @@
             lockButton.setText("Lock");
         }
     }
-
+    
     private void changeLock(final boolean lock) {
         JSONArray hostIds = new JSONArray();
         hostIds.set(0, currentHostObject.get("id"));
-
+        
         AfeUtils.changeHostLocks(hostIds, lock, "Host " + hostname, new SimpleCallback() {
             public void doCallback(Object source) {
                 refresh();
             }
         });
     }
-
+    
     private boolean isJobRow(JSONObject row) {
         String type = Utils.jsonToString(row.get("type"));
         return type.equals("Job");
diff --git a/frontend/client/src/autotest/afe/HostListView.java b/frontend/client/src/autotest/afe/HostListView.java
index 55d1610..94d1ade 100644
--- a/frontend/client/src/autotest/afe/HostListView.java
+++ b/frontend/client/src/autotest/afe/HostListView.java
@@ -1,9 +1,9 @@
 package autotest.afe;
 
-import autotest.afe.create.CreateJobViewPresenter.JobCreateListener;
+import autotest.afe.CreateJobView.JobCreateListener;
 import autotest.common.SimpleCallback;
-import autotest.common.table.DynamicTable.DynamicTableListener;
 import autotest.common.table.SelectionManager;
+import autotest.common.table.DynamicTable.DynamicTableListener;
 import autotest.common.ui.ContextMenu;
 import autotest.common.ui.NotifyManager;
 import autotest.common.ui.TabView;
@@ -17,14 +17,14 @@
 
 public class HostListView extends TabView implements TableActionsListener {
     protected static final int HOSTS_PER_PAGE = 30;
-
+    
     public interface HostListListener {
         public void onHostSelected(String hostname);
     }
-
+    
     protected HostListListener hostListListener = null;
     private JobCreateListener jobCreateListener = null;
-
+    
     public HostListView(HostListListener hostListListener, JobCreateListener jobCreateListener) {
         this.hostListListener = hostListListener;
         this.jobCreateListener = jobCreateListener;
@@ -34,32 +34,32 @@
     public String getElementId() {
         return "hosts";
     }
-
+    
     protected HostTable table;
     protected HostTableDecorator hostTableDecorator;
     protected SelectionManager selectionManager;
-
+    
     @Override
     public void initialize() {
         super.initialize();
-
+        
         table = new HostTable(new HostDataSource(), true);
         hostTableDecorator = new HostTableDecorator(table, HOSTS_PER_PAGE);
-
+        
         selectionManager = hostTableDecorator.addSelectionManager(false);
         table.setWidgetFactory(selectionManager);
         hostTableDecorator.addTableActionsPanel(this, true);
-
+        
         table.setClickable(true);
         table.addListener(new DynamicTableListener() {
             public void onRowClicked(int rowIndex, JSONObject row, boolean isRightClick) {
                 String hostname = row.get("hostname").isString().stringValue();
                 hostListListener.onHostSelected(hostname);
             }
-
+            
             public void onTableRefreshed() {}
         });
-
+        
         addWidget(hostTableDecorator, "hosts_list");
     }
 
@@ -68,14 +68,14 @@
         super.refresh();
         table.refresh();
     }
-
+    
     private void reverifySelectedHosts() {
         JSONObject params = new JSONObject();
         JSONArray hostIds = getSelectedHostIds();
         if (hostIds == null) {
             return;
         }
-
+        
         params.put("id__in", hostIds);
         AfeUtils.callReverify(params, new SimpleCallback() {
             public void doCallback(Object source) {
@@ -83,33 +83,33 @@
             }
         }, "Hosts");
     }
-
+    
     private void changeLockStatus(final boolean lock) {
         JSONArray hostIds = getSelectedHostIds();
         if (hostIds == null) {
             return;
         }
-
+        
         AfeUtils.changeHostLocks(hostIds, lock, "Hosts", new SimpleCallback() {
             public void doCallback(Object source) {
                 refresh();
             }
         });
     }
-
+    
     private void reinstallSelectedHosts() {
         Set<JSONObject> selectedSet = getSelectedHosts();
         if (selectedSet == null) {
             return;
         }
-
+        
         JSONArray array = new JSONArray();
         for (JSONObject host : selectedSet) {
             array.set(array.size(), host.get("hostname"));
         }
         AfeUtils.scheduleReinstall(array, "Hosts", jobCreateListener);
     }
-
+    
     private Set<JSONObject> getSelectedHosts() {
         Set<JSONObject> selectedSet = selectionManager.getSelectedObjects();
         if (selectedSet.isEmpty()) {
@@ -118,21 +118,21 @@
         }
         return selectedSet;
     }
-
+    
     private JSONArray getSelectedHostIds() {
         Set<JSONObject> selectedSet = getSelectedHosts();
         if (selectedSet == null) {
             return null;
         }
-
+        
         JSONArray ids = new JSONArray();
         for (JSONObject jsonObj : selectedSet) {
             ids.set(ids.size(), jsonObj.get("id"));
         }
-
+        
         return ids;
     }
-
+    
     public ContextMenu getActionMenu() {
         ContextMenu menu = new ContextMenu();
         menu.addItem("Reverify hosts", new Command() {
@@ -155,7 +155,7 @@
                 reinstallSelectedHosts();
             }
         });
-
+        
         return menu;
     }
 }
diff --git a/frontend/client/src/autotest/afe/HostSelector.java b/frontend/client/src/autotest/afe/HostSelector.java
index b4c9838..22951b2 100644
--- a/frontend/client/src/autotest/afe/HostSelector.java
+++ b/frontend/client/src/autotest/afe/HostSelector.java
@@ -2,12 +2,12 @@
 
 import autotest.common.Utils;
 import autotest.common.table.ArrayDataSource;
+import autotest.common.table.SelectionManager;
+import autotest.common.table.TableDecorator;
 import autotest.common.table.DataSource.DefaultDataCallback;
 import autotest.common.table.DataSource.Query;
 import autotest.common.table.DynamicTable.DynamicTableListener;
-import autotest.common.table.SelectionManager;
 import autotest.common.table.SelectionManager.SelectionListener;
-import autotest.common.table.TableDecorator;
 import autotest.common.ui.NotifyManager;
 import autotest.common.ui.SimplifiedList;
 
@@ -126,9 +126,9 @@
                 if (isMetaEntry(row) || isOneTimeHost(row)) {
                     deselectRow(row);
                     selectionRefresh();
-                } else {
-                    availableSelection.deselectObject(row);
                 }
+                else
+                    availableSelection.deselectObject(row);
             }
 
             public void onTableRefreshed() {}
@@ -269,8 +269,8 @@
 
     private void populateLabels(SimplifiedList list) {
         String[] labelNames = AfeUtils.getLabelStrings();
-        for (String labelName : labelNames) {
-            list.addItem(labelName, "");
+        for(int i = 0; i < labelNames.length; i++) {
+            list.addItem(labelNames[i], "");
         }
     }
 
diff --git a/frontend/client/src/autotest/afe/IButton.java b/frontend/client/src/autotest/afe/IButton.java
deleted file mode 100644
index 77b47f7..0000000
--- a/frontend/client/src/autotest/afe/IButton.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package autotest.afe;
-
-import com.google.gwt.event.dom.client.HasClickHandlers;
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.HasText;
-
-public interface IButton extends HasText, HasClickHandlers {
-    public void setEnabled(boolean enabled);
-
-    public static class ButtonImpl extends Button implements IButton {
-        public ButtonImpl() {}
-
-        public ButtonImpl(String html) {
-            super(html);
-        }
-    }
-}
diff --git a/frontend/client/src/autotest/afe/ICheckBox.java b/frontend/client/src/autotest/afe/ICheckBox.java
deleted file mode 100644
index 28583e8..0000000
--- a/frontend/client/src/autotest/afe/ICheckBox.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package autotest.afe;
-
-import com.google.gwt.event.dom.client.HasClickHandlers;
-import com.google.gwt.user.client.ui.CheckBox;
-import com.google.gwt.user.client.ui.HasText;
-import com.google.gwt.user.client.ui.HasValue;
-
-public interface ICheckBox extends HasText, HasValue<Boolean>, HasClickHandlers {
-    public void setEnabled(boolean enabled);
-    public void setVisible(boolean visible);
-    public boolean isVisible();
-
-    public static class CheckBoxImpl extends CheckBox implements ICheckBox {
-        public CheckBoxImpl() {}
-
-        public CheckBoxImpl(String label) {
-            super(label);
-        }
-    }
-}
diff --git a/frontend/client/src/autotest/afe/IRadioButton.java b/frontend/client/src/autotest/afe/IRadioButton.java
deleted file mode 100644
index 571eb04..0000000
--- a/frontend/client/src/autotest/afe/IRadioButton.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package autotest.afe;
-
-import com.google.gwt.user.client.ui.HasText;
-import com.google.gwt.user.client.ui.HasValue;
-import com.google.gwt.user.client.ui.RadioButton;
-
-public interface IRadioButton extends HasValue<Boolean>, HasText {
-    public void setEnabled(boolean enabled);
-
-    public static class RadioButtonImpl extends RadioButton implements IRadioButton {
-        public RadioButtonImpl(String name) {
-            super(name);
-        }
-
-        public RadioButtonImpl(String name, String choice) {
-            super(name, choice);
-        }
-    }
-}
diff --git a/frontend/client/src/autotest/afe/ITextArea.java b/frontend/client/src/autotest/afe/ITextArea.java
deleted file mode 100644
index aee39bd..0000000
--- a/frontend/client/src/autotest/afe/ITextArea.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package autotest.afe;
-
-import com.google.gwt.event.dom.client.HasChangeHandlers;
-import com.google.gwt.user.client.ui.HasText;
-import com.google.gwt.user.client.ui.TextArea;
-
-public interface ITextArea extends HasText, HasChangeHandlers {
-    public void setReadOnly(boolean readOnly);
-
-    public static class TextAreaImpl extends TextArea implements ITextArea {}
-}
diff --git a/frontend/client/src/autotest/afe/ITextBox.java b/frontend/client/src/autotest/afe/ITextBox.java
deleted file mode 100644
index 4790cfb..0000000
--- a/frontend/client/src/autotest/afe/ITextBox.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package autotest.afe;
-
-import com.google.gwt.event.dom.client.HasBlurHandlers;
-import com.google.gwt.event.dom.client.HasKeyPressHandlers;
-import com.google.gwt.user.client.ui.HasText;
-import com.google.gwt.user.client.ui.TextBox;
-
-public interface ITextBox extends HasText, HasBlurHandlers, HasKeyPressHandlers {
-    public void setEnabled(boolean enabled);
-
-    public static class TextBoxImpl extends TextBox implements ITextBox {}
-}
diff --git a/frontend/client/src/autotest/afe/TestSelector.java b/frontend/client/src/autotest/afe/TestSelector.java
index 6bdcdf1..b049efd 100644
--- a/frontend/client/src/autotest/afe/TestSelector.java
+++ b/frontend/client/src/autotest/afe/TestSelector.java
@@ -4,19 +4,24 @@
 import autotest.common.StaticDataRepository;
 import autotest.common.Utils;
 import autotest.common.table.DataTable;
+import autotest.common.table.SelectionManager;
+import autotest.common.table.TableClickWidget;
 import autotest.common.table.DataTable.DataTableListener;
 import autotest.common.table.DataTable.TableWidgetFactory;
-import autotest.common.table.SelectionManager;
 import autotest.common.table.SelectionManager.SelectionListener;
-import autotest.common.table.TableClickWidget;
-import autotest.common.ui.SimplifiedList;
 
 import com.google.gwt.event.dom.client.ChangeEvent;
 import com.google.gwt.event.dom.client.ChangeHandler;
 import com.google.gwt.json.client.JSONArray;
 import com.google.gwt.json.client.JSONObject;
 import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.HasHTML;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.HorizontalSplitPanel;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.ListBox;
+import com.google.gwt.user.client.ui.Panel;
+import com.google.gwt.user.client.ui.VerticalPanel;
 import com.google.gwt.user.client.ui.Widget;
 
 import java.util.ArrayList;
@@ -25,57 +30,24 @@
 import java.util.List;
 import java.util.Map;
 
-public class TestSelector extends Composite implements DataTableListener, ChangeHandler,
+class TestSelector extends Composite implements DataTableListener, ChangeHandler, 
                                                 TableWidgetFactory, SelectionListener {
-    public static interface Display {
-        public SimplifiedList getTestTypeSelect();
-        public IDataTable getTestTable();
-        public ISelectionManager getTestSelection();
-        public HasHTML getTestInfo();
-    }
-
-    // TODO: Change DataTable to passive view, then get rid of this ad-hoc interface
-    public static interface IDataTable {
-        public void setWidgetFactory(TableWidgetFactory widgetFactory);
-        public void addListener(DataTableListener listener);
-        public void clear();
-        public void addRow(JSONObject row);
-        public void refreshWidgets();
-
-        public static class DataTableImpl extends DataTable implements IDataTable {
-            public DataTableImpl(String[][] columns) {
-                super(columns);
-            }
-        }
-    }
-
-    // TODO: Change SelectionManager to use the DataTable passive view model, then get rid of this
-    // ad-hoc interface
-    public static interface ISelectionManager {
-        public void deselectAll();
-        public Widget createWidget(int row, int cell, JSONObject rowObject);
-        public void addListener(SelectionListener listener);
-
-        public static class SelectionManagerImpl extends SelectionManager
-                implements ISelectionManager {
-            public SelectionManagerImpl(DataTable table, boolean selectOnlyOne) {
-                super(table, selectOnlyOne);
-            }
-
-        }
-    }
-
     // control file types
-    public static final String SERVER_TYPE = "Server";
-    public static final String CLIENT_TYPE = "Client";
-
+    static final String SERVER_TYPE = "Server";
+    static final String CLIENT_TYPE = "Client";
+    
+    private static final String[][] testTableColumns = new String[][] {
+        {DataTable.WIDGET_COLUMN, ""},
+        {"name", "Test"},
+    };
+    
     public static interface TestSelectorListener {
         /**
          * Called when a test is selected or deselected, or when the test type is changed.
          */
         public void onTestSelectionChanged();
     }
-
+    
     private static class TestInfoBuilder {
         private static final Map<String, String> timeMap = new HashMap<String, String>();
         static {
@@ -83,30 +55,30 @@
             timeMap.put("MEDIUM", "15 minutes to four hours");
             timeMap.put("LONG", "over four hours");
         }
-
+        
         private StringBuilder builder = new StringBuilder();
         private JSONObject test;
-
+        
         public TestInfoBuilder(JSONObject test) {
             this.test = test;
-
+            
             writeTitleLine();
             appendTextField("Written by", getField("author"));
             appendTextField("Type", getField("test_type"));
             appendTextField("Synchronization count", getField("sync_count"));
             writeTime();
             writeSkipVerify(test);
-
+            
             builder.append("<br>" + getField("description"));
         }
 
         private void writeTitleLine() {
             builder.append("<b>" + getField("name") + "</b> ");
-            builder.append("(" +
-                           getField("test_class") + " / " + getField("test_category") +
+            builder.append("(" + 
+                           getField("test_class") + " / " + getField("test_category") + 
                            ")<br><br>");
         }
-
+        
         private void writeTime() {
             String time = getField("test_time");
             String timeDetail = "unknown time";
@@ -129,47 +101,71 @@
         private String getField(String field) {
             return Utils.escape(Utils.jsonToString(test.get(field)));
         }
-
+        
         public String getInfo() {
             return builder.toString();
         }
     }
-
+    
+    private ListBox testTypeSelect = new ListBox();
+    private DataTable testTable = new DataTable(testTableColumns);
+    private SelectionManager testSelection = new SelectionManager(testTable, false);
+    private HTML testInfo = new HTML("Click a test to view its description");
+    private HorizontalSplitPanel mainPanel = new HorizontalSplitPanel();
     private boolean enabled = true;
     private TestSelectorListener listener;
     private StaticDataRepository staticData = StaticDataRepository.getRepository();
     private List<JSONObject> selectedTests = new ArrayList<JSONObject>();
-
-    private Display display;
-
-    public void bindDisplay(Display display) {
-        this.display = display;
-
-        display.getTestTypeSelect().addItem(CLIENT_TYPE, CLIENT_TYPE);
-        display.getTestTypeSelect().addItem(SERVER_TYPE, SERVER_TYPE);
-        display.getTestTypeSelect().addChangeHandler(this);
-
-        display.getTestTable().setWidgetFactory(this);
-        display.getTestTable().addListener(this);
-
+    
+    public TestSelector() {
+        testInfo.setStyleName("test-description");
+        
+        testTypeSelect.addItem(CLIENT_TYPE);
+        testTypeSelect.addItem(SERVER_TYPE);
+        testTypeSelect.addChangeHandler(this);
+        
+        testTable.fillParent();
+        testTable.setWidgetFactory(this);
+        testTable.setClickable(true);
+        testTable.addListener(this);
+        
+        Panel testTypePanel = new HorizontalPanel();
+        testTypePanel.add(new Label("Test type:"));
+        testTypePanel.add(testTypeSelect);
+        
+        Panel testInfoPanel = new VerticalPanel();
+        testInfoPanel.add(testInfo);
+        
+        mainPanel.setLeftWidget(testTable);
+        mainPanel.setRightWidget(testInfoPanel);
+        mainPanel.setSize("100%", "30em");
+        mainPanel.setSplitPosition("20em");
+        
+        Panel container = new VerticalPanel();
+        container.add(testTypePanel);
+        container.add(mainPanel);
+        container.setWidth("100%");
+        
         populateTests();
-
-        display.getTestSelection().addListener(this);
+        
+        initWidget(container);
+        
+        testSelection.addListener(this);
     }
-
+    
     private void populateTests() {
-        display.getTestSelection().deselectAll();
-        display.getTestTable().clear();
-
+        testSelection.deselectAll();
+        testTable.clear();
+        
         JSONArray tests = staticData.getData("tests").isArray();
         for (JSONObject test : new JSONArrayList<JSONObject>(tests)) {
-            if (!includeExperimentalTests()
+            if (!includeExperimentalTests() 
                     && test.get("experimental").isBoolean().booleanValue()) {
                 continue;
             }
             String testType = test.get("test_type").isString().stringValue();
             if (testType.equals(getSelectedTestType())) {
-                display.getTestTable().addRow(test);
+                testTable.addRow(test);
             }
         }
     }
@@ -178,36 +174,36 @@
         JSONObject user = staticData.getData("current_user").isObject();
         return user.get("show_experimental").isBoolean().booleanValue();
     }
-
+    
     @Override
     public void onRowClicked(int rowIndex, JSONObject row, boolean isRightClick) {
         TestInfoBuilder builder = new TestInfoBuilder(row);
-        display.getTestInfo().setHTML(builder.getInfo());
+        testInfo.setHTML(builder.getInfo());
     }
-
+    
     @Override
     public void onChange(ChangeEvent event) {
         populateTests();
         notifyListener();
     }
-
+    
     public Collection<JSONObject> getSelectedTests() {
         return selectedTests;
     }
 
     public String getSelectedTestType() {
-        return display.getTestTypeSelect().getSelectedName();
+        return testTypeSelect.getItemText(testTypeSelect.getSelectedIndex());
     }
 
     public void setEnabled(boolean enabled) {
         this.enabled = enabled;
-        display.getTestTypeSelect().setEnabled(enabled);
-        display.getTestTable().refreshWidgets();
+        testTypeSelect.setEnabled(enabled);
+        testTable.refreshWidgets();
     }
 
     public Widget createWidget(int row, int cell, JSONObject rowObject) {
-        TableClickWidget widget =
-            (TableClickWidget) display.getTestSelection().createWidget(row, cell, rowObject);
+        TableClickWidget widget = 
+            (TableClickWidget) testSelection.createWidget(row, cell, rowObject);
         if (!enabled) {
             widget.getContainedWidget().setEnabled(false);
         }
@@ -215,10 +211,10 @@
     }
 
     public void reset() {
-        display.getTestTypeSelect().selectByName(CLIENT_TYPE);
+        testTypeSelect.setSelectedIndex(0);
         populateTests();
     }
-
+    
     private void notifyListener() {
         if (listener != null) {
             listener.onTestSelectionChanged();
diff --git a/frontend/client/src/autotest/afe/TestSelectorDisplay.java b/frontend/client/src/autotest/afe/TestSelectorDisplay.java
deleted file mode 100644
index 19b6bf7..0000000
--- a/frontend/client/src/autotest/afe/TestSelectorDisplay.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package autotest.afe;
-
-import autotest.afe.TestSelector.IDataTable;
-import autotest.afe.TestSelector.IDataTable.DataTableImpl;
-import autotest.afe.TestSelector.ISelectionManager;
-import autotest.afe.TestSelector.ISelectionManager.SelectionManagerImpl;
-import autotest.common.table.DataTable;
-import autotest.common.ui.ExtendedListBox;
-import autotest.common.ui.SimplifiedList;
-
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.HTML;
-import com.google.gwt.user.client.ui.HasHTML;
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.HorizontalSplitPanel;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.Panel;
-import com.google.gwt.user.client.ui.VerticalPanel;
-
-public class TestSelectorDisplay extends Composite implements TestSelector.Display {
-    private static final String[][] testTableColumns = new String[][] {
-        {DataTable.WIDGET_COLUMN, ""},
-        {"name", "Test"},
-    };
-
-    private ExtendedListBox testTypeSelect = new ExtendedListBox();
-    private DataTableImpl testTable = new DataTableImpl(testTableColumns);
-    private SelectionManagerImpl testSelection = new SelectionManagerImpl(testTable, false);
-    private HTML testInfo = new HTML("Click a test to view its description");
-    private HorizontalSplitPanel mainPanel = new HorizontalSplitPanel();
-
-    public TestSelectorDisplay() {
-        testInfo.setStyleName("test-description");
-
-        testTable.fillParent();
-        testTable.setClickable(true);
-
-        Panel testTypePanel = new HorizontalPanel();
-        testTypePanel.add(new Label("Test type:"));
-        testTypePanel.add(testTypeSelect);
-
-        Panel testInfoPanel = new VerticalPanel();
-        testInfoPanel.add(testInfo);
-
-        mainPanel.setLeftWidget(testTable);
-        mainPanel.setRightWidget(testInfoPanel);
-        mainPanel.setSize("100%", "30em");
-        mainPanel.setSplitPosition("20em");
-
-        Panel container = new VerticalPanel();
-        container.add(testTypePanel);
-        container.add(mainPanel);
-        container.setWidth("100%");
-
-        initWidget(container);
-    }
-
-    public SimplifiedList getTestTypeSelect() {
-        return testTypeSelect;
-    }
-
-    public HasHTML getTestInfo() {
-        return testInfo;
-    }
-
-    public ISelectionManager getTestSelection() {
-        return testSelection;
-    }
-
-    public IDataTable getTestTable() {
-        return testTable;
-    }
-}
diff --git a/frontend/client/src/autotest/afe/UserPreferencesView.java b/frontend/client/src/autotest/afe/UserPreferencesView.java
index 0c8197a..057905d 100644
--- a/frontend/client/src/autotest/afe/UserPreferencesView.java
+++ b/frontend/client/src/autotest/afe/UserPreferencesView.java
@@ -3,10 +3,9 @@
 import autotest.common.JsonRpcCallback;
 import autotest.common.JsonRpcProxy;
 import autotest.common.StaticDataRepository;
-import autotest.common.StaticDataRepository.FinishedCallback;
 import autotest.common.Utils;
+import autotest.common.StaticDataRepository.FinishedCallback;
 import autotest.common.ui.RadioChooser;
-import autotest.common.ui.RadioChooserDisplay;
 import autotest.common.ui.TabView;
 
 import com.google.gwt.event.dom.client.ClickEvent;
@@ -27,14 +26,14 @@
 public class UserPreferencesView extends TabView implements ClickHandler {
     private static final StaticDataRepository staticData = StaticDataRepository.getRepository();
     private static final JsonRpcProxy proxy = JsonRpcProxy.getProxy();
-
+    
     public static interface UserPreferencesListener {
         public void onPreferencesChanged();
     }
-
+    
     private JSONObject user;
     private UserPreferencesListener listener;
-
+    
     private RadioChooser rebootBefore = new RadioChooser();
     private RadioChooser rebootAfter = new RadioChooser();
     private ListBox droneSet = new ListBox();
@@ -54,23 +53,17 @@
     @Override
     public void initialize() {
         super.initialize();
-
-        RadioChooserDisplay rebootBeforeDisplay = new RadioChooserDisplay();
-        RadioChooserDisplay rebootAfterDisplay = new RadioChooserDisplay();
-        rebootBefore.bindDisplay(rebootBeforeDisplay);
-        rebootAfter.bindDisplay(rebootAfterDisplay);
-
         Panel container = new VerticalPanel();
         AfeUtils.populateRadioChooser(rebootBefore, "reboot_before");
         AfeUtils.populateRadioChooser(rebootAfter, "reboot_after");
 
         saveButton.addClickHandler(this);
 
-        addOption("Reboot before", rebootBeforeDisplay);
-        addOption("Reboot after", rebootAfterDisplay);
+        addOption("Reboot before", rebootBefore);
+        addOption("Reboot after", rebootAfter);
         addOption("Show experimental tests", showExperimental);
         if (staticData.getData("drone_sets_enabled").isBoolean().booleanValue()) {
-            AfeUtils.populateListBox(droneSet, "drone_sets");
+            AfeUtils.popualateListBox(droneSet, "drone_sets");
             addOption("Drone set", droneSet);
         }
 
@@ -99,7 +92,7 @@
 
         showExperimental.setValue(user.get("show_experimental").isBoolean().booleanValue());
     }
-
+    
     private String getValue(String key) {
         return Utils.jsonToString(user.get(key));
     }
diff --git a/frontend/client/src/autotest/afe/create/CreateJobViewDisplay.java b/frontend/client/src/autotest/afe/create/CreateJobViewDisplay.java
deleted file mode 100644
index 441f3e3..0000000
--- a/frontend/client/src/autotest/afe/create/CreateJobViewDisplay.java
+++ /dev/null
@@ -1,232 +0,0 @@
-package autotest.afe.create;
-
-import autotest.afe.CheckBoxPanel;
-import autotest.afe.CheckBoxPanelDisplay;
-import autotest.afe.ControlTypeSelect;
-import autotest.afe.ControlTypeSelectDisplay;
-import autotest.afe.HostSelector;
-import autotest.afe.HostSelectorDisplay;
-import autotest.afe.IButton;
-import autotest.afe.IButton.ButtonImpl;
-import autotest.afe.ICheckBox;
-import autotest.afe.ICheckBox.CheckBoxImpl;
-import autotest.afe.ITextArea;
-import autotest.afe.ITextArea.TextAreaImpl;
-import autotest.afe.ITextBox;
-import autotest.afe.ITextBox.TextBoxImpl;
-import autotest.afe.TestSelector;
-import autotest.afe.TestSelectorDisplay;
-import autotest.common.ui.ExtendedListBox;
-import autotest.common.ui.RadioChooser;
-import autotest.common.ui.RadioChooserDisplay;
-import autotest.common.ui.SimplifiedList;
-
-import com.google.gwt.event.dom.client.HasClickHandlers;
-import com.google.gwt.event.logical.shared.HasCloseHandlers;
-import com.google.gwt.event.logical.shared.HasOpenHandlers;
-import com.google.gwt.user.client.ui.Anchor;
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.CheckBox;
-import com.google.gwt.user.client.ui.DisclosurePanel;
-import com.google.gwt.user.client.ui.HTMLPanel;
-import com.google.gwt.user.client.ui.HasText;
-import com.google.gwt.user.client.ui.HasValue;
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.Panel;
-import com.google.gwt.user.client.ui.TextBox;
-import com.google.gwt.user.client.ui.VerticalPanel;
-
-public class CreateJobViewDisplay implements CreateJobViewPresenter.Display {
-    public static final int CHECKBOX_PANEL_COLUMNS = 5;
-
-    private TextBox jobName = new TextBox();
-    private ExtendedListBox priorityList = new ExtendedListBox();
-    private TextBoxImpl kernel = new TextBoxImpl();
-    private TextBoxImpl kernel_cmdline = new TextBoxImpl();
-    private TextBox timeout = new TextBox();
-    private TextBox maxRuntime = new TextBox();
-    private TextBox emailList = new TextBox();
-    private CheckBoxImpl skipVerify = new CheckBoxImpl();
-    private RadioChooserDisplay rebootBefore = new RadioChooserDisplay();
-    private RadioChooserDisplay rebootAfter = new RadioChooserDisplay();
-    private CheckBox parseFailedRepair = new CheckBox();
-    private CheckBoxImpl hostless = new CheckBoxImpl();
-    private TestSelectorDisplay testSelector = new TestSelectorDisplay();
-    private CheckBoxPanelDisplay profilersPanel = new CheckBoxPanelDisplay(CHECKBOX_PANEL_COLUMNS);
-    private CheckBoxImpl runNonProfiledIteration =
-        new CheckBoxImpl("Run each test without profilers first");
-    private ExtendedListBox droneSet = new ExtendedListBox();
-    private TextAreaImpl controlFile = new TextAreaImpl();
-    private DisclosurePanel controlFilePanel = new DisclosurePanel();
-    private ControlTypeSelectDisplay controlTypeSelect = new ControlTypeSelectDisplay();
-    private TextBoxImpl synchCountInput = new TextBoxImpl();
-    private ButtonImpl editControlButton = new ButtonImpl();
-    private HostSelectorDisplay hostSelector = new HostSelectorDisplay();
-    private ButtonImpl submitJobButton = new ButtonImpl("Submit Job");
-    private Button createTemplateJobButton = new Button("Create Template Job");
-    private Button resetButton = new Button("Reset");
-    private Anchor viewLink = new Anchor("");
-
-    public void initialize(HTMLPanel panel) {
-        Panel profilerControls = new VerticalPanel();
-        profilerControls.add(profilersPanel);
-        profilerControls.add(runNonProfiledIteration);
-
-        controlFile.setSize("50em", "30em");
-
-        HorizontalPanel controlOptionsPanel = new HorizontalPanel();
-        controlOptionsPanel.setVerticalAlignment(HorizontalPanel.ALIGN_BOTTOM);
-        controlOptionsPanel.add(controlTypeSelect);
-        Label useLabel = new Label("Use");
-        useLabel.getElement().getStyle().setProperty("marginLeft", "1em");
-        synchCountInput.setSize("3em", ""); // set width only
-        synchCountInput.getElement().getStyle().setProperty("margin", "0 0.5em 0 0.5em");
-        controlOptionsPanel.add(useLabel);
-        controlOptionsPanel.add(synchCountInput);
-        controlOptionsPanel.add(new Label("host(s) per execution"));
-        Panel controlEditPanel = new VerticalPanel();
-        controlEditPanel.add(controlOptionsPanel);
-        controlEditPanel.add(controlFile);
-
-        Panel controlHeaderPanel = new HorizontalPanel();
-        controlHeaderPanel.add(viewLink);
-        controlHeaderPanel.add(editControlButton);
-
-        controlFilePanel.setHeader(controlHeaderPanel);
-        controlFilePanel.add(controlEditPanel);
-
-        panel.add(jobName, "create_job_name");
-        panel.add(kernel, "create_kernel");
-        panel.add(kernel_cmdline, "create_kernel_cmdline");
-        panel.add(timeout, "create_timeout");
-        panel.add(maxRuntime, "create_max_runtime");
-        panel.add(emailList, "create_email_list");
-        panel.add(priorityList, "create_priority");
-        panel.add(skipVerify, "create_skip_verify");
-        panel.add(rebootBefore, "create_reboot_before");
-        panel.add(rebootAfter, "create_reboot_after");
-        panel.add(parseFailedRepair, "create_parse_failed_repair");
-        panel.add(hostless, "create_hostless");
-        panel.add(testSelector, "create_tests");
-        panel.add(profilerControls, "create_profilers");
-        panel.add(controlFilePanel, "create_edit_control");
-        panel.add(hostSelector, "create_host_selector");
-        panel.add(submitJobButton, "create_submit");
-        panel.add(createTemplateJobButton, "create_template_job");
-        panel.add(resetButton, "create_reset");
-        panel.add(droneSet, "create_drone_set");
-    }
-
-    public CheckBoxPanel.Display getCheckBoxPanelDisplay() {
-        return profilersPanel;
-    }
-
-    public ControlTypeSelect.Display getControlTypeSelectDisplay() {
-        return controlTypeSelect;
-    }
-
-    public ITextArea getControlFile() {
-        return controlFile;
-    }
-
-    public HasCloseHandlers<DisclosurePanel> getControlFilePanelClose() {
-        return controlFilePanel;
-    }
-
-    public HasOpenHandlers<DisclosurePanel> getControlFilePanelOpen() {
-        return controlFilePanel;
-    }
-
-    public HasClickHandlers getCreateTemplateJobButton() {
-        return createTemplateJobButton;
-    }
-
-    public SimplifiedList getDroneSet() {
-        return droneSet;
-    }
-
-    public IButton getEditControlButton() {
-        return editControlButton;
-    }
-
-    public HasText getEmailList() {
-        return emailList;
-    }
-
-    public HostSelector.Display getHostSelectorDisplay() {
-        return hostSelector;
-    }
-
-    public ICheckBox getHostless() {
-        return hostless;
-    }
-
-    public HasText getJobName() {
-        return jobName;
-    }
-
-    public ITextBox getKernel() {
-        return kernel;
-    }
-
-    public ITextBox getKernelCmdline() {
-        return kernel_cmdline;
-    }
-
-    public HasText getMaxRuntime() {
-        return maxRuntime;
-    }
-
-    public HasValue<Boolean> getParseFailedRepair() {
-        return parseFailedRepair;
-    }
-
-    public SimplifiedList getPriorityList() {
-        return priorityList;
-    }
-
-    public RadioChooser.Display getRebootAfter() {
-        return rebootAfter;
-    }
-
-    public RadioChooser.Display getRebootBefore() {
-        return rebootBefore;
-    }
-
-    public HasClickHandlers getResetButton() {
-        return resetButton;
-    }
-
-    public ICheckBox getRunNonProfiledIteration() {
-        return runNonProfiledIteration;
-    }
-
-    public ICheckBox getSkipVerify() {
-        return skipVerify;
-    }
-
-    public IButton getSubmitJobButton() {
-        return submitJobButton;
-    }
-
-    public ITextBox getSynchCountInput() {
-        return synchCountInput;
-    }
-
-    public TestSelector.Display getTestSelectorDisplay() {
-        return testSelector;
-    }
-
-    public HasText getTimeout() {
-        return timeout;
-    }
-
-    public HasText getViewLink() {
-        return viewLink;
-    }
-
-    public void setControlFilePanelOpen(boolean isOpen) {
-        controlFilePanel.setOpen(isOpen);
-    }
-}
diff --git a/frontend/client/src/autotest/afe/create/CreateJobViewPresenter.java b/frontend/client/src/autotest/afe/create/CreateJobViewPresenter.java
deleted file mode 100644
index ff25998..0000000
--- a/frontend/client/src/autotest/afe/create/CreateJobViewPresenter.java
+++ /dev/null
@@ -1,687 +0,0 @@
-package autotest.afe.create;
-
-import autotest.afe.AfeUtils;
-import autotest.afe.CheckBoxPanel;
-import autotest.afe.ControlTypeSelect;
-import autotest.afe.HostSelector;
-import autotest.afe.IButton;
-import autotest.afe.ICheckBox;
-import autotest.afe.ITextArea;
-import autotest.afe.ITextBox;
-import autotest.afe.TestSelector;
-import autotest.afe.TestSelector.TestSelectorListener;
-import autotest.common.JSONArrayList;
-import autotest.common.JsonRpcCallback;
-import autotest.common.JsonRpcProxy;
-import autotest.common.SimpleCallback;
-import autotest.common.StaticDataRepository;
-import autotest.common.Utils;
-import autotest.common.ui.NotifyManager;
-import autotest.common.ui.RadioChooser;
-import autotest.common.ui.SimplifiedList;
-
-import com.google.gwt.event.dom.client.BlurEvent;
-import com.google.gwt.event.dom.client.BlurHandler;
-import com.google.gwt.event.dom.client.ChangeEvent;
-import com.google.gwt.event.dom.client.ChangeHandler;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.event.dom.client.HasClickHandlers;
-import com.google.gwt.event.dom.client.KeyCodes;
-import com.google.gwt.event.dom.client.KeyPressEvent;
-import com.google.gwt.event.dom.client.KeyPressHandler;
-import com.google.gwt.event.logical.shared.CloseEvent;
-import com.google.gwt.event.logical.shared.CloseHandler;
-import com.google.gwt.event.logical.shared.HasCloseHandlers;
-import com.google.gwt.event.logical.shared.HasOpenHandlers;
-import com.google.gwt.event.logical.shared.OpenEvent;
-import com.google.gwt.event.logical.shared.OpenHandler;
-import com.google.gwt.json.client.JSONArray;
-import com.google.gwt.json.client.JSONBoolean;
-import com.google.gwt.json.client.JSONNull;
-import com.google.gwt.json.client.JSONNumber;
-import com.google.gwt.json.client.JSONObject;
-import com.google.gwt.json.client.JSONString;
-import com.google.gwt.json.client.JSONValue;
-import com.google.gwt.user.client.DOM;
-import com.google.gwt.user.client.Window;
-import com.google.gwt.user.client.ui.DisclosurePanel;
-import com.google.gwt.user.client.ui.HasText;
-import com.google.gwt.user.client.ui.HasValue;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class CreateJobViewPresenter implements TestSelectorListener {
-    public static interface Display {
-        public CheckBoxPanel.Display getCheckBoxPanelDisplay();
-        public ControlTypeSelect.Display getControlTypeSelectDisplay();
-        public TestSelector.Display getTestSelectorDisplay();
-        public IButton getEditControlButton();
-        public HasText getJobName();
-        public SimplifiedList getPriorityList();
-        public HasText getTimeout();
-        public HasText getMaxRuntime();
-        public HasText getEmailList();
-        public ICheckBox getSkipVerify();
-        public RadioChooser.Display getRebootBefore();
-        public RadioChooser.Display getRebootAfter();
-        public HasValue<Boolean> getParseFailedRepair();
-        public ICheckBox getHostless();
-        public HostSelector.Display getHostSelectorDisplay();
-        public SimplifiedList getDroneSet();
-        public ITextBox getSynchCountInput();
-        public ITextArea getControlFile();
-        public void setControlFilePanelOpen(boolean isOpen);
-        public ICheckBox getRunNonProfiledIteration();
-        public ITextBox getKernel();
-        public ITextBox getKernelCmdline();
-        public HasText getViewLink();
-        public HasCloseHandlers<DisclosurePanel> getControlFilePanelClose();
-        public HasOpenHandlers<DisclosurePanel> getControlFilePanelOpen();
-        public IButton getSubmitJobButton();
-        public HasClickHandlers getCreateTemplateJobButton();
-        public HasClickHandlers getResetButton();
-    }
-
-    private static final String EDIT_CONTROL_STRING = "Edit control file";
-    private static final String UNEDIT_CONTROL_STRING= "Revert changes";
-    private static final String VIEW_CONTROL_STRING = "View control file";
-    private static final String HIDE_CONTROL_STRING = "Hide control file";
-
-    public interface JobCreateListener {
-        public void onJobCreated(int jobId);
-    }
-
-    private JsonRpcProxy rpcProxy = JsonRpcProxy.getProxy();
-    private JobCreateListener listener;
-
-    private StaticDataRepository staticData = StaticDataRepository.getRepository();
-
-    private CheckBoxPanel profilersPanel = new CheckBoxPanel();
-    private ControlTypeSelect controlTypeSelect = new ControlTypeSelect();
-    protected TestSelector testSelector = new TestSelector();
-    private RadioChooser rebootBefore = new RadioChooser();
-    private RadioChooser rebootAfter = new RadioChooser();
-    private HostSelector hostSelector;
-
-    private boolean controlEdited = false;
-    private boolean controlReadyForSubmit = false;
-    private JSONArray dependencies = new JSONArray();
-
-    private Display display;
-
-    public void bindDisplay(Display display) {
-        this.display = display;
-    }
-
-    public CreateJobViewPresenter(JobCreateListener listener) {
-        this.listener = listener;
-    }
-
-    public void cloneJob(JSONValue cloneInfo) {
-        // reset() fires the TestSelectorListener, which will generate a new control file. We do
-        // no want this, so we'll stop listening to it for a bit.
-        testSelector.setListener(null);
-        reset();
-        testSelector.setListener(this);
-
-        disableInputs();
-        openControlFileEditor();
-        JSONObject cloneObject = cloneInfo.isObject();
-        JSONObject jobObject = cloneObject.get("job").isObject();
-
-        display.getJobName().setText(jobObject.get("name").isString().stringValue());
-
-        String priority = jobObject.get("priority").isString().stringValue();
-        display.getPriorityList().selectByName(priority);
-
-        display.getTimeout().setText(Utils.jsonToString(jobObject.get("timeout")));
-        display.getMaxRuntime().setText(Utils.jsonToString(jobObject.get("max_runtime_hrs")));
-        display.getEmailList().setText(
-                jobObject.get("email_list").isString().stringValue());
-
-        display.getSkipVerify().setValue(!jobObject.get("run_verify").isBoolean().booleanValue());
-        rebootBefore.setSelectedChoice(Utils.jsonToString(jobObject.get("reboot_before")));
-        rebootAfter.setSelectedChoice(Utils.jsonToString(jobObject.get("reboot_after")));
-        display.getParseFailedRepair().setValue(
-                jobObject.get("parse_failed_repair").isBoolean().booleanValue());
-        display.getHostless().setValue(cloneObject.get("hostless").isBoolean().booleanValue());
-        if (display.getHostless().getValue()) {
-            hostSelector.setEnabled(false);
-        }
-        if (cloneObject.get("drone_set").isNull() == null) {
-            display.getDroneSet().selectByName(Utils.jsonToString(cloneObject.get("drone_set")));
-        }
-
-        controlTypeSelect.setControlType(
-                jobObject.get("control_type").isString().stringValue());
-        display.getSynchCountInput().setText(Utils.jsonToString(jobObject.get("synch_count")));
-        setSelectedDependencies(jobObject.get("dependencies").isArray());
-        display.getControlFile().setText(
-                jobObject.get("control_file").isString().stringValue());
-        controlReadyForSubmit = true;
-
-        JSONArray hostInfo = cloneObject.get("hosts").isArray();
-        List<String> hostnames = new ArrayList<String>();
-        for (JSONObject host : new JSONArrayList<JSONObject>(hostInfo)) {
-            hostnames.add(Utils.jsonToString(host.get("hostname")));
-        }
-        hostSelector.setSelectedHostnames(hostnames, true);
-
-        JSONObject metaHostCounts = cloneObject.get("meta_host_counts").isObject();
-
-        for (String label : metaHostCounts.keySet()) {
-            String number = Integer.toString(
-                (int) metaHostCounts.get(label).isNumber().doubleValue());
-            hostSelector.addMetaHosts(label, number);
-        }
-
-        hostSelector.refresh();
-    }
-
-    private void openControlFileEditor() {
-        display.getControlFile().setReadOnly(false);
-        display.getEditControlButton().setText(UNEDIT_CONTROL_STRING);
-        display.setControlFilePanelOpen(true);
-        controlTypeSelect.setEnabled(true);
-        display.getSynchCountInput().setEnabled(true);
-        display.getEditControlButton().setEnabled(true);
-    }
-
-    private void populatePriorities(JSONArray priorities) {
-        for(int i = 0; i < priorities.size(); i++) {
-            JSONArray priorityData = priorities.get(i).isArray();
-            String priority = priorityData.get(1).isString().stringValue();
-            display.getPriorityList().addItem(priority, priority);
-        }
-
-        resetPriorityToDefault();
-    }
-
-    private void resetPriorityToDefault() {
-        JSONValue defaultValue = staticData.getData("default_priority");
-        String defaultPriority = defaultValue.isString().stringValue();
-        display.getPriorityList().selectByName(defaultPriority);
-    }
-
-    private void populateProfilers() {
-        JSONArray tests = staticData.getData("profilers").isArray();
-
-        for(JSONObject profiler : new JSONArrayList<JSONObject>(tests)) {
-            String name = profiler.get("name").isString().stringValue();
-            ICheckBox checkbox = profilersPanel.generateCheckBox();
-            checkbox.setText(name);
-            checkbox.addClickHandler(new ClickHandler() {
-                public void onClick(ClickEvent event) {
-                    updateNonProfiledRunControl();
-                    generateControlFile(false);
-                    setInputsEnabled();
-                }
-            });
-            profilersPanel.add(checkbox);
-        }
-
-        display.getRunNonProfiledIteration().addClickHandler(new ClickHandler() {
-            @Override
-            public void onClick(ClickEvent event) {
-                generateControlFile(false);
-            }
-        });
-        // default to checked -- run a non-profiled iteration by default
-        display.getRunNonProfiledIteration().setValue(true);
-    }
-
-    private void updateNonProfiledRunControl() {
-        boolean anyProfilersChecked = !profilersPanel.getChecked().isEmpty();
-        display.getRunNonProfiledIteration().setVisible(anyProfilersChecked);
-    }
-
-    private void populateRebootChoices() {
-        AfeUtils.populateRadioChooser(rebootBefore, "reboot_before");
-        AfeUtils.populateRadioChooser(rebootAfter, "reboot_after");
-    }
-
-
-    private JSONArray getKernelParams(String kernel_list, String cmdline) {
-        JSONArray result = new JSONArray();
-
-        for(String version: kernel_list.split("[, ]+")) {
-            Map<String, String> item = new HashMap<String, String>();
-
-            item.put("version", version);
-            // if there is a cmdline part, put it for all versions in the map
-            if (cmdline.length() > 0) {
-                item.put("cmdline", cmdline);
-            }
-
-            result.set(result.size(), Utils.mapToJsonObject(item));
-        }
-
-        return result;
-    }
-    /**
-     * Get parameters to submit to the generate_control_file RPC.
-     * @param readyForSubmit are we getting a control file that's ready to submit for a job, or just
-     * an intermediate control file to be viewed by the user?
-     */
-    protected JSONObject getControlFileParams(boolean readyForSubmit) {
-        JSONObject params = new JSONObject();
-
-        String kernelString = display.getKernel().getText();
-        if (!kernelString.equals("")) {
-            params.put(
-                    "kernel", getKernelParams(kernelString, display.getKernelCmdline().getText()));
-        }
-
-        JSONArray tests = new JSONArray();
-        for (JSONObject test : testSelector.getSelectedTests()) {
-            tests.set(tests.size(), test.get("id"));
-        }
-
-        JSONArray profilers = new JSONArray();
-        for (ICheckBox profiler : profilersPanel.getChecked()) {
-            profilers.set(profilers.size(), new JSONString(profiler.getText()));
-        }
-
-        params.put("tests", tests);
-        params.put("profilers", profilers);
-
-        if (display.getRunNonProfiledIteration().isVisible()) {
-            boolean profileOnly = !display.getRunNonProfiledIteration().getValue();
-            params.put("profile_only", JSONBoolean.getInstance(profileOnly));
-        }
-
-        return params;
-    }
-
-    private void generateControlFile(final boolean readyForSubmit,
-                                       final SimpleCallback finishedCallback,
-                                       final SimpleCallback errorCallback) {
-        JSONObject params = getControlFileParams(readyForSubmit);
-        rpcProxy.rpcCall("generate_control_file", params, new JsonRpcCallback() {
-            @Override
-            public void onSuccess(JSONValue result) {
-                JSONObject controlInfo = result.isObject();
-                String controlFileText = controlInfo.get("control_file").isString().stringValue();
-                boolean isServer = controlInfo.get("is_server").isBoolean().booleanValue();
-                String synchCount = Utils.jsonToString(controlInfo.get("synch_count"));
-                setSelectedDependencies(controlInfo.get("dependencies").isArray());
-                display.getControlFile().setText(controlFileText);
-                controlTypeSelect.setControlType(isServer ? TestSelector.SERVER_TYPE :
-                                                            TestSelector.CLIENT_TYPE);
-                display.getSynchCountInput().setText(synchCount);
-                controlReadyForSubmit = readyForSubmit;
-                if (finishedCallback != null) {
-                    finishedCallback.doCallback(this);
-                }
-            }
-
-            @Override
-            public void onError(JSONObject errorObject) {
-                super.onError(errorObject);
-                if (errorCallback != null) {
-                    errorCallback.doCallback(this);
-                }
-            }
-        });
-    }
-
-    protected void generateControlFile(boolean readyForSubmit) {
-        generateControlFile(readyForSubmit, null, null);
-    }
-
-    public void handleSkipVerify() {
-        boolean shouldSkipVerify = false;
-        for (JSONObject test : testSelector.getSelectedTests()) {
-            boolean runVerify = test.get("run_verify").isBoolean().booleanValue();
-            if (!runVerify) {
-                shouldSkipVerify = true;
-                break;
-            }
-        }
-
-        if (shouldSkipVerify) {
-            display.getSkipVerify().setValue(true);
-            display.getSkipVerify().setEnabled(false);
-        } else {
-            display.getSkipVerify().setEnabled(true);
-        }
-    }
-
-    protected void setInputsEnabled() {
-        testSelector.setEnabled(true);
-        profilersPanel.setEnabled(true);
-        handleSkipVerify();
-        display.getKernel().setEnabled(true);
-        display.getKernelCmdline().setEnabled(true);
-    }
-
-    protected void disableInputs() {
-        testSelector.setEnabled(false);
-        profilersPanel.setEnabled(false);
-        display.getKernel().setEnabled(false);
-        display.getKernelCmdline().setEnabled(false);
-    }
-
-    public void initialize() {
-        profilersPanel.bindDisplay(display.getCheckBoxPanelDisplay());
-        controlTypeSelect.bindDisplay(display.getControlTypeSelectDisplay());
-        testSelector.bindDisplay(display.getTestSelectorDisplay());
-        rebootBefore.bindDisplay(display.getRebootBefore());
-        rebootAfter.bindDisplay(display.getRebootAfter());
-
-        display.getEditControlButton().setText(EDIT_CONTROL_STRING);
-        display.getViewLink().setText(VIEW_CONTROL_STRING);
-
-        hostSelector = new HostSelector();
-        hostSelector.initialize();
-        hostSelector.bindDisplay(display.getHostSelectorDisplay());
-
-        populatePriorities(staticData.getData("priorities").isArray());
-
-        BlurHandler kernelBlurHandler = new BlurHandler() {
-            public void onBlur(BlurEvent event) {
-                generateControlFile(false);
-            }
-        };
-
-        display.getKernel().addBlurHandler(kernelBlurHandler);
-        display.getKernelCmdline().addBlurHandler(kernelBlurHandler);
-
-        KeyPressHandler kernelKeyPressHandler = new KeyPressHandler() {
-            public void onKeyPress(KeyPressEvent event) {
-                if (event.getCharCode() == (char) KeyCodes.KEY_ENTER) {
-                    generateControlFile(false);
-                }
-            }
-        };
-
-        display.getKernel().addKeyPressHandler(kernelKeyPressHandler);
-        display.getKernelCmdline().addKeyPressHandler(kernelKeyPressHandler);
-
-        populateProfilers();
-        updateNonProfiledRunControl();
-
-        populateRebootChoices();
-        onPreferencesChanged();
-
-        if (parameterizedJobsEnabled()) {
-            display.getEditControlButton().setEnabled(false);
-        }
-
-        display.getEditControlButton().addClickHandler(new ClickHandler() {
-            public void onClick(ClickEvent event) {
-                DOM.eventCancelBubble(DOM.eventGetCurrentEvent(), true);
-
-                if (display.getEditControlButton().getText().equals(EDIT_CONTROL_STRING)) {
-                    disableInputs();
-                    display.getEditControlButton().setEnabled(false);
-                    SimpleCallback onGotControlFile = new SimpleCallback() {
-                        public void doCallback(Object source) {
-                            openControlFileEditor();
-                        }
-                    };
-                    SimpleCallback onControlFileError = new SimpleCallback() {
-                        public void doCallback(Object source) {
-                            setInputsEnabled();
-                            display.getEditControlButton().setEnabled(true);
-                        }
-                    };
-                    generateControlFile(true, onGotControlFile, onControlFileError);
-                }
-                else {
-                    if (controlEdited &&
-                        !Window.confirm("Are you sure you want to revert your" +
-                                        " changes?")) {
-                        return;
-                    }
-                    generateControlFile(false);
-                    display.getControlFile().setReadOnly(true);
-                    setInputsEnabled();
-                    display.getEditControlButton().setText(EDIT_CONTROL_STRING);
-                    controlTypeSelect.setEnabled(false);
-                    display.getSynchCountInput().setEnabled(false);
-                    controlEdited = false;
-                }
-            }
-        });
-
-        display.getControlFile().addChangeHandler(new ChangeHandler() {
-            public void onChange(ChangeEvent event) {
-                controlEdited = true;
-            }
-        });
-
-        display.getControlFilePanelClose().addCloseHandler(new CloseHandler<DisclosurePanel>() {
-            public void onClose(CloseEvent<DisclosurePanel> event) {
-                display.getViewLink().setText(VIEW_CONTROL_STRING);
-            }
-        });
-
-        display.getControlFilePanelOpen().addOpenHandler(new OpenHandler<DisclosurePanel>() {
-            public void onOpen(OpenEvent<DisclosurePanel> event) {
-                display.getViewLink().setText(HIDE_CONTROL_STRING);
-            }
-        });
-
-        display.getSubmitJobButton().addClickHandler(new ClickHandler() {
-            public void onClick(ClickEvent event) {
-                submitJob(false);
-            }
-        });
-
-        display.getCreateTemplateJobButton().addClickHandler(new ClickHandler() {
-            public void onClick(ClickEvent event) {
-                submitJob(true);
-            }
-        });
-
-        display.getResetButton().addClickHandler(new ClickHandler() {
-            public void onClick(ClickEvent event) {
-                reset();
-            }
-        });
-
-        display.getHostless().addClickHandler(new ClickHandler() {
-            @Override
-            public void onClick(ClickEvent event) {
-                hostSelector.setEnabled(!display.getHostless().getValue());
-            }
-        });
-
-        reset();
-
-        if (staticData.getData("drone_sets_enabled").isBoolean().booleanValue()) {
-            AfeUtils.populateListBox(display.getDroneSet(), "drone_sets");
-        } else {
-            AfeUtils.removeElement("create_drone_set_wrapper");
-        }
-
-        testSelector.setListener(this);
-    }
-
-    public void reset() {
-        StaticDataRepository repository = StaticDataRepository.getRepository();
-
-        display.getJobName().setText("");
-        resetPriorityToDefault();
-        rebootBefore.reset();
-        rebootAfter.reset();
-        display.getParseFailedRepair().setValue(
-                repository.getData("parse_failed_repair_default").isBoolean().booleanValue());
-        display.getHostless().setValue(false);
-        display.getKernel().setText("");
-        display.getKernelCmdline().setText("");
-        display.getTimeout().setText(Utils.jsonToString(repository.getData("job_timeout_default")));
-        display.getMaxRuntime().setText(
-                Utils.jsonToString(repository.getData("job_max_runtime_hrs_default")));
-        display.getEmailList().setText("");
-        testSelector.reset();
-        display.getSkipVerify().setValue(false);
-        profilersPanel.reset();
-        setInputsEnabled();
-        controlTypeSelect.setControlType(TestSelector.CLIENT_TYPE);
-        controlTypeSelect.setEnabled(false);
-        display.getSynchCountInput().setEnabled(false);
-        display.getSynchCountInput().setText("1");
-        display.getControlFile().setText("");
-        display.getControlFile().setReadOnly(true);
-        controlEdited = false;
-        display.setControlFilePanelOpen(false);
-        display.getEditControlButton().setText(EDIT_CONTROL_STRING);
-        hostSelector.reset();
-        dependencies = new JSONArray();
-    }
-
-    private void submitJob(final boolean isTemplate) {
-        final int timeoutValue, maxRuntimeValue;
-        final JSONValue synchCount;
-        try {
-            timeoutValue = parsePositiveIntegerInput(display.getTimeout().getText(), "timeout");
-            maxRuntimeValue = parsePositiveIntegerInput(
-                    display.getMaxRuntime().getText(), "max runtime");
-
-            if (display.getHostless().getValue()) {
-                synchCount = JSONNull.getInstance();
-            } else {
-                synchCount = new JSONNumber(parsePositiveIntegerInput(
-                    display.getSynchCountInput().getText(),
-                    "number of machines used per execution"));
-            }
-        } catch (IllegalArgumentException exc) {
-            return;
-        }
-
-        // disallow accidentally clicking submit twice
-        display.getSubmitJobButton().setEnabled(false);
-
-        final SimpleCallback doSubmit = new SimpleCallback() {
-            public void doCallback(Object source) {
-                JSONObject args = new JSONObject();
-                args.put("name", new JSONString(display.getJobName().getText()));
-                String priority = display.getPriorityList().getSelectedName();
-                args.put("priority", new JSONString(priority));
-                args.put("control_file", new JSONString(display.getControlFile().getText()));
-                args.put("control_type",
-                         new JSONString(controlTypeSelect.getControlType()));
-                args.put("synch_count", synchCount);
-                args.put("timeout", new JSONNumber(timeoutValue));
-                args.put("max_runtime_hrs", new JSONNumber(maxRuntimeValue));
-                args.put("email_list", new JSONString(display.getEmailList().getText()));
-                args.put("run_verify", JSONBoolean.getInstance(
-                        !display.getSkipVerify().getValue()));
-                args.put("is_template", JSONBoolean.getInstance(isTemplate));
-                args.put("dependencies", getSelectedDependencies());
-                args.put("reboot_before", new JSONString(rebootBefore.getSelectedChoice()));
-                args.put("reboot_after", new JSONString(rebootAfter.getSelectedChoice()));
-                args.put("parse_failed_repair",
-                         JSONBoolean.getInstance(display.getParseFailedRepair().getValue()));
-                args.put("hostless", JSONBoolean.getInstance(display.getHostless().getValue()));
-
-                if (staticData.getData("drone_sets_enabled").isBoolean().booleanValue()) {
-                    args.put("drone_set", new JSONString(display.getDroneSet().getSelectedName()));
-                }
-
-                HostSelector.HostSelection hosts = hostSelector.getSelectedHosts();
-                args.put("hosts", Utils.stringsToJSON(hosts.hosts));
-                args.put("meta_hosts", Utils.stringsToJSON(hosts.metaHosts));
-                args.put("one_time_hosts",
-                    Utils.stringsToJSON(hosts.oneTimeHosts));
-
-                rpcProxy.rpcCall("create_job", args, new JsonRpcCallback() {
-                    @Override
-                    public void onSuccess(JSONValue result) {
-                        int id = (int) result.isNumber().doubleValue();
-                        NotifyManager.getInstance().showMessage(
-                                    "Job " + Integer.toString(id) + " created");
-                        reset();
-                        if (listener != null) {
-                            listener.onJobCreated(id);
-                        }
-                        display.getSubmitJobButton().setEnabled(true);
-                    }
-
-                    @Override
-                    public void onError(JSONObject errorObject) {
-                        super.onError(errorObject);
-                        display.getSubmitJobButton().setEnabled(true);
-                    }
-                });
-            }
-        };
-
-        // ensure control file is ready for submission
-        if (!controlReadyForSubmit) {
-            generateControlFile(true, doSubmit, new SimpleCallback() {
-                public void doCallback(Object source) {
-                    display.getSubmitJobButton().setEnabled(true);
-                }
-            });
-        } else {
-            doSubmit.doCallback(this);
-        }
-    }
-
-    private JSONArray getSelectedDependencies() {
-        return dependencies;
-    }
-
-    private void setSelectedDependencies(JSONArray dependencies) {
-        this.dependencies = dependencies;
-    }
-
-    private int parsePositiveIntegerInput(String input, String fieldName) {
-        final int parsedInt;
-        try {
-            if (input.equals("") ||
-                (parsedInt = Integer.parseInt(input)) <= 0) {
-                    String error = "Please enter a positive " + fieldName;
-                    NotifyManager.getInstance().showError(error);
-                    throw new IllegalArgumentException();
-            }
-        } catch (NumberFormatException e) {
-            String error = "Invalid " + fieldName + ": \"" + input + "\"";
-            NotifyManager.getInstance().showError(error);
-            throw new IllegalArgumentException();
-        }
-        return parsedInt;
-    }
-
-    public void refresh() {
-        hostSelector.refresh();
-    }
-
-    public void onTestSelectionChanged() {
-        generateControlFile(false);
-        setInputsEnabled();
-    }
-
-    private void setRebootSelectorDefault(RadioChooser chooser, String name) {
-        JSONObject user = staticData.getData("current_user").isObject();
-        String defaultOption = Utils.jsonToString(user.get(name));
-        chooser.setDefaultChoice(defaultOption);
-    }
-
-    private void selectPreferredDroneSet() {
-        JSONObject user = staticData.getData("current_user").isObject();
-        JSONValue droneSet = user.get("drone_set");
-        if (droneSet.isNull() == null) {
-            String preference = Utils.jsonToString(user.get("drone_set"));
-            display.getDroneSet().selectByName(preference);
-        }
-    }
-
-    public void onPreferencesChanged() {
-        setRebootSelectorDefault(rebootBefore, "reboot_before");
-        setRebootSelectorDefault(rebootAfter, "reboot_after");
-        selectPreferredDroneSet();
-        testSelector.reset();
-    }
-
-    private boolean parameterizedJobsEnabled() {
-        return staticData.getData("parameterized_jobs").isBoolean().booleanValue();
-    }
-}
diff --git a/frontend/client/src/autotest/afe/create/CreateJobViewTab.java b/frontend/client/src/autotest/afe/create/CreateJobViewTab.java
deleted file mode 100644
index 8a30d40..0000000
--- a/frontend/client/src/autotest/afe/create/CreateJobViewTab.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package autotest.afe.create;
-
-import autotest.afe.create.CreateJobViewPresenter.JobCreateListener;
-import autotest.common.ui.TabView;
-
-import com.google.gwt.json.client.JSONValue;
-import com.google.gwt.user.client.ui.HTMLPanel;
-
-public class CreateJobViewTab extends TabView {
-    private CreateJobViewPresenter presenter;
-    private CreateJobViewDisplay display;
-
-    protected CreateJobViewTab() {}
-
-    public CreateJobViewTab(JobCreateListener listener) {
-        presenter = new CreateJobViewPresenter(listener);
-        display = new CreateJobViewDisplay();
-        presenter.bindDisplay(display);
-    }
-
-    @Override
-    public String getElementId() {
-        return "create_job";
-    }
-
-    @Override
-    public void initialize() {
-        super.initialize();
-        getDisplay().initialize((HTMLPanel) getWidget());
-        getPresenter().initialize();
-    }
-
-    @Override
-    public void refresh() {
-        super.refresh();
-        getPresenter().refresh();
-    }
-
-    public void cloneJob(JSONValue cloneInfo) {
-        getPresenter().cloneJob(cloneInfo);
-    }
-
-    public void onPreferencesChanged() {
-        getPresenter().onPreferencesChanged();
-    }
-
-    protected CreateJobViewPresenter getPresenter() {
-        return presenter;
-    }
-
-    protected CreateJobViewDisplay getDisplay() {
-        return display;
-    }
-}
diff --git a/frontend/client/src/autotest/common/table/DynamicTable.java b/frontend/client/src/autotest/common/table/DynamicTable.java
index bcb9ca7..66227de 100644
--- a/frontend/client/src/autotest/common/table/DynamicTable.java
+++ b/frontend/client/src/autotest/common/table/DynamicTable.java
@@ -24,82 +24,82 @@
     public static final int NO_COLUMN = -1;
     public static final String SORT_UP_IMAGE = "arrow_up.png",
                                SORT_DOWN_IMAGE = "arrow_down.png";
-
+    
     public static interface DynamicTableListener extends DataTableListener {
         public void onTableRefreshed();
     }
-
+    
     static class SortIndicator extends Composite {
         public int column;
         private Image image = new Image();
-
+        
         public SortIndicator(int column) {
             this.column = column;
             initWidget(image);
             setVisible(false);
         }
-
+        
         public void sortOn(SortDirection direction) {
             image.setUrl(direction == SortDirection.ASCENDING ? SORT_UP_IMAGE : SORT_DOWN_IMAGE);
             setVisible(true);
         }
-
+        
         public void sortOff() {
             setVisible(false);
         }
     }
-
+    
     protected DataSource dataSource;
     private Query currentQuery;
-
+    
     private boolean clientSortable = false;
     private SortIndicator[] sortIndicators;
     private List<SortSpec> sortColumns = new ArrayList<SortSpec>();
-
+    
     protected List<Filter> filters = new ArrayList<Filter>();
     protected List<Paginator> paginators = new ArrayList<Paginator>();
     protected Integer rowsPerPage;
-
-    protected List<DynamicTableListener> dynamicTableListeners =
+    
+    protected List<DynamicTableListener> dynamicTableListeners = 
         new ArrayList<DynamicTableListener>();
-
+    
     public DynamicTable(String[][] columns, DataSource dataSource) {
         super(columns);
         setDataSource(dataSource);
     }
-
+    
     // SORTING
-
+    
     /**
-     * Makes the table client sortable, that is, sortable by the user by
-     * clicking on column headers.
+     * Makes the table client sortable, that is, sortable by the user by 
+     * clicking on column headers. 
      */
     public void makeClientSortable() {
         this.clientSortable = true;
-        table.getRowFormatter().addStyleName(0,
+        table.getRowFormatter().addStyleName(0, 
                                          DataTable.HEADER_STYLE + "-sortable");
-
+        
         sortIndicators = new SortIndicator[columns.length];
         for(int i = 0; i < columns.length; i++) {
             sortIndicators[i] = new SortIndicator(i);
-
+            
             // we have to use an HTMLPanel here to preserve styles correctly and
             // not break hover
             // we add a <span> with a unique ID to hold the sort indicator
             String name = columns[i][COL_TITLE];
             String id = HTMLPanel.createUniqueId();
-            HTMLPanel panel = new HTMLPanel(name +
+            HTMLPanel panel = new HTMLPanel(name + 
                                             " <span id=\"" + id + "\"></span>");
             panel.add(sortIndicators[i], id);
             table.setWidget(0, i, panel);
         }
     }
-
+    
     private void updateSortIndicators() {
         if (!clientSortable) {
             return;
         }
-
+        
         SortSpec firstSpec = getFirstSortSpec();
         for (SortIndicator indicator : sortIndicators) {
             if (columns[indicator.column][COL_NAME].equals(firstSpec.getField())) {
@@ -116,7 +116,7 @@
         }
         return sortColumns.get(0);
     }
-
+    
     /**
      * Set column on which data is sorted.  You must call <code>refresh()</code>
      * after this to display the results.
@@ -131,25 +131,25 @@
                 break;
             }
         }
-
+        
         sortColumns.add(0, new SortSpec(columnField, sortDirection));
         updateSortIndicators();
     }
-
+    
     /**
      * Defaults to ascending order.
      */
     public void sortOnColumn(String columnField) {
         sortOnColumn(columnField, SortDirection.ASCENDING);
     }
-
+    
     public void clearSorts() {
         sortColumns.clear();
         updateSortIndicators();
     }
-
+    
     // PAGINATION
-
+    
     /**
      * Attach a new paginator to this table.
      */
@@ -160,11 +160,11 @@
             public void doCallback(Object source) {
                 setPaginatorStart(((Paginator) source).getStart());
                 fetchPage();
-            }
+            } 
         });
         paginator.setResultsPerPage(rowsPerPage.intValue());
     }
-
+    
     /**
      * Set the page size of this table (only useful if you attach paginators).
      */
@@ -175,9 +175,9 @@
             paginator.setResultsPerPage(rowsPerPage);
         }
     }
-
+    
     /**
-     * Set start row for pagination.  You must call
+     * Set start row for pagination.  You must call 
      * <code>refresh()</code> after this to display the results.
      */
     public void setPaginatorStart(int start) {
@@ -185,22 +185,22 @@
             paginator.setStart(start);
         }
     }
-
+    
     protected void refreshPaginators() {
         for (Paginator paginator : paginators) {
             paginator.update();
         }
     }
-
+    
     protected void updatePaginatorTotalResults(int totalResults) {
         for (Paginator paginator : paginators) {
             paginator.setNumTotalResults(totalResults);
         }
     }
-
-
+    
+    
     // FILTERING
-
+    
     public void addFilter(Filter filter) {
         filters.add(filter);
         filter.addCallback(new SimpleCallback() {
@@ -210,7 +210,7 @@
             }
         });
     }
-
+    
     protected void addFilterParams(JSONObject params) {
         for (Filter filter : filters) {
             if (filter.isActive()) {
@@ -218,7 +218,7 @@
             }
         }
     }
-
+    
     public boolean isAnyUserFilterActive() {
         for (Filter filter : filters) {
             if (filter.isUserControlled() && filter.isActive()) {
@@ -228,10 +228,10 @@
 
         return false;
     }
-
-
+    
+    
     // DATA MANAGEMENT
-
+    
     public void refresh() {
         JSONObject params = new JSONObject();
         addFilterParams(params);
@@ -278,29 +278,28 @@
     public String[] getRowData(int row) {
         String[] data = new String[columns.length];
         for (int i = 0; i < columns.length; i++) {
-            if(isWidgetColumn(i)) {
+            if(isWidgetColumn(i))
                 continue;
-            }
             data[i] = table.getHTML(row, i);
         }
         return data;
     }
-
+    
     public DataSource getDataSource() {
         return dataSource;
     }
-
+    
     public void setDataSource(DataSource dataSource) {
         this.dataSource = dataSource;
     }
-
+    
     public Query getCurrentQuery() {
         return currentQuery;
     }
-
-
+    
+    
     // INPUT
-
+    
     @Override
     protected void onCellClicked(int row, int cell, boolean isRightClick) {
         if (row == headerRow) {
@@ -315,17 +314,17 @@
             if (firstSortSpec != null && columnName.equals(firstSortSpec.getField())) {
                 newSortDirection = invertSortDirection(firstSortSpec.getDirection());
             }
-
+            
             sortOnColumn(columnName, newSortDirection);
             refresh();
             return;
         }
-
+        
         super.onCellClicked(row, cell, isRightClick);
     }
-
+    
     private SortDirection invertSortDirection(SortDirection direction) {
-        return direction == SortDirection.ASCENDING ?
+        return direction == SortDirection.ASCENDING ? 
                                         SortDirection.DESCENDING : SortDirection.ASCENDING;
     }
 
@@ -333,18 +332,18 @@
         super.addListener(listener);
         dynamicTableListeners.add(listener);
     }
-
+    
     public void removeListener(DynamicTableListener listener) {
         super.removeListener(listener);
         dynamicTableListeners.remove(listener);
     }
-
+    
     protected void notifyListenersRefreshed() {
         for (DynamicTableListener listener : dynamicTableListeners) {
             listener.onTableRefreshed();
         }
     }
-
+    
     public List<SortSpec> getSortSpecs() {
         return Collections.unmodifiableList(sortColumns);
     }
diff --git a/frontend/client/src/autotest/common/ui/MultiListSelectPresenter.java b/frontend/client/src/autotest/common/ui/MultiListSelectPresenter.java
index 4b9d923..0d9efaa 100644
--- a/frontend/client/src/autotest/common/ui/MultiListSelectPresenter.java
+++ b/frontend/client/src/autotest/common/ui/MultiListSelectPresenter.java
@@ -32,8 +32,8 @@
         public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler);
     }
 
-    /* Optional additional display allowing toggle between a simple ListBox and a
-     * DoubleListSelector
+    /* Optional additional display allowing toggle between a simple ListBox and a 
+     * DoubleListSelector 
      */
     public interface ToggleDisplay {
         public SimplifiedList getSingleSelector();
@@ -93,14 +93,14 @@
         public String toString() {
             return "Item<" + name + ", " + value + ">";
         }
-
+        
         private boolean isSelected() {
             if (isGeneratedItem) {
                 return true;
             }
             return selected;
         }
-
+        
         private void setSelected(boolean selected) {
             assert !isGeneratedItem;
             this.selected = selected;
@@ -138,11 +138,6 @@
                 public HandlerRegistration addChangeHandler(ChangeHandler handler) {
                     throw new UnsupportedOperationException();
                 }
-
-                @Override
-                public void setEnabled(boolean enabled) {
-                    throw new UnsupportedOperationException();
-                }
             };
         }
 
@@ -210,7 +205,7 @@
         // check consistency of selectedItems
         for (Item item : items) {
             if (item.isSelected() && !selectedItems.contains(item)) {
-                throw new RuntimeException("selectedItems is inconsistent, missing: "
+                throw new RuntimeException("selectedItems is inconsistent, missing: " 
                                            + item.toString());
             }
         }
@@ -233,7 +228,7 @@
     private boolean isItemPresent(Item item) {
         return Collections.binarySearch(items, item) >= 0;
     }
-
+    
     private void removeItem(Item item) {
         items.remove(item);
         if (item.isSelected()) {
@@ -299,7 +294,7 @@
         selectedItems.add(item);
         assert verifyConsistency();
     }
-
+    
     public void selectItemByName(String name) {
         selectItem(getItemByName(name));
         refresh();
@@ -331,7 +326,7 @@
     }
 
     /**
-     * Set the set of selected items, silently dropping any that don't exist in the header field
+     * Set the set of selected items, silently dropping any that don't exist in the header field 
      * list.
      */
     public void restoreSelectedItems(List<Item> items) {
@@ -394,15 +389,15 @@
         }
         return null;
     }
-
+    
     public boolean hasItemName(String name) {
         return findItem(name) != null;
     }
 
     @Override
     public void onClick(ClickEvent event) {
-        boolean isItemSelectedOnLeft = display.getAvailableList().getSelectedName() != null;
-        boolean isItemSelectedOnRight = display.getSelectedList().getSelectedName() != null;
+        boolean isItemSelectedOnLeft = (display.getAvailableList().getSelectedName() != null);
+        boolean isItemSelectedOnRight = (display.getSelectedList().getSelectedName() != null);
         Object source = event.getSource();
         if (source == display.getAddAllButton()) {
             addAll();
@@ -425,7 +420,7 @@
         } else {
             throw new RuntimeException("Unexpected ClickEvent from " + event.getSource());
         }
-
+        
         refresh();
     }
 
@@ -440,7 +435,7 @@
             // ignore double-clicks on other widgets
             return;
         }
-
+        
         refresh();
     }
 
@@ -459,7 +454,7 @@
                 selectItem(item);
             }
         }
-
+        
         refresh();
     }
 
diff --git a/frontend/client/src/autotest/common/ui/RadioChooser.java b/frontend/client/src/autotest/common/ui/RadioChooser.java
index fabe2e1..24d2331 100644
--- a/frontend/client/src/autotest/common/ui/RadioChooser.java
+++ b/frontend/client/src/autotest/common/ui/RadioChooser.java
@@ -1,50 +1,51 @@
 package autotest.common.ui;
 
-import autotest.afe.IRadioButton;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Panel;
+import com.google.gwt.user.client.ui.RadioButton;
 
 import java.util.ArrayList;
 import java.util.List;
 
-public class RadioChooser {
-    public static interface Display {
-        public IRadioButton generateRadioButton(String groupName, String choice);
-    }
-
+public class RadioChooser extends Composite {
     private static int groupNameCounter = 0;
+    
+    private List<RadioButton> radioButtons = new ArrayList<RadioButton>();
+    private RadioButton defaultButton;
+    private Panel container = new HorizontalPanel();
     private String groupName = getFreshGroupName();
-    private List<IRadioButton> radioButtons = new ArrayList<IRadioButton>();
-    private IRadioButton defaultButton;
-
-    private Display display;
-
-    public void bindDisplay(Display display) {
-        this.display = display;
+    
+    public RadioChooser() {
+        initWidget(container);
+        setStyleName("radio-chooser");
     }
-
+    
     private static String getFreshGroupName() {
         groupNameCounter++;
         return "group" + Integer.toString(groupNameCounter);
     }
-
+    
     public void addChoice(String choice) {
-        IRadioButton button = display.generateRadioButton(groupName, choice);
+        RadioButton button = new RadioButton(groupName, choice);
         if (radioButtons.isEmpty()) {
             // first button in this group
             defaultButton = button;
             button.setValue(true);
         }
         radioButtons.add(button);
+        container.add(button);
     }
-
+    
     public String getSelectedChoice() {
-        for (IRadioButton button : radioButtons) {
+        for (RadioButton button : radioButtons) {
             if (button.getValue()) {
                 return button.getText();
             }
         }
         throw new RuntimeException("No radio button selected");
     }
-
+    
     public void reset() {
         if (defaultButton != null) {
             defaultButton.setValue(true);
@@ -58,9 +59,9 @@
     public void setSelectedChoice(String choice) {
         findButtonForChoice(choice).setValue(true);
     }
-
-    private IRadioButton findButtonForChoice(String choice) {
-        for (IRadioButton button : radioButtons) {
+    
+    private RadioButton findButtonForChoice(String choice) {
+        for (RadioButton button : radioButtons) {
             if (button.getText().equals(choice)) {
                 return button;
             }
diff --git a/frontend/client/src/autotest/common/ui/RadioChooserDisplay.java b/frontend/client/src/autotest/common/ui/RadioChooserDisplay.java
deleted file mode 100644
index 0a665c1..0000000
--- a/frontend/client/src/autotest/common/ui/RadioChooserDisplay.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package autotest.common.ui;
-
-import autotest.afe.IRadioButton;
-import autotest.afe.IRadioButton.RadioButtonImpl;
-
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.Panel;
-
-public class RadioChooserDisplay extends Composite implements RadioChooser.Display {
-    private Panel container = new HorizontalPanel();
-
-    public RadioChooserDisplay() {
-        initWidget(container);
-        setStyleName("radio-chooser");
-    }
-
-    public IRadioButton generateRadioButton(String groupName, String choice) {
-        RadioButtonImpl radioButton = new RadioButtonImpl(groupName, choice);
-        container.add(radioButton);
-        return radioButton;
-    }
-}
diff --git a/frontend/client/src/autotest/common/ui/SimplifiedList.java b/frontend/client/src/autotest/common/ui/SimplifiedList.java
index 3a626ee..20f3341 100644
--- a/frontend/client/src/autotest/common/ui/SimplifiedList.java
+++ b/frontend/client/src/autotest/common/ui/SimplifiedList.java
@@ -11,5 +11,4 @@
     public String getSelectedName();
     public void selectByName(String name);
     public HandlerRegistration addChangeHandler(ChangeHandler handler);
-    public void setEnabled(boolean enabled);
 }
diff --git a/frontend/tko/rpc_interface.py b/frontend/tko/rpc_interface.py
index f695675..491aa52 100644
--- a/frontend/tko/rpc_interface.py
+++ b/frontend/tko/rpc_interface.py
@@ -173,13 +173,8 @@
             for index in xrange(1, max_iterations + 1)]
 
 
-def _job_keyvals_to_dict(keyvals):
-    return dict((keyval.key, keyval.value) for keyval in keyvals)
-
-
 def get_detailed_test_views(**filter_data):
     test_views = models.TestView.list_objects(filter_data)
-
     tests_by_id = models.Test.objects.in_bulk([test_view['test_idx']
                                                for test_view in test_views])
     tests = tests_by_id.values()
@@ -191,22 +186,11 @@
                                                'iteration_results')
     models.Test.objects.populate_relationships(tests, models.TestLabel,
                                                'labels')
-
-    jobs_by_id = models.Job.objects.in_bulk([test_view['job_idx']
-                                             for test_view in test_views])
-    jobs = jobs_by_id.values()
-    models.Job.objects.populate_relationships(jobs, models.JobKeyval,
-                                              'keyvals')
-
     for test_view in test_views:
         test = tests_by_id[test_view['test_idx']]
         test_view['attributes'] = _attributes_to_dict(test.attributes)
         test_view['iterations'] = _format_iteration_keyvals(test)
         test_view['labels'] = [label.name for label in test.labels]
-
-        job = jobs_by_id[test_view['job_idx']]
-        test_view['job_keyvals'] = _job_keyvals_to_dict(job.keyvals)
-
     return rpc_utils.prepare_for_serialization(test_views)
 
 # graphing view support
diff --git a/frontend/tko/rpc_interface_unittest.py b/frontend/tko/rpc_interface_unittest.py
index 6649a63..91be76e 100644
--- a/frontend/tko/rpc_interface_unittest.py
+++ b/frontend/tko/rpc_interface_unittest.py
@@ -173,8 +173,6 @@
                                                 status=good_status,
                                                 machine=machine)
 
-        job1.jobkeyval_set.create(key='keyval_key', value='keyval_value')
-
         # create test attributes, test labels, and iterations
         # like Noah's Ark, include two of each...just in case there's a bug with
         # multiple related items
@@ -251,7 +249,6 @@
                                                 'perf': {'iresult': 3,
                                                          'iresult2': 4}}])
         self.assertEquals(test['labels'], ['testlabel1', 'testlabel2'])
-        self.assertEquals(test['job_keyvals'], {'keyval_key': 'keyval_value'})
 
 
     def test_test_attributes(self):
diff --git a/scheduler/monitor_db.py b/scheduler/monitor_db.py
index 2d878bb..5b7e593 100755
--- a/scheduler/monitor_db.py
+++ b/scheduler/monitor_db.py
@@ -7,7 +7,7 @@
 
 import common
 import datetime, errno, optparse, os, pwd, Queue, re, shutil, signal
-import smtplib, socket, stat, subprocess, sys, tempfile, time, traceback, urllib
+import smtplib, socket, stat, subprocess, sys, tempfile, time, traceback
 import itertools, logging, weakref, gc
 
 import MySQLdb
@@ -1823,7 +1823,6 @@
         keyval_path = os.path.join(self._working_directory(), 'host_keyvals',
                                    host.hostname)
         platform, all_labels = host.platform_and_labels()
-        all_labels = [ urllib.quote(label) for label in all_labels ]
         keyval_dict = dict(platform=platform, labels=','.join(all_labels))
         self._write_keyvals_before_job_helper(keyval_dict, keyval_path)
 
diff --git a/scheduler/scheduler_models.py b/scheduler/scheduler_models.py
index 0a6ae7b..bafaf5f 100644
--- a/scheduler/scheduler_models.py
+++ b/scheduler/scheduler_models.py
@@ -19,7 +19,6 @@
 import datetime, itertools, logging, os, re, sys, time, weakref
 from django.db import connection
 from autotest_lib.client.common_lib import global_config, host_protections
-from autotest_lib.client.common_lib import global_config, utils
 from autotest_lib.frontend.afe import models, model_attributes
 from autotest_lib.database import database_connection
 from autotest_lib.scheduler import drone_manager, email_manager
@@ -592,57 +591,14 @@
             _drone_manager.unregister_pidfile(pidfile_id)
 
 
-    def _get_status_email_contents(self, status, summary=None, hostname=None):
-        """
-        Gather info for the status notification e-mails.
-
-        If needed, we could start using the Django templating engine to create
-        the subject and the e-mail body, but that doesn't seem necessary right
-        now.
-
-        @param status: Job status text. Mandatory.
-        @param summary: Job summary text. Optional.
-        @param hostname: A hostname for the job. Optional.
-
-        @return: Tuple (subject, body) for the notification e-mail.
-        """
-        job_stats = Job(id=self.job.id).get_execution_details()
-
-        subject = ('Autotest | Job ID: %s "%s" | Status: %s ' %
-                   (self.job.id, self.job.name, status))
-
-        if hostname is not None:
-            subject += '| Hostname: %s ' % hostname
-
-        if status not in ["1 Failed", "Failed"]:
-            subject += '| Success Rate: %.2f %%' % job_stats['success_rate']
-
-        body =  "Job ID: %s\n" % self.job.id
-        body += "Job name: %s\n" % self.job.name
-        if hostname is not None:
-            body += "Host: %s\n" % hostname
-        if summary is not None:
-            body += "Summary: %s\n" % summary
-        body += "Status: %s\n" % status
-        body += "Results interface URL: %s\n" % self._view_job_url()
-        body += "Execution time (HH:MM:SS): %s\n" % job_stats['execution_time']
-        if int(job_stats['total_executed']) > 0:
-            body += "User tests executed: %s\n" % job_stats['total_executed']
-            body += "User tests passed: %s\n" % job_stats['total_passed']
-            body += "User tests failed: %s\n" % job_stats['total_failed']
-            body += ("User tests success rate: %.2f %%\n" %
-                     job_stats['success_rate'])
-
-        if job_stats['failed_rows']:
-            body += "Failures:\n"
-            body += job_stats['failed_rows']
-
-        return subject, body
-
-
     def _email_on_status(self, status):
         hostname = self._get_hostname()
-        subject, body = self._get_status_email_contents(status, None, hostname)
+
+        subject = 'Autotest: Job ID: %s "%s" Host: %s %s' % (
+                self.job.id, self.job.name, hostname, status)
+        body = "Job ID: %s\nJob Name: %s\nHost: %s\nStatus: %s\n%s\n" % (
+                self.job.id, self.job.name, hostname, status,
+                self._view_job_url())
         email_manager.manager.send_email(self.job.email_list, subject, body)
 
 
@@ -650,20 +606,24 @@
         if not self.job.is_finished():
             return
 
-        summary = []
+        summary_text = []
         hosts_queue = HostQueueEntry.fetch('job_id = %s' % self.job.id)
         for queue_entry in hosts_queue:
-            summary.append("Host: %s Status: %s" %
+            summary_text.append("Host: %s Status: %s" %
                                 (queue_entry._get_hostname(),
                                  queue_entry.status))
 
-        summary = "\n".join(summary)
+        summary_text = "\n".join(summary_text)
         status_counts = models.Job.objects.get_status_counts(
                 [self.job.id])[self.job.id]
         status = ', '.join('%d %s' % (count, status) for status, count
                     in status_counts.iteritems())
 
-        subject, body = self._get_status_email_contents(status, summary, None)
+        subject = 'Autotest: Job ID: %s "%s" %s' % (
+                self.job.id, self.job.name, status)
+        body = "Job ID: %s\nJob Name: %s\nStatus: %s\n%s\nSummary:\n%s" % (
+                self.job.id, self.job.name, status,  self._view_job_url(),
+                summary_text)
         email_manager.manager.send_email(self.job.email_list, subject, body)
 
 
@@ -861,83 +821,6 @@
         return entries
 
 
-    def get_execution_details(self):
-        """
-        Get test execution details for this job.
-
-        @return: Dictionary with test execution details
-        """
-        def _find_test_jobs(rows):
-            """
-            Here we are looking for tests such as SERVER_JOB and CLIENT_JOB.*
-            Those are autotest 'internal job' tests, so they should not be
-            counted when evaluating the test stats.
-
-            @param rows: List of rows (matrix) with database results.
-            """
-            job_test_pattern = re.compile('SERVER|CLIENT\\_JOB\.[\d]')
-            n_test_jobs = 0
-            for r in rows:
-                test_name = r[0]
-                if job_test_pattern.match(test_name):
-                    n_test_jobs += 1
-
-            return n_test_jobs
-
-        stats = {}
-
-        rows = _db.execute("""
-                SELECT t.test, s.word, t.reason
-                FROM tko_tests AS t, tko_jobs AS j, tko_status AS s
-                WHERE t.job_idx = j.job_idx
-                AND s.status_idx = t.status
-                AND j.afe_job_id = %s
-                """ % self.id)
-
-        failed_rows = [r for r in rows if not 'GOOD' in r]
-
-        n_test_jobs = _find_test_jobs(rows)
-        n_test_jobs_failed = _find_test_jobs(failed_rows)
-
-        total_executed = len(rows) - n_test_jobs
-        total_failed = len(failed_rows) - n_test_jobs_failed
-
-        if total_executed > 0:
-            success_rate = 100 - ((total_failed / float(total_executed)) * 100)
-        else:
-            success_rate = 0
-
-        stats['total_executed'] = total_executed
-        stats['total_failed'] = total_failed
-        stats['total_passed'] = total_executed - total_failed
-        stats['success_rate'] = success_rate
-
-        status_header = ("Test Name", "Status", "Reason")
-        if failed_rows:
-            stats['failed_rows'] = utils.matrix_to_string(failed_rows,
-                                                          status_header)
-        else:
-            stats['failed_rows'] = ''
-
-        time_row = _db.execute("""
-                   SELECT started_time, finished_time
-                   FROM tko_jobs
-                   WHERE afe_job_id = %s
-                   """ % self.id)
-
-        if time_row:
-            t_begin, t_end = time_row[0]
-            delta = t_end - t_begin
-            minutes, seconds = divmod(delta.seconds, 60)
-            hours, minutes = divmod(minutes, 60)
-            stats['execution_time'] = ("%02d:%02d:%02d" %
-                                       (hours, minutes, seconds))
-        else:
-            stats['execution_time'] = '(none)'
-
-        return stats
-
-
     def set_status(self, status, update_queues=False):
         self.update_field('status',status)
 
diff --git a/server/autotest.py b/server/autotest.py
index eb25095..f918b27 100644
--- a/server/autotest.py
+++ b/server/autotest.py
@@ -213,10 +213,11 @@
             try:
                 self._install_using_packaging(host, autodir)
                 return
-            except (error.PackageInstallError, error.AutoservRunError,
-                    global_config.ConfigError), e:
+            except global_config.ConfigError, e:
                 logging.info("Could not install autotest using the packaging "
-                             "system: %s. Trying other methods",  e)
+                             "system: %s",  e)
+            except (error.PackageInstallError, error.AutoservRunError), e:
+                logging.error("Could not install autotest from repos")
 
         # try to install from file or directory
         if self.source_material:
diff --git a/server/git.py b/server/git.py
index 0428b80..93833ec 100644
--- a/server/git.py
+++ b/server/git.py
@@ -1,60 +1,74 @@
+#
+# Copyright 2007 IBM Corp. Released under the GPL v2
+# Authors: Ryan Harper <ryanh@us.ibm.com>
+#
+
 """
 This module defines a class for handling building from git repos
-
-@author: Ryan Harper (ryanh@us.ibm.com)
-@copyright: IBM 2007
 """
 
-import os, warnings, logging
-from autotest_lib.client.common_lib import error, revision_control
-from autotest_lib.client.bin import os_dep
+__author__ = """
+ryanh@us.ibm.com (Ryan Harper)
+"""
+
+
+import os
+from autotest_lib.client.common_lib import error
 from autotest_lib.server import utils, installable_object
 
 
-class InstallableGitRepo(installable_object.InstallableObject):
+class GitRepo(installable_object.InstallableObject):
     """
-    This class helps to pick a git repo and install it in a host.
+    This class represents a git repo.
+
+    It is used to pull down a local copy of a git repo, check if the local
+    repo is up-to-date, if not update.  It delegates the install to
+    implementation classes.
+
     """
-    def __init__(self, repodir, giturl, weburl=None):
-        self.repodir = repodir
+
+    def __init__(self, repodir, giturl, weburl):
+        super(installable_object.InstallableObject, self).__init__()
+        if repodir is None:
+            e_msg = 'You must provide a directory to hold the git repository'
+            raise ValueError(e_msg)
+        self.repodir = utils.sh_escape(repodir)
+        if giturl is None:
+            raise ValueError('You must provide a git URL to the repository')
         self.giturl = giturl
+        if weburl is None:
+            raise ValueError('You must provide a http URL to the repository')
         self.weburl = weburl
-        self.git_repo = revision_control.GitRepo(self.repodir, self.giturl,
-                                                 self.weburl)
+
+        # path to .git dir
+        self.gitpath = utils.sh_escape(os.path.join(self.repodir,'.git'))
+
+        # base git command , pointing to gitpath git dir
+        self.gitcmdbase = 'git --git-dir=%s' % self.gitpath
+
         # default to same remote path as local
-        self._build = os.path.dirname(self.repodir)
+        self.__build = os.path.dirname(self.repodir)
+
+
+    def run(self, command, timeout=None, ignore_status=False):
+        return utils.run(r'%s' % (utils.sh_escape(command)),
+                          timeout, ignore_status)
 
 
     # base install method
     def install(self, host, builddir=None):
-        """
-        Install a git repo in a host. It works by pushing the downloaded source
-        code to the host.
-
-        @param host: Host object.
-        @param builddir: Directory on the host filesystem that will host the
-                source code.
-        """
         # allow override of target remote dir
         if builddir:
-            self._build = builddir
+            self.__build = builddir
 
         # push source to host for install
-        logging.info('Pushing code dir %s to host %s', self.source_material,
-                     self._build)
-        host.send_file(self.source_material, self._build)
+        print 'pushing %s to host:%s' %(self.source_material, self.__build)
+        host.send_file(self.source_material, self.__build)
 
 
     def gitcmd(self, cmd, ignore_status=False):
-        """
-        Wrapper for a git command.
-
-        @param cmd: Git subcommand (ex 'clone').
-        @param ignore_status: Whether we should supress error.CmdError
-                exceptions if the command did return exit code !=0 (True), or
-                not supress them (False).
-        """
-        return self.git_repo.gitcmd(cmd, ignore_status)
+        return self.run('%s %s'%(self.gitcmdbase, cmd),
+                                        ignore_status=ignore_status)
 
 
     def get(self, **kwargs):
@@ -64,75 +78,108 @@
         this method will leave an up-to-date version of git repo at
         'giturl' in 'repodir' directory to be used by build/install
         methods.
-
-        @param **kwargs: Dictionary of parameters to the method get.
         """
+
+        if not self.is_repo_initialized():
+            # this is your first time ...
+            print 'cloning repo...'
+            cmd = 'clone %s %s ' %(self.giturl, self.repodir)
+            rv = self.gitcmd(cmd, True)
+            if rv.exit_status != 0:
+                print rv.stderr
+                raise error.CmdError('Failed to clone git url', rv)
+            else:
+                print rv.stdout
+
+        else:
+            # exiting repo, check if we're up-to-date
+            if self.is_out_of_date():
+                print 'updating repo...'
+                rv = self.gitcmd('pull', True)
+                if rv.exit_status != 0:
+                    print rv.stderr
+                    e_msg = 'Failed to pull git repo data'
+                    raise error.CmdError(e_msg, rv)
+            else:
+                print 'repo up-to-date'
+
+
+        # remember where the source is
         self.source_material = self.repodir
-        return self.git_repo.get(**kwargs)
 
 
     def get_local_head(self):
-        """
-        Get the top commit hash of the current local git branch.
+        cmd = 'log --max-count=1'
+        gitlog = self.gitcmd(cmd).stdout
 
-        @return: Top commit hash of local git branch
-        """
-        return self.git_repo.get_local_head()
+        # parsing the commit checksum out of git log 's first entry.
+        # Output looks like:
+        #
+        #       commit 1dccba29b4e5bf99fb98c324f952386dda5b097f
+        #       Merge: 031b69b... df6af41...
+        #       Author: Avi Kivity <avi@qumranet.com>
+        #       Date:   Tue Oct 23 10:36:11 2007 +0200
+        #
+        #           Merge home:/home/avi/kvm/linux-2.6
+        return str(gitlog.split('\n')[0]).split()[1]
 
 
     def get_remote_head(self):
-        """
-        Get the top commit hash of the current remote git branch.
+        def __needs_refresh(lines):
+            tag = '<meta http-equiv="refresh" content="0"/>'
+            if len(filter(lambda x: x.startswith(tag), lines)) > 0:
+                return True
 
-        @return: Top commit hash of remote git branch
-        """
-        return self.git_repo.get_remote_head()
+            return False
+
+
+        # scan git web interface for revision HEAD's commit tag
+        gitwebaction=';a=commit;h=HEAD'
+        url = self.weburl+gitwebaction
+        max_refresh = 4
+        r = 0
+
+        print 'checking %s for changes' %(url)
+        u = utils.urlopen(url)
+        lines = u.read().split('\n')
+
+        while __needs_refresh(lines) and r < max_refresh:
+            print 'refreshing url'
+            r = r+1
+            u = utils.urlopen(url)
+            lines = u.read().split('\n')
+
+        if r >= max_refresh:
+            e_msg = 'Failed to get remote repo status, refreshed %s times' % r
+            raise IndexError(e_msg)
+
+        # looking for a line like:
+        # <tr><td>commit</td><td # class="sha1">aadea67210c8b9e7a57744a1c2845501d2cdbac7</td></tr>
+        commit_filter = lambda x: x.startswith('<tr><td>commit</td>')
+        commit_line = filter(commit_filter, lines)
+
+        # extract the sha1 sum from the commit line
+        return str(commit_line).split('>')[4].split('<')[0]
 
 
     def is_out_of_date(self):
-        """
-        Return whether this branch is out of date with regards to remote branch.
+        local_head = self.get_local_head()
+        remote_head = self.get_remote_head()
 
-        @return: False, if the branch is outdated, True if it is current.
-        """
-        return self.git_repo.is_out_of_date()
+        # local is out-of-date, pull
+        if local_head != remote_head:
+            return True
+
+        return False
 
 
     def is_repo_initialized(self):
-        """
-        Return whether the git repo was already initialized (has a top commit).
+        # if we fail to get a rv of 0 out of the git log command
+        # then the repo is bogus
 
-        @return: False, if the repo was initialized, True if it was not.
-        """
-        return self.git_repo.is_repo_initialized()
+        cmd = 'log --max-count=1'
+        rv = self.gitcmd(cmd, True)
+        if rv.exit_status == 0:
+            return True
 
-
-    def get_revision(self):
-        """
-        Return current HEAD commit id
-        """
-        return self.git_repo.get_revision()
-
-
-    def checkout(self, remote, local=None):
-        """
-        Check out the git commit id, branch, or tag given by remote.
-
-        Optional give the local branch name as local.
-
-        @param remote: Remote commit hash
-        @param local: Local commit hash
-        @note: For git checkout tag git version >= 1.5.0 is required
-        """
-        return self.git_repo.checkout(remote, local)
-
-
-    def get_branch(self, all=False, remote_tracking=False):
-        """
-        Show the branches.
-
-        @param all: List both remote-tracking branches and local branches (True)
-                or only the local ones (False).
-        @param remote_tracking: Lists the remote-tracking branches.
-        """
-        return self.git_repo.get_branch(all, remote_tracking)
+        return False
diff --git a/server/git_kernel.py b/server/git_kernel.py
index 9bd7ae6..1f4273c 100644
--- a/server/git_kernel.py
+++ b/server/git_kernel.py
@@ -1,116 +1,69 @@
+#
+# Copyright 2007 IBM Corp. Released under the GPL v2
+# Authors: Ryan Harper <ryanh@us.ibm.com>
+#
+
 """
 This module defines the GitKernel class
-
-@author: Ryan Harper (ryanh@us.ibm.com)
-@copyright: IBM 2007
 """
 
-import os, logging
+__author__ = """
+ryanh@us.ibm.com (Ryan Harper)
+"""
+
+
+import os
 import git, source_kernel
 
 
-class GitKernel(git.InstallableGitRepo):
+class GitKernel(git.GitRepo):
     """
-    This class represents an installable git kernel repo.
+    This class represents a git kernel repo.
 
     It is used to pull down a local copy of a git repo, check if the local repo
     is up-to-date, if not update and then build the kernel from the git repo.
+
     """
     def __init__(self, repodir, giturl, weburl):
-        super(GitKernel, self).__init__(repodir, giturl, weburl)
-        self._patches = []
-        self._config = None
-        self._build = None
-        self._branch = None
-        self._revision = None
+        git.GitRepo.__init__(self, repodir, giturl, weburl)
+        self.__patches = []
+        self.__config = None
+        self.__build = None
 
 
     def configure(self, config):
-        self._config = config
+        self.__config = config
 
 
     def patch(self, patch):
-        self._patches.append(patch)
+        self.__patches.append(patch)
 
 
-    def checkout(self, revision, local=None):
-        """
-        Checkout the commit id, branch, or tag.
-
-        @param revision: Name of the git remote branch, revision or tag
-        @param local: Name of the local branch, implies -b
-        """
-        logging.info('Checking out %s', revision)
-        super(GitKernel, self).checkout(revision)
-        self._revision = super(GitKernel, self).get_revision()
-        self._branch = super(GitKernel, self).get_branch()
-        logging.info('Checked out %s on branch %s', self._revision,
-                     self._branch)
-
-
-    def show_branch(self):
-        """
-        Print the current local branch name.
-        """
-        self._branch = super(GitKernel, self).get_branch()
-        logging.info(self._branch)
-
-
-    def show_branches(self, all=True):
-        """
-        Print the local and remote branches.
-
-        @param all: Whether to show all branches (True) or only local branches
-                (False).
-        """
-        self._branch = super(GitKernel, self).get_branch()
-        logging.info(super(GitKernel, self).get_branch(all=all))
-
-
-    def show_revision(self):
-        """
-        Show the current git revision.
-        """
-        self._revision = super(GitKernel, self).get_revision()
-        logging.info(self._revision)
-
-
-    def install(self, host, build=True, builddir=None, revision=None):
-        """
-        Install the git tree in a host.
-
-        @param host: Host object
-        @param build: Whether to build the source tree
-        @param builddir: Specify a build dir. If no build dir is specified,
-                the job temporary directory will be used, so the build won't
-                be persistent.
-        @param revision: Desired commit hash. If ommited, will build from HEAD
-                of the branch.
-        """
-        if revision:
-            self.checkout(revision)
-            self._revision = super(GitKernel, self).get_revision()
-            logging.info('Checked out revision: %s', self._revision)
-
+    def install(self, host, build=True, builddir=None):
+        # use tmpdir if no builddir specified
+        # NB: pass a builddir to install() method if you
+        # need to ensure the build remains after the completion
+        # of a job
         if not builddir:
-            self._build = os.path.join(host.get_tmp_dir(), "build")
-            logging.warning('Builddir %s is not persistent (it will be erased '
-                            'in future jobs)', self._build)
+            self.__build = os.path.join(host.get_tmp_dir(),"build")
+            print 'warning: builddir %s is not persistent' %(self.__build)
 
         # push source to host for install
-        logging.info('Pushing %s to host', self.source_material)
-        host.send_file(self.source_material, self._build)
+        print 'pushing %s to host' %(self.source_material)
+        host.send_file(self.source_material, self.__build)
+        remote_source_material= os.path.join(self.__build,
+                        os.path.basename(self.source_material))
 
         # use a source_kernel to configure, patch, build and install.
-        sk = source_kernel.SourceKernel(self._build)
+        sk = source_kernel.SourceKernel(remote_source_material)
 
         if build:
             # apply patches
-            for p in self._patches:
+            for p in self.__patches:
                 sk.patch(p)
 
             # configure
-            sk.configure(self._config)
+            sk.configure(self.__config)
 
             # build
             sk.build(host)
diff --git a/server/hosts/remote.py b/server/hosts/remote.py
index e46bc1b..b692480 100644
--- a/server/hosts/remote.py
+++ b/server/hosts/remote.py
@@ -1,7 +1,7 @@
 """This class defines the Remote host class, mixing in the SiteHost class
 if it is available."""
 
-import os, logging, urllib
+import os, logging
 from autotest_lib.client.common_lib import error
 from autotest_lib.server import utils
 from autotest_lib.server.hosts import base_classes, bootloader
@@ -25,7 +25,6 @@
 
     DEFAULT_REBOOT_TIMEOUT = base_classes.Host.DEFAULT_REBOOT_TIMEOUT
     LAST_BOOT_TAG = object()
-    DEFAULT_HALT_TIMEOUT = 2 * 60
 
     VAR_LOG_MESSAGES_COPY_PATH = "/var/log/messages.autotest_start"
 
@@ -89,12 +88,6 @@
         self.run('echo b > /proc/sysrq-trigger &')
 
 
-    def halt(self, timeout=DEFAULT_HALT_TIMEOUT, wait=True):
-        self.run('/sbin/halt')
-        if wait:
-            self.wait_down(timeout=timeout)
-
-
     def reboot(self, timeout=DEFAULT_REBOOT_TIMEOUT, label=LAST_BOOT_TAG,
                kernel_args=None, wait=True, fastsync=False,
                reboot_cmd=None, **dargs):
@@ -220,21 +213,6 @@
             return None
 
 
-    def get_all_labels(self):
-        """
-        Return all labels, or empty list if label is not set.
-        """
-        if self.job:
-            keyval_path = os.path.join(self.job.resultdir, 'host_keyvals',
-                                       self.hostname)
-            keyvals = utils.read_keyval(keyval_path)
-            all_labels = keyvals.get('labels', '')
-            if all_labels:
-              all_labels = all_labels.split(',')
-              return [urllib.unquote(label) for label in all_labels]
-        return []
-
-
     def delete_tmp_dir(self, tmpdir):
         """
         Delete the given temporary directory on the remote machine.
diff --git a/server/hosts/serial.py b/server/hosts/serial.py
index d514dba..9b4bdb2 100644
--- a/server/hosts/serial.py
+++ b/server/hosts/serial.py
@@ -114,7 +114,7 @@
 
 
     def hardreset(self, timeout=DEFAULT_REBOOT_TIMEOUT, wait=True,
-                  conmux_command='hardreset', num_attempts=1, halt=False,
+                  conmux_command='hardreset', num_attempts=1,
                   **wait_for_restart_kwargs):
         """
         Reach out and slap the box in the power switch.
@@ -124,7 +124,6 @@
         @params wait: Whether or not to wait for the machine to reboot
         @params num_attempts: Number of times to attempt hard reset erroring
                               on the last attempt.
-        @params halt: Halts the machine before hardresetting.
         @params **wait_for_restart_kwargs: keyword arguments passed to
                 wait_for_restart()
         """
@@ -139,8 +138,6 @@
             old_boot_id = 'unknown boot_id prior to SerialHost.hardreset'
 
         def reboot():
-            if halt:
-                self.halt()
             if not self.run_conmux(conmux_command):
                 self.record("ABORT", None, "reboot.start",
                             "hard reset unavailable")
diff --git a/server/server_job.py b/server/server_job.py
index 6ef59de..757257f 100644
--- a/server/server_job.py
+++ b/server/server_job.py
@@ -542,12 +542,10 @@
 
                 # no error occured, so we don't need to collect crashinfo
                 collect_crashinfo = False
-            except Exception, e:
+            except:
                 try:
                     logging.exception(
                             'Exception escaped control file, job aborting:')
-                    self.record('INFO', None, None, str(e),
-                                {'job_abort_reason': str(e)})
                 except:
                     pass # don't let logging exceptions here interfere
                 raise
diff --git a/tko/parsers/version_1.py b/tko/parsers/version_1.py
index 111f7ef..e231fd1 100644
--- a/tko/parsers/version_1.py
+++ b/tko/parsers/version_1.py
@@ -285,14 +285,9 @@
                 subdir_stack.append(line.subdir)
                 continue
             elif line.type == "INFO":
-                fields = line.optional_fields
                 # update the current kernel if one is defined in the info
-                if "kernel" in fields:
+                if "kernel" in line.optional_fields:
                     current_kernel = line.get_kernel()
-                # update the SERVER_JOB reason if one was logged for an abort
-                if "job_abort_reason" in fields:
-                    running_job.reason = fields["job_abort_reason"]
-                    new_tests.append(running_job)
                 continue
             elif line.type == "STATUS":
                 # update the stacks
@@ -390,7 +385,7 @@
 
         # the job is finished, produce the final SERVER_JOB entry and exit
         final_job = test.parse_test(self.job, "----", "SERVER_JOB",
-                                    self.job.exit_status(), running_job.reason,
+                                    self.job.exit_status(), "",
                                     current_kernel,
                                     self.job.started_time,
                                     self.job.finished_time,
diff --git a/utils/external_packages.py b/utils/external_packages.py
index d505eef..9f74655 100644
--- a/utils/external_packages.py
+++ b/utils/external_packages.py
@@ -478,11 +478,11 @@
     # For all known setuptools releases a string compare works for the
     # version string.  Hopefully they never release a 0.10.  (Their own
     # version comparison code would break if they did.)
-    version = '0.6c11'
+    version = '0.6c9'
     urls = ('http://pypi.python.org/packages/source/s/setuptools/'
             'setuptools-%s.tar.gz' % (version,),)
     local_filename = 'setuptools-%s.tar.gz' % version
-    hex_sum = '8d1ad6384d358c547c50c60f1bfdb3362c6c4a7d'
+    hex_sum = '79086433b341f0c1df45e10d586a7d3cc25089f1'
 
     SUDO_SLEEP_DELAY = 15