diff --git a/api/src/com/cloud/storage/Storage.java b/api/src/com/cloud/storage/Storage.java index aaf71b43bf9..8d53d335eac 100644 --- a/api/src/com/cloud/storage/Storage.java +++ b/api/src/com/cloud/storage/Storage.java @@ -92,7 +92,8 @@ public class Storage { IscsiLUN(true), //shared LUN, with a clusterfs overlay Iscsi(true), //for e.g., ZFS Comstar ISO(false), // for iso image - LVM(false); // XenServer local LVM SR + LVM(false), // XenServer local LVM SR + VMFS(true); // VMware VMFS storage boolean shared; diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java index 2f8774e91e1..f78cb424e76 100755 --- a/server/src/com/cloud/storage/StorageManagerImpl.java +++ b/server/src/com/cloud/storage/StorageManagerImpl.java @@ -1387,6 +1387,8 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag port = 2049; } pool = new StoragePoolVO(StoragePoolType.ISO, storageHost, port, hostPath); + } else if (scheme.equalsIgnoreCase("vmfs")) { + pool = new StoragePoolVO(StoragePoolType.VMFS, storageHost, 0, hostPath); } else { s_logger.warn("Unable to figure out the scheme for URI: " + uri); throw new IllegalArgumentException("Unable to figure out the scheme for URI: " + uri); @@ -1572,9 +1574,12 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag @Override public boolean addPoolToHost(long hostId, StoragePoolVO pool) { s_logger.debug("Adding pool " + pool.getName() + " to host " + hostId); - if (pool.getPoolType() != StoragePoolType.NetworkFilesystem && pool.getPoolType() != StoragePoolType.Filesystem && pool.getPoolType() != StoragePoolType.IscsiLUN && pool.getPoolType() != StoragePoolType.Iscsi) { - return true; + if (pool.getPoolType() != StoragePoolType.NetworkFilesystem && pool.getPoolType() != StoragePoolType.Filesystem + && pool.getPoolType() != StoragePoolType.IscsiLUN && pool.getPoolType() != StoragePoolType.Iscsi && pool.getPoolType() != StoragePoolType.VMFS) { + + return true; } + ModifyStoragePoolCommand cmd = new ModifyStoragePoolCommand(true, pool); final Answer answer = _agentMgr.easySend(hostId, cmd);