libvirt.test: Add attach interface to VM case and fix some problems

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>