Python solution to VMWare question