For the Porto -> Moscow leg you should be able to get a SCIC (Special Conditions of International Carriage) ticket in any European train ticket office.
The complete list of participating countries is here:
I think the Trans-Siberian rail still runs from Moscow to Beijing (with a link to the Trans-Mongolian rail at Ulan Ude or the Trans-Manchurian at Chita).
From Beijing it shouldn’t be too difficult to find a single link to Hanoi. And from Hanoi there is a single sleeper that runs to Ho Chi Minh (I’ve taken this one in the other direction back in 2008).
So if I’m not mistaken (or out of date) Moscow to Ho Chi Minh should be at most 3 connections (Ulan Ude/Chita, Beijing, and Hanoi).
Vietnam is currently closed to tourists but the trains are running as usual. I travelled along the south central coast hard seat class in July which has some amazing seaside and mountain views. I also did a personal first took the once-daily train along the branch line to Quy Nhon; highly recommended.