qemu.tests.boot_from_device: Change vm.create() to preprocess_vm()

In older code we did not update params for vm before creating it.
So old VM is reused. So we will meet following error:
15:42:02 ERROR| Exception escaping from test:
Traceback (most recent call last):
  File "/usr/code/autotest/client/shared/test.py", line 426, in _exec
    _call_test_function(self.execute, *p_args, **p_dargs)
  File "/usr/code/autotest/client/shared/test.py", line 853, in _call_test_function
    raise error.UnhandledTestFail(e)
UnhandledTestFail: Unhandled VMImageMissingError: CD image file not found: '/tmp/test.iso'
[context: (run_boot_from_device) --> creating 'virt-tests-vm1']
Traceback (most recent call last):
  File "/usr/code/autotest/client/shared/test.py", line 846, in _call_test_function
    return func(*args, **dargs)
  File "/usr/code/autotest/client/shared/test.py", line 299, in execute
    postprocess_profiled_run, args, dargs)
  File "/usr/code/autotest/client/shared/test.py", line 216, in _call_run_once
    *args, **dargs)
  File "/usr/code/autotest/client/shared/test.py", line 322, in run_once_profiling
    self.run_once(*args, **dargs)
  File "/usr/code/autotest/client/tests/virt/virt.py", line 139, in run_once
    run_func(self, params, env)
  File "/usr/code/autotest/client/shared/error.py", line 138, in new_fn
    return fn(*args, **kwargs)
  File "/usr/code/autotest/client/tests/virt/qemu/tests/boot_from_device.py", line 112, in run_boot_from_device
    vm.create()
  File "/usr/code/autotest/client/shared/error.py", line 138, in new_fn
    return fn(*args, **kwargs)
  File "/usr/code/autotest/client/tests/virt/virttest/qemu_vm.py", line 1769, in create
    raise virt_vm.VMImageMissingError(iso)
VMImageMissingError: CD image file not found: '/tmp/test.iso'

This patch could fix this.

Signed-off-by: Feng Yang <fyang@redhat.com>
qemu.cfg.boot_from_device: Update bootindex.

Not first index is 0, so update bootindex to 0, if we want to boot from it
firstly.

Signed-off-by: Feng Yang <fyang@redhat.com>
run: Setting --qemu_sandbox=on by default

This commit sets the Qemu sandboxing to 'on' by default. It allows the
user to run all tests using this feature to catch missing system calls
and providing more feedback to the general security of Qemu.

Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
qemu.tests: small fix for qemu_iotests

since qemu_iotests merged into tests/qemu_iotests, add param
qemu_iotests_dir to set iotests root dir;
And updated default git repo to qemu-kvm new repo;

Signed-off-by: Xu Tian <xutian@redhat.com>
virsh.is_dead(): Resolve timing condition

Existing code didn't check for 'in shutdown' condition which led to
odd timing issues in various tests where is_dead() was returning true
during the "Trying to shutdown VM with shell command" path followed
by code attempting a startup which would fail because you cannot start
an already started guest.

Rather than add 'in shutdown' to the list of things to check - I flipped
the check to look for dead states and return true (per the comments).  I
also note that 'no state' was returning False previously which could
have caused false positives.

Since the list of checked states could grow over time, I added a check
for all currently known states and just print a message if a state
is not known.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Mass PEP8 fix

From time to time, people are forgetting the little
PEP8 details, and we have to fix them.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
v2v.tests-shared: Fix wrong order of included files.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
v2v.tests: Rebuild cfg/tests.cfg for script 'run'.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
v2v.testcases: Enhancements of convert_remote_vm.

* Target_dev should be same as lvm pool's name.
* Replace test.tmpdir to data_dir to avoid too long
  path error.
* Add logic volume checking for creating lvm pool.
* Print more debug info for test.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
v2v.testcases: Check 'block' parameter for pool.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virt: Set spapr-vscsi for default in ppc64

The default scsi hba is lsi53c895a, but in ppc64, it is spapr-vscsi.

This patch to enable spapr-vscsi in ppc64 platform.

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
qemu/nic_bonding: Enlarge the timeout value of the case

There are four actions in the case, host to guest, guest to host
and repeat in another thread, for action, the time out is 1000,
but the whole case's timeout value also 1000, which is unreasonable
and cause failure sometimes.

This patch is to solve this bug.

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
Adding Sles11sp3 config file for ppc

Signed-off-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>