Este contenido no está disponible en el idioma seleccionado.
Chapter 6. Creating an instance with a guaranteed minimum bandwidth QoS
You can create instances that request a guaranteed minimum bandwidth by using a Quality of Service (QoS) policy.
QoS policies with a guaranteed minimum bandwidth rule are assigned to ports on a specific physical network. When you create an instance that uses the configured port, the Compute scheduling service selects a host for the instance that satisfies this request. The Compute scheduling service checks the Placement service for the amount of bandwidth reserved by other instances on each physical interface, before selecting a host to deploy an instance on.
You can only assign a guaranteed minimum bandwidth QoS policy when creating a new instance. You cannot assign a guaranteed minimum bandwidth QoS policy to instances that are already running, as the Compute service only updates resource usage for an instance in placement during creation or move operations, which means the minimum bandwidth available to the instance cannot be guaranteed.
To execute openstack
client commands on the cloud, you must specify the name of the cloud detailed in your clouds.yaml
file. You can specify the name of the cloud by using one of the following methods:
Use the
--os-cloud
option with each command, for example:openstack flavor list --os-cloud <cloud_name>
$ openstack flavor list --os-cloud <cloud_name>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Use this option if you access more than one cloud.
Create an environment variable for the cloud name in your
bashrc
file:`export OS_CLOUD=<cloud_name>`
`export OS_CLOUD=<cloud_name>`
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Prerequisites
- A QoS policy is available that has a minimum bandwidth rule. For more information, Using Quality of Service (QoS) policies to manage data traffic in the Configuring networking services guide.
-
The administrator has created a project for you and they have provided you with a
clouds.yaml
file for you to access the cloud. -
You have installed the
python-openstackclient
package.
Procedure
List the available QoS policies:
openstack network qos policy list
$ openstack network qos policy list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check the rules of each of the available policies to determine which has the required minimum bandwidth:
openstack network qos policy show policy0
$ openstack network qos policy show policy0
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a port from the appropriate policy:
openstack port create port-normal-qos --network net0 --qos-policy policy0
$ openstack port create port-normal-qos --network net0 --qos-policy policy0
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create an instance, specifying the NIC port to use:
openstack server create --flavor cirros256 --image cirros-0.3.5-x86_64-disk --nic port-id=port-normal-qos --wait qos_instance
$ openstack server create --flavor cirros256 --image cirros-0.3.5-x86_64-disk --nic port-id=port-normal-qos --wait qos_instance
Copy to Clipboard Copied! Toggle word wrap Toggle overflow An "ACTIVE" status in the output indicates that you have successfully created the instance on a host that can provide the requested guaranteed minimum bandwidth.
6.1. Removing a guaranteed minimum bandwidth QoS from an instance Copiar enlaceEnlace copiado en el portapapeles!
If you want to lift the guaranteed minimum bandwidth QoS policy restriction from an instance, you can detach the interface.
To execute openstack
client commands on the cloud, you must specify the name of the cloud detailed in your clouds.yaml
file. You can specify the name of the cloud by using one of the following methods:
Use the
--os-cloud
option with each command, for example:openstack flavor list --os-cloud <cloud_name>
$ openstack flavor list --os-cloud <cloud_name>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Use this option if you access more than one cloud.
Create an environment variable for the cloud name in your
bashrc
file:`export OS_CLOUD=<cloud_name>`
`export OS_CLOUD=<cloud_name>`
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Prerequisites
-
The administrator has created a project for you and they have provided you with a
clouds.yaml
file for you to access the cloud. -
You have installed the
python-openstackclient
package.
Procedure
To detach the interface, enter the following command:
openstack server remove port <vm_name|vm_id> <port_name|port_id>
$ openstack server remove port <vm_name|vm_id> <port_name|port_id>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow