virt.qemu_monitor: Add an API for terminating monitor connection

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt.env_process: Close monitor socket after test

The socket connection is stll alive after a test finishes,
normally it works well.
But there is one situation that the next test case tries to
re-connect to these monitor sockets after unpickled from env
file, even though the former monitor socket connection is
still established. In this case auotest will report a error
of "Could not find (qemu) prompt", though the monitor works
well in fact.

To avoid this problem, this patch just close all monitors'
socket connections at the end of a test case, and let the
following test case try to re-connect if needed.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt.qemu_vm: Move get_monitor_filename(s) functions to qemu_monitor

These 2 function are monitor related operation, thus better to put
them in qemu_monitor module.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt.qemu_monitor: Create 2 functions for creating monitor object

This patch introduces 2 helper functions in qemu_monitor module,
to help user create monitor object.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt.qemu_vm: Use monitor creation function in qemu_monitor

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt.qemu_monitor: Store qemu VM object in monitor object

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.cfg: Enable qemu_guest_agent tests on newer Fedora host

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.cfg: Update qemu guest agent config

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests: Fix module import problem in qemu_guest_agent_snapshot test

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.qemu_guest_agent: Update fsfreeze/fsthaw workflow

The original flow of freeze/thaw testing will make autotest
hang when rebooting/shutdown guest after freeze guest fs.
This patch moves guest reboot/shutdown operation after guest
is thawed.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt.guest_agent: Remove qemu monitor operation from this module

This module should not depend on qemu monitor interfaces.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt.guest_agent: Remove vm related operation in this module

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt.guest_agent: Update vm name arguments in exception classes

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt.guest_agent: Define constant for guest agent serial type

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt.guest_agent: Remove VAgentNotSupportedSerialError

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.qemu_guest_agent: Update QemuAgent initiation code

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.qemu_guest_agent: Fix test error message

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virttest.utils_net: move net related functions to utils_net

Move the net related function to utils_net to ignore the
loop import problems.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest.utils_net: Convert windows format ip to linux ip format in update_mac_ip_address

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest.utils_misc: Smbios test support in kvm autotest

    this patch modify smbios_table, add smbios three smbios type
and machine type test(-M) support.
    you can run smbios_table using "-smbios type=0" "-smbios type=1"
or both of them in test,and you can run test using diff machine type.

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