History | View | Annotate | Download (80.6 kB)
slirp: Add domain-search option to slirp's DHCP server
This patch will allow the user to include the domain-search option inreplies from the built-in DHCP server. The domain suffixes can bespecified by adding dnssearch= entries to the "-net user" parameter....
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Merge branch 'queue/qmp' of git://repo.or.cz/qemu/qmp-unstable
qmp: handle stop/cont in INMIGRATE state
Right now, stop followed by an incoming migration will let thevirtual machine start. cont before an incoming migration insteadwill fail.
This is bad because the actual behavior is not predictable; it isracy with respect to the start of the incoming migration. That's...
mirror: add support for on-source-error/on-target-error
Error management is important for mirroring; otherwise, an error on thetarget (even something as "innocent" as ENOSPC) requires to start againwith a full copy. Similar to on_read_error/on_write_error, two separate...
qmp: add drive-mirror command
This adds the monitor commands that start the mirroring job.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
monitor: Allow add-fd to any specified fd set
The first call to add an fd to an fd set was previously notallowed to choose the fd set ID. The ID was generated asthe first available and ensuing calls could add more fds byspecifying the fd set ID. This change allows users to...
block: export dirty bitmap information in query-block
block: add block-job-complete
While streaming can be dropped as soon as it progressed through the wholeimage, mirroring needs to be completed manually for two reasons: 1) so thatmanagement knows exactly when the VM switches to the target; 2) becausefor other use cases such as replication, we may leave the operation running...
block: introduce BLOCK_JOB_READY event
Even for jobs that need to be manually completed, management may wantto take care itself of the completion, not requiring the user to issuea command to terminate the job. In this case we want to avoid thatthey poll us continuously, waiting for completion to become available....
mirror: introduce mirror job
This patch adds the implementation of a new job that mirrors a disk toa new image while letting the guest continue using the old image.The target is treated as a "black box" and data is copied from thesource to the target in the background. This can be used for several...
qmp: add NBD server commands
Adding an NBD server inside QEMU is trivial, since all the logic isin nbd.c and can be shared easily between qemu-nbd and QEMU itself.The main difference is that qemu-nbd serves a single unnamed export,while QEMU serves named exports....
qapi: add socket address types
Acked-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
migration: print total downtime for final phase of migration
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Orit Wasserman <owasserm@redhat.com>
migration: print expected downtime in info migrate
migration: Add dirty_pages_rate to query migrate output
It indicates how many pages were dirtied during the last second.
Merge remote-tracking branch 'sstabellini/xen-2012-10-03' into staging
QMP, Introduce xen-set-global-dirty-log command.
This command is used during a migration of a guest under Xen. It callsmemory_global_dirty_log_start or memory_global_dirty_log_stop according to theargument pass to the command.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>...
block: introduce block job error
The following behaviors are possible:
'report': The behavior is the same as in 1.1. An I/O error,respectively during a read or a write, will complete the job immediatelywith an error code.
'ignore': An I/O error, respectively during a read or a write, will be...
stream: add on-error argument
This patch adds support for error management to streaming.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
iostatus: move BlockdevOnError declaration to QAPI
This will let block-stream reuse the enum. Places that used the enumsare renamed accordingly.
qmp: add 'busy' member to BlockJobInfo
Because pausing a job is asynchronous, we need to know whether it hascompleted. This is described by the "busy" field of BlockJob; copy itto BlockJobInfo.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>...
block: add support for job pause/resume
Job pausing reuses the existing support for cancellable sleeps. A pausehappens at the next sleeping point and lasts until the coroutine isre-entered explicitly. Cancellation was already doing a forced resume,so implement it explicitly in terms of resume....
qmp: add block-job-pause and block-job-resume
Add QMP commands matching the functionality.
Paused jobs cannot be canceled without first resuming them. Thisensures that I/O errors are never missed by management. However, anoptional force argument can be specified to allow that....
QAPI: add command for live block commit, 'block-commit'
The command for live block commit is added, which has the followingarguments:
device: the block device to perform the commit on (mandatory)base: the base image to commit into; optional (if not specified,...
block: live snapshot documentation tweaks
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qmp: qmp_send_key(): accept key codes in hex
Before the qapi conversion, the sendkey command could be used tosend key codes in hex directly to the guest. In HMP, this wouldbe like:
(qemu) sendkey 0xdc
However, the qapi conversion broke this, as it only supports sending...
qmp: dump-guest-memory: improve schema doc (again)
o Add a note about memory allocation with paging=true o Fix indentation
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>
qapi: convert add_client
Also fixes a few issues while there:
1. The fd returned by monitor_get_fd() leaks in most error conditions 2. monitor_get_fd() return value is not checked. Best case we get an error that is not correctly reported, worse case one of the...
qapi: Fix enumeration typo error
Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
qapi: Add SnapshotInfo and ImageInfo.
Signed-off-by: Benoit Canet <benoit@irqsave.net>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Merge branch 'spice.v59' of git://anongit.freedesktop.org/spice/qemu
qapi: convert sendkey
Convert 'sendkey' to use QAPI.
QAPI passes key's index of mapping table to qmp_send_key(),not keycode. So we use help functions to convert key/code toindex of key_defs, and 'index' will be converted to 'keycode'inside qmp_send_key()....
qapi: convert screendump
Next commits will update devices to propagate errors.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi: add the QKeyCode enum
key_defs[] in monitor.c is a mapping table of keys and keycodes,this patch added a QKeyCode enum. Key's index in the enmu is sameas keycode's index in key_defs[].
Signed-off-by: Amos Kong <akong@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
spice: add 'migrated' flag to spice info
The flag is 'true' when spice migration has completed on the src side.It is needed for a case where libvirt dies before migration completesand it misses the event QEVENT_SPICE_MIGRATE_COMPLETED.When libvirt is restored and queries the migration status, it also needs...
Merge remote-tracking branch 'qmp/queue/qmp' into staging
qapi: add 'query-target' command to return target arch
Add a 'query-target' QAPI command to allow management applicationsto determine what target architecture a QEMU binary is emulatingwithout having to parse the binary name or -help output
$ qmp-shell -p /tmp/qemu...
migration: move total_time from ram stats to migration info
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi: Introduce add-fd, remove-fd, query-fdsets
This patch adds support that enables passing of file descriptorsto the QEMU monitor where they will be stored in specified filedescriptor sets.
A file descriptor set can be used by a client like libvirt to...
qmp: introduce device-list-properties command
This can be used in conjunction with qom-list-types to determine the supportedset of devices and their parameters.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi: mark QOM commands stable
We've had a cycle to tweak. It is time to commit to supporting them.
qapi: add query-machines command
This provides the same output as -M ? but in a structured way.
qapi: add query-cpu-definitions command (v2)
This command attempts to map to the behavior of -cpu ?. Unfortunately, theoutput of this command differs wildly across targets.
To accommodate this, we use a weak symbol to implement a default version of the...
qmp: switch to the new error format on the wire
IMPORTANT: this BREAKS QMP's compatibility for the error response.
This commit changes QMP's wire protocol to make use of the simplererror format introduced by previous commits.
There are two important (and mostly incompatible) changes:...
qapi-schema: add ErrorClass enum
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>
qmp: query-block: add 'encryption_key_missing' field
Add migrate_set_cache_size command
Change XBZRLE cache size in bytes (the size should be a power of 2, it will berounded down to the nearest power of 2).If XBZRLE cache size is too small there will be many cache miss.
New query-migrate-cache-size QMP command and 'info migrate_cache_size' HMP...
Change total_time to total-time in MigrationStats
migration total_time was introduced in commitd5f8a5701d3690b5ec0c34b6a5c0b5a24d274540 for QEMU 1.2
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>...
Add migration accounting for normal and duplicate pages
Signed-off-by: Benoit Hudzia <benoit.hudzia@sap.com>Signed-off-by: Petter Svard <petters@cs.umu.se>Signed-off-by: Aidan Shribman <aidan.shribman@sap.com>Signed-off-by: Orit Wasserman <owasserm@redhat.com>...
Add XBZRLE statistics
Signed-off-by: Benoit Hudzia <benoit.hudzia@sap.com>Signed-off-by: Petter Svard <petters@cs.umu.se>Signed-off-by: Aidan Shribman <aidan.shribman@sap.com>Signed-off-by: Orit Wasserman <owasserm@redhat.com>Signed-off-by: Juan Quintela <quintela@redhat.com>...
Add migration capabilities
The management can query the current migration capabilities usingquery-migrate-capabilities QMP command.The user can use 'info migrate_capabilities' HMP command.Currently only XBZRLE capability is available.
Signed-off-by: Orit Wasserman <owasserm@redhat.com>...
Add migrate-set-capabilities
The management can enable/disable a capability for the next migration by usingmigrate-set-capabilities QMP command.The user can use migrate_set_capability HMP command.
Signed-off-by: Orit Wasserman <owasserm@redhat.com>Signed-off-by: Juan Quintela <quintela@redhat.com>...
qapi: generalize documentation of streaming commands
Talk about background operations in general, rather than specificallyabout streaming.
block: Use bdrv_get_backing_file_depth()
Use the dedicated counting function in qmp_query_block in order topropagate the backing file depth to HMP and add backing_file_depthto qmp-commands.hx
Signed-off-by: Benoit Canet <benoit@irqsave.net>Reviewed-by: Eric Blake <eblake@redhat.com>...
net: Add a hub net client
The vlan feature can be implemented in terms of hubs. By introducing ahub net client it becomes possible to remove the special case vlan codefrom net.c and push the vlan feature out of generic networking code.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>...
qapi schema: remove trailing whitespace
Signed-off-by: Laszlo Ersek <lersek@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
qapi schema: add Netdev types
NetdevTapOptions::sndbuf and NetdevDumpOptions::len use the new "size" type.
v1->v2:- NetLegacy::name is optional- NetLegacyNicOptions::vectors is of type uint32- NetdevVdeOptions::port and ::mode are of type uint16- NetLegacy::vlan has type int32...
qmp: dump-guest-memory: improve schema doc
Clarify a few points and makes it looks more like the other commands'documentation.
qapi: Convert getfd and closefd
Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Add spent time for migration
We add time spent for migration to the output of "info migrate" command. 'total_time' means time since the start fo migration ifmigration is 'active', and total time of migration if migration iscompleted. As we are also interested in transferred ram when...
qapi: convert netdev_add
This is not a full QAPI conversion, but an intermediate step.
In essence, do_netdev_add() is split into three functions:
1. netdev_add(): performs the actual work. This function is fully converted to Error (thus, it's "qapi-friendly")...
qapi: convert netdev_del
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-By: Laszlo Ersek <lersek@redhat.com>
Add 'query-events' command to QMP to query async events
Sometimes it is neccessary for an application to determinewhether a particular QMP event is available, so they candecide whether to use compatibility code instead. Thisintroduces a new 'query-events' command to QMP to do just...
introduce a new monitor command 'dump-guest-memory' to dump guest's memory
The command's usage: dump-guest-memory [-p] protocol [begin] [length]The supported protocol can be file or fd:1. file: the protocol starts with "file:", and the following string is...
runstate: introduce suspended state
QEMU enters in this state when the guest suspends to ram (S3).
This is important so that HMP users and QMP clients can know thatthe guest is suspended. QMP also has an event for this, but eventsare not reliable and are limited (ie. a client can connect to QEMU...
qapi-schema.json: fix RunState enums alphabetical order
spice_info: add mouse_mode
Add mouse_mode, either server or mouse, to qmp and hmp commands, basedon spice_server_is_server_mouse added in spice-server 0.10.3.
Signed-off-by: Alon Levy <alevy@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
block: use Error mechanism instead of -errno for block_job_set_speed()
There are at least two different errors that can occur inblock_job_set_speed(): the job might not support setting speeds or thevalue might be invalid.
Use the Error mechanism to report the error where it occurs....
block: change block-job-set-speed argument from 'value' to 'speed'
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Acked-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
block: add 'speed' optional parameter to block-stream
Allow streaming operations to be started with an initial speed limit.This eliminates the window of time between starting streaming andissuing block-job-set-speed. Users should use the new optional 'speed'...
qmp: make block job command naming consistent
The block streaming and job commands used '_' instead of '-' for reasonsof compatibility with libvirt, which already included support for the'_' naming. However, the semantics of block_job_cancel have changed and...
qapi: convert device_del
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Merge remote-tracking branch 'sstabellini/saverestore-8' into staging
Introduce "xen-save-devices-state"
- add an "is_ram" flag to SaveStateEntry;
- register_savevm_live sets is_ram for live_savevm devices;
- introduce a "xen-save-devices-state" QAPI command that can be used to savethe state of all devices, but not the RAM or the block devices of the...
qapi: Convert migrate
The migrate command is one of those commands where HMP and QMP completelymix up together. This made the conversion to the QAPI (which separates thecommand into QMP and HMP parts) a bit difficult.
The first important change to be noticed is that this commit completes the...
rename blockdev-group-snapshot-sync
We will add other kinds of operation. Prepare for this by adjustingthe schema.
add mode field to blockdev-snapshot-sync transaction item
The mode field lets a management application create the snapshotdestination outside QEMU.
Right now, the only modes are "existing" and "absolute-paths". Mirroringintroduces "no-backing-file". In the future "relative-paths" could be...
qmp: convert blockdev-snapshot-sync to a wrapper around transactions
Simplify the blockdev-snapshot-sync code and gain failsafe operationby turning it into a wrapper around the new transaction command. A newoption is also added matching "mode".
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
qapi-schema: fix typos and explain 'spice' auth
Signed-off-by: Alon Levy <alevy@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi-schema.json: fix comment for type ObjectPropretyInfo
qapi: Introduce blockdev-group-snapshot-sync command
This is a QAPI/QMP only command to take a snapshot of a group ofdevices. This is similar to the blockdev-snapshot-sync command, exceptblockdev-group-snapshot-sync accepts a list devices, filenames, and...
suspend: add system_wakeup monitor command
This patch adds the system_wakeup monitor command which will simplywake up suspended guests.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qom: move properties from qdev to object
This is mostly code movement although not entirely. This makes properties partof the Object base class which means that we can now start using Object in ameaningful way outside of qdev.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qom: add new command to search for types
This adds a command that allows searching for types that implement a property.This allows you to do things like search for all available PCIDevices. In thefuture, we'll also have a standard interface for things with a BlockDriverState...
qmp: add block_job_cancel command
Add block_job_cancel, which stops an active block streaming operation.When the operation has been cancelled the new BLOCK_JOB_CANCELLED eventis emitted.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Acked-by: Luiz Capitulino <lcapitulino@redhat.com>...
qmp: add query-block-jobs
Add query-block-jobs, which shows the progress of ongoing block deviceoperations.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Acked-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
add QERR_BASE_NOT_FOUND
This qerror will be raised when a given streaming base (backing file)cannot be found.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Acked-by: Luiz Capitulino <lcapitulino@redhat.com>...
qmp: add block_job_set_speed command
Add block_job_set_speed, which sets the maximum speed for a backgroundblock operation.
qmp: add block_stream command
Add the block_stream command, which starts copy backing file contentsinto the image file. Also add the BLOCK_JOB_COMPLETED QMP event whichis emitted when image streaming completes. Later patches add controlover the background copy speed, cancelation, and querying running...
qapi: Convert eject
qapi: Introduce change-vnc-password
New QMP command to change the VNC password.
qapi: Convert change
qapi: Convert block_set_io_throttle
block: use proper qerrors in qmp_block_resize
Let's report specific errors so that management tools and users canidentify the problem.
Two new qerrors are needed: * QERR_DEVICE_HAS_NO_MEDIUM for ENOMEDIUM * QERR_DEVICE_IS_READ_ONLY for EACCES