remove code stolen from libvirt that is not needed any more