In the episode Ghost Channel, XANA creates a simulation of Boulogne-Billancourt so our heroes think they are in the real world whilst really not. The simulation was actually located inside Lyoko, specifically inside a Simulation Bubble (which looks surprising like a Guardian) from the Ice Barrier Sector. XANA trapped Yumi, Odd, and Ulrich inside of it so it could kill them by deletion once and for all.
The program itself was quite bottom-line. XANA, like most fictional villains, does not pay attention to minor details in his schemes, and therefore problems with the people inside the simulation did occur. For example, Sissi wore the wrong color shirt (though she claimed that yellow was the "in color"), and many of the people, including Sissi, Herb, Nicholas, Mrs. Hertz and other teachers, and Yumi's parents repeat their actions whilst mantaining their personalities.
XANA, of course, had mass survelliance of the program. It even entered it and assumed the role, voice and physical form of Jeremie. From his laptop, XANA could activate various security cameras around the simulation that would inform him when something went wrong, such as when Aelita virtualizes Jeremie into the simulation. XANA played the part of Jeremie with very little, if any, rehearsal, which is what the real Jeremie used to deduce him as a fake. XANA can also, at will, turn the fake people into zombies, allowing easy security in most places.