Try to connect to libvirt while no exception is thrown. Clean global variable for libvirt connection.