utils_test.libvirt: Support block device for create_disk_xml.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
Merge pull request #1708 from yangdongsheng/env_process

env_process: Fix a wrong logic in checking of vm.exists().
Merge pull request #1707 from yumingfei/attach_block_device

utils_test.libvirt: Support block device for create_disk_xml.
libvirt_vm: Resume vm in destroy() when vm is paused.

There are some cases need to suspend vm, and in postprocess,
we need to kill vm by vm.destroy(). But when vm is paused,
vm.destroy() will wait 240s to login it. Then find it is not
loginable and kill it with virsh.destroy().

We waste 240s at this case, we should check the state of vm
before we login it.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt: Declare LIBVIRT_DEFAULT_URI in preprocess().

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
env_process: Recreate vm in env if vm.connect_uri is not params.get('connect_uri').

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt_vm: Override __setattr__ of libvirt_vm.VM.

For VMs in different uri, we need some different params for them.
This patch introduce a way we can set these params in base.cfg only
for VM in a special uri. What we need to do is adding the special
param with a prefix of 'libvirt_URI_' into base.cfg. That's all.
libvirt_vm.VM will check the connect_uri and use the param you want.

Example:
	isa_serial = "serial0" is not usable for lxc VM. lxc does
not support serial device yet. In this case, we need not to change
the default value of isa_serial. We can add a new param in base.cfg.
	libvirt_lxc_isa_serial = "console0"
Then if your VM is a lxc guest, it will use "console0".

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
run: Introduce an option --connect-uri to assign uri for test.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>