- 02 3月, 2010 1 次提交
-
-
由 Wolfgang Mauerer 提交于
when the underlying qemu supports the drive/device model and the controller has been added this way. * src/qemu/qemu_driver.c: use qemuMonitorDelDevice() when detaching PCI controller and if supported * src/qemu/qemu_monitor.[ch]: add new qemuMonitorDelDevice() function * src/qemu/qemu_monitor_json.[ch]: JSON backend for DelDevice command * src/qemu/qemu_monitor_text.[ch]: Text backend for DelDevice command
-
- 16 2月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
When in JSON mode, QEMU requires that 'qmp_capabilities' is run as the first command in the monitor. This is a no-op when run in the text mode monitor * src/qemu/qemu_driver.c: Run capabilities negotiation when connecting to the monitor * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h, src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h: Add support for the 'qmp_capabilities' command, no-op in text mode.
-
- 13 2月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
The old text mode monitor prompts for a password when disks are encrypted. This interactive approach doesn't work for JSON mode monitor. Thus there is a new 'block_passwd' command that can be used. * src/qemu/qemu_driver.c: Split out code for looking up a disk secret from findVolumeQcowPassphrase, into a new method getVolumeQcowPassphrase. Enhance qemuInitPasswords() to also set the disk encryption password via the monitor * 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 support for the 'block_passwd' monitor command.
-
- 03 2月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
The way QEMU is started has been changed to use '-device' and the new style '-drive' syntax. This needs to be mirrored in the hotplug code, requiring addition of two new APIs. * src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c: Define APIs qemuMonitorAddDevice() and qemuMonitorAddDrive() * src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h, src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Implement the new monitor APIs
-
- 26 1月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
* src/util/json.c, src/util/json.h: Declare returned strings to be const * src/qemu/qemu_monitor.c: Wire up JSON mode for qemuMonitorGetPtyPaths * src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h: Fix const correctness. Add missing error message in the function qemuMonitorJSONGetAllPCIAddresses. Add implementation of the qemuMonitorGetPtyPaths function calling 'query-chardev'.
-
- 18 1月, 2010 3 次提交
-
-
由 Daniel P. Berrange 提交于
Hotunplug of devices requires that we know their PCI address. Even hotplug of SCSI drives, required that we know the PCI address of the SCSI controller to attach the drive to. We can find this out by running 'info pci' and then correlating the vendor/product IDs with the devices we booted with. Although this approach is somewhat fragile, it is the only viable option with QEMU < 0.12, since there is no way for libvirto set explicit PCI addresses when creating devices in the first place. For QEMU > 0.12, this code will not be used. * src/qemu/qemu_driver.c: Assign all dynamic PCI addresses on startup of QEMU VM, matching vendor/product IDs * 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 fetching PCI device address mapping
-
由 Daniel P. Berrange 提交于
The current SCSI hotplug support attaches a brand new SCSI controller for every disk. This is broken because the semantics differ from those used when starting the VM initially. In the latter case, each SCSI controller is filled before a new one is added. If the user specifies an high drive index (sdazz) then at initial startup, many intermediate SCSI controllers may be added with no drives. This patch changes SCSI hotplug so that it exactly matches the behaviour of initial startup. First the SCSI controller number is determined for the drive to be hotplugged. If any controller upto and including that controller number is not yet present, it is attached. Then finally the drive is attached to the last controller. NB, this breaks SCSI hotunplug, because there is no 'drive_del' command in current QEMU. Previous SCSI hotunplug was broken in any case because it was unplugging the entire controller, not just the drive in question. A future QEMU will allow proper SCSI hotunplug of a drive. This patch is derived from work done by Wolfgang Mauerer on disk controllers. * src/qemu/qemu_driver.c: Fix SCSI hotplug to add a drive to the correct controller, instead of just attaching a new controller. * 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 support for 'drive_add' command
-
由 Wolfgang Mauerer 提交于
This patch allows for explicit hotplug/unplug of SCSI controllers. Ordinarily this is not required, since QEMU/libvirt will attach a new SCSI controller whenever one is required. Allowing explicit hotplug of controllers though, enables the caller to specify a static PCI address, instead of auto-assigning the next available PCI slot. Or it will when we have static PCI addressing. This patch is derived from Wolfgang Mauerer's disk controller patch series. * src/qemu/qemu_driver.c: Support hotplug & unplug of SCSI controllers * 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 API for attaching PCI SCSI controllers
-
- 16 1月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
Convert the QEMU monitor APIs over to use virDomainDeviceAddress structs for passing addresses in/out, instead of individual bits. This makes the number of parameters smaller & easier to deal with. No functional change * src/qemu/qemu_driver.c, src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h, src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Change monitor hotplug APIs to take an explicit address ptr for all host/guest addresses
-
- 08 12月, 2009 2 次提交
-
-
由 Daniel P. Berrange 提交于
Initial support for the new QEMU monitor protocol using JSON as the data encoding format instead of plain text * po/POTFILES.in: Add src/qemu/qemu_monitor_json.c * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Hack to turn on QMP mode. Replace with a version number check on >= 0.12 later * src/qemu/qemu_monitor.c: Delegate to json monitor if enabled * src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h: Add impl of QMP protocol * src/Makefile.am: Add src/qemu/qemu_monitor_json.{c,h}
-
由 Daniel P. Berrange 提交于
The current QEMU disk media change does not support setting the disk format. The new JSON monitor will support this, so add an extra parameter to pass this info in * src/qemu/qemu_driver.c: Pass in disk format when changing media * src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c, src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Add a 'format' arg to qemuMonitorChangeMedia()
-
- 10 11月, 2009 2 次提交
-
-
由 Daniel P. Berrange 提交于
Change the QEMU monitor file handle watch to poll for both read & write events, as well as EOF. All I/O to/from the QEMU monitor FD is now done in the event callback thread. When the QEMU driver needs to send a command, it puts the data to be sent into a qemuMonitorMessagePtr object instance, queues it for dispatch, and then goes to sleep on a condition variable. The event thread sends all the data, and then waits for the reply to arrive, putting the response / error data back into the qemuMonitorMessagePtr and notifying the condition variable. There is a temporary hack in the disk passphrase callback to avoid acquiring the domain lock. This avoids a deadlock in the command processing, since the domain lock is still held when running monitor commands. The next commit will remove the locking when running commands & thus allow re-introduction of locking the disk passphrase callback * src/qemu/qemu_driver.c: Temporarily don't acquire lock in disk passphrase callback. To be reverted in next commit * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Remove raw I/O functions, and a generic qemuMonitorSend() for invoking a command * src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Remove all low level I/O, and use the new qemuMonitorSend() API. Provide a qemuMonitorTextIOProcess() method for detecting command/reply/prompt boundaries in the monitor data stream
-
由 Daniel P. Berrange 提交于
Change the QEMU driver to not directly invoke the text mode monitor APIs. Instead add a generic wrapper layer, which will eventually invoke either the text or JSON protocol code as needed. Pass an qemuMonitorPtr object into the monitor APIs instead of virDomainObjPtr to complete the de-coupling of the monitor impl from virDomainObj data structures * src/qemu/qemu_conf.h: Remove qemuDomainObjPrivate definition * src/qemu/qemu_driver.c: Add qemuDomainObjPrivate definition. Pass qemuMonitorPtr into all monitor APIs instead of the virDomainObjPtr instance. * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add thin wrappers for all qemuMonitorXXX command APIs, calling into qemu_monitor_text.c/h * src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Rename qemuMonitor -> qemuMonitorText & update to accept qemuMonitorPtr instead of virDomainObjPtr
-
- 01 10月, 2009 1 次提交
-
-
由 Chris Lalancette 提交于
The upcoming tunnelled migration needs to be able to set a migration in progress in the background, as well as be able to cancel a migration when a problem has happened. This patch allows for both of these to properly work. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 29 9月, 2009 25 次提交
-
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor_text.h: Remove qemudMonitorCommand, qemudMonitorCommandWithFd, qemudMonitorCommandWithHandler, qemudMonitorCommandExtra low level APIs * src/qemu/qemu_monitor_text.c: Replace s/qemud/qemuMonitor/
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c: Add new qemuMonitorRemoveHostNetwork() command for removing host networks * src/qemu/qemu_driver.c: Convert NIC hotplug methods over to use qemuMonitorRemoveHostNetwork()
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_conf.h, src/qemu/qemu_conf.c: Remove prefix arg from qemuBuildHostNetStr which is no longer required * src/qemu/qemu_driver.c: Refactor to use qemuMonitorAddHostNetwork() API for adding host network * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new qemuMonitorAddHostNetwork() method for adding host networks
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_conf.c: Remove separator from qemuBuildNicStr() args, and remove hardcoded 'nic' prefix. Leave it upto callers instead * src/qemu/qemu_driver.c: Switch over to using the new qemuMonitorAddPCINetwork() method for NIC hotplug * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new qemuMonitorAddPCINetwork API for PCI network device hotplug
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new qemuMonitorCloseFileHandle and qemuMonitorSendFileHandle APIs for processing file handles * src/qemu/qemu_driver.c: Convert NIC hotplug method over to use qemuMonitorCloseFileHandle and qemuMonitorSendFileHandle
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new API qemuMonitorAddPCIDisk() * src/qemu/qemu_driver.c: Convert over to using the new qemuMonitorAddPCIDisk() method, and remove now obsolete qemudEscape() method
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new API qemuMonitorRemovePCIDevice() for removing PCI device * src/qemu/qemu_driver.c: Convert all places removing PCI devices over to new qemuMonitorRemovePCIDevice() API
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new API qemuMonitorAddPCIHostDevice() * src/qemu/qemu_driver.c: Switch to using qemuMonitorAddPCIHostDevice() for PCI host device hotplug
-
由 Daniel P. Berrange 提交于
One API adds an exact device based on bus+dev, the other adds any device matching vendor+product * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new qemuMonitorAddUSBDeviceExact() and qemuMonitorAddUSBDeviceMatch() commands. * src/qemu/qemu_driver.c: Switch over to using the new qemuMonitorAddUSBDeviceExact() and qemuMonitorAddUSBDeviceMatch()
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new qemuMonitorAddUSBDisk() API * src/qemu/qemu_driver.c: Switch USB disk hotplug to the new src/qemu/qemu_driver.c API.
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new qemuMonitorMigrateToCommand() API * src/qemu/qemu_driver.c: Switch over to using the qemuMonitorMigrateToCommand() API for core dumps and save to file APIs
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new API qemuMonitorMigrateToHost() for doing TCP migration * src/qemu/qemu_driver.c: Convert to use qemuMonitorMigrateToHost(). Also handle proper URIs (tcp:// as well as tcp:)
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new qemuMonitorGetMigrationStatus() command. * src/qemu/qemu_driver.c: Use new qemuMonitorGetMigrationStatus() command to check completion status.
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_driver.c: Use new qemuMonitorSetMigrationSpeed() API during migration * src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c: Add new qemuMonitorSetMigrationSpeed() API
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add a new qemuMonitorGetBlockStatsInfo() command * src/qemu/qemu_driver.c: Remove directly use of blockstats in favour of calling qemuMonitorGetBlockStatsInfo()
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c: Add new APIs qemuMonitorSaveVirtualMemory() and qemuMonitorSavePhysicalMemory() * src/qemu/qemu_driver.c: Use the new qemuMonitorSaveVirtualMemory() and qemuMonitorSavePhysicalMemory() APIs
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new APis qemuMonitorChangeMedia and qemuMonitorEjectMedia. Pull in code for qemudEscape * src/qemu/qemu_driver.c: Remove code that directly issues 'eject' and 'change' commands in favour of API calls.
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new qemuMonitorSetBalloon() based on existing code in qemudDomainSetMemoryBalloon * src/qemu/qemu_driver.c: Remove use of qemudDomainSetMemoryBalloon() in favour of qemuMonitorSetBalloon(). Fix error code when balloon is not supported
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Pull old qemudDomainGetMemoryBalloon() code into a new method called qemuMonitorGetBalloonInfo() * src/qemu/qemu_driver.c: Update to call qemuMonitorGetBalloonInfo() and remove qemudDomainGetMemoryBalloon().
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_driver.c: Remove use of 'system_powerdown' * src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c: Add a new qemuMonitorSystemPowerdown() api call
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add a new qemuMonitorStopCPUs() API * src/qemu/qemu_driver.c: Replace direct monitor commands for 'stop' with qemuMonitorStopCPUs()
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Rename Rename qemudMonitorSendCont to qemuMonitorStartCPUs * src/qemu/qemu_driver.c: Update callers for new name
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add a new qemuMonitorSetVNCPassword() API * src/qemu/qemu_driver.c: Refactor qemudInitPasswords to call qemuMonitorSetVNCPassword()
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c: Add a new qemuMonitorGetCPUInfo() command * src/qemu/qemu_driver.c: Refactor qemudDetectVcpuPIDs to use qemuMonitorGetCPUInfo()
-
由 Daniel P. Berrange 提交于
Pull out all the QEMU monitor interaction code to a separate file. This will make life easier when we need to drop in a new implementation for the forthcoming QMP machine friendly monitor support. Next step is to add formal APIs for each monitor command, and remove direct commands for sending/receiving generic data. * src/Makefile.am: Add qemu_monitor.c to build * src/qemu/qemu_driver.c: Remove code for monitor interaction * src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: New file for monitor interaction * po/POTFILES.in: Add src/qemu/qemu_monitor_text.c
-