libguestfs: Add testcases for error_test of guestfs_add.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libguestfs.test: Fix guestfs_add for new libguestfs version.

In new libguestfs version, all disks will be recognised with /dev/sdx.
But virtio disks of vm will be /dev/vdx in vm.So change gotten
/dev/sdx in guestfish to /dev/vdx if it is necessary.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Support multiple devices for multifunction test.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Add testcases for single_device of multifunction.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Add testcases for multi_devices in multifunction.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virt:Fix a hidden bug in virt_filesystems

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virt:Add a function to get primary disk filesystem type

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
tests: Add a case to install hck client in Windows guest

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
device_bit_check.cfg: replace scsi_extra_params_hda with blk_extra_params

change the parameter name scsi_extra_params_hda to blk_extra_params.

Signed-off-by: Xiangmin Han <xhan@redhat.com>
libvirt: Fix setmaxmem from changing mem size

The test setmaxmem backup the vm's max memory and restore it by calling
`virsh setmaxmem` after test.

This will cause problem when test shinking the max memory. The current
memory will also shrink to adapt the max memory. After restore the max
memory, this shrinked current memory will remain.

* To ensure the fully restoration of guest, we change back to
  backup by new_from_inactive_dumpxml and sync after test.

* Use `try ... finally ...` to make sure restoration even bad thing
  happens.

* Fix some pylint complaints.

Signed-off-by: Hao Liu <hliu@redhat.com>
qemu.test: make migration_with_netperf support windows guest

This patch make migration_with_netperf test support windows guest.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
virttest.utils_netperf: make the remote netperf path independent

This patch make the netperf path independent, the script will
re-geting the netperf package name when decompress the compressed
package.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
test.qemu.test: Refactor the code of netperf_udp

This patch refactor the code of netperf_udp using utils_netperf.
also make this test support windows guest.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
qemu.test: modify the configration of virtual_nic_send_buffer

We need update the configration of virtual_nic_send_buffer, sinece
refactor the netperf_udp

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
libvirt: Fix vcpupin XML change

Test vcpupin doesn't backup and restore vm XML, making the XML change
when using '--config' option.

This commit:
* Backup and restore VM's XML using new_from_inactive_dumpxml and sync.

* Close the test block in 'try ... finally ...' to ensure VM recover in
  any case.

Signed-off-by: Hao Liu <hliu@redhat.com>
virsh: Add options in virsh.restore() fucntion.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt-tests: Use tmp_file for virsh restore

Reported-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
qemu_vm: Support netdev_extra_params when do nic hotplug

This patch make add_netdev support netdev_extra_params when do nic hotplug

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
qemu.test: Support hot plug vhost nics

This patch add hotplug vhost nics test

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
qemu.test: remove the unnecessary limitation

It is unnecessary to limit "only virtio_net", when plugging virtio
nics.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>