resourceslimitopenstackquotahypervisor

can openstack set quota for one hypervisor


Could I set some quota of one hypervisor like memory_mb?

I want to set the hypervisor's memory_mb to smaller than the true value -- 32126, because I need to preserve some resource for the host's system running.

root@l-pc:~# openstack hypervisor show l-pc -c free_ram_mb -c memory_mb -c memory_mb_used -c running_vms
+----------------+-------+
| Field          | Value |
+----------------+-------+
| free_ram_mb    | 27518 |
| memory_mb      | 32126 |
| memory_mb_used | 4608  |
| running_vms    | 1     |
+----------------+-------+
root@l-pc:~# free -h
              total        used        free      shared  buff/cache   available
Mem:            31G        9.8G         17G        119M        3.9G         20G
Swap:           14G          0B         14G

I know there is a openstack quota set command can limit the resource for the project, but not for one hypervisor.

root@l-pc:~# openstack hypervisor -h
Command "hypervisor" matches:
  hypervisor list
  hypervisor show
  hypervisor stats show

Is there any method to achieve that like openstack hypervisor set for limit the resource consume in one hypervisor?


Solution

  • You can use "reserved_host_memory_mb" parameter in nova.conf

    Any positive integer representing amount of memory in MB to reserve for the host.