Utils test libvirt

This is a remake of PR #1509.