调整XenServer中VM的内存上下限
2013-12-19 19:59
253 查看
工作中使用的平台是win2008R2,XenServer5.6上的虚机,然后ssh登陆linux服务器,最近老是卡,而且多人使用,cpu,内存资源实在是少的可怜,而所在的物理机资源又消耗殆尽,于是乎将该虚机打一个快照导出xva文件导入到另一个XenServer6.2(XenServer6.2以后才开始支持不同spool的热迁移);
虚机起来之后发现cpu可以上调,而内存死活调不上去,还只能往小的调,应该是某个参数写死了虚机可分配的内存最大值;
经查处理如下:
在XenServer上执行以下命令查看虚机内存峰值限制,
[root@XEN-216-23 ~]# xe vm-list name-label=192.168.11.102 params=memory-static-max,recommendations
memory-static-max ( RW) : 4294967296
recommendations ( RO): <restrictions><restriction field="memory-static-max" max="4294967296" /><restriction field="vcpus-max" max="8" /><restriction property="number-of-vbds" max="7" /><restriction property="number-of-vifs" max="7" /></restrictions>
查看虚机uuid:
[root@XEN-216-23 ~]# xe vm-list name-label=192.168.11.102
uuid ( RO) : 64dadd50-32e2-431a-4d89-6b538108ae56
name-label ( RW): 192.168.11.102
power-state ( RO): running
调整内存最大值:
[root@XEN-216-23 ~]# xe vm-param-set uuid=64dadd50-32e2-431a-4d89-6b538108ae56 memory-static-max=16384M
Error: Failed to parse field 'memory-static-max': Unknown suffix: 'M' (try KiB, MiB, GiB or TiB)##########提示输入格式
[root@XEN-216-23 ~]# xe vm-param-set uuid=64dadd50-32e2-431a-4d89-6b538108ae56 memory-static-max=16384MiB
You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call.
vm: 64dadd50-32e2-431a-4d89-6b538108ae56 (192.168.11.102)
expected: halted
actual: running###################提示应该关机操作
关机之后:
]# xe vm-param-set uuid=64dadd50-32e2-431a-4d89-6b538108ae56 memory-static-max=16384MiB
操作成功
参考:http://hi.baidu.com/betajiang/item/01d4be27c0c06c9bb7326315
虚机起来之后发现cpu可以上调,而内存死活调不上去,还只能往小的调,应该是某个参数写死了虚机可分配的内存最大值;
经查处理如下:
在XenServer上执行以下命令查看虚机内存峰值限制,
[root@XEN-216-23 ~]# xe vm-list name-label=192.168.11.102 params=memory-static-max,recommendations
memory-static-max ( RW) : 4294967296
recommendations ( RO): <restrictions><restriction field="memory-static-max" max="4294967296" /><restriction field="vcpus-max" max="8" /><restriction property="number-of-vbds" max="7" /><restriction property="number-of-vifs" max="7" /></restrictions>
查看虚机uuid:
[root@XEN-216-23 ~]# xe vm-list name-label=192.168.11.102
uuid ( RO) : 64dadd50-32e2-431a-4d89-6b538108ae56
name-label ( RW): 192.168.11.102
power-state ( RO): running
调整内存最大值:
[root@XEN-216-23 ~]# xe vm-param-set uuid=64dadd50-32e2-431a-4d89-6b538108ae56 memory-static-max=16384M
Error: Failed to parse field 'memory-static-max': Unknown suffix: 'M' (try KiB, MiB, GiB or TiB)##########提示输入格式
[root@XEN-216-23 ~]# xe vm-param-set uuid=64dadd50-32e2-431a-4d89-6b538108ae56 memory-static-max=16384MiB
You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call.
vm: 64dadd50-32e2-431a-4d89-6b538108ae56 (192.168.11.102)
expected: halted
actual: running###################提示应该关机操作
关机之后:
]# xe vm-param-set uuid=64dadd50-32e2-431a-4d89-6b538108ae56 memory-static-max=16384MiB
操作成功
参考:http://hi.baidu.com/betajiang/item/01d4be27c0c06c9bb7326315
相关文章推荐
- Linux 与 Windows 对UNICODE 的处理方式
- Ubuntu12.04下QQ完美走起啊!走起啊!有木有啊!
- 解決Linux下Android开发真机调试设备不被识别问题
- 运维入门
- 运维提升
- Linux 自检和 SystemTap
- Ubuntu Linux使用体验
- c语言实现hashmap(转载)
- Linux 信号signal处理机制
- linux下mysql添加用户
- Scientific Linux 5.5 图形安装教程
- 基于 Linux 集群环境上 GPFS 的问题诊断
- 谁是桌面王者?Win PK Linux三大镇山之宝
- vivi下重新调整分区
- Linux VS Unix:Linux欲一统天下 Unix不死
- linux下设定环境变量
- Linux下修改MySQL编码的方法
- Linux串口通信
- 从Windows系统下访问Linux分区相关软件