KVM调整cpu和内存 - sw博客-1、virsh edit centos73 (更改前要将virsh shutdown centos73 ) 找到“memory”和“vcpu”标签,将 ...

默契网络

点滴记忆
首页>> 优化设置 >>KVM调整cpu和内存 - sw博客
2018-4-18
分类: 优化设置

KVM调整cpu和内存

文章作者:默契
手机扫码查看

1、virsh edit centos73 (更改前要将virsh shutdown centos73 ) 找到“memory”和“vcpu”标签,将 <name>centos73&l......

1、virsh edit centos73 (更改前要将virsh shutdown centos73 )
找到“memory”和“vcpu”标签,将
<name>centos73</name>
  <uuid>2220a6d1-a36a-4fbb-8523-e078b3dfe795</uuid>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu placement='static'>1</vcpu>
改为:
<name>centos73</name>
  <uuid>2220a6d1-a36a-4fbb-8523-e078b3dfe795</uuid>
  <memory unit='KiB'>3145728</memory>
  <currentMemory unit='KiB'>3145728</currentMemory>
  <vcpu placement='static'>2</vcpu>
  
 virsh define /etc/libvirt/qemu/centos73.xml    重定义使配置生效    
重启虚拟机
virsh start centos73 --console
查看原配置信息
 
  
[root@localhost kvm]# virsh dominfo centos734
Id:             -
Name:           centos73
UUID:           2220a6d1-a36a-4fbb-8523-e078b3dfe795
OS Type:        hvm
State:          shut off
CPU(s):         1
Max memory:     2097152 KiB
Used memory:    2097152 KiB
Persistent:     yes
Autostart:      disable
Managed save:   no
Security model: none
Security DOI:   0
调整后信息:
[root@localhost kvm]# virsh dominfo centos73
Id:             -
Name:           centos73
UUID:           2220a6d1-a36a-4fbb-8523-e078b3dfe795
OS Type:        hvm
State:          shut off
CPU(s):         2
Max memory:     3145728 KiB
Used memory:    3145728 KiB
Persistent:     yes
Autostart:      disable
Managed save:   no
Security model: none
Security DOI:   0

×

感谢您的支持,我们会一直保持!

扫码支持
请土豪扫码随意打赏

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

打赏作者
版权所有,转载注意明处:sw博客 » KVM调整cpu和内存

发表评论

路人甲
未显示?请点击刷新

网友评论(0)