A virtuous end does justify an immoral means. Sometimes people have to do bad things in order to have a good outcome. Take any war for example, it is immoral to kill other people and risk the lives of your own, but it is needed so you can secure the safety of your country.
While it is never the best way to conduct oneself, there are certain issues and motivations that really do support the statement "The Ends Justify The Means" or "By Any Means Necessary." That is not to say that immoral behavior should be the first choice, but for issues that are truly important - lifesaving medical research, human rights, freedom, etc, if immoral means are absolutely necessary to reach reasonable ends, it is justified.
The word "virtuous" implies that the acts committed are if fact morally correct, thus if something immoral is conducted, it then becomes non-virtuous.
Here is an example: If someone who is innocent must be killed against their own will to save 100 innocent people, your moral act of saving 100 innocent lives then becomes immoral due to 1 innocent life being sacrificed against their own will, and if the 100 people vote to kill that one innocent life to save themselves, they too become immoral and non-innocent, thus finalizing the fact the end is not virtuous due to the fact you are no longer saving innocent lives. This is because making the decision for someone else's life is in fact immoral.
However, if said person gives up their own life to save the many, it is then considered morally correct to save 100 innocent lives by killing said person that has willingly given their life as a sacrifice.
The true virtuous end would be to find a way to possibly save everyone (even if some die unintentionally), or sacrifice yourself for the rest, or if someone else willingly gives up their own life for the rest to be saved.