Maybe this function could be a api in libvirt_vm for VM class. :)