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>
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: Restore the working dir in download_test_provider

After check the repo informations we should restore the working
dir to original one. Otherwise it will cause problems after we
call it in our scripts.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest: Remove sit0 in get_linux_ifname of utils_net

sit0 is IPv6-in-IPv4 device added in system which not represent devices
added by vm.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virt: Add clone_volume func to PoolVolume class

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virt: Add create func to VolXML class

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virt: Add functions to get/set cpu status

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
utils_libvirtd: Don't need to wait if start failed

If libvirtd service start or restart failed, just checking the exit code
will be enough, we don't need to wait 60 seconds to check whether a
virsh command can be executed.

Signed-off-by: Hao Liu <hliu@redhat.com>
libvirt: Declare LIBVIRT_DEFAULT_URI in preprocess().

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
env_process: Recreate vm in env if vm.connect_uri is not params.get('connect_uri').

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt_vm: Override __setattr__ of libvirt_vm.VM.

For VMs in different uri, we need some different params for them.
This patch introduce a way we can set these params in base.cfg only
for VM in a special uri. What we need to do is adding the special
param with a prefix of 'libvirt_URI_' into base.cfg. That's all.
libvirt_vm.VM will check the connect_uri and use the param you want.

Example:
	isa_serial = "serial0" is not usable for lxc VM. lxc does
not support serial device yet. In this case, we need not to change
the default value of isa_serial. We can add a new param in base.cfg.
	libvirt_lxc_isa_serial = "console0"
Then if your VM is a lxc guest, it will use "console0".

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
run: Introduce an option --connect-uri to assign uri for test.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Merge pull request #1664 from yumingfei/migration_enhancements

Utils_test: Migration enhancements
add debug() function