Openstack VM Limits with Nova

In the flavor set the extra specs
set like so

1
nova flavor-key f103aef6-ded8-44d4-97b3-1a7d9543082d set quota:disk_total_iops_sec=200

disk

1
2
3
4
5
6
7
8
9
def disk_qos(self, info, extra_specs):
tune_items = ['disk_read_bytes_sec', 'disk_read_iops_sec',
'disk_write_bytes_sec', 'disk_write_iops_sec',
'disk_total_bytes_sec', 'disk_total_iops_sec']
for key, value in six.iteritems(extra_specs):
scope = key.split(':')
if len(scope) > 1 and scope[0] == 'quota':
if scope[1] in tune_items:
setattr(info, scope[1], value)

example in the xml

1
2
3
4
5
6
7
  <target dev='sda' bus='scsi'/>
<iotune>
<total_iops_sec>200</total_iops_sec>
</iotune>
<alias name='scsi0-0-0-0'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>

cpu

1
2
3
 cpu_shares
cpu_quota
cpu_period

bandwidth

1
2
3
4
5
6
 vif_inbound_average
vif_outbound_average
vif_inbound_peak
vif_outbound_peak
vif_inbound_burst
vif_outbound_burst