utils_test.libvirt: Support to attach devices with --config.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>