- 25 6月, 2011 1 次提交
-
-
由 Taku Izumi 提交于
This patch implements the code to address the new API (virDomainGetVcpupinInfo) in the qemu driver. Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-
- 24 6月, 2011 5 次提交
-
-
由 Eric Blake 提交于
This reverts commit 784ee08d.
-
由 Daniel P. Berrange 提交于
If an application is using libvirt + KVM as a piece of its internal infrastructure to perform a specific task, it can be desirable to guarentee the VM dies when the virConnectPtr disconnects from libvirtd. This ensures the app can't leak any VMs it was using. Adding VIR_DOMAIN_START_AUTOKILL as a flag when starting guests enables this to be done. * include/libvirt/libvirt.h.in: All VIR_DOMAIN_START_AUTOKILL * src/qemu/qemu_driver.c: Support automatic killing of guests upon connection close * tools/virsh.c: Add --autokill flag to 'start' and 'create' commands
-
由 Daniel P. Berrange 提交于
Sometimes it is useful to be able to automatically destroy a guest when a connection is closed. For example, kill an incoming migration if the client managing the migration dies. This introduces a map between guest 'uuid' strings and virConnectPtr objects. When a connection is closed, any associated guests are killed off. * src/qemu/qemu_conf.h: Add autokill hash table to qemu driver * src/qemu/qemu_process.c, src/qemu/qemu_process.h: Add APIs for performing autokill of guests associated with a connection * src/qemu/qemu_driver.c: Initialize autodestroy map
-
由 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
-
由 Eric Blake 提交于
GCC complained about a C99 for-loop declaration outside of C99 mode when compiling on RHEL 5. * src/qemu/qemu_driver.c (qemudDomainPinVcpuFlags): Avoid C99 for loop, since gcc 4.1.2 hates it.
-
- 21 6月, 2011 1 次提交
-
-
由 Cole Robinson 提交于
Since we virEventRegisterDefaultImpl is now a public API, callers need a way to invoke the default registered Handle and Timeout functions. We already have general functions for these internally, so promote them to the public API. v2: Actually add APIs to libvirt.h
-
- 20 6月, 2011 3 次提交
-
-
由 Taku Izumi 提交于
Pinning to all physical cpus means resetting, hence it is preferable to delete vcpupin setting of XML. This patch changes qemu driver to delete vcpupin setting by invoking virDomainVcpupinDel API when pinning the specified virtual cpu to all host physical cpus. Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-
由 Hu Tao 提交于
-
由 Hu Tao 提交于
-
- 17 6月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
-
- 15 6月, 2011 3 次提交
-
-
由 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>
-
由 Minoru Usui 提交于
Signed-off-by: NMinoru Usui <usui@mxm.nes.nec.co.jp>
-
由 Minoru Usui 提交于
Signed-off-by: NMinoru Usui <usui@mxm.nes.nec.co.jp>
-
- 14 6月, 2011 1 次提交
-
-
由 Hu Tao 提交于
This patch deprecates following enums: VIR_DOMAIN_MEM_CURRENT VIR_DOMAIN_MEM_LIVE VIR_DOMAIN_MEM_CONFIG VIR_DOMAIN_VCPU_LIVE VIR_DOMAIN_VCPU_CONFIG VIR_DOMAIN_DEVICE_MODIFY_CURRENT VIR_DOMAIN_DEVICE_MODIFY_LIVE VIR_DOMAIN_DEVICE_MODIFY_CONFIG And modify internal codes to use virDomainModificationImpact.
-
- 13 6月, 2011 2 次提交
-
-
由 Taku Izumi 提交于
This patch implements the new API (virDomainPinVcpuFlags) in the qemu driver.
-
由 Jiri Denemark 提交于
-
- 07 6月, 2011 1 次提交
-
-
由 Cole Robinson 提交于
v2: Have virCommand cleanup intermediate process for us v3: Preserve original FD closing behavior Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 04 6月, 2011 1 次提交
-
-
由 Eric Blake 提交于
This commit is safe precisely because there has been no release for any of the enum values being deleted (they were added post-0.9.1). After the 0.9.2 release, we can then take advantage of virDomainModificationImpact in more places. * include/libvirt/libvirt.h.in (virDomainModificationImpact): New enum. (virDomainSchedParameterFlags, virMemoryParamFlags): Delete, since these were never released, and the new enum works fine here. * src/libvirt.c (virDomainGetMemoryParameters) (virDomainSetMemoryParameters) (virDomainGetSchedulerParametersFlags) (virDomainSetSchedulerParametersFlags): Update documentation. * src/qemu/qemu_driver.c (qemuDomainSetMemoryParameters) (qemuDomainGetMemoryParameters, qemuSetSchedulerParametersFlags) (qemuSetSchedulerParameters, qemuGetSchedulerParametersFlags) (qemuGetSchedulerParameters): Adjust clients. * tools/virsh.c (cmdSchedinfo, cmdMemtune): Likewise. Based on ideas by Daniel Veillard and Hu Tao.
-
- 03 6月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
The change 18c2a592 caused some regressions in behaviour of virDomainBlockStats and virDomainBlockInfo in the QEMU driver. The virDomainBlockInfo API stopped working for inactive guests if querying a block device. The virDomainBlockStats API did not promptly report an error if the guest was not running in some cases. * src/qemu/qemu_driver.c: Fix inactive guest handling in BlockStats/Info APIs
-
- 02 6月, 2011 3 次提交
-
-
由 Daniel P. Berrange 提交于
* src/conf/domain_conf.c, src/conf/domain_conf.h: APIs for inserting/finding/removing virDomainLeaseDefPtr instances * src/qemu/qemu_driver.c: Wire up hotplug/unplug for leases * src/qemu/qemu_hotplug.h, src/qemu/qemu_hotplug.c: Support for hotplug and unplug of leases
-
由 Daniel P. Berrange 提交于
Some lock managers associate state with leases, allowing a process to temporarily release its leases, and re-acquire them later, safe in the knowledge that no other process has acquired + released the leases in between. This is already used between suspend/resume operations, and must also be used across migration. This passes the lockstate in the migration cookie. If the lock manager uses lockstate, then it becomes compulsory to use the migration v3 protocol to get the cookie support. * src/qemu/qemu_driver.c: Validate that migration v2 protocol is not used if lock manager needs state transfer * src/qemu/qemu_migration.c: Transfer lock state in migration cookie XML
-
由 Daniel P. Berrange 提交于
The QEMU integrates with the lock manager instructure in a number of key places * During startup, a lock is acquired in between the fork & exec * During startup, the libvirtd process acquires a lock before setting file labelling * During shutdown, the libvirtd process acquires a lock before restoring file labelling * During hotplug, unplug & media change the libvirtd process holds a lock while setting/restoring labels The main content lock is only ever held by the QEMU child process, or libvirtd during VM shutdown. The rest of the operations only require libvirtd to hold the metadata locks, relying on the active QEMU still holding the content lock. * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h, src/qemu/libvirtd_qemu.aug, src/qemu/test_libvirtd_qemu.aug: Add config parameter for configuring lock managers * src/qemu/qemu_driver.c: Add calls to the lock manager
-
- 29 5月, 2011 2 次提交
-
-
由 Eric Blake 提交于
* src/qemu/qemu_driver.c (qemuGetSchedulerParameters): Move guts... (qemuGetSchedulerParametersFlags): ...to new callback, and honor flags more accurately.
-
由 Eric Blake 提交于
Rather mechanical in nature. * src/driver.h: Use newer virTypedParameter API names. * src/libvirt.c: Likewise. * daemon/remote.c: Likewise. * src/esx/esx_driver.c: Likewise. * src/libxl/libxl_driver.c: Likewise. * src/lxc/lxc_driver.c: Likewise. * src/qemu/qemu_driver.c: Likewise. * src/remote/remote_driver.c: Likewise. * src/test/test_driver.c: Likewise. * src/xen/xen_driver.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. * src/xen/xen_hypervisor.h: Likewise. * src/xen/xend_internal.c: Likewise. * tools/virsh.c: Likewise.
-
- 27 5月, 2011 4 次提交
-
-
由 Hu Tao 提交于
* src/qemu/qemu_driver.c: update qemuDomainSetMemoryParameters to look at the flag parameter and depending on it save the config or the live amount
-
由 Hu Tao 提交于
* src/qemu/qemu_driver.c: update qemuDomainGetMemoryParameters to look at the flag parameter and depending on it read the config or the live amount
-
由 KAMEZAWA Hiroyuki 提交于
This patch allows to modify interfaces of domain(qemu) * src/conf/domain_conf.c src/conf/domain_conf.h src/libvirt_private.syms: (virDomainNetInsert) : Insert a network device to domain definition. (virDomainNetIndexByMac) : Returns an index of net device in array. (virDomainNetRemoveByMac): Remove a NIC of passed MAC address. * src/qemu/qemu_driver.c (qemuDomainAttachDeviceConfig): add codes for NIC. (qemuDomainDetachDeviceConfig): add codes for NIC.
-
由 Federico Simoncelli 提交于
Originally most of libvirt domain-specific calls were blocking during a migration. A new mechanism to allow specific calls (blkstat/blkinfo) to be executed in such condition has been implemented. In the long term it'd be desirable to get a more general solution to mark further APIs as migration safe, without needing special case code. * src/qemu/qemu_migration.c: add some additional job signal flags for doing blkstat/blkinfo during a migration * src/qemu/qemu_domain.c: add a condition variable that can be used to efficiently wait for the migration code to clear the signal flag * src/qemu/qemu_driver.c: execute blkstat/blkinfo using the job signal flags during migration
-
- 26 5月, 2011 1 次提交
-
-
由 Markus Groß 提交于
When modifying the disk devices of a live domain and the domain configuration, the function qemuDomainAttachDeviceConfig first sets dev->data->disk to NULL. Later qemuDomainAttachDeviceLive accesses dev->data.disk and causes a segfault. * src/qemu/qemu_driver.c: fix qemuDomainModifyDeviceFlags() accordingly
-
- 25 5月, 2011 5 次提交
-
-
由 Daniel P. Berrange 提交于
The current virDomainMigrateFinish3 method signature attempts to distinguish two types of errors, by allowing return with ret== 0, but ddomain == NULL, to indicate a failure to start the guest. This is flawed, because when ret == 0, there is no way for the virErrorPtr details to be sent back to the client. Change the signature of virDomainMigrateFinish3 so it simply returns a virDomainPtr, in the same way as virDomainMigrateFinish2 The disk locking code will protect against the only possible failure mode this doesn't account for (loosing conenctivity to libvirtd after Finish3 starts the CPUs, but before the client sees the reply for Finish3). * src/driver.h, src/libvirt.c, src/libvirt_internal.h: Change virDomainMigrateFinish3 to return a virDomainPtr instead of int * src/remote/remote_driver.c, src/remote/remote_protocol.x, daemon/remote.c, src/qemu/qemu_driver.c, src/qemu/qemu_migration.c: Update for API change
-
由 Daniel P. Berrange 提交于
When doing migration, if an error occurs in Perform, it must not be overwritten during Finish/Confirm steps. If an error occurs in Finish, it must not be overwritten in Confirm. Previous commit a9d12c24 added code to qemudDomainMigrateFinish2 to preserve the error. This is not the right place, because it is not applicable in non-p2p migration. The src/libvirt.c virDomainMigrateV2/3 methods need code to preserve errors for non-p2p migration, while the doPeer2PeerMigrate2 and doPeer2PeerMigrate3 methods contain code to preverse errors for p2p migration. Remove the bogus error preservation from qemudDomainMigrateFinish2 and qemudDomainMigrateFinish3. Fix virDomainMigrateV3 and doPeer2PeerMigrate3 so that they preserve any error hit during the Finish3 step, before invoking Confirm3. Finally if qemuMigrationFinish fails to resume the CPUs, it must preserve the error before tearing down the VM, so that VM cleanup doesn't overwrite it. * src/libvirt.c: Preserve error before invoking Confirm3 * src/qemu/qemu_driver.c: Remove bogus error preservation code in qemudDomainMigrateFinish2/qemudDomainMigrateFinish3 * src/qemu/qemu_migration.c: Preserve error before invoking Confirm3 and after resume fails in qemuMigrationFinish.
-
由 Daniel P. Berrange 提交于
Even when failing to start CPUs, the finish method was returning a success result. Fix this so that the QEMU process is killed off when finish fails under v3 protocol. Also rename the killOnFinish boolean to 'v3proto' to make it clearer that this is a tunable based on the migration protocol version * src/qemu/qemu_driver.c: Update for API change * src/qemu/qemu_migration.c, src/qemu/qemu_migration.h: Kill VM in qemuMigrationFinish if failing to start CPUs
-
由 Daniel P. Berrange 提交于
The virDomainMigratePerform3 currently has a single URI parameter whose meaning varies. It is either - A QEMU migration URI (normal migration) - A libvirtd connection URI (peer2peer migration) Unfortunately when using peer2peer migration, without also using tunnelled migration, it is possible that both URIs are required. This adds a second URI parameter to the virDomainMigratePerform3 method, to cope with this scenario. Each parameter how has a fixed meaning. NB, there is no way to actually take advantage of this yet, since virDomainMigrate/virDomainMigrateToURI do not have any way to provide the 2 separate URIs * daemon/remote.c, src/remote/remote_driver.c, src/remote/remote_protocol.x, src/remote_protocol-structs: Add the second URI parameter to perform3 message * src/driver.h, src/libvirt.c, src/libvirt_internal.h: Add the second URI parameter to Perform3 method * src/libvirt_internal.h, src/qemu/qemu_migration.c, src/qemu/qemu_migration.h: Update to handle URIs correctly
-
由 Daniel P. Berrange 提交于
This extends the v3 migration protocol such that the virDomainMigrateBegin3 and virDomainMigratePerform3 methods accept an application supplied XML config for the target VM. If the 'xmlin' parameter is NULL, then Begin3 uses the current guest XML as normal. A driver implementing the Begin3 method should either reject all non-NULL 'xmlin' parameters, or strictly validate that the app supplied XML does not change guest ABI. The Perform3 method also needed the xmlin parameter to cope with the Peer2Peer migration sequence. NB it is not yet possible to use this capability since neither of the public virDomainMigrate/virDomainMigrateToURI methods have a way to pass in XML. * daemon/remote.c, src/remote/remote_driver.c, src/remote/remote_protocol.x, src/remote_protocol-structs: Add 'remote_string xmlin' parameter to begin3/perform3 RPC messages * src/libvirt.c, src/driver.h, src/libvirt_internal.h: Add 'const char *xmlin' parameter to Begin3/Perform3 methods * src/qemu/qemu_driver.c, src/qemu/qemu_migration.c, src/qemu/qemu_migration.h: Pass xmlin parameter around migration methods
-
- 24 5月, 2011 2 次提交
-
-
由 Michal Privoznik 提交于
Saving domain to previously created file changes also its ownership. This is certainly not what users want if some conditions are met: it is a regular, local file and dynamic_ownership is off.
-
由 Daniel P. Berrange 提交于
The qemuMigrationConfirm method shouldn't deal with final VM cleanup, since it can be called from the peer2peer migration, which expects to still use the 'vm' object afterwards. Push the cleanup code out of qemuMigrationConfirm, into its caller, qemuDomainMigrateConfirm3 * src/qemu/qemu_driver.c: Add VM cleanup code to qemuDomainMigrateConfirm3 * src/qemu/qemu_migration.c, src/qemu/qemu_migration.h: Remove job handling cleanup from qemuMigrationConfirm
-
- 20 5月, 2011 1 次提交
-
-
由 Richard W.M. Jones 提交于
Otherwise qemu is unable to write to it, with the error: libvir: QEMU error : internal error unable to execute QEMU command 'memsave': Could not open '/var/cache/libvirt/qemu/qemu.mem.RRNvLv'
-
- 19 5月, 2011 2 次提交
-
-
由 Daniel P. Berrange 提交于
The v2 migration protocol had a limit on cookie length that was too small to be useful for QEMU. Avoid generating cookies with v2 protocol, so that old libvirtd can still reliably migrate a guest to new libvirtd uses v2 protocol. * src/qemu/qemu_driver.c: Avoid migration cookies with v2 migration
-
由 Matthias Bolte 提交于
Improve invalid argument checks in the size query case. The drivers already relied on this unchecked behavior. Relax the implementation of virDomainGet(Memory|Blkio)MemoryParameters in the drivers and allow to pass more memory than necessary for all parameters.
-