virttest.libvirt_vm: Add functions to get device details.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
utils_test: Add functions for remote disk operations.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
utils_test: Support lvm for RemoteDiskManager.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
utils_test.libvirt: Add attaching operations for libvirt vm.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
utils_test.init: Add function for RemoteDiskManager.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virttest: Remove duplicate lines in qemu_vm

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest.qemu_device: Make virtio-scsi-pci bus can support num_queues

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
utils_test.HostStress: Set default value for params.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
utils_test: Pass correct args to control file.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
utils_test.run_autotest: Support to pass args for control.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
Add functions to get disk slots and disk type in xml.
virttest: Init old_redirs as a empty dict

Make the type of old_redirs and self.redirs the same. Otherwise
it will always failed in the check step and set up the self.devices
to None.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest: Update nic command line in create when devices already exist

As we will skip the command update if vm object already have self.devices
in qemu_vm. We need manually update the fds and vhostfds for it when we
get them from host.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest: Remove the special strings from sysfs of numa possible node

In some system the possible node information read from sysfs include some
special string as \x00 for end of the string. Need remove it as it will
failed the translate of string to int.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest.virsh: add blkiotune command wrapper

Signed-off-by: Alex Jia <ajia@redhat.com>
virttest.utils_misc: add functions for getting major and minor numbers of the device

Signed-off-by: Alex Jia <ajia@redhat.com>
virttest.libvirt_xml.vm_xml: parse block I/O elements from XML

Signed-off-by: Alex Jia <ajia@redhat.com>
env_process: Check if VM exists when preprocessing

Before this patch when running test cases without a main VM exists,
say `virt-tests-vm1`, the test still goes on, it will raise a `TestFail`
if it tries to start the non-exist VM or if test was configured not to be
started at the preprocess progress, there will be strange outputs.

This patch check the existence of target VM, and raise a `TestError` if
`main_vm` don't exist or a `TestNAError` if a non-`main_vm` don't exist.

Signed-off-by: Hao Liu <hliu@redhat.com>
libvirt_vm: make normalize_connect_uri return exact uri rather than None when input is default.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt_vm: Fix for vm.connect_uri when it is default.

Default is not always qemu.

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