We present an investigation of water menisci confined in closed geometries by studying the structural effects of their capillary forces on viruses during the final stage of desiccation. We used individual particles of the bacteriophage phi29 and the minute virus of mice. In both cases the genomic DNA was ejected from the capsid. However, although the structural integrity of the minute virus of mice was essentially preserved, the phi29 capsid underwent a wall-to-wall collapse. We provide evidence that the capillary forces of water confined inside the viruses are mainly responsible for these effects. Moreover, by performing theoretical simulations with a lattice gas model, we found that some structural differences between these 2 viruses may be crucial to explain the different ways in which they are affected by water menisci forces confined at the nanoscale.