kvm 改配 cpu
virsh setvcpus vmxxx 12 --config 离线
virsh setvcpus vmxxx 12 --config --live 在线
kvm 添加内存
cat mem.xml
<memory model='dimm'>
<target>
<size unit='GiB'>1</size>
<node>0</node>
</target>
</memory>
virsh attach-device vmxxx mem.xml --persistent
persistent 用来更新虚拟机xml,永久保存,否则关机再开机之后会丢失(reboot重启不会丢失)
kvm对接ceph 改配磁盘
磁盘只能增加,不能减少
查看虚拟机的磁盘挂载情况
root@ceph05 ceph\]# virsh domfsinfo vmlinuxxx -- linux Mountpoint Name Type Target ------------------------------------------------------------------- / dm-0 xfs vda /boot vda1 xfs vda \[root@ysceph05 ceph\]# virsh domfsinfo vmwinxxx -- windows Mountpoint Name Type Target ------------------------------------------------------------------- System Reserved \\\\?\\Volume{60fab9af-0000-0000-0000-100000000000}\\ NTFS vda D:\\ \\\\?\\Volume{4a5eb452-e282-4a1e-9e90-8d11499f70f7}\\ NTFS vdb Z:\\ \\\\?\\Volume{d347c747-740a-4f2a-a511-7e9a2593827e}\\ NTFS vdc C:\\ \\\\?\\Volume{60fab9af-0000-0000-0000-602200000000}\\ NTFS vda \[root@ceph05 \~\]# virsh blockresize vmwinxxx vdc 1000G -- 在线改配磁盘(kvm对接了ceph的secret) Block device 'vdc' is resized \[root@ceph05 \~\]# rbd resize rbdpool/vmwinxxx --size 1000G -- 离线/关机,修改rbd,开机