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.utils_netperf: Support multi package size in NetperfClient.(bg_)start()

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>
virttest.qemu_storage: Update create() function when using qcow2 format

Some option only support qcow2 format, like: preallocation, encryption,
cluster_size.

Signed-off-by: Shuping Cui <scui@redhat.com>
virttest.qemu_storage: Fix a typo

We use 'encryption=on' for qcow2 format now.

Signed-off-by: Shuping Cui <scui@redhat.com>
utils_test.libvirt: Make sure XML file has been created for create_disk_xml.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
utils_test.libvirt: Support multiple disks and scsi disks for attach_disks.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
utils_test.libvirt: Support to attach devices with --config.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
shared.cfg: Correct file_check_cmd for live_snapshot_chain

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
utils_test.libvirt: Support format for creating disks.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt_xml.devices: Enhance hostdev device.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
utils_test.libvirt: Update logic of generating disks index.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virttest.utils_conn: avoid to override __del__ method of parent class

Signed-off-by: Alex Jia <ajia@redhat.com>
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