added method to check if vm is running