A string of nucleotide letters confined within a protein capsid contains all the instructions necessary to make a functional virus particle, a virion. While the structure of protein capsid is known for many species of viruses, the structure of their genomes has mostly evaded experimental probes. Using a multi-resolution simulation protocol, we have obtained multiple complete all-atom structures of a fully packaged bacteriophage virion. Mimicking the action of a DNA packaging motor, the genome was gradually packed into a protein capsid with or without an additional torque that twisted the DNA. The structure of the assembled particles was then iteratively refined through a series of simulations of increasing resolution, ultimately producing a 27 million-atom model of the complete virion, including water and ions confined within the capsid. Strikingly, we find DNA packaging within the capsid to occur via a loop extrusion mechanism that, starting from nearly identical configurations, can produce wildly different global configurations of the final packaged genome, giving each viral particle individual traits. Multiple microsecond-long simulations of the packaged phages found the packaged genome to diminish structural fluctuations of the capsid while reducing water and ion passage through the capsid's pores. The isocohedral confinement of the capsid was found to imprint reproducible features on the structure of the genome at the capsid-genome interface whereas the internal pressure of a packaged virus was largely independent of the presence of the twist during the packaging process. We show how our computational approach to reconstructing the structure of viral genomes can be generalized to other viral species.