utils_test: Add class for control stress tool.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virt: Add 'extra' param to domstate function

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
shared.cfg: Update live_snapshot_chain commands for Windows guests

dir command from Windows guests will include summary of current
directory informations. Which will change as we use the system disk
in test. So update the command to ignore the summary lines.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Fix setup_or_cleanup_iscsi error path

When the call will return "" (eg no iscsi_device found after 5 seconds),
we should clean up after ourselves and not expect the caller to clean
up after us.
Detach allocation and capacity from vol-size

Signed-off-by: Kyla Zhang <weizhan@redhat.com>
virttest.utils_test: Delete volumes for disk and logical pool cleanup

As libvirt also support delete volume for logical and disk pool, add
logical and disk pool to clean besides dir and netfs pool, this fix a
problem when destroy logical pool with error:

/usr/bin/virsh pool-destroy virt-logical-pool
stderr:
error: Failed to destroy pool virt-logical-pool
error: internal error: Child process (/usr/sbin/vgchange -aln vg_logical)
unexpected exit status 5:   Cannot deactivate "vol_create_test_vorigin"
locally..

Signed-off-by: Wayne Sun <gsun@redhat.com>
virttest.video_maker: Fix the counter bug

When the test case destroy the old vm and recreate new, there will
be two different folders which has the screendump pictures,
however, when the video make try get the pictures in the new folder,
the index will be not 1

This patch is to find the smallest index in the folder.

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
add expect_bootup_time for SUSE products

Signed-off-by: Lin Ma <lma@suse.com>
Add prompt information of rescue mode to patterns

Signed-off-by: Lin Ma <lma@suse.com>
virt.shared.cfg: force cd_format in machines.cfg

force cd_format for unattended_install with virtio_scsi or virtio_blk cdrom
test, because guest need special driver to support it before bootup.

Signed-off-by: Xu Tian <xutian@redhat.com>
utils_test: Support loading stress for test.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virttest.virsh: Add inject-nmi function.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
utils_test.libvirt: Move migration functions from test module.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virttest.virsh: Add wrapper for vol-resize

Signed-off-by: Yanbing Du <ydu@redhat.com>
virttest.bootstrap: Make jeos detection work on older autotest

Apparently, autotest 0.16 is not packaged in EPEL,
which means RHEL6 didn't get it. Oh joy.

This is a temporary workaround until we figure out how
to update EPEL packages.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest.bootstrap: Suppress annoying deprecation message

In order to not get a deprecation message every
time we execute a virt test instance, let's use
a even more hackish approach to determine which
JeOS to use. We plan on dropping this and get
back to the elegant way of doing it as soon as
we get autotest 0.16 on EPEL.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
gluster: Support remote gluster server.

Sometime we have to use gluster in remote host.

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest.qemu_storage: Support gluster in image_check().

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest.qemu_storage: Do not check parent directory exist when glusterFS used

Got following error message in unattended_install case:
03/28 10:55:54 ERROR|qemu_stora:0128| Parent directory of the image file gluster://10.66.8.107:0/vol_test/rhel64-64.qcow2 does not exist
03/28 10:55:54 ERROR|qemu_stora:0129| This usually means a serious setup error.
03/28 10:55:54 ERROR|qemu_stora:0130| Please verify if your data dir contains the expected directory structure
03/28 10:55:54 ERROR|qemu_stora:0133| Backing data dir: /var/lib/virt_test
03/28 10:55:54 ERROR|qemu_stora:0134| Directory structure:
03/28 10:55:54 ERROR|qemu_stora:0136| /var/lib/virt_test
03/28 10:55:54 WARNI|qemu_stora:0138| We'll try to proceed by creating the dir. Other errors may ensue

This is some interference information.
I think we should not check parent directory when glusterFS used.
But we can check parent directory available when image_backend = filesystem.

Signed-off-by: Feng Yang <fyang@redhat.com>
Merge pull request #1543 from xutian/fix_machines

virt.shared.cfg: force cd_format in machines.cfg