- 12 7月, 2011 2 次提交
-
-
由 Eric Blake 提交于
* src/qemu/qemu_driver.c (doCoreDump): Guarantee fd is closed.
-
由 Matthias Bolte 提交于
The drivers were accepting domain configs without checking if those were actually meant for them. For example the LXC driver happily accepts configs with type QEMU. Add a check for the expected domain types to the virDomainDefParse* functions.
-
- 08 7月, 2011 2 次提交
-
-
由 Michal Privoznik 提交于
When dynamic ownership is disabled we don't want to chown any files, not just local.
-
由 Eric Blake 提交于
Now that the public APIs always use unsigned flags, the internal driver callbacks might as well do likewise. * src/driver.h (vrDrvOpen, virDrvDomainCoreDump) (virDrvDomainGetXMLDesc, virDrvNetworkGetXMLDesc) (virDrvNWFilterGetXMLDesc): Update type. * src/remote/remote_protocol.x (remote_open_args) (remote_domain_core_dump_args, remote_domain_get_xml_desc_args) (remote_network_get_xml_desc_args) (remote_nwfilter_get_xml_desc_args): Likewise. * src/test/test_driver.c: Update clients. * src/remote/remote_driver.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. * src/xen/xen_hypervisor.h: Likewise. * src/xen/xen_driver.c: Likewise. * src/xen/xend_internal.c: Likewise. * src/xen/xend_internal.h: Likewise. * src/xen/xm_internal.c: Likewise. * src/xen/xm_internal.h: Likewise. * src/xen/xs_internal.c: Likewise. * src/xen/xs_internal.h: Likewise. * src/xen/xen_inotify.c: Likewise. * src/xen/xen_inotify.h: Likewise. * src/phyp/phyp_driver.c: Likewise. * src/openvz/openvz_driver.c: Likewise. * src/vmware/vmware_driver.c: Likewise. * src/vbox/vbox_driver.c: Likewise. * src/vbox/vbox_tmpl.c: Likewise. * src/xenapi/xenapi_driver.c: Likewise. * src/esx/esx_driver.c: Likewise. * src/esx/esx_interface_driver.c: Likewise. * src/esx/esx_network_driver.c: Likewise. * src/esx/esx_storage_driver.c: Likewise. * src/esx/esx_device_monitor.c: Likewise. * src/esx/esx_secret_driver.c: Likewise. * src/esx/esx_nwfilter_driver.c: Likewise. * src/interface/netcf_driver.c: Likewise. * src/nwfilter/nwfilter_driver.c: Likewise. * src/libxl/libxl_driver.c: Likewise. * src/qemu/qemu_driver.c: Likewise. * src/lxc/lxc_driver.c: Likewise. * src/uml/uml_driver.c: Likewise. * src/network/bridge_driver.c: Likewise. * src/secret/secret_driver.c: Likewise. * src/storage/storage_driver.c: Likewise. * src/node_device/node_device_hal.c: Likewise. * src/node_device/node_device_udev.c: Likewise. * src/remote_protocol-structs: Likewise.
-
- 06 7月, 2011 3 次提交
-
-
由 Matthias Bolte 提交于
Some callers expected virFileMakePath to set errno, some expected it to return an errno value. Unify this to return 0 on success and -1 on error. Set errno to report detailed error information. Also optimize virFileMakePath if stat fails with an errno different from ENOENT.
-
由 Guannan Ren 提交于
add a new API pciDeviceReAttachInit() in pci.c to initialize state values for nodedev reattach Initialize three state value of device driver to 1. This is just for a new call to qemudNodeDeviceReAttach()
-
由 Laine Stump 提交于
Although most functions with flags check to verify no application is passing in flag bits that are currently undefined, for some reason this function wasn't.
-
- 05 7月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
virFileMakePath returns an errno value on error, that will never be negative. An virFileMakePath error would have been ignored here, instead of being reported correctly.
-
- 01 7月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
The qemudDomainSaveFlag method will call EndJob on the 'vm' object it is passed in. This can result in the 'vm' object being free'd if the last reference is removed. Thus no caller of 'qemudDomainSaveFlag' must *ever* reference 'vm' again upon return. Unfortunately qemudDomainSave and qemuDomainManagedSave both call 'virDomainObjUnlock', which can result in a crash. This is non-deterministic since it involves a race with the monitor I/O thread. Fix this by making qemudDomainSaveFlag responsible for calling virDomainObjUnlock instead. * src/qemu/qemu_driver.c: Fix potential use after free when saving guests
-
- 30 6月, 2011 2 次提交
-
-
由 Wen Congyang 提交于
If we pass VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG to qemuGetSchedulerParametersFlags() or *nparams is less than 1, we will unlock qemu_driver without locking it. It's very dangerous. We should lock qemu_driver after calling virCheckFlags().
-
由 Wen Congyang 提交于
We should save domain status after modifing vcpupin. If not, we will get wrong vcpupin information after rebooting libvirtd.
-
- 29 6月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
Although we create a temporary file, it is owned by root:root and have rights 0600. In case qemu does not run under root, it is unable to write to that file and thus we transfer 0B sized file.
-
- 28 6月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
When CURRENT and FORCE flags were used together, UpdateDeviceFlags did nothing because it failed to transform CURRENT into either LIVE or CONFIG.
-
- 27 6月, 2011 1 次提交
-
-
由 Eric Blake 提交于
We already have a public virDomainPinVcpu, which implies that Pin and Vcpu are treated as separate words. Unreleased commit e261987c introduced virDomainGetVcpupinInfo as the first public API that used Vcpupin, although we had prior internal uses of that spelling. For consistency, change the spelling to be two words everywhere, regardless of whether pin comes first or last. * daemon/remote.c: Treat vcpu and pin as separate words. * include/libvirt/libvirt.h.in: Likewise. * src/conf/domain_conf.c: Likewise. * src/conf/domain_conf.h: Likewise. * src/driver.h: Likewise. * src/libvirt.c: Likewise. * src/libvirt_private.syms: Likewise. * src/libvirt_public.syms: Likewise. * src/libxl/libxl_driver.c: Likewise. * src/qemu/qemu_driver.c: Likewise. * src/remote/remote_driver.c: Likewise. * src/xen/xend_internal.c: Likewise. * tools/virsh.c: Likewise. * src/remote/remote_protocol.x: Likewise. * src/remote_protocol-structs: Likewise. Suggested by Matthias Bolte.
-
- 25 6月, 2011 2 次提交
-
-
由 Eric Blake 提交于
Caught by gcc -O2, during autobuild.sh. * src/qemu/qemu_driver.c (qemudDomainGetVcpupinInfo): Initialize vm.
-
由 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.
-