modify-limits

Changes memory and CPU limits on one or more systems

This command changes the allocated memory and limits on CPU use for a virtual system. Not all virtual system types support all forms of resource limits.

The systems to modify are set using the standard flags like --host and --type. Memory allocated is set with the --memory flag, which must be followed by a number in MB. For Xen instances, available memory cannot be increased above the amount set at boot time without a reboot, but it can be reduced. Lowering it too much may cause the virtual system to crash though. On system types that support it (like Vservers and Zones), the memory limit can be completed removed with the --no-memory flag.

On virtualization types like OpenVZ, you can also set a separate memory limit with the --guaranteed-memory flag followed by a number in MB.
If the host system is over-comitted, this specifies the amount of memory that the virtual system is certain to have available, while the --memory flag sets the upper limit. On other virtualization types both limits are always the same, and are set by the --memory flag.

The percentage of the host system's CPU that is assigned to the instance is set with the --cpu flag, which must be followed by a number.
This can be greater than 100 for host systems with more than one CPU. To remove CPU limits completely, use the --no-cpu flag.

If bandwidth monitoring is enabled in Cloudmin, the --bw-limit flag can be used to set the maximum bandwidth this system is allowed to consume per accounting period. It must be followed by a number in MB. To remove the limit, use the --bw-unlimited flag.

The network interfaces to collect bandwidth usage statistics on can be set by the --bw-interfaces flag, followed by a quoted list of interface names like "eth0 eth1". To collect stats on all interfaces, use --bw-all-interfaces instead.

For virtual system types that support changing the IO scheduling class, the --ioclass flag can be given followed by a number from 0 (highest priority) to 7 (lowest).

Xen systems can have the number and assignment of virtual CPUs set with the --vcpus flag, followed by either a number of CPUs or a list of mappings in virtual-cpu:host-cpu format. KVM systems only support setting the number of CPUs, but also allow you to define the number of cores per virtual CPU with the --cores flag.

For KVM systems Cloudmin can prevent use of IPs or MAC addresses that have not been assigned to virtual systems with the --all-firewall flag.
Alternately you can specify a custom list of IPs to allow with the --firewall flag followed by a comma-separated IP list, or --no-firewall to disable blocking of spoofed addresses altogether.

By default, the command will inform you if a reboot is needed to apply any CPU or memory limit changes. However, you can force an immediate shutdown and restart with the --reboot flag, if needed.

Example usage

  cloudmin modify-limits --host xencentos.home --memory 512 --bw-limit 1024
  Setting memory limit on Xen system xencentos.home to 512 MB ..
  .. already set
  Setting bandwidth limit on Xen system xencentos.home ..
  .. set to 1024 MB

Command Line Help

Changes memory and CPU limits on one or more managed systems.

cloudmin modify-limits [--host name]*
                       [--group name]*
                       [--type real|kvm|gce|this]*
                       [--os oscode]*
                       [--owner name]*
                       [--status status-code|"up"|"wm"|"bad"]
                       [--host-on name]
                       [--cpu percentage | --no-cpu]
                       [--weight number]
                       [--memory MB | --no-memory]
                       [--guaranteed-memory MB]
                       [--disk MB | --no-disk]
                       [--reboot]
                       [--vcpus N | --vcpus list]
                       [--cores N]
                       [--bw-limit MB | --bw-unlimited]
                       [--bw-interfaces iface | --bw-all-interfaces]
                       [--rate-limit Mb/s | --rate-unlimited]
                       [--ioclass number]
                       [--no-firewall | --all-firewall |
                        --firewall ip,ip,...]