Xenserver5.6修改虚拟机16GB最大内存限制
XenServer为了保证通常情况下的系统运行,为每个类型的系统设置了合适的内存范围,常用的部分如下表:
Operating System | Minimum RAM | Maximum RAM | Disk space |
CentOS 4.5, 4.6, 4.7 | 256MB | 16GB | 800MB |
CentOS 5.0, 5.1, 5.2, 5.3, 5.4 | 512MB | 16GB | 800MB |
Windows Server 2008 R2 | 512MB | 32GB | Minimum 32GB |
Windows Server 2008 32-bit/64-bit | 512MB | 32GB | Minimum 10GB, 40GB or more recommended |
Windows Server 2003 | 256MB | 32GB | 2GB |
查询
-xe template-list用来查看模版的设置,而xe vm-list是用来查看虚机的设置
-直接使用params=memory-static-min可以查看可以设置的最小内存
-直接使用params=memory-static-max可以查看可以设置的最大内存
-增加recommendations参数,可以参考XenServer中对模版或者VM的一些限制,如vCPU,网卡等数量限制
xe template-list name-label=<Name of Template> params=memory-static-max,recommendations
Or
xe vm-list name-label=<Name of VM> params=memory-static-max,recommendations
在虚拟主机上执行
- # xe template-list
-
- uuid ( RO) : 5dde4fa4-d8fa-e7eb-085e-2030c54561c0
- name-label ( RW): CentOS 5 (64-bit)
- name-description ( RW): Template that allows VM installation from Xen-aware EL-based distros. To use this template from the CLI, install your VM using vm-install, then set other-config-install-repository to the path to your network repository, e.g. http://<server>/<path> or nfs:server:/<path>
- ...
-
-
- # xe template-list params=memory-static-max,recommendations uuid=5dde4fa4-d8fa-e7eb-085e-2030c54561c0
- memory-static-max ( RW) : 1073741824
- recommendations ( RO): <restrictions><restriction field="memory-static-max" max="17179869184" /><restriction field="vcpus-max" max="16" /><restriction property="number-of-vbds" max="7" /><restriction property="number-of-vifs" max="7" /></restrictions>
xe template-param-set uuid=<UUID of Selected Template> memory-static-max=<New Memory Limit in Bytes/MiB/GiB>
Or
xe vm-param-set uuid=<UUID of Selected VM> memory-static-max=<New Memory Limit in Bytes/MiB/G
上面的方法可能只能调整下线,调整上线会由于牵涉到内存DMC的设置,所以需要使用下面的命令设置最大值:此处UUID为VM uuid
xe vm-memory-limits-set uuid=<uuid> static-min=<value> dynamic-min=<value> dynamic-max=<value> static-max=<value>
该命令中,后三个参数需要满足以下条件static-min≤dynamic-min=dynamic-max=static-max
设置内存为32G
- # xe vm-memory-limits-set uuid=111c20d1-5df4-5162-7517-0ef42f7e6c2d static-min=536870912 dynamic-min=536870912 dynamic-max=34359738368 static-max=34359738368
以下是Xenserver 6的DMC资料。
目录 返回
首页