Error: "integer out of range" message displayed during virtual machine creation and edit tasks
search cancel

Error: "integer out of range" message displayed during virtual machine creation and edit tasks

book

Article ID: 438765

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • "integer out of range" database error blocks all VM edit/create operations.
  • Unable to increase virtual disks size.
  • On the Cloud Director(VCD) primary database cell within the postgresql log file /var/vmware/vpostgres/<version_number>/pgdata/log/postgresql-<date>.log you observe the following error message:

    [1303191] ERROR:  integer out of range
    [1303191] STATEMENT:  /* Method: unknown */ /* criteria query */ select this_.name as name365_0_, this_.moref as moref365_0_, this_.vc_id as vc3_365_0_, this_.max_available_mb as max4_365_0_ from sfp_view_spf_max_capacity this_ where ((this_.vc_id=$1 and this_.moref=$2) or (this_.vc_id=$3 and this_.moref=$4) or (this_.vc_id=$5 and this_.moref=$6) or (this_.vc_id=$7 and this_.moref=$8))
    1296710] ERROR:  integer out of range

Environment

VMware Cloud Director 10.6.1.x

Cause

This issue occurs if a very large NFS share has been recently created within the environment.  The Cloud Director database view sfp_view_spf_max_capacity returns information about maximum storage capacity per storage profile per resource pool. The database view reads the available free bytes on the volume and the defined red threshold set in VCD. It performs a calculation on those values and If the result of this calculation exceeds the maximum for a 32-bit integer, which is 2,147,483,647, then it will trigger an "integer out of range" error to occur.

Resolution

Inspect the environment and check if any large NFS shares have been recently created without any limit defined. Once identified, set a limit upon the NFS.

  1. Login to vCenter Server.
  2. Navigate to the Datastores view.
  3. Identify the recently added NFS share and confirm that storage size on the summary tab of the datastore. 
  4. If you have the 3rd party vendors storage plugin installed you can resize directly. To do this, right-click the NFS datastore and select [PluginName} > Resize datastore.

    Note: If you do not have access to a storage plugin then you will need to engage with your local storage team to adjust the NFS size.

  5. Login to the Cloud Director Provider UI and configure lower red and yellow threshold on the volume as outlined in Configure Low Disk Space Thresholds for a Provider Virtual Data Center Storage Container in Your VMware Cloud Director.

Additional Information

The calculation performed by the sfp_view_spf_max_capacity view is the following:

max(ds_inv.disk_free_bytes / (1024 * 1024) - 1024 * ds.threshold_red_gb) AS max_available_mb