virttest.virsh: Add blockresize() API

Add new API to support the libvirt test
virsh_blockresize

Signed-off-by: Guannan Ren <gren@redhat.com>
Fix parameters for LibvirtXMLError calls

Initially seen in vm_xml/sync() - the raising of the exception passed
3 paramters instead of the __init__ required 2:

   File "/home/virt-test/virttest/libvirt_xml/vm_xml.py", line 376, in sync
     raise xcepts.LibvirtXMLError("Failed to undefine %s.", self.vm_name)
 TypeError: __init__() takes at most 2 arguments (3 given)

Since I was fixing this one - I looked for others. Found the pool_xml/
pool_rename() condition as well, so I modified it too.
virttest.virsh: Add wrapper for migrate-compcache

Add standard wrapper function in virsh.py for calling virsh command
migrate-cimpcache.

Signed-off-by: Hao Liu <hliu@redhat.com>
libvirt_xml: remove the import of utils_test in devices.

There is a cycle import chain as below:

utils_test->VMXML->librarian->utils_test.

Then we will get a error when we use libvirt_xml:
    from virttest.libvirt_xml import vm_xml
  File "/home/yds/github-autotest/github-autotest/client/tests/virt/virttest/libvirt_xml/__init__.py", line 45, in <module>
    from virttest.libvirt_xml.vm_xml import VMXML
  File "/home/yds/github-autotest/github-autotest/client/tests/virt/virttest/libvirt_xml/vm_xml.py", line 10, in <module>
    from virttest.libvirt_xml.devices import librarian
  File "/home/yds/github-autotest/github-autotest/client/tests/virt/virttest/libvirt_xml/devices/librarian.py", line 6, in <module>
    import virttest.utils_test
  File "/home/yds/github-autotest/github-autotest/client/tests/virt/virttest/utils_test/__init__.py", line 38, in <module>
    import libvirt
  File "/home/yds/github-autotest/github-autotest/client/tests/virt/virttest/utils_test/libvirt.py", line 25, in <module>
    from virttest.libvirt_xml import vm_xml
ImportError: cannot import name vm_xml

This patch remove this unnecessary import line in librarian.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt_xml: fix issues from run_pep8 tool.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
virttest: Mass indentation fix

This time, brought to you by the program inspektor.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virtio-win: reorganize restrictions

Place the "unattended_install.cdrom, whql.support_vm_install" clause
on top, and avoid repeating it throughout.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-win: commonize virtio_network_installer_path settings

These only depend on 32- vs. 64-bit.  Do not repeat it for all tuples.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-win: commonize virtio driver path settings

They do not depend on the service path.  The aim is to match the
CD paths to the cartesian config file.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-win: automatically add virtio cd for virtio installs

Use the defines in guest-hw.cfg to find out.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-win: automatically add virtio floppy for XP and 2k3

Can do it, now that virtio-win.cfg is only sourced for virtio
installs.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-win: update default paths for latest virtio-win.iso

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-win: add virtio_scsi_path

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-win: remove unused variable

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-win: put virtio ISO together with winutils ISO

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
vm: provide a knob to disable computation of the hash

This lets one use RHEL settings with CentOS images, or other similar hacks.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
vm: use normal screendumps to verify BSOD

Currently a BSOD might happen before a screendump is taken, and thus
will not be in the video.  Instead, check the BSOD against the
files that are captured by _take_screendumps.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Add wrap for domblkerror, domdisplay, reset

Signed-off-by: Kyla Zhang <weizhan@redhat.com>
Merge pull request #1464 from bonzini/virtio-win

virtio-win cleanups, updates and virtio-scsi support
Merge pull request #1458 from autotest/indent-fixes

virttest: Mass indentation fix