This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch 4.13
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.13 by this push:
     new 4be7001  Fixed error on data volumes lager than 2.14TB when creating 
ins… (#3924)
4be7001 is described below

commit 4be70014bb3bca7185bf2c048dc344d6b5c65567
Author: dahn <[email protected]>
AuthorDate: Thu Mar 5 11:52:55 2020 +0100

    Fixed error on data volumes lager than 2.14TB when creating ins… (#3924)
---
 .../java/com/cloud/storage/resource/VmwareStorageProcessor.java     | 2 +-
 .../main/java/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/plugins/hypervisors/vmware/src/main/java/com/cloud/storage/resource/VmwareStorageProcessor.java
 
b/plugins/hypervisors/vmware/src/main/java/com/cloud/storage/resource/VmwareStorageProcessor.java
index 420ac44..71968fa 100644
--- 
a/plugins/hypervisors/vmware/src/main/java/com/cloud/storage/resource/VmwareStorageProcessor.java
+++ 
b/plugins/hypervisors/vmware/src/main/java/com/cloud/storage/resource/VmwareStorageProcessor.java
@@ -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 {
diff --git 
a/vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
 
b/vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
index a1205c2..aef9d4f 100644
--- 
a/vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
+++ 
b/vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
@@ -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 +

Reply via email to