qemu.tests.multi_nic_stress: Correct remote netperf folder in guest.

Signed-off-by: Feng Yang <fyang@redhat.com>
virsh_migrate: remove static mac address for "xml" test

We are using static mac address "ff:ff:ff:ff:ff:ff" which is broadcast
address, but libvirt neads unicast address. Instead of using static mac
address we can leave libvirt to generate one and then obtain that mac
address for further checking in the code.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
virsh_migrate: skip direct migration for driver different from xen

Direct migration is supported only for xen in libvirt and therefore
we should skip this test for all other drivers instead of failing.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
virsh.migrate: fix the connect uri

The src uri for migration tests should be gotten from the cfg file
instead from the vm object.

Also change the "connect_uri" into the "virsh_migrate_connect_uri"
and instead of "logging.warning()" that the src_uri or dest_uri aren't
updated use "error.TestNAError()" which will skip the test.
virsh.migrate: Update the "there_migrateuri" test case

By this update we can tell the user that he needs to setup the
migrateuri.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
virsh.migrate: change the current storage into the shared storage

The migration requires shared storage. By this patch we will detach
all existing storages from the existing guest and we will attach
one shared storage defined in the config file. It can be on
whatever backend you want.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
virsh.migrate: always recover the vm from xml backup

We are updating the vm configuration to have a shared disk we need
to always recover the vm form xml backup to ensure there are no
modification done by this test.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
qemu_vm: make the termination judgment of nic hotunplug more accurate

Currently, when hotunplug a nic, if the nic's nic_name is same as
another nic's netdev_id, hotunplug will failed.
This patch modify the judgment, make it more accurate.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
qemu.test: make nic_hotplug support hot plug/unplug multi nics

This patch make nic_hotplug test support hot plug/unplug multi
nics with different nic_model.

This patch also make nic_hotplug support random unplug a nic that
have been pluged.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
qemu.test: Add multi nics hotplug/hotunplug test

This patch add multi nics hotplug/hotunplug test

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
unattended_install.cfg: limit disk num to 6 in multi_disk_install when using ahci

An ahci controller can have up to 6 downstream devices,
so need to limit disk num to 6.

history:
  V2:
    add image1 in the images value
  V1:
    assign 6 stg name as the images value

Signed-off-by: Xiangmin Han <xhan@redhat.com>
qemu.tests.stress_kernel_compile: Fix typo

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
tests.guest_test: Fix reference to test entry point

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Merge pull request #1230 from FengYang/multi_nic_stress

qemu.tests.multi_nic_stress: Correct remote netperf folder in guest.
Merge pull request #1250 from jferlan/virsh_change_media

virsh_change_media: Add SKIP option for Enforcing selinux
Merge pull request #1213 from Antique/virsh-migrate

Improve virsh migrate tests
Merge pull request #1274 from Xiangmin/limit_ahci_disks_fix

unattended_install.cfg: limit disk num to 6 in multi_disk_install when sing ahci
Merge pull request #1272 from humanux/nic-hotplug

Nic hotplug
virsh_setvcpus: Update test

Update the config/test to follow more "modern" practices, especially
with respect to _domain vs. _vm_ref variables in cfg file. Found instances
where _vm_ref was being used instead of _options - fixed that too. Added
tests for add and remove when the guest is on (hotswap). This code has
undergone quite a bit of change and this test was always trying to remove
a vcpu which has it's issues.

Adjust test flow to use try/finally for the test conditions. Rather than
relying on /etc/libvirt/qemu/%s.xml for running/defined domain output,
use the dumpxml() function with and without --inactive based on whether
the test is adjusting the "--config" or otherwise.  Adjust the usage of
temporary xml files to use the tmp directory.  Use the more commonly
used new_from_inactive_dumpxml() to save/restore the original configuration.
Finally rather than relying on the generated xml format to re.search
to find the current value, grab that from the XML.  The issue with the
current code is that a new property "placement=<string>" was added and
the result was the re.search would never succeed the way it was written.

Use TestNAError for remote tests when not configured properly and also
for the libvirt/qemu error string check. The hotswap/remove cpus is the
most difficult option