You can use vSphere storage policies to control the datastores on which OpenStack instances are created.


Create the desired storage policy in vSphere.


  1. Log in to the OpenStack Management Server as viouser.
  2. If your deployment is not using a custom.yml file, copy the template custom.yml file to the /opt/vmware/vio/custom directory.
    sudo mkdir -p /opt/vmware/vio/custom
    sudo cp /var/lib/vio/ansible/custom/custom.yml.sample /opt/vmware/vio/custom/custom.yml
  3. Open the /opt/vmware/vio/custom/custom.yml file in a text editor.
  4. Uncomment the nova_pbm_enabled parameter and set its value to true.
  5. Uncomment the nova_pbm_default_policy parameter and set its value to the name of the storage policy to use by default when an instance is created with a flavor that is not associated with a storage policy.
  6. Uncomment the nova_scheduler_default_filters parameter and add AggregateInstanceExtraSpecsFilter to the end.
    nova_scheduler_default_filters: RetryFilter, AvailabilityZoneFilter, RamFilter, ComputeFilter, ComputeCapabilitiesFilter, ImagePropertiesFilter, ServerGroupAntiAffinityFilter, ServerGroupAffinityFilter, PciPassthroughFilter, AggregateInstanceExtraSpecsFilter
  7. Deploy the updated configuration.
    sudo viocli deployment configure

    Deploying the configuration briefly interrupts OpenStack services.

  8. Log in to the VMware Integrated OpenStack dashboard as a cloud administrator.
  9. Select the admin project from the drop-down menu in the title bar.
  10. Select Admin > Compute > Flavors.
  11. Create a new flavor or choose an existing flavor.
  12. Click Update Metadata to the right of the flavor.
  13. In the Available Metadata pane, expand VMware Policies and click the Add (plus sign) icon next to Storage Policy.
  14. Enter the desired storage policy name as the value of the vmware:storage_policy parameter and click Save.


The specified vSphere storage policy is applied to all new OpenStack instances that are created from the flavor. The default storage policy is applied to all new instances that are created from a flavor not associated with a storage policy.