Error: "Cannot change disk size from <disk size value> to 0. Disks can only be extended" occurs when deploying vApp from template
search cancel

Error: "Cannot change disk size from <disk size value> to 0. Disks can only be extended" occurs when deploying vApp from template

book

Article ID: 384494

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Within the log file /opt/vmware/cloud-director/logs/vcloud-container-debug.log you see an error as follows:

 2024-12-05 11:38:00,904 | DEBUG    | task-service-activity-pool-7539 | TaskActivity                   | [Activity Execution] Unable to execute task 'urn:uuid:<uuid>' - Handle: urn:uuid:<uuid>, Current Phase: TaskActivity$PostExecutePhase | requestId=<request-id>,request=POST https://cloud.example.com/api/vdc/<vdc_id>/action/instantiateVAppTemplate,requestTime=1733398637540,remoteAddress=<ip_address>:49932,userAgent=python-requests/2.31.0,accept=application/*+xml;version 35.2 vcd=<vcd_id>,task=<task_id> activity=(com.vmware.vcloud.backendbase.management.system.TaskActivity,urn:uuid:<uuid>)
com.vmware.vcloud.api.presentation.service.BadRequestException: Cannot change disk size from 256,000 to 0. Disks can only be extended.
        at com.vmware.vcloud.vdc.impl.InstantiateVAppActivity$AfterVAppCopyContentPhase.validateDiskReconfiguration(InstantiateVAppActivity.java:478)

Environment

VMware Cloud Director 10.6

Cause

This issue occurs if the source template does show a default value for the Hard Disk size and nothing is specified by the user during vApp deployment. Therefore when you deploy the new vApp, 0mb is passed in as the disk size variable.

Resolution

Review the health of the source template and ensure that the default hard disk size is specified.

To do this, deploy the template as a vApp in your OrgVDC. Specify a hard disk size during vApp deployment and ensure the hard disk size shows correctly on the vApp. Then save this template back to catalog as a new template. You may choose to overwrite the original template if desired.