- 修改虚拟机的xml文件
- virsh shutdown 原来的虚拟机
- virsh undefine 原来的虚拟机
- virsh define 新的 xml文件,创建虚拟机
- virsh start 虚拟机
复制
如果是openstack的环境,virsh dump –file 指定文件路径后,生成的文件,不是在 指定路径而是在: /var/lib/docker/overlay2/****/diff/root
可以用来dump vm的 memory,是不是可以用gdb 来做dump;
qemu manual : https://www.mankier.com/1/qemu
-smp [[cpus=]n][,maxcpus=maxcpus][,sockets=sockets][,dies=dies][,clusters=clusters][,cores=cores][,threads=threads] 模拟SMP的系统,虚拟器初始之后,模拟出n个CPU。如果模拟的板子支持CPU热拔插,maxcpus就是在系统运行时,最多可以添加到多少个CPU。如果cpus和maxcpus两个参数没有设置,会根据相关的其他参数来做计算,计算的值就是两个参数的值。When only one of them is given then the omitted one will be set to its counterpart’s value. Both parameters may be specified, but the maximum number of CPUs must be equal to or greater than the initial CPU count. Product of the CPU topology hierarchy must be equal to the maximum number of CPUs. Both parameters are subject to an upper limit that is determined by the specific machine type chosen.
To control reporting of CPU topology information, values of the topology parameters can be specified. Machines may only support a subset of the parameters and different machines may have different subsets supported which vary depending on capacity of the corresponding CPU targets. So for a particular machine type board, an expected topology hierarchy can be defined through the supported sub-option. Unsupported parameters can also be provided in addition to the sub-option, but their values mus