KVM 虚拟机 调整内存与CPU

1、关闭虚拟机

virsh shutdown kvm109#调整前 [root@0830 ~]# virsh dominfo kvm109 Id:- Name:kvm109 UUID:658ba60c-505a-435a-967b-276d84620930 OS Type:hvm State:shut off CPU(s):1 Max memory:1048576 KiB Used memory:1048576 KiB Persistent:yes Autostart:disable Managed save:no Security model: none Security DOI:0

2、编辑虚拟机
virsh edit kvm109kvm109 658ba60c-505a-435a-967b-276d84620930 2097152#调整内存至2G 2097152#调整内存至2G 2#调整CPU核数为2

【KVM 虚拟机 调整内存与CPU】3、重新定义使配置文件生效
virsh define /etc/libvirt/qemu/kvm109.xml

4、启动虚拟机
virsh start kvm109#调整后 [root@0830 ~]# virsh dominfo kvm109 Id:3 Name:kvm109 UUID:658ba60c-505a-435a-967b-276d84620930 OS Type:hvm State:running CPU(s):2#CPU 为2核 CPU time:12.3s Max memory:2097152 KiB#内存 为2G Used memory:2097152 KiB Persistent:yes Autostart:disable Managed save:no Security model: none Security DOI:0


    推荐阅读