The Ostreid herpesvirus 1 (OsHV-1) is a lethal pathogen of the Pacific oyster (Crassostrea gigas), an important aquaculture species. To understand the genetic architecture of the defense against the pathogen, we studied genomic variations associated with herpesvirus-caused mortalities by pooled whole-genome resequencing of before and after-mortality larval samples as well as dead and surviving adults from a viral challenge. Analysis of the resequencing data identified 5,271 SNPs and 1,883 genomic regions covering 3,111 genes in larvae, and 18,692 SNPs and 28,314 regions covering 4,863 genes in adults that were significantly associated with herpesvirus-caused mortalities. Only 1,653 of the implicated genes were shared by larvae and adults, suggesting that the antiviral response or resistance in larvae and adults involves different sets of genes or differentiated members of expanded gene families. Combined analyses with previous transcriptomic data from challenge experiments revealed that transcription of many mortality-associated genes was also significantly upregulated by herpesvirus infection confirming their importance in antiviral response. Key immune response genes especially those encoding antiviral receptors such as TLRs and RLRs displayed strong association between variation in regulatory region and herpesvirus-caused mortality, suggesting they may confer resistance through transcriptional modulation. These results point to previously undescribed genetic mechanisms for disease resistance at different developmental stages and provide candidate polymorphisms and genes that are valuable for understanding antiviral immune responses and breeding for herpesvirus resistance.