virttest: Handle AttributeError exception in store_vm_register() function.

We may got following error when monitor not ready:
07/05 13:11:07 ERROR| threading:0545|   File "/usr/lib64/python2.6/threading.py", line 532, in __bootstrap_inner
07/05 13:11:07 ERROR| threading:0545|     self.run()
07/05 13:11:07 ERROR| threading:0545|   File "/usr/lib64/python2.6/threading.py", line 484, in run
07/05 13:11:07 ERROR| threading:0545|     self.__target(*self.__args, **self.__kwargs)
07/05 13:11:07 ERROR| threading:0545|   File "/usr/local/staf/test/RHEV/kvm/autotest-devel/client/tests/virt/virttest/env_process.py", line 1092, in _store_vm_register
07/05 13:11:07 ERROR| threading:0545|     stored_log = store_vm_register(vm, vr_filename)
07/05 13:11:07 ERROR| threading:0545|   File "/usr/local/staf/test/RHEV/kvm/autotest-devel/client/tests/virt/virttest/env_process.py", line 1052, in store_vm_register
07/05 13:11:07 ERROR| threading:0545|     output = vm.monitor.info('registers', debug=False)
07/05 13:11:07 ERROR| threading:0545| AttributeError: 'NoneType' object has no attribute 'info'

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest.env_process: Use vm.instance in counter and vm_register_error_count in _store_vm_register()

Now we use vm.name in  counter and vm_register_error_count in _store_vm_register().
It could not work well in migration mode, which two vms have same name.

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest: Update the kernel command line update part of code in env_process

As the original code for msi setup and extra_kernel_params setup are both
update the guest kernel command line. So remove some duplicate code. And
add the kernel command line restore code in post_process to restore the default
kernel command line in guest. Also add kernel command line check if guest is
started in preprocess.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
shared.cfg: Correct file_check_cmd for live_snapshot_chain

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virt.cfg: adjust Ubuntu preseed grub cmdline

When booting into single-user mode only the first console in the
list will actually show a prompt. This lead to issues with a few of
the qemu tests. Switch the order so the proper terminal shows a prompt
in single user mode.

Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
libvirt_xml.devices: Enhance hostdev device.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
Add function get_parts_list to return disk partitions list.
guest-os: Ubuntu*.preseed add additional packages

Add additional base packages to enable tp-qemu test cases.

Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
guest-os: Ubuntu.cfg change cpu_chk_cmd

The old style of command causes issues because of the $ character in
Ubuntu environments causing tests to fail. Replace with a safer command.

Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
cfg.base: change default profiler to perf for Ubuntu

Ubuntu and Debian do not package kvm_stat; this changes the base
profiler to perf which is available.

Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
Merge pull request #1837 from rbian/disk_partitions

Add function get_parts_list to return disk partitions list.
Merge pull request #1829 from arges/ubuntu

Fixes for Ubuntu guests
Merge pull request #1834 from yumingfei/hostdev

libvirt_xml.devices: Enhance hostdev device.
ppc64: always use "unix" as serial device type

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
qcontainer: use bus "pci.0" on ppc64

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
fix qemu.unattended_install.cdrom on ppc64

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Merge pull request #1840 from giuseppe/giuseppe/ppc64

giuseppe/ppc64
Merge pull request #1816 from ypu/cfg-fix

shared.cfg: Correct file_check_cmd for live_snapshot_chain
Merge pull request #1762 from FengYang/AttributeError

Update  _store_vm_register()
Merge pull request #1715 from ypu/kernel_update

virttest: Update the kernel command line update part of code in env_proc...