QEMUモニタのヘルプ
気になるコマンド
quit
QEMUを終了する
info registers
レジスタ一覧
(qemu) info registers
pc 8000b04c
mhartid 00000000
mstatus 80006000
mstatush 00000000
mip 00000080
mie 00000008
mideleg 00000222
medeleg 0000b109
mtvec 80000518
stvec 00000000
mepc 80005b76
sepc 00000000
mcause 00000002
scause 00000000
mtval 00000000
stval 00000000
x0/zero 00000000 x1/ra 8000b02c x2/sp 80012e00 x3/gp 00000000
x4/tp 80013000 x5/t0 80005c16 x6/t1 00000000 x7/t2 00001000
x8/s0 80012e70 x9/s1 8000f2b0 x10/a0 80010070 x11/a1 0000000d
x12/a2 00000001 x13/a3 00000000 x14/a4 00000000 x15/a5 00000000
x16/a6 00000000 x17/a7 00000000 x18/s2 80012e10 x19/s3 00000000
x20/s4 00000000 x21/s5 00000000 x22/s6 00000009 x23/s7 8000e015
x24/s8 0000002d x25/s9 00000000 x26/s10 00000000 x27/s11 00000030
x28/t3 00000000 x29/t4 00000063 x30/t5 000000e4 x31/t6 00000000
f0/ft0 ffffffff00000000 f1/ft1 ffffffff00000000 f2/ft2 ffffffff00000000 f3/ft3 ffffffff00000000
f4/ft4 ffffffff00000000 f5/ft5 ffffffff00000000 f6/ft6 ffffffff00000000 f7/ft7 ffffffff00000000
f8/fs0 ffffffff00000000 f9/fs1 ffffffff00000000 f10/fa0 ffffffff00000000 f11/fa1 ffffffff00000000
f12/fa2 ffffffff00000000 f13/fa3 ffffffff00000000 f14/fa4 ffffffff00000000 f15/fa5 ffffffff00000000
f16/fa6 ffffffff00000000 f17/fa7 ffffffff00000000 f18/fs2 ffffffff00000000 f19/fs3 ffffffff00000000
f20/fs4 ffffffff00000000 f21/fs5 ffffffff00000000 f22/fs6 ffffffff00000000 f23/fs7 ffffffff00000000
f24/fs8 ffffffff00000000 f25/fs9 ffffffff00000000 f26/fs10 ffffffff00000000 f27/fs11 ffffffff00000000
f28/ft8 ffffffff00000000 f29/ft9 ffffffff00000000 f30/ft10 ffffffff00000000 f31/ft11 ffffffff00000000
(qemu)
info roms
ROM一覧
リセットベクタとかがセットされてるね
これはなにもの?
/usr/local/Cellar/qemu/5.2.0_1/bin/../share/qemu/opensbi-riscv32-generic-fw_dynamic.elf
OpenSBIというブートローダみたい
これ?
ROMはどうやってマウントされるの?
これ?
-option-rom rom load a file, rom, into the option ROM space
(qemu) info roms
addr=0000000000001000 size=0x000028 mem=rom name="mrom.reset"
addr=0000000000001028 size=0x000018 mem=rom name="mrom.finfo"
addr=0000000080000000 size=0x011688 mem=ram name="phdr #0: /usr/local/Cellar/qemu/5.2.0_1/bin/../share/qemu/opensbi-riscv32-generic-fw_dynamic.elf" addr=0000000087e00000 size=0x100000 mem=ram name="fdt"
(qemu)
ヘルプ全文
(qemu) help
acl_add aclname match allow|deny index -- add a match rule to the access control list acl_policy aclname allow|deny -- set default access control list policy
acl_remove aclname match -- remove a match rule from the access control list
acl_reset aclname -- reset the access control list
acl_show aclname -- list rules in the access control list
announce_self interfaces id -- Trigger GARP/RARP announcements balloon target -- request VM to change its memory allocation (in MB)
block_job_cancel -f device -- stop an active background block operation (use -f if you want to abort the operation immediately
instead of keep running until data is in sync)
block_job_complete device -- stop an active background block operation
block_job_pause device -- pause an active background block operation
block_job_resume device -- resume a paused background block operation
block_job_set_speed device speed -- set maximum speed for a background block operation
block_passwd block_passwd device password -- set the password of encrypted block devices
block_resize device size -- resize a block image
block_set_io_throttle device bps bps_rd bps_wr iops iops_rd iops_wr -- change I/O throttle limits for a block drive
block_stream device [speed base] -- copy data from a backing file into a block device boot_set bootdevice -- define new values for the boot device list
change device filename [format read-only-mode] -- change a removable medium, optional format chardev-add args -- add chardev
chardev-change id args -- change chardev
chardev-remove id -- remove chardev
chardev-send-break id -- send a break on chardev
client_migrate_info protocol hostname port tls-port cert-subject -- set migration information for remote display
closefd closefd name -- close a file descriptor previously passed via SCM rights
commit device|all -- commit changes to the disk images (if -snapshot is used) or backing files
cpu index -- set the default CPU
c|cont -- resume emulation
delvm tag -- delete a VM snapshot from its tag
device_add driver,prop=value,... -- add device, like -device on the command line device_del device -- remove device
drive_backup -n -f -c device target format -- initiates a point-in-time copy for a device. The device's contents are
copied to the new image file, excluding data that
is written after the command is started.
The -n flag requests QEMU to reuse the image found
in new-image-file, instead of recreating it from scratch.
The -f flag requests QEMU to copy the whole disk,
so that the result does not need a backing file.
The -c flag requests QEMU to compress backup data
(if the target format supports it).
drive_del device -- remove host block device
drive_mirror -n -f device target format -- initiates live storage migration for a device. The device's contents are
copied to the new image file, including data that
is written after the command is started.
The -n flag requests QEMU to reuse the image found
in new-image-file, instead of recreating it from scratch.
The -f flag requests QEMU to copy the whole disk,
so that the result does not need a backing file.
-p: do paging to get guest's memory mapping.
-d: return immediately (do not wait for completion).
-z: dump in kdump-compressed format, with zlib compression.
-l: dump in kdump-compressed format, with lzo compression.
-s: dump in kdump-compressed format, with snappy compression.
-w: dump in Windows crashdump format (can be used instead of ELF-dump converting),
for Windows x64 guests with vmcoreinfo driver only.
begin: the starting physical address.
length: the memory size, in bytes.
eject -f device -- eject a removable medium (use -f to force it) exit_preconfig -- exit the preconfig state
expire_password protocol time -- set spice/vnc password expire-time
gdbserver device -- start gdbserver on given device (default 'tcp::1234'), stop with 'none' getfd getfd name -- receive a file descriptor via SCM rights and assign it a name
gpa2hva addr -- print the host virtual address corresponding to a guest physical address
gva2gpa addr -- print the guest physical address corresponding to a guest virtual address
help|? cmd -- show the help i /fmt addr -- I/O port read
info subcommand -- show various information about the system state loadvm tag -- restore a VM snapshot from its tag
log item1,... -- activate logging of the specified items logfile filename -- output logs to 'filename'
memsave addr size file -- save to disk virtual memory dump starting at 'addr' of size 'size'
migrate -d -b -i -r uri -- migrate to URI (using -d to not wait for completion) -b for migration without shared storage with full copy of disk
-i for migration without shared storage with incremental copy of disk (base image shared between src and destination)
-r to resume a paused migration
migrate_cancel -- cancel the current VM migration
migrate_continue state -- Continue migration from the given paused state
migrate_incoming uri -- Continue an incoming migration from an -incoming defer
migrate_pause -- Pause an ongoing migration (postcopy-only)
migrate_recover uri -- Continue a paused incoming postcopy migration
migrate_set_cache_size value -- set cache size (in bytes) for XBZRLE migrations,the cache size will be rounded down to the nearest power of 2.
The cache size affects the number of cache misses.In case of a high cache miss ratio you need to increase the cache size
migrate_set_capability capability state -- Enable/Disable the usage of a capability for migration
migrate_set_downtime value -- set maximum tolerated downtime (in seconds) for migrations
migrate_set_parameter parameter value -- Set the parameter for migration
migrate_set_speed value -- set maximum speed (in bytes) for migrations. Defaults to MB if no size suffix is specified, ie. B/K/M/G/T
migrate_start_postcopy -- Followup to a migration command to switch the migration to postcopy mode. The postcopy-ram capability must be set on both source and destination before the original migration command .
mouse_button state -- change mouse button state (1=L, 2=M, 4=R)
mouse_move dx dy dz -- send mouse move events mouse_set index -- set which mouse device receives events
nbd_server_add nbd_server_add -w device name -- export a block device via NBD nbd_server_remove nbd_server_remove -f name -- remove an export previously exposed via NBD nbd_server_start nbd_server_start -a -w host:port -- serve block devices on the given host and port nbd_server_stop nbd_server_stop -- stop serving block devices using the NBD protocol
netdev_del id -- remove host network device
nmi -- inject an NMI
o /fmt addr value -- I/O port write
object_del id -- destroy QOM object
-a for advisory non fatal error
-c for correctable error
<id> = qdev device id
<error_status> = error string or 32bit
<tlb header> = 32bit x 4
<tlb header prefix> = 32bit x 4
pmemsave addr size file -- save to disk physical memory dump starting at 'addr' of size 'size'
p|print /fmt expr -- print expression value (use $reg for CPU register access)
-d: device is a device ID rather than a drive ID or node name qom-get path property -- print QOM property
qom-list path -- list QOM properties
qom-set -j path property value -- set QOM property. -j: the value is specified in json format.
q|quit -- quit the emulator
replay_break icount -- set breakpoint at the specified instruction count
replay_delete_break -- remove replay breakpoint
replay_seek icount -- replay execution to the specified instruction count
ringbuf_read device size -- Read from a ring buffer character device
ringbuf_write device data -- Write to a ring buffer character device
savevm tag -- save a VM snapshot. If no tag is provided, a new snapshot is created
screendump filename [device head] -- save screen from head 'head' of display device 'device' into PPM image 'filename' sendkey keys hold_ms -- send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms) set_link name on|off -- change the link status of a network adapter
set_password protocol password action-if-connected -- set spice/vnc password
singlestep on|off -- run emulation in singlestep mode or switch to normal mode of device. If a new image file is specified, the
new image file will become the new root image.
If format is specified, the snapshot file will
be created in that format.
The default format is qcow2. The -n flag requests QEMU
to reuse the image found in new-image-file, instead of
recreating it from scratch.
snapshot_blkdev_internal device name -- take an internal snapshot of device.
The format of the image used by device must
support it, such as qcow2.
snapshot_delete_blkdev_internal device name id -- delete an internal snapshot of device. If id is specified, qemu will try delete
the snapshot matching both id and name.
The format of the image used by device must
support it, such as qcow2.
stop -- stop emulation
stopcapture capture index -- stop capture
sum addr size -- compute the checksum of a memory region
sync-profile on|off|reset -- enable, disable or reset synchronization profiling. With no arguments, prints whether profiling is on or off. system_powerdown -- send system power down event
system_reset -- reset the system
system_wakeup -- wakeup guest from suspend
trace-event name on|off vcpu -- changes status of a specific trace event (vcpu: vCPU to set, default is all) wavcapture path audiodev [frequency [bits channels]] -- capture audio to a wave file (default frequency=44100 bits=16 channels=2) x /fmt addr -- virtual memory dump starting at 'addr'
x_colo_lost_heartbeat -- Tell COLO that heartbeat is lost,
a failover or takeover is needed.
xp /fmt addr -- physical memory dump starting at 'addr'
(qemu)
info subcommands
(qemu) info
info balloon -- show balloon information
info block -n -v device -- show info of one block device or all block devices (-n: show named nodes; -v: show details) info block-jobs -- show progress of ongoing block device operations
info blockstats -- show block device statistics
info capture -- show capture information
info chardev -- show the character devices
info cpus -- show infos for each CPU
info cpustats -- show CPU statistics
info dump -- Display the latest dump status
info history -- show the command line history
info hotpluggable-cpus -- Show information about hotpluggable CPUs
info iothreads -- show iothreads
info irq -- show the interrupts statistics (if available)
info jit -- show dynamic compiler info
info kvm -- show KVM information
info mem -- show the active virtual memory mappings
info memdev -- show memory backends
info memory-devices -- show memory devices
info memory_size_summary -- show the amount of initially allocated and present hotpluggable (if enabled) memory in bytes.
info mice -- show which guest mouse is receiving events
info migrate -- show migration status
info migrate_cache_size -- show current migration xbzrle cache size
info migrate_capabilities -- show current migration capabilities
info migrate_parameters -- show current migration parameters
info mtree -f-d-o-D -- show memory tree (-f: dump flat view for address spaces;-d: dump dispatch tree, valid with -f only);-o: dump region owners/parents;-D: dump disabled regions info name -- show the current VM name
info network -- show the network state
info numa -- show NUMA information
info opcount -- show dynamic compiler opcode counters
info pci -- show PCI info
info pic -- show PIC state
info profile -- show profiling information
info qdm -- show qdev device model list
info qom-tree path -- show QOM composition tree info qtree -- show device tree
info ramblock -- Display system ramblock information
info rdma -- show RDMA state
info registers -a -- show the cpu registers (-a: all - show register info for all cpus) info replay -- show record/replay information
info rocker name -- Show rocker switch
info rocker-of-dpa-flows name tbl_id -- Show rocker OF-DPA flow tables info rocker-of-dpa-groups name type -- Show rocker OF-DPA groups info rocker-ports name -- Show rocker ports
info roms -- show roms
info snapshots -- show the currently saved VM snapshots
info status -- show the current VM status (running|paused)
info sync-profile -m -n max -- show synchronization profiling info, up to max entries (default: 10), sorted by total wait time. (-m: sort by mean wait time; -n: do not coalesce objects with the same call site) info tpm -- show the TPM device
info trace-events name vcpu -- show available trace-events & their state (name: event name pattern; vcpu: vCPU to query, default is any) info usb -- show guest USB devices
info usbhost -- show host USB devices
info usernet -- show user network stack connection states
info uuid -- show the current VM UUID
info version -- show the version of QEMU
info vm-generation-id -- Show Virtual Machine Generation ID
info vnc -- show the vnc server status
(qemu)