libvirtd vm-tmp
1 <domain type='kvm'> 2 <name>vm-test</name> 3 <uuid>e0cccc71-1a93-d008-15c0-60155feecb01</uuid> 4 <memory unit='KiB'>2097152</memory> 5 <currentMemory unit='KiB'>2097152</currentMemory> 6 <vcpu>2</vcpu> 7 <os> 8 <type arch='x86_64'>hvm</type> 9 <boot dev='hd'/> 10 </os> 11 <features> 12 <acpi/> 13 <apic/> 14 <pae/> 15 </features> 16 <clock offset='utc'/> 17 <on_poweroff>destroy</on_poweroff> 18 <on_reboot>restart</on_reboot> 19 <on_crash>restart</on_crash> 20 <devices> 21 <emulator>/usr/libexec/qemu-kvm</emulator> 22 <disk type='block' device='cdrom'> 23 <driver name='qemu' type='raw'/> 24 <target dev='hdc' bus='ide'/> 25 <readonly/> 26 <address type='drive' controller='0' bus='1' unit='0'/> 27 </disk> 28 <disk type='file' device='disk'> 29 <driver name='qemu' type='qcow2'/> 30 <source file='/root/image/base_centos7.8_v5'/> 31 <target dev='vda' bus='virtio'/> 32 </disk> 33 <controller type='ide' index='0'> 34 <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> 35 </controller> 36 <controller type='scsi' index='0' model='virtio-scsi'> 37 <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/> 38 </controller> 39 <serial type='pty'> 40 <target port='0'/> 41 </serial> 42 <console type='pty'> 43 <target type='serial' port='0'/> 44 </console> 45 <input type='mouse' bus='ps2'/> 46 <graphics type='vnc' port='-1' autoport='yes' sharePolicy='allow-exclusive'> 47 <listen type='address' address='127.0.0.1'/> 48 </graphics> 49 <video> 50 <model type='qxl' vram='16384' heads='1'/> 51 <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> 52 </video> 53 <memballoon model='virtio'> 54 <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> 55 </memballoon> 56 </devices> 57 </domain>
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 virsh qemu-monitor-command vm-test --hmp "gdbserver" 2 virsh console vm-test 3 4 5 6 https://en.wikibooks.org/wiki/QEMU/Monitor 7 https://qemu-project.gitlab.io/qemu/system/monitor.html 8 9 virsh qemu-monitor-command vm-123456 --hmp "info mtree" 10 virsh qemu-monitor-command vm-123456 --hmp "gdbserver" 11 virsh qemu-monitor-command dev-f706f5 --hmp "info registers " 12 13 14 so good using libvirsh 15 https://access.redhat.com/blogs/766093/posts/2690881 16 <domain type='kvm' 17 xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0' > 18 <qemu:commandline> 19 <qemu:arg value='-s'/> 20 </qemu:commandline> 21 </domain>