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>
virt.virttest.utils_test.update_boot_option: Check kernel option at the end of function.

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>
virt.qemu_storage: Always check the image by qemu-img info, if glusterfs or iscsi used.

As os.path.exists() do not support gluster://IP:port/volume/image.qcow2 and
iscsi://IP:port/iqn.*:target0/$lun

Signed-off-by: Feng Yang <fyang@redhat.com>
shared.control.fio: Do not handle --args parameter in control file.

Now we support update args by directly update the control file.
So no need handle the --args in control file now.

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest.utils_test: Do not add args parameter in autotest-local command.

In run_autotest() function, we do not need add args parameter in
guest's  autotest-local command.
Now we support args parameter by directly update the control file used
in guest. So need not add args parameter in guest's  autotest-local
command again.

Signed-off-by: Feng Yang <fyang@redhat.com>
shared.cfg: Correct file_check_cmd for live_snapshot_chain

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest: Add balloon device in qemu_vm

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest: Correct a wrong docstring in qemu_vm

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>
Merge pull request #1823 from FengYang/run_autotest

Update run_autotest function
Merge pull request #1821 from FengYang/info

virt.qemu_storage: Always check the image by qemu-img info, if glusterfs...
Merge pull request #1796 from FengYang/boot_option

virt.virttest.utils_test.update_boot_option: Check kernel option at the ...
Merge pull request #1828 from ypu/balloon-update

Add balloon device using qemu_device functions
vm_xml: typo fix

Signed-off-by: Yanbing Du <ydu@redhat.com>
libvirt_xml.devices: Enhance hostdev device.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
Merge pull request #1835 from will-Do/typo_fix

vm_xml: typo fix
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>