Pivotal Knowledge Base

Follow

How to remove the CPU Power of Two constraints on a custom sized VM

Environment

Pivotal Cloud Foundry: 1.7.x, 1.8.1-1.8.44, 1.9.23, 1.10.1-1.10.10

Purpose

This article discusses how to remove the Power of Two constraints on a custom sized VM. The following validation error is displayed in Ops Manager UI 

 power-of-two.jpg

In the past, we specified that all VMs required having CPU counts that conformed to a power of two constraints (The validation is enforcing a power of 2 for CPU so 1,2,4,8,16):

This constraint existed because of a quirk that was needed to support vSphere 4.0. Since we no longer support that version of vSphere, the constraint is no longer needed. Future versions of the product have removed it, but this KB explains how to remove it in older versions of Ops Manager manually.

Procedure

Follow the steps below within the Elastic Runtime Tile of Ops Manager:

  1. Login to Ops Manager via command line tool
  2. You should be able to modify the manifest file to get around the validation for any deployment. For example, run the command sudo grep -ril "label: Pivotal Elastic Runtime" /var/tempest/workspaces/default/metadata to retrieve the manifest file for the cf deployment. The top lines of this manifest file should display the following                                                                                name: cf
                      product_version: 1.7.64-build.2
                      minimum_version_for_upgrade: 1.6.9-build.0
                      label: Pivotal Elastic Runtime
  3. Remove the power_of_two entry from which ever component section that you require to change. (Note: By setting the power_of_two value to false will not work, you need to remove the power_of_two entry and save the file.)

    For example, If you wanted to remove power_of_two value from Diego BBS VM, you would run the following steps

    1. sudo vi /var/tempest/workspaces/default/metadata/SOME-GUID.yml
    2. Search for name: diego_database
    3. Scroll down until you find this block and remove the line power_of_two: true and save the yml file

                  - name: cpu
                    type: integer
                    default: 1
                    configurable: true
                    constraints:
                    min: 1
                    power_of_two: true

  4. Select the "Save" button on the "Resource Config" page in Ops Manager UI (You should now be able to set custom vm_type without getting validation errors)

We have removed this constraint in the following ERT versions (You will not need to run the above steps)

Additional Information 

Please refer to the following KB article on how to create custom VMTYPE

How To Create or Remove Custom VM_TYPE Template using the Ops Manager API

 

Comments

Powered by Zendesk