Skip to content

Commit cb541f8

Browse files
Srivastava, PiyushSrivastava, Piyush
authored andcommitted
vm instance creation test4
1 parent 65a03a2 commit cb541f8

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/driver/OntapPrimaryDatastoreDriver.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ private String createCloudStackVolumeForTypeVolume(DataStore dataStore, DataObje
143143
// Store the subdirectory path for KVM to mount separately
144144
VolumeVO volume = volumeDao.findById(((VolumeInfo) dataObject).getId());
145145
volume.set_iScsiName(subdirectoryPath); // Used as MOUNT_POINT for NFS managed storage
146+
volume.setPoolType(Storage.StoragePoolType.NetworkFilesystem); // Set volume pool type for KVM adaptor selection
146147
volume.setFolder(((VolumeInfo) dataObject).getUuid());
147148
volume.setPoolId(dataStore.getId());
148149
volume.setPath(null); // Path is null for managed storage - KVM creates files in mounted subdir

plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,13 @@ public DataStore initialize(Map<String, Object> dsInfos) {
192192
ProtocolType protocol = ProtocolType.valueOf(details.get(Constants.PROTOCOL));
193193
switch (protocol) {
194194
case NFS:
195+
// Use NetworkFilesystem like CloudByte - volume pool type will be set per volume
196+
// This allows managed storage to work with standard NFS pools
195197
parameters.setType(Storage.StoragePoolType.NetworkFilesystem);
196198
// Path should be just the NFS export path (junction path), NOT host:path
197199
// CloudStack will construct the full mount path as: hostAddress + ":" + path
198200
path = "/" + storagePoolName;
199-
s_logger.info("Setting NFS path for storage pool: " + path);
201+
s_logger.info("Setting NetworkFilesystem path for storage pool: " + path);
200202
host = "10.193.192.136"; // TODO hardcoded for now
201203
break;
202204
case ISCSI:

0 commit comments

Comments
 (0)