public HashMap<String, String> getStatusForAllVm() throws VMWareException {

        ServiceInstance si = null;

        HashMap<String, String> statusMap = new HashMap<String, String>();

        try {

            si = this.getServerInstance();
            Folder rootFolder = si.getRootFolder();
            ManagedEntity[] mangedEntities = new InventoryNavigator(rootFolder).searchManagedEntities("VirtualMachine");

            for (ManagedEntity entity : mangedEntities) {

                VirtualMachine vm = (VirtualMachine) entity;
                statusMap.put(vm.getName(), vm.getOverallStatus().name());
            }

            return statusMap;
        } catch (PlatformConfigFault f) {
            throw new VMWareException(f);
        } catch (RemoteException exc) {
            throw new VMWareException(exc);
        } catch (Exception exc) {
            throw new VMWareException(exc);
        }
    }