mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fixed error on data volumes lager than 2.14TB when creating ins… (#3924)
This commit is contained in:
parent
b4fdf22397
commit
4be70014bb
@ -808,7 +808,7 @@ public class VmwareStorageProcessor implements StorageProcessor {
|
||||
synchronized (this) {
|
||||
s_logger.info("Delete file if exists in datastore to clear the way for creating the volume. file: " + volumeDatastorePath);
|
||||
VmwareStorageLayoutHelper.deleteVolumeVmdkFiles(dsMo, vmdkName, dcMo, searchExcludedFolders);
|
||||
vmMo.createDisk(volumeDatastorePath, (int)(volume.getSize() / (1024L * 1024L)), morDatastore, -1);
|
||||
vmMo.createDisk(volumeDatastorePath, (long)(volume.getSize() / (1024L * 1024L)), morDatastore, -1);
|
||||
vmMo.detachDisk(volumeDatastorePath, false);
|
||||
}
|
||||
} finally {
|
||||
|
||||
@ -1099,13 +1099,13 @@ public class VirtualMachineMO extends BaseMO {
|
||||
}
|
||||
|
||||
// vmdkDatastorePath: [datastore name] vmdkFilePath
|
||||
public void createDisk(String vmdkDatastorePath, int sizeInMb, ManagedObjectReference morDs, int controllerKey) throws Exception {
|
||||
public void createDisk(String vmdkDatastorePath, long sizeInMb, ManagedObjectReference morDs, int controllerKey) throws Exception {
|
||||
createDisk(vmdkDatastorePath, VirtualDiskType.THIN, VirtualDiskMode.PERSISTENT, null, sizeInMb, morDs, controllerKey);
|
||||
}
|
||||
|
||||
// vmdkDatastorePath: [datastore name] vmdkFilePath
|
||||
public void createDisk(String vmdkDatastorePath, VirtualDiskType diskType, VirtualDiskMode diskMode, String rdmDeviceName, int sizeInMb,
|
||||
ManagedObjectReference morDs, int controllerKey) throws Exception {
|
||||
public void createDisk(String vmdkDatastorePath, VirtualDiskType diskType, VirtualDiskMode diskMode, String rdmDeviceName, long sizeInMb,
|
||||
ManagedObjectReference morDs, int controllerKey) throws Exception {
|
||||
|
||||
if (s_logger.isTraceEnabled())
|
||||
s_logger.trace("vCenter API trace - createDisk(). target MOR: " + _mor.getValue() + ", vmdkDatastorePath: " + vmdkDatastorePath + ", sizeInMb: " + sizeInMb +
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user