SF films make virtual realty possible and accessible in its various different forms.
Total Recall has the character Doug Quaid, played by Arnold Schwarzeneggar, who is injected with a dream to make him feel he has been on a 2 week holiday, a series of implanted memories. However if the film progresses, we can't be sure if Quaid is dreaming or if the whole thing is really happening. The film is based on the short novel "We can remember it for you wholesale".
In The Matrix, Keanu Reeves' character Neo discovers his entire life has been a dream, that his mind has been existing inside a computer generated illusion. In fact, the entire human race has been living in this "matrix" for some 200 years.
These films, in particular The Matrix, raise existential questions. How do you know you are not really inside a pod, your mind living in a computer generated dream? Total Recall even has the tagline "How would you know if someone had stolen your mind?"
But the film I found closest to this issue was Vanilla Sky. Tome Cruise's character David Ames has in fact bought a "lucid dream" from a company and is living inside his dream while his body is frozen in a vat, waiting medical advances to repair it. He has been in this state for 150 years, yet is unaware. As the film progresses, the dream descends into a nightmare. When David realises his situation he goes into a panic screaming "It's a nightmare" and calling for "Tech Support". The Beach Boys track "Good Vibrations" plays in the background. This did lead me to question why someone would choose to live the lucid dream in a city rather than at a beach.
Other SF examples of a virtual reality would be the Holodeck in Star Trek. There are many episodes where characters get trapped there and have to work their way out.
A more modern, and perhaps more chilling, example is The Truman Show. Jim Carrey's character Truman Burbank has spent his whole life as the subject of a reality TV show. All the people in his life have been, and still are, actors, and the whole world is watching. When the show's creator is asked how this illusion works for Truman his answer is "we except the reality which we are presented".