Changed the way of checking the powerState of virtual machines and host systems