I've thought about this recently, too. It of course depends on how you define life. I think astrobiology is usually a good resource for definitions of this sort. If we found a virus on mars, would we say we discovered life? I think so.
I like Carl Sagan's definition: "Living systems might then be defined as localized regions where there is a continuous increase in order." This is important to note, as the universe generally increases in entropy.
At the center of all life we know is information. Information that replicates itself in some manner, as books are clearly not alive.
So it would seem information (increase in order) and replication in some manner.
So could a computer virus fit the definition? Conceivably.