virttest.qemu_storage: Update create() function when using qcow2 format

Some option only support qcow2 format, like: preallocation, encryption,
cluster_size.

Signed-off-by: Shuping Cui <scui@redhat.com>
virttest.qemu_storage: Fix a typo

We use 'encryption=on' for qcow2 format now.

Signed-off-by: Shuping Cui <scui@redhat.com>
libvirt_xml.network_xml: add forward tag as dict

Removed `fwd_mode` attribute because it's not flexible
when dealing with multiple attributes. It's safe to do
this since it's not used anywhere.

Signed-off-by: Hao Liu <hliu@redhat.com>
Merge pull request #1841 from Hao-Liu/fix_network

libvirt_xml.network_xml: add forward tag as dict
virttest.utils_test: Could not use error as parameter name.

We have already use error as module name. So could not use it as
parameter name. Or we will get following error:
  Traceback (most recent call last):
    File "/usr/code/autotest/client/shared/test.py", line 823, in _call_test_function
      return func(*args, **dargs)
    File "/usr/code/autotest/client/shared/test.py", line 291, in execute
      postprocess_profiled_run, args, dargs)
    File "/usr/code/autotest/client/shared/test.py", line 209, in _call_run_once
      *args, **dargs)
    File "/usr/code/autotest/client/shared/test.py", line 313, in run_once_profiling
      self.run_once(*args, **dargs)
    File "/usr/code/autotest/client/tests/virt/virt.py", line 154, in run_once
      run_func(self, params, env)
    File "/usr/code/autotest/client/shared/error.py", line 141, in new_fn
      return fn(*args, **kwargs)
    File "/usr/code/autotest/client/tests/virt/test-providers.d/downloads/io-github-autotest-qemu/qemu/tests/mq_change_qnum.py", line 93, in run
      utils_test.update_boot_option(vm, args_added="pci=nomsi")
    File "/usr/code/autotest/client/shared/error.py", line 141, in new_fn
      return fn(*args, **kwargs)
    File "/usr/code/autotest/client/tests/virt/virttest/utils_test/__init__.py", line 100, in update_boot_option
      error.context(msg, logging.info)
  UnboundLocalError: local variable 'error' referenced before assignment

Signed-off-by: Feng Yang <fyang@redhat.com>
Merge pull request #1846 from FengYang/boot_param

virttest.utils_test: Could not use error as parameter name.
Merge pull request #1807 from spcui/qemu_storage

qemu_storage bugs fix
utils_test.libvirt: Add function to create xml for hostdev device.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
utils_misc: Add VFIO relative functions.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virttest.libvirt_vm: Add functions to get vm pci devices.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>