We present the Kilogrid, an open-source virtualization environment and data logging manager for the Kilobot robot, Kilobot for short. The Kilogrid has been designed to extend the sensory-motor abilities of the Kilobot, to simplify the task of collecting data during experiments, and to provide researchers with a tool to fine-control the experimental setup and its parameters. Based on the design of the Kilobot and compatible with existing hardware, the Kilogrid is a modular system composed of a grid of computing nodes, or modules, that provides a bidirectional communication channel between the Kilobots and a remote workstation. In this paper, we describe the hardware and software architecture of the Kilogrid system as well as its functioning to accompany its release as a new open-hardware tool for the swarm robotics community. We demonstrate the capabilities of the Kilogrid using a 200-module Kilogrid, swarms of up to 100 Kilobots, and four different case studies: exploration and obstacle avoidance, site selection based on multiple gradients, plant watering, and pheromone-based foraging. Through this set of case studies, we