- 27 1月, 2012 1 次提交
-
-
由 Jiri Denemark 提交于
QEMU always sends details about all available block devices as an answer for "info block"/"query-block" command. On the other hand, our qemuMonitorGetBlockInfo was made for a single block devices queries only. Thus, when asking for multiple devices, we asked qemu multiple times to always get the same answer from which different parts were filtered. This patch makes qemuMonitorGetBlockInfo return a hash table of all block devices, which may later be used for getting details about specific devices.
-
- 26 1月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
In preparation for the patch to include Murmurhash3, which introduces a virhashcode.h and virhashcode.c files, rename the existing hash.h and hash.c to virhash.h and virhash.c respectively.
-
- 01 12月, 2011 1 次提交
-
-
由 Lei Li 提交于
Implement the block I/O throttle setting and getting support to qemu driver. Signed-off-by: NLei Li <lilei@linux.vnet.ibm.com> Signed-off-by: NZhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 29 11月, 2011 1 次提交
-
-
由 Osier Yang 提交于
Implements functions for both HMP and QMP mode. For HMP mode, qemu uses "M" as the units by default, so the passed "sized" is divided by 1024. For QMP mode, qemu uses "Bytes" as the units by default, the passed "sized" is multiplied by 1024. All of the monitor functions return -1 on failure, 0 on success, or -2 if not supported.
-
- 28 10月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
The QEMU monitor command 'add_client' can be used to connect to a VNC or SPICE graphics display. This allows for implementation of the virDomainOpenGraphics API * src/qemu/qemu_driver.c: Implement virDomainOpenGraphics * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h, src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h, src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Add binding for 'add_client' command
-
- 19 10月, 2011 1 次提交
-
-
由 Guido Günther 提交于
-
- 29 9月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
If the daemon is restarted so we reconnect to monitor, cdrom media can be ejected. In that case we don't want to show it in domain xml, or require it on migration destination. To check for disk status use 'info block' monitor command.
-
- 28 9月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
Current qemu is able to give us detailed domain status (not just if it is running or not) which we can translate into a status reason.
-
- 16 9月, 2011 1 次提交
-
-
由 Peter Krempa 提交于
/usr/lib/stdlib.h in Mac OS X and probably also in BSD's exports this symbol :(
-
- 06 9月, 2011 2 次提交
-
-
由 Peter Krempa 提交于
This patch adds handlers for modification of guest's interface link state. Both HMP and QMP commands are supported, but as the link state functionality is from the beginning supported in QMP the HMP code will probably never be used.
-
由 Osier Yang 提交于
The mainly changes are: 1) Update qemuMonitorGetBlockStatsInfo and it's children (Text/JSON) functions to return the value of new latency fields. 2) Add new function qemuMonitorGetBlockStatsParamsNumber, which is to count how many parameters the underlying QEMU supports. 3) Update virDomainBlockStats in src/qemu/qemu_driver.c to be compatible with the changes by 1).
-
- 05 9月, 2011 1 次提交
-
-
由 Eric Blake 提交于
No one uses this yet, but it will be important once virDomainSnapshotCreateXML learns a VIR_DOMAIN_SNAPSHOT_DISK_ONLY flag, and the xml allows passing in the new file names. * src/qemu/qemu_monitor.h (qemuMonitorDiskSnapshot): New prototype. * src/qemu/qemu_monitor_text.h (qemuMonitorTextDiskSnapshot): Likewise. * src/qemu/qemu_monitor_json.h (qemuMonitorJSONDiskSnapshot): Likewise. * src/qemu/qemu_monitor.c (qemuMonitorDiskSnapshot): New function. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONDiskSnapshot): Likewise.
-
- 22 7月, 2011 2 次提交
-
-
由 Adam Litke 提交于
When an operation started by virDomainBlockPull completes (either with success or with failure), raise an event to indicate the final status. This API allow users to avoid polling on virDomainGetBlockJobInfo if they would prefer to use an event mechanism. * daemon/remote.c: Dispatch events to client * include/libvirt/libvirt.h.in: Define event ID and callback signature * src/conf/domain_event.c, src/conf/domain_event.h, src/libvirt_private.syms: Extend API to handle the new event * src/qemu/qemu_driver.c: Connect to the QEMU monitor event for block_stream completion and emit a libvirt block pull event * src/remote/remote_driver.c: Receive and dispatch events to application * src/remote/remote_protocol.x: Wire protocol definition for the event * src/remote_protocol-structs: structure definitions for protocol verification * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h, src/qemu/qemu_monitor_json.c: Watch for BLOCK_STREAM_COMPLETED event from QEMU monitor
-
由 Adam Litke 提交于
The virDomainBlockPull* family of commands are enabled by the following HMP/QMP commands: 'block_stream', 'block_job_cancel', 'info block-jobs' / 'query-block-jobs', and 'block_job_set_speed'. * src/qemu/qemu_driver.c src/qemu/qemu_monitor_text.[ch]: implement disk streaming by using the proper qemu monitor commands. * src/qemu/qemu_monitor_json.[ch]: implement commands using the qmp monitor
-
- 21 7月, 2011 1 次提交
-
-
由 Lai Jiangshan 提交于
qemu driver just accept xt_kbd codeset's keycode, so the lib virtkey is used for translating keycodes from other codesets
-
- 14 7月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
When qemuMonitorCloseFileHandle is called in error path, we need to preserve the original error since a possible further error when running closefd monitor command is not very useful to users.
-
- 12 7月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
When attaching to an external QEMU process, it is neccessary to check if the process is using KVM or not. This can be done using a monitor command * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h, src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h, src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Add API for checking if KVM is enabled
-
- 24 6月, 2011 3 次提交
-
-
由 Eric Blake 提交于
This reverts commit 784ee08d.
-
由 Eric Blake 提交于
This reverts commit 12cd77a0. Conflicts: python/libvirt-override-virConnect.py python/libvirt-override.c src/remote/remote_protocol.x
-
由 Daniel P. Berrange 提交于
For controlled shutdown we issue a 'system_powerdown' command to the QEMU monitor. This triggers an ACPI event which (most) guest OS wire up to a controlled shutdown. There is no equiv ACPI event to trigger a controlled reboot. This patch attempts to fake a reboot. - In qemuDomainObjPrivatePtr we have a bool fakeReboot flag. - The virDomainReboot method sets this flag and then triggers a normal 'system_powerdown'. - The QEMU process is started with '-no-shutdown' so that the guest CPUs pause when it powers off the guest - When we receive the 'POWEROFF' event from QEMU JSON monitor if fakeReboot is not set we invoke the qemuProcessKill command and shutdown continues normally - If fakeReboot was set, we spawn a background thread which issues 'system_reset' to perform a warm reboot of the guest hardware. Then it issues 'cont' to start the CPUs again * src/qemu/qemu_command.c: Add -no-shutdown flag if we have JSON support * src/qemu/qemu_domain.h: Add 'fakeReboot' flag to qemuDomainObjPrivate struct * src/qemu/qemu_driver.c: Fake reboot using the system_powerdown command if JSON support is available * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h, src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h, src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Add binding for system_reset command * src/qemu/qemu_process.c: Reset the guest & start CPUs if fakeReboot is set
-
- 15 6月, 2011 2 次提交
-
-
由 Adam Litke 提交于
When an operation started by virDomainBlockPullAll completes (either with success or with failure), raise an event to indicate the final status. This allows an API user to avoid polling on virDomainBlockPullInfo if they would prefer to use the event mechanism. * daemon/remote.c: Dispatch events to client * include/libvirt/libvirt.h.in: Define event ID and callback signature * src/conf/domain_event.c, src/conf/domain_event.h, src/libvirt_private.syms: Extend API to handle the new event * src/qemu/qemu_driver.c: Connect to the QEMU monitor event for block_stream completion and emit a libvirt block pull event * src/remote/remote_driver.c: Receive and dispatch events to application * src/remote/remote_protocol.x: Wire protocol definition for the event * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h, src/qemu/qemu_monitor_json.c: Watch for BLOCK_STREAM_COMPLETED event from QEMU monitor Signed-off-by: NAdam Litke <agl@us.ibm.com>
-
由 Adam Litke 提交于
The virDomainBlockPull* family of commands are enabled by the 'block_stream' and 'info block_stream' qemu monitor commands. * src/qemu/qemu_driver.c src/qemu/qemu_monitor_text.[ch]: implement disk streaming by using the stream and info stream text monitor commands * src/qemu/qemu_monitor_json.[ch]: implement commands using the qmp monitor Signed-off-by: NAdam Litke <agl@us.ibm.com> Acked-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 29 5月, 2011 2 次提交
-
-
由 Daniel P. Berrange 提交于
Currently the QEMU monitor I/O handler code uses errno values to report errors. This results in a sub-optimal error messages on certain conditions, in particular when parsing JSON strings malformed data simply results in 'EINVAL'. This changes the code to use the standard libvirt error reporting APIs. The virError is stored against the qemuMonitorPtr struct, and when a monitor API is run, any existing stored error is copied into that thread's error local * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h, src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_text.c: Use virError APIs for all monitor I/O handling code
-
由 Daniel P. Berrange 提交于
Currently whenever there is any failure with parsing the monitor, this is treated in the same was as end-of-file (ie QEMU quit). The domain is terminated, if not already dead. With this change, failures in parsing the monitor stream do not result in the death of QEMU. The guest continues running unchanged, but all further use of the monitor will be disabled. The VMM_FAILURE event will be emitted, and the mgmt application can decide when to kill/restart the guest to re-gain control * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Run a different callback for monitor EOF vs error conditions. * src/qemu/qemu_process.c: Emit VMM_FAILURE event when monitor fails
-
- 16 5月, 2011 2 次提交
-
-
由 Daniel P. Berrange 提交于
Use the graphics information from the QEMU migration cookie to issue a 'client_migrate_info' monitor command to QEMU. This causes the SPICE client to automatically reconnect to the target host when migration completes * src/qemu/qemu_migration.c: Set data for SPICE client relocation before starting migration on src * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h, src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h, src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Add new qemuMonitorGraphicsRelocate() command
-
由 Jiri Denemark 提交于
A qemu domain can get paused when libvirtd is stopped (e.g., because of I/O error) so we should check its current state when reconnecting to it.
-
- 13 5月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
* src/qemu/qemu_driver.c: new qemuDomainScreenshot() function * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h, src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h, src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Monitor command
-
- 11 5月, 2011 1 次提交
-
-
由 Lai Jiangshan 提交于
-
- 25 3月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Add the compiler attribute to ensure we don't introduce any more ref bugs like were just patched in commit 9741f346, then explicitly mark the remaining places in code that are safe. * src/qemu/qemu_monitor.h (qemuMonitorUnref): Mark ATTRIBUTE_RETURN_CHECK. * src/conf/domain_conf.h (virDomainObjUnref): Likewise. * src/conf/domain_conf.c (virDomainObjParseXML) (virDomainLoadStatus): Fix offenders. * src/openvz/openvz_conf.c (openvzLoadDomains): Likewise. * src/vmware/vmware_conf.c (vmwareLoadDomains): Likewise. * src/qemu/qemu_domain.c (qemuDomainObjBeginJob) (qemuDomainObjBeginJobWithDriver) (qemuDomainObjExitRemoteWithDriver): Likewise. * src/qemu/qemu_monitor.c (QEMU_MONITOR_CALLBACK): Likewise. Suggested by Daniel P. Berrange.
-
- 22 3月, 2011 3 次提交
-
-
由 Jiri Denemark 提交于
-
由 Eric Blake 提交于
With only a single caller to these two monitor commands, I didn't need to wrap a new WithFds version, but just change the command itself. * src/qemu/qemu_monitor.h (qemuMonitorAddNetdev) (qemuMonitorAddHostNetwork): Add parameters. * src/qemu/qemu_monitor.c (qemuMonitorAddNetdev) (qemuMonitorAddHostNetwork): Add support for fd passing. * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Use it to simplify code.
-
由 Eric Blake 提交于
This is also a bug fix - on the error path, qemu_hotplug would leave the configfd file leaked into qemu. At least the next attempt to hotplug a PCI device would reuse the same fdname, and when the qemu getfd monitor command gets a new fd by the same name as an earlier one, it closes the earlier one, so there is no risk of qemu running out of fds. * src/qemu/qemu_monitor.h (qemuMonitorAddDeviceWithFd): New prototype. * src/qemu/qemu_monitor.c (qemuMonitorAddDevice): Move guts... (qemuMonitorAddDeviceWithFd): ...to new function, and add support for fd passing. * src/qemu/qemu_hotplug.c (qemuDomainAttachHostPciDevice): Use it to simplify code. Suggested by Daniel P. Berrange.
-
- 16 3月, 2011 1 次提交
-
-
由 Eric Blake 提交于
* src/qemu/qemu_monitor.h (qemuMonitorMigrateToFd): New prototype. * src/qemu/qemu_monitor.c (qemuMonitorMigrateToFd): New function.
-
- 10 3月, 2011 2 次提交
-
-
由 Jiri Denemark 提交于
So that it's obvious that they are supposed to be used with HMP commands.
-
由 Jiri Denemark 提交于
JSON monitor command implementation can now just directly call text monitor implementation and it will be automatically encapsulated into QMP's human-monitor-command.
-
- 04 2月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
Currently users who want to use virDomainQemuMonitorCommand() API or it's virsh equivalent has to use the same protocol as libvirt uses for communication to qemu. Since the protocol is QMP with current qemu and HMP much more usable for humans, one ends up typing something like the following: virsh qemu-monitor-command DOM \ '{"execute":"human-monitor-command","arguments":{"command-line":"info kvm"}}' which is not a very convenient way of debugging qemu. This patch introduces --hmp option to qemu-monitor-command, which says that the provided command is in HMP. If libvirt uses QMP to talk with qemu, the command will automatically be converted into QMP. So the example above is simplified to just virsh qemu-monitor-command --hmp DOM "info kvm" Also the result is converted from {"return":"kvm support: enabled\r\n"} to just plain HMP: kvm support: enabled If libvirt talks to qemu in HMP, --hmp flag is obviously a noop.
-
- 15 1月, 2011 2 次提交
-
-
由 Marc-André Lureau 提交于
-
由 Eric Blake 提交于
* src/conf/domain_conf.h (virDomainChrDeviceType): Drop monitor. * src/conf/domain_conf.c (virDomainChrDevice) (virDomainChrDefParseTargetXML, virDomainChrDefFormat): Drop monitor support. * src/qemu/qemu_command.h (qemuBuildCommandLine): Alter signature. * src/qemu/qemu_monitor.h (qemuMonitorOpen): Likewise. * src/qemu/qemu_domain.h (_qemuDomainObjPrivate): Change type of monConfig. * src/qemu/qemu_domain.c (qemuDomainObjPrivateFree) (qemuDomainObjPrivateXMLFormat, qemuDomainObjPrivateXMLParse): Adjust to type change. * src/qemu/qemu_command.c (qemuBuildCommandLine): Likewise. * src/qemu/qemu_driver.c (qemuPrepareMonitorChr) (qemudStartVMDaemon, qemuDomainXMLToNative, qemuConnectMonitor) (qemudShutdownVMDaemon): Likewise. * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise. * src/qemu/qemu_monitor.c (qemuMonitorOpen): Likewise. * tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Likewise.
-
- 22 12月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* daemon/Makefile.am: Avoid spurious space before tabs. * src/Makefile.am: Likewise. * examples/dominfo/Makefile.am: Likewise. * examples/domsuspend/Makefile.am: Likewise. * tools/Makefile.am: Likewise. * src/datatypes.h (VIR_CONNECT_MAGIC): Likewise. * src/internal.h (TODO): Likewise. * src/qemu/qemu_monitor.h (QEMU_MONITOR_MIGRATE): Likewise. * src/xen/xen_hypervisor.c (XEN_V2_OP_GETAVAILHEAP): Likewise. * src/xen/xs_internal.h: Likewise.
-
- 09 12月, 2010 1 次提交
-
-
由 Ryan Harper 提交于
Currently libvirt doesn't confirm whether the guest has responded to the disk removal request. In some cases this can leave the guest with continued access to the device while the mgmt layer believes that it has been removed. With a recent qemu monitor command[1] we can deterministically revoke a guests access to the disk (on the QEMU side) to ensure no futher access is permitted. This patch adds support for the drive_del() command and introduces it in the disk removal paths. If the guest is running in a QEMU without this command we currently explicitly check for unknown command/CommandNotFound and log the issue. If QEMU supports the command we issue the drive_del command after we attempt to remove the device. The guest may respond and remove the block device before we get to attempt to call drive_del. In that case, we explicitly check for 'Device not found' from the monitor indicating that the target drive was auto-deleted upon guest responds to the device removal notification. 1. http://thread.gmane.org/gmane.comp.emulators.qemu/84745Signed-off-by: NRyan Harper <ryanh@us.ibm.com>
-