guest-os: Change kickstart/unattended parameters passed to kernel

With recent changes in the QEMU VM code, the cdrom order
is not honored anymore. Let's change the linux guests
configuration to honor that change.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
tests/autotest_control.py: simple identation fix

Signed-off-by: Cleber Rosa <crosa@redhat.com>
virttest/utils_test.py: allow running autotest tests with standalone control files

This fix is needed when running tests on vms based on the autotest
client, when using control files that do not use job.run_test() and
similar calls. That is, the control files are standalone and do not
reference a client test.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
virt: introduce autotest_distro_detect test

This is a trivial test that exercises the recently added distro.py
module on autotest.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
qemu.tests: Bring back missing tests code in cdrom.py

Some test code in this script was deleted by accident in
commit 2b5e0f6151419dd403d7f959e0492510f790b8e0. This patch
brings them back.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests: Add a kvm subtest format_disk.

This test will simply create a file system on disk, mount it and write
a file with some content to the disk. Check whether the write could be
succeeded.

Signed-off-by: sshang <sshang@redhat.com>

Checking guest os type with 'guest_name' parameter may not
always work for all guests, and not supported by upstream.
Thus update all these places to using 'os_type'.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>

In the format disk test, the status of the harddisk is different in different
env in Windows guest. Should check if the disk plused is offline and writeable.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>

This patch try to fix all the tab and trailing space problems.

Signed-off-by: Jason Wang <jasowang@redhat.com>

Make command timeout of format_disk.py scirpt longer and configurable

Signed-off-by: Feng Yang <fyang@redhat.com>
virt: Adds support for new qemu-kvm -cpu interface.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virt: Add get_iface functions for libvirt_xml module.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virt-libvirt: Add test for virsh attach|detach interface.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virt: fix problem of checking persistent in virsh.net_state_dict().

When network is transient, net_autostart() will raise.
The next step will try to get "transient" in result_object.
While error messages may not be in stderr but exist in result
object indeed:

 * Command:
 net-autostart default --disable
 Exit status: 1
 Duration: 0
 stdout:
 error: failed to unmark network default as autostarted
 error: Requested operation is not valid: cannot set autostart
        for transient network

Message "transient" exists, but stderr is None.
So search "ranient" in whole result object will be more suitable.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt_vm: give a choice on starting serial console automatically.

In start()&create() of VM class, they will start
serial console automatic when vm is started.
It will prevent other test from using console.
So give a choice on starting serial console automatically.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virt-libvirt: Standardize VMXML device package module handling

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: Base classes for VMXML devices

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: Add VMXML serial device base class

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: Add xml validation method and property

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: Add device manipulation to vm_xml module

Signed-off-by: Chris Evich <cevich@redhat.com>
Fix: slots should add a special list, not a string.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
Fix: find_module should be given a list include pathes.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
Add Serial class for libvirt_xml/devices/serial module.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
Change the implement of get_devices in vm_xml module.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>