virsh.emulatorpin: fix the way we get a cgroup path

There is a proper method in virttest.staging.utils_cgroup called
"resolve_task_cgroup_path" which is the best way to resolve
a cgroup path for current vm and cgroup controller.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
qemu.test: make set_link test support multiple queues

This patch make set_link test support multiple queues.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
qemu.test: Add vhost_net zero copy test

This patch add vhost_net zero copy test

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
util_test.libguestfs: Support choosing disk or domain in VirtTools.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libguestfs.tests: Supplements for guestmount test.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
qemu.test: add qemu device options check

This patch add a test for qemu nic device options check

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
virt: Fix filesystem type in mtab don't have to be same like fs in mount cmd

example:
   mount -t glusterfs server1:/vol_test /tmp/gmount-dMZ4hf

   cat mtab
     server1:/vol_test /tmp/gmount-dMZ4hf fuse.glusterfs rw,...

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virt: Allows get_net_if filter interfaces by state.

Adds possibility to filter network interface with
if_state == state (UP, DOWN, ...).

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virt: Fix import error when AUTOTEST_PATH is relative and work dir is changed.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
shared.cfg.guest-hw: Update pf_assignable and vf_assignable configure to fit framework changes.

pf_assignable and vf_assignable variants only works with nettype = bridge

Signed-off-by: Feng Yang <fyang@redhat.com>
qemu.tests: Add sr_iov_sanity new test case.

Signed-off-by: Feng Yang <fyang@redhat.com>
virt: Adds support for filesystem backend to storage.

backend could be glusterfs, nfs, ...
Only gluster fs implemented now.
Necessary for gluster testing.
virt: gluster split create and get path functionality.

It should be possible get gluster volume path without create
gluster volume.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virt: Adds support for qcow2 backing file.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virt: Adds support for check disk in storage with native support (gluster).

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virt: env_preprocess adds support for image backend.

Gluster and iSCSI storage are special because it is supported
native in qemu-kvm different way from other storage backend.

-drive gluster://server1:0/vol_test/f19-64.qcow2
-drive iscsi://<target-ip>[:<port>]/<target-iqn>/<lun>

other backends are firstly connected to system filesystem and
then used through the file path in VM like normal file or
uses other method like p9.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virt: Change config files to use image_backend config.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virt: Adds some gluster tests.

Tests:
1) boot_snap_boot.
2) gluster image create test.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virsh_domfstrim: Check for existence of lsscsi first

Need to check if the 'lsscsi' command exists before running; otherwise,
scsi_disk variable cannot be populated leading to failure to run the
fdisk command that follows.
virsh_vcpucount: Adjust --guest option testing

Couple of issues here. First there was no check to see if the
guest agent was running in the guest. The test would fail as
written with:

stderr: error: argument unsupported: QEMU guest agent is not configured

So borrow from virsh_snapshot_create_as.py and add code to check
and start the guest agent.

Even though the guest agent was running, the underlying QEMU may not
support the 'guest-get-vcpus' option as it was only added as of 1.5.
The error message received is:

 stderr: error: internal error: unable to execute QEMU agent command
  'guest-get-vcpus': The command guest-get-vcpus has not been found

So as a secondary fix - add a check for the stderr check and exit with
SKIP rather than FAIL.

The call to make this check is wrapped inside a try/except so that if
there is a failure, the test can reset the environment back to how it
found it.

Use that reset environment method in other test exit paths as well...

Finally fixed a spelling error in the CFG file from "opiton" to "option"