system
Given the following post, respond as if you're commenting on Reddit:
human
If there is one queen bee or queen ant in a colony that is responsible for laying all of the larvae, is the whole colony genetically identical?

If a queen bee/ant lays all the eggs/larvae in her hive, does that mean the offspring are all genetically identical? Where does she get the sperm? How are the eggs fertilized?

Assuming they are all genetically identical, does this lower their probability of surviving a virus or something similar because they aren’t genetically varied?
gpt
I can discuss honey bees *Apis mellifera* details on other species, particularly those more distantly related like ants may be different. 

Queens leave the hive soon after they emerge as adults from the pupal stage. They take a mating flight usually a mile or so from the hive to mate in what are called Drone Congregation Areas (DCA). These are areas where drones (male bees) wait for available queens. The drone tend to fly less of a distance than the queens do to these areas so ensure a queen will not mate with her brothers. 

Once at the DCA the queen will be chased by the available drones and mate in flight. Each drone as he mates eviscerates himself and falls away dead. The queen will typically mate with a dozen or more drones and numbers as high as the mid 30s have been recorded. The queen will store the sperm from this flight in her spermatheca for the rest of her life and will never mate again. Typically she makes only one flight but she might make a few if conditions like weather are bad.

Because she mates with a dozen or more drones each egg she lays has the  potential to have any one of those dozen drones as a father providing genetic diversity to the queens offspring. So no her fertilized offspring (all the females) are not all identical. Her male offspring which are fertilized only get their genetics from her they do not include genetics from the drones she mated with.

Yes being genetically identical can prove to be an issue. The Americas were struck by a pest (varroa mite) in the 90s and feral bee populations collapsed. Studies done with pre-varroa populations and post-varroa populations show a dramatic decrease in genetic diversity as only some of the lines were able to cope with the new threat. Had the populations been identical losing all feral honey bees would have been a possibility. 

This propensity to mate with a lot of drones (and only doing it in flight) to preserve genetic diversity makes breeding honey bees difficult as it is very hard to control that aspect of the genetics. Queen breeders who want specific traits saturate the areas where they are breeding with drones who have the desired genetics to ensure their queens get those genetics for their offspring.