qemu.qemu_vm: support vhostfd in netdev.

vhostfd only works when vhost on.
add enable_vhost parameter. set default value to 'yes'
Signed-off-by: Feng Yang <fyang@redhat.com>
utils_libvirtd: if libvirt is not availible in host, No error, but a warning.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
virt: modify libvirtd_status() to libvirtd_is_running()

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virttest.aexpect: Fix old class Spawn definition.

The base class Spawn for ShellSession was defined in old way(class Spawn).
Then we can not use super() for inherited classes:
TypeError: super() argument 1 must be type, not classobj

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
README.rst: add basic troubleshooting instructions

As suggested by Juan Quintela.

CC: Juan Quintela <quintela@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
virttest.env_process: Fix postprocess logging

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
qemu.tests.cfg: Enable qemu guest agent test for RHEL guest

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.cfg: Disable xhci on old windows for RHEL host

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.cfg: Move usb_(re)boot config for win guest to Windows.cfg

These parameters would be overridden by the parameters in
each usb device config block. So move it into guest-os's
config files.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Merge pull request #638 from zhouqt/minor-fix

qemu: Minor fixes for qemu test cases
shared.deps.finish.bat: Add vds service start in finish.bat

Start this service to ignore diskpart failed in some windows guests
like win2003.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Acked-by: Xiaoqing Wei <xwei@redhat.com>
tests: Add a function for copy image from nfs when install failed

As this is a prepare case for test loops, we should make sure there
is a good image for the rest of the tests. So will copy images from nfs
if this case failed.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
shared.unattended: Make win2008r2 support key during installation.

Multiple Activation Key (MAK) could not work in 2008r2
 answer file in the WindowsPE phase of setup.
Always get following error:
The unattend answer file contains an invalid product key.
Either remove the invalid key or provide a valid product key in
 the unattend answer file to proceed with Windows Installation

So add key in Microsoft-Windows-Shell-Setup in component.
http://technet.microsoft.com/en-us/library/cc749389%28v=ws.10%29.aspx

Signed-off-by: Feng Yang <fyang@redhat.com>
Acked-by: Suqin Huang <shuang@redhat.com>
tests: Read serial output from the log file in unattended_install

Read serial output from vm.serial will loss infos when do migrate
operates. The migrate will start new session when boot up the dst
guest. And the infos from src guest will loss in checkout step.
This will cause the case can not get the finish strings. So use
serail log file to instead it.

changes from v1:
   - move fd.close to finally branch to ignore the multi open
     problem
changes from v2:
   - to ignore the try:except:finally problem in python 2.4
     use a old method.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Acked-by: Qingtang Zhou <qzhou@redhat.com>
tests: unattended_install: Fix serial log file path

The isa serial console's log file path is updated in commit
5e320327ecfb1ef25cc1656029b071a26ff1378d

So we need to update unattended_install as well.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>

Update the serial log path to fit both control mode and standard alone
mode.

Singed-off-by: Yiqiao Pu <ypu@redhat.com>
tests: unattended_install: Create missing serial log file

If the serial log file is missing, try to create an empty file
to avoid redundant warning msg.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
tests: Support copy iso file to local host in unattended_install.cdrom case.

This patch is useful for performance testing.
So comment it out by default.

Changes from v3:
Do not copy again, if file already there with same md5 value.
Changes from v2:
Check parameter available before using it.
Changes from v1:
Add copy_to_local parameter to set which file need copy to local host.

Signed-off-by: Feng Yang <fyang@redhat.com>
tests: Update the unattended install string update function

Make the Windows guests unattended files can support more type of
driver install.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
tests: Read driver id from inf file for Windows drivers

Update the driver id according the inf file of driver for virtio
drivers in Windows guests

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest.utils_test: Update get_driver_hardware_id to ignore device is busy

Update get_driver_hardware_id to close the txt_file before umount the
driver disk for virtio drivers. Also update the re_hw_id.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>