Add 27 tests for virsh_migrate.

Add 27 tests for virsh_migrate.

	1) Uni-direction migration with option --persistent.
	2) Uni-direction migration with option --undefinesource.
	3) Uni-direction migration with option --copy-storage-all.
	4) Uni-direction migration with option --copy-storage-inc.
	5) Uni-direction migration with option --change-protection.
	6) Uni-direction migration with option --verbose.
	7) Uni-direction migration with option --timeout.
	8) Uni-direction migration with option --migrateuri.
	9) Uni-direction migration with option --dname.
	10) Uni-direction migration with option --xml.
	11) Uni-direction migration with non-exist domain.
	12) Uni-direction migration without option --domain.
	13) Uni-direction migration with non-exist desturi.
	14) Uni-direction migration without option --desturi.
	15) Uni-direction migration with non-exist migrateuri.
	16) Uni-direction migration with an invalid timeout.
	17) Uni-direction migration with a very short timeout.
	18) Uni-direction offline migration with option --timeout.
	19) Uni-direction migration with an existing dname.
	20) Uni-direction migration with a non-existing xmlfile.
	21) Uni-direction offline migration.
	22) Uni-direction live migration with VM suspend.
	23) Uni-direction offline migration with VM suspend.
	24) Uni-direction live migration with VM shutdown.
	25) Uni-direction offline migration with VM shutdown.
	26) Uni-direction live migration with libvirtd stop.
	27) Uni-direction offline migration with libvirtd stop.

Signed-off-by: Tang Chen <tanchen@cn.fujitsu.com>
Improve virsh_migrate to support more tests.

Signed-off-by: Tang Chen <tanchen@cn.fujitsu.com>
Improve vm.migrate() to support error testing.

Signed-off-by: Tang Chen <tanchen@cn.fujitsu.com>
Add 3 API for libvirt_vm.

Add 3 API for libvirt_vm.

      1) vm.define()
      2) vm.attach_interface()
      3) vm.detach_interface()

Signed-off-by: Tang Chen <tanchen@cn.fujitsu.com>
Add vm.backup_xml() API for libvirt_vm.

Signed-off-by: Tang Chen <tanchen@cn.fujitsu.com>
Virt: Support VNC autoport.

Without vnc autoport, the vnc port in xml will be specified.
If another vm starts with the same port, the starting will fail.

Signed-off-by: Tang Chen <tanchen@cn.fujitsu.com>
virt: Add perf-kvm test to trace kvm events

This patch adds a test for kvm event tracing using "perf kvm".

Ref: https://bugzilla.redhat.com/show_bug.cgi?id=817284
https://lkml.org/lkml/2012/6/1/176
http://www.linux-kvm.org/page/Perf_events

Signed-off-by: Pradeep Kumar Surisetty <psuriset@linux.vnet.ibm.com>
web frontend: Point kernel spec docs on job create page

As we've had some confusion recently about how to specify
a kernel properly in the job creation interfaces, let's
put a link to a documentation page on the wiki that explains
what types of strings are valid and what are not. This
replaces the old, terse string in the web interface.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.kernelexpand: Throw more useful error msg on unknown kernel

It might not be immediately obvious to users that they
have specified an incorrect kernel version. So throw
a more helpful error message explaining where to find
the appropriate documentation on kernel version
specification.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
cli.job: Point to kernel creation docs on --kernel help

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
add logging infrastructure

Add a logs dict to the vm object where one can just throw in names and unix
sockets to have the bits written out to a logfile.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
add seabios logging

Create isa-debugcon device to get seabios output logged.
Gets added unconditionally if supported by qemu.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
start vm after log setup

Ask qemu to start in stopped state (via -S), then start the guest via cont
monitor command.  This allows us to finish logging setup before the guest
actually runs, so we don't loose early seabios output.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
kvm: Fix vm.add_nic() bug from vmnet list/dict ambeguity

Signed-off-by: Chris Evich <cevich@redhat.com>
virt: add fail test

Signed-off-by: Chris Evich <cevich@redhat.com>
ltp: Use absolute paths to copy.

The relative locations between bindir and srcdir have changed.

Signed-off-by: Vinson Lee <vlee@twitter.com>
virt test: Fix bug global name 'blkdebug' is not defined in kvm_storage.py

Signed-off-by: Feng Yang <fyang@redhat.com>
KVM-Test: kvm_test_utils: add function for updating grub

Changes from v1:
Add error context mechanism.
Add docstring for parameters introduction.
Use 'os_type'.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Feng Yang <fyang@redhat.com>
add anaconda logging

Anaconda in recent fedora versions sends logs to the virtio serial port named
'org.fedoraproject.anaconda.log.0' if present.  Wind up autotest logging for it.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
KVM Test: usb_storage: Ignore letter case when checking removable option

The pattern string for removable option in usb_storage
test script isn't suitable for RHEL5 guest. Thus ignore
the letter case when checking this option.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>