Bug #2156: Role stores last vm name used
(cherry picked from commit 17a651378dfadbf6fde7134941ec621f5bfa6e2d)