kvm-autotest: Allow migration of multiple machines.

Change migration_multi_host test to migrate all vms on same time.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virt: Repairs aexpect expect.read_nonblocking infinite read.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virt.nestress_kill_guest: Fix a typo,"quest" should be "guest"

"quest_netperf_cmd" is used to run on guest,"quest"
is not self-explanatory, it should be "guest" as
prefix.

Signed-off-by: Lei Yang <yanglei.fage@gmail.com>
virt: introduce add_machine_type() in kvm_vm.py

add_machine_type() is used to set emulated machine type.

-M machine : Select the emulated machine ("-M ?" for list)

Signed-off-by: Golita Yue <gyue@redhat.com>
Signed-off-by: Amos Kong <akong@redhat.com>
libvirt.tests: Reindent tests, reword messages and fix some typos

A full tree check revealed that these tests had indentation
problems. Fix those and also reword messages and fix some
typos.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
contrib/install-autotest-server.sh: Fix systemd detection bug

Which was making the script fail to install on Fedora 16.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virt.guest-os.cfg: Add ppc64 Fedora 16 guest variant

 Add a configuration item for ppc64 platform to
 support autotest running on ppc64 machines.

Signed-off-by: Liu Sheng <liusheng@cn.ibm.com>
virt.virt_assistant: Change diff order

So it'll show what is going to be added as a + and
what is going to be removed as a -.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virt: Fix usb_stick block device subsystem

* Add ehci controller when usbstick is selected
* Add default number of usb_max_port

With those mini-changes it's possible to run every test with usb_stick
block device without further test/cfg modifications.

Signed-off-by: Lukas Doktor <ldoktor@redhat.com>
virt tests: add dd_test

This patch adds dd_test which tries simple read/write from/to an attached
disk. The purpose is to test readonly vs. readwrite subsystem.

The dd_test.py is highly parametrizable so it can be used in other
tests by changing parameters.

It also adds another image parameter "image_readonly" (bool) which is
required for this test.

Signed-off-by: Lukas Doktor <ldoktor@redhat.com>
virt_http_server.py: disable name resolution

Name resolution is not important for the virt http server, and its
use may bring some complications, including performance.

So, let us follow httpd's default by disabling name resolution.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
virt: introduced import method for guest install

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
virt.unattended_install: Fix coding style

Implicit line continuation is alays preferred.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
grubby: add grubby boot manager as a client dep

This is a requirement for the new boottool(.py) implementation,
which depends on grubby. Making a client dep allows one
to install grubby easily on systems that do ship or install
it by default.

Please notice that if you plan to use boottool(.py) as a
standalone tool, it also includes the ability to auto install
grubby.

The versioning scheme used for grubby is not official. It
adds '-autotest' to distinguish from the official version. Our
goal is to have all the functionality in the -autotest version
merged upstream, so that we'll be able to follow the official
version.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
boottool: introduce boottool rewrite

With the introduction of new bootloader versions, most notably
grub2[1], support would have to be introduced to the boottool.
While doing some shopping, we noticed that grubby[2] had support
for all bootloaders that boottool offered plus grub2.

This new boottool, introduced here, is a simple wrapper for
grubby, to account for command line syntax and output
compatiblity. The long-term plan is to drop this new boottool
and rely on grubby directly.

[1] AKA grub, because grub 1 is now know as grub legacy
[2] http://git.fedorahosted.org/git/grubby.git

Changes from v7:
 * Rework logging system
 * Bumped grubby version
 * Fixed grubby version regex

Changes from v6:
 * Fixed typos
 * Made EliloConf a new style class

Changes from v5:
 * Implemented set_default_by_index and fix call of get_entry_indexes()
 * Implemented --default and --set-default actions
 * Updated exported symbols (__all__)
 * Made parse_entry a function, to ease its use by server side code

Changes from v4:
 * Made EfiVar and EfiToolSys inherit from object (lmr)
 * EfiToolSys checks the basic directory structure at at init (lmr)
 * _max_index replaced by _get_entry_indexes (lmr)
 * Removed xen_hypervisor parameter from add_kernel (lmr)

Changes from v3:
 * Respect --debug= command line options
 * Respect --bootloader= command line option
 * Better format the messages output via the logging system
 * Removed FIXMEs on XEN support
 * Style and spacing fixes
 * Improved find_executable and make it a function
 * Automatically install grubby if it's not found
 * Simplified version check routines
 * remove attempt to support boot once on ia64 with 2.4 kernels
 * Introduced EliloConf, simple parser for elilo config file
 * Completed support for boot once on ia64
 * Updated mininum required version of grubby to 8.9

Changes from v2:
 * Log messages on BoottoolApp should start with that as a prefix
 * Stardandization of return values from API and actions methods
 * Opmization while checking for harmful messages on boot once for
   gruby
 * Naming fixes recommended by pylint
 * Makefile patching for explicity adding libuuid on RHEL4
 * Python 2.4 compatibility issue with tarfile's extractall()
 * Fixes for ia64 and temporary placeholders for boot_once
 * Introduced classes to manipulate EFI variables
 * Initial implementation of boot once for elilo based on
   EfiVars/EfiToolSys

Changes from v1:
 * fix typos
 * fixes for opts vs self.opts
 * action block comment moved to correct location
 * moved implementation of add_kernel to an API method
 * make Grubby pass the --config-file argument to grubby
 * add remove_kernel as an API method and make action use it
 * add boot_once action using the boot_once API

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
boottool: auto install of grubby for users of the client library

The boottool CLI already does auto installation of grubby if a
recent enough version is not found on the system. This patch
makes that feature a function that can also be used by users of
the boottool client library, at instantiation time.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
boottool: adapt server side bootloader.py for rewrite of bootool

Signed-off-by: Cleber Rosa <crosa@redhat.com>
bootool: removed (now) legacy perl based version

Signed-off-by: Cleber Rosa <crosa@redhat.com>
bootool: renamed new boottool.py to be called simply boottool

Signed-off-by: Cleber Rosa <crosa@redhat.com>
boottool: fixes for missing methods on server API

As reported by visonlee, on issues #282 and #281.

Signed-off-by: Cleber Rosa <crosa@redhat.com>