- 23 12月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
This patch adds max_files option to qemu.conf which can be used to override system default limit on number of opened files that are allowed for qemu user.
-
- 22 12月, 2011 1 次提交
-
-
由 Osier Yang 提交于
Upstream QEMU starts to support it from commit 2c74c2cb.
-
- 21 12月, 2011 10 次提交
-
-
由 Stefan Berger 提交于
Remove the requirement that DHCP messages have to be broadcasted. DHCP requests are most often sent via broadcast but can be directed towards a specific DHCP server. For example 'dhclient' takes '-s <server>' as a command line parameter thus allowing DHCP requests to be sent to a specific DHCP server.
-
由 Osier Yang 提交于
-
由 Michael Ellerman 提交于
Add logic to assign addresses for devices with spapr-vio addresses. We also do validation of addresses specified by the user, ie. ensuring that there are not duplicate addresses on the bus. Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
-
由 Michael Ellerman 提交于
For QEMU PPC64 we have a machine type ("pseries") which has a virtual bus called "spapr-vio". We need to be able to create devices on this bus, and as such need a way to specify the address for those devices. This patch adds a new address type "spapr-vio", which achieves this. The addressing is specified with a "reg" property in the address definition. The reg is optional, if it is not specified QEMU will auto-assign an address for the device. Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
-
由 Michael Ellerman 提交于
Currently non-x86 guests must have <acpi/> defined in <features> to prevent libvirt from running qemu with -no-acpi. Although it works, it is a hack. Instead add a capability flag which indicates whether qemu understands the -no-acpi option. Use it to control whether libvirt emits -no-acpi. Current versions of qemu always display -no-acpi in their help output, so this patch has no effect. However the development version of qemu has been modified such that -no-acpi is only displayed when it is actually supported. Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
-
由 Hu Tao 提交于
-
由 Hu Tao 提交于
-
由 Hu Tao 提交于
Set up the types for the numa functions and insert them into the virDriver structure definition.
-
由 Hu Tao 提交于
This patch also sets cgroup cpuset parameters for numatune.
-
由 Hu Tao 提交于
-
- 20 12月, 2011 1 次提交
-
-
由 Eric Blake 提交于
The RPC code had several latent memory leaks and an attempt to free the wrong string, but thankfully nothing triggered them (blkiotune was the only one returning a string, and always as the last parameter). Also, our cleanups for rpcgen ended up nuking a line of code that renders VIR_TYPED_PARAM_INT broken, because it was the only use of 'i' in a function, even though it was a member usage rather than a standalone declaration. * daemon/remote.c (remoteSerializeTypedParameters): Free the correct array element. (remoteDispatchDomainGetSchedulerParameters) (remoteDispatchDomainGetSchedulerParametersFlags) (remoteDispatchDomainBlockStatsFlags) (remoteDispatchDomainGetMemoryParameters): Don't leak strings. * src/rpc/genprotocol.pl: Don't nuke member-usage of 'buf' or 'i'.
-
- 19 12月, 2011 8 次提交
-
-
由 Daniel P. Berrange 提交于
The lifetime of the virDomainEventState object is tied to the lifetime of the driver, which in stateless drivers is tied to the lifetime of the virConnectPtr. If we add & remove a timer when allocating/freeing the virDomainEventState object, we can get a situation where the timer still triggers once after virDomainEventState has been freed. The timeout callback can't keep a ref on the event state though, since that would be a circular reference. The trick is to only register the timer when a callback is registered with the event state & remove the timer when the callback is unregistered. The demo for the bug is to run while true ; do date ; ../tools/virsh -q -c test:///default 'shutdown test; undefine test; dominfo test' ; done prior to this fix, it will frequently hang and / or crash, or corrupt memory
-
由 Daniel P. Berrange 提交于
Currently all drivers using domain events need to provide a callback for handling a timer to dispatch events in a clean stack. There is no technical reason for dispatch to go via driver specific code. It could trivially be dispatched directly from the domain event code, thus removing tedious boilerplate code from all drivers Also fix the libxl & xen drivers to pass 'true' when creating the virDomainEventState, since they run inside the daemon & thus always expect events to be present. * src/conf/domain_event.c, src/conf/domain_event.h: Internalize dispatch of events from timer callback * src/libxl/libxl_driver.c, src/lxc/lxc_driver.c, src/qemu/qemu_domain.c, src/qemu/qemu_driver.c, src/remote/remote_driver.c, src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/xen/xen_driver.c: Remove all timer dispatch functions
-
由 Daniel P. Berrange 提交于
The virDomainEventCallbackList and virDomainEventQueue APIs are now solely helpers used internally by virDomainEventState APIs. Remove their decls from domain_event.h since no driver code should need to use them any more. * src/conf/domain_event.c: Make virDomainEventCallbackList and virDomainEventQueue APIs static & remove some unused APIs * src/conf/domain_event.h, src/libvirt_private.syms: Remove virDomainEventCallbackList and virDomainEventQueue APIs
-
由 Daniel P. Berrange 提交于
No caller of the domain events APIs should need to poke at the struct internals. Thus they should all be removed from the header file * src/conf/domain_event.h: Remove struct definitions * src/conf/domain_event.c: Add struct definitions
-
由 Daniel P. Berrange 提交于
* src/libxl/libxl_driver.c, src/lxc/lxc_driver.c, src/qemu/qemu_driver.c, src/remote/remote_driver.c, src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/xen/xen_driver.c: Convert to threadsafe APIs
-
由 Daniel P. Berrange 提交于
While virDomainEventState has APIs for managing removal of callbacks, while locked, adding callbacks in the first place requires direct access to the virDomainEventCallbackList structure. This is not threadsafe since it is bypassing the virDomainEventState locks * src/conf/domain_event.c, src/conf/domain_event.h, src/libvirt_private.syms: Add APIs for managing callbacks via virDomainEventState.
-
由 Daniel P. Berrange 提交于
When registering a callback for a particular event some callers need to know how many callbacks already exist for that event. While it is possible to ask for a count, this is not free from race conditions when threaded. Thus the API for registering callbacks should return the count of callbacks. Also rename virDomainEventStateDeregisterAny to virDomainEventStateDeregisterID * src/conf/domain_event.c, src/conf/domain_event.h, src/libvirt_private.syms: Return count of callbacks when registering callbacks * src/libxl/libxl_driver.c, src/libxl/libxl_driver.c, src/qemu/qemu_driver.c, src/remote/remote_driver.c, src/remote/remote_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/xen/xen_driver.c: Update for change in APIs
-
由 Daniel P. Berrange 提交于
The Xen & VBox drivers deal with callbacks & dispatching of events directly. All the other drivers use a timer to dispatch events from a clean stack state, rather than deep inside the drivers. Convert Xen & VBox over to virDomainEventState so that they match behaviour of other drivers * src/conf/domain_event.c: Return count of remaining callbacks when unregistering event callback * src/vbox/vbox_tmpl.c, src/xen/xen_driver.c, src/xen/xen_driver.h: Convert to virDomainEventState
-
- 17 12月, 2011 1 次提交
-
-
由 Stefan Berger 提交于
If only iptables rules are created then two unnecessary ebtables chains are also created. This patch fixes this and prevents these chains from being created. They have been cleaned up properly, though.
-
- 16 12月, 2011 4 次提交
-
-
由 Peter Krempa 提交于
A generic error code was returned, if the user aborted a migration job. This made it hard to distinguish between a user requested abort and an error that might have occured. This patch introduces a new error code, which is returned in the specific case of a user abort, while leaving all other failures with their existing code. This makes it easier to distinguish between failure while mirgrating and an user requested abort. * include/libvirt/virterror.h: - add new error code * src/util/virterror.c: - add message for the new error code * src/qemu/qemu_migration.h: - Emit operation aborted error instead of operation failed, on migration abort
-
由 Eric Blake 提交于
If managed save fails at the right point in time, then the save image can end up with 0 bytes in length (no valid header), and our attempts in commit 55d88def to detect and skip invalid save files missed this case. * src/qemu/qemu_driver.c (qemuDomainSaveImageOpen): Also unlink empty file as corrupt. Reported by Dennis Householder.
-
由 Michal Privoznik 提交于
Currently, on device detach, we parse given XML, find the device in domain object, free it and try to restore security labels. However, in some cases (e.g. usb hostdev) parsed XML contains less information than freed device. In usb case it is bus & device IDs. These are needed during label restoring as a symlink into /dev/bus is generated from them. Therefore don't drop device configuration until security labels are restored.
-
由 Jim Fehlig 提交于
In commit 6f84e110 I mistakenly set default migration speed to 33554432 Mb! The units of migMaxBandwidth is Mb, with conversion handled in qemuMonitor{JSON,Text}SetMigrationSpeed(). Also, remove definition of QEMU_DOMAIN_FILE_MIG_BANDWIDTH_MAX since it is no longer used after reverting commit ef1065cf.
-
- 15 12月, 2011 3 次提交
-
-
由 Jiri Denemark 提交于
If an async job run on a domain will stop the domain at the end of the job, a concurrently run query job can hang in qemu monitor and nothing can be done with that domain from this point on. An attempt to start such domain results in "Timed out during operation: cannot acquire state change lock" error. However, quite a few things have to happen at the right time... There must be an async job running which stops a domain at the end. This race was reported with dump --crash but other similar jobs, such as (managed)save and migration, should be able to trigger this bug as well. While this async job is processing its last monitor command, that is a query-migrate to which qemu replies with status "completed", a new libvirt API that results in a query job must arrive and stay waiting until the query-migrate command finishes. Once query-migrate is done but before the async job closes qemu monitor while stopping the domain, the other thread needs to wake up and call qemuMonitorSend to send its command to qemu. Before qemu gets a chance to respond to this command, the async job needs to close the monitor. At this point, the query job thread is waiting for a condition that no-one will ever signal so it never finishes the job.
-
由 Osier Yang 提交于
* src/qemu/qemu_hostdev.c (qemuDomainReAttachHostdevDevices): pciDeviceListFree(pcidevs) in the end free()s the device even if it's in use by other domain, which can cause a race. How to reproduce: <script> virsh nodedev-dettach pci_0000_00_19_0 virsh start test virsh attach-device test hostdev.xml virsh start test2 for i in {1..5}; do echo "[ -- ${i}th time --]" virsh nodedev-reattach pci_0000_00_19_0 done echo "clean up" virsh destroy test virsh nodedev-reattach pci_0000_00_19_0 </script> Device pci_0000_00_19_0 dettached Domain test started Device attached successfully error: Failed to start domain test2 error: Requested operation is not valid: PCI device 0000:00:19.0 is in use by domain test [ -- 1th time --] Device pci_0000_00_19_0 re-attached [ -- 2th time --] Device pci_0000_00_19_0 re-attached [ -- 3th time --] Device pci_0000_00_19_0 re-attached [ -- 4th time --] Device pci_0000_00_19_0 re-attached [ -- 5th time --] Device pci_0000_00_19_0 re-attached clean up Domain test destroyed Device pci_0000_00_19_0 re-attached The patch also fixes another problem, there won't be error like "qemuDomainReAttachHostdevDevices: Not reattaching active device 0000:00:19.0" in daemon log if some device is in active. As pciResetDevice and pciReattachDevice won't be called for the device anymore. This is sensible as we already reported error when preparing the device if it's active. Blindly trying to pciResetDevice & pciReattachDevice on the device and getting an error is just redundant.
-
由 Osier Yang 提交于
This patch fixes two problems: 1) The device will be reattached to host even if it's not managed, as there is a "pciDeviceSetManaged". 2) The device won't be reattached to host with original driver properly. As it doesn't honor the device original properties which are maintained by driver->activePciHostdevs.
-
- 14 12月, 2011 1 次提交
-
-
由 Lei Li 提交于
This chunk of code below repeated in several functions, factor it into a helper method virDomainLiveConfigHelperMethod to eliminate duplicated code based on Eric and Adam's suggestion. I have tested it for all the relevant APIs changed. Signed-off-by: NEric Blake <eblake@redhat.com> Signed-off-by: NLei Li <lilei@linux.vnet.ibm.com>
-
- 13 12月, 2011 1 次提交
-
-
由 Osier Yang 提交于
If the vol object is newly created, it increases the volumes count, but doesn't decrease the volumes count when do cleanup. It can cause libvirtd to crash when one trying to free the volume objects like: for (i = 0; i < pool->volumes.count; i++) virStorageVolDefFree(pool->volumes.objs[i]); It's more reliable if we add the newly created vol object in the end.
-
- 12 12月, 2011 3 次提交
-
-
由 Jiri Denemark 提交于
When destroying a domain qemuDomainDestroy kills its qemu process and starts a new job, which means it unlocks the domain object and locks it again after some time. Although the object is usually unlocked for a pretty short time, chances are another thread processing an EOF event on qemu monitor is able to lock the object first and does all the cleanup by itself. This leads to wrong shutoff reason and lifecycle event detail and virDomainDestroy API incorrectly reporting failure to destroy an inactive domain. Reported by Charlie Smurthwaite.
-
由 Rommer 提交于
Current "-ay | -an" has problems on pool starting/refreshing if the volumes are clustered. Rommer has posted a patch to list 2 months ago. https://www.redhat.com/archives/libvir-list/2011-October/msg01116.html But IMO we shouldn't skip the inactived vols. So this is a squashed patch by Rommer. Signed-off-by: NRommer <rommer@active.by>
-
由 Josh Durgin 提交于
Network disks don't have paths to be resolved or files to be checked for ownership. ee3efc41 checked this for some image label functions, but was partially reverted in a refactor. This finishes adding the check to each security driver's set and restore label methods for images. Signed-off-by: NJosh Durgin <josh.durgin@dreamhost.com>
-
- 10 12月, 2011 6 次提交
-
-
由 Laine Stump 提交于
This patch addresses https://bugzilla.redhat.com/show_bug.cgi?id=760442 When a network has any forward type other than route, nat or none, the network configuration should be done completely external to libvirt - libvirt only uses these types to allow configuring guests in a manner that isn't tied to a specific host (all the host-specific information, in particular interface names, port profile data, and bandwidth configuration is in the network definition, and the guest configuration only references it). Due to a bug in the bridge network driver, libvirt was adding iptables rules for networks with forward type='bridge' etc. any time libvirtd was restarted while one of these networks was active. This patch eliminates that error by only "reloading" iptables rules if forward type is route, nat, or none.
-
由 Michael Ellerman 提交于
Currently qemuDomainAssignPCIAddresses() is called to assign addresses to PCI devices. We need to do something similar for devices with spapr-vio addresses. So create one place where address assignment will be done, that is qemuDomainAssignAddresses(). Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
-
由 Michael Ellerman 提交于
For the PPC64 pseries machine type we need to add address information for the spapr-vty device. Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
-
由 Michael Ellerman 提交于
On the PPC64 pseries machine type we need to use the spapr-vscsi device rather than an lsi. Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
-
由 Eric Blake 提交于
In QEMU PPC64 we have a network device called "spapr-vlan". We can specify this using the existing syntax for network devices, however libvirt currently rejects "spapr-vlan" in virDomainNetDefParseXML() because of the "-". Fix the code to accept "-". * src/conf/domain_conf.c (virDomainNetDefParseXML): Allow '-' in model name, and be more efficient. * docs/schemas/domaincommon.rng: Limit valid model names to match code. Based on a patch by Michael Ellerman.
-
由 Michal Privoznik 提交于
instead of simple 'if' statement as virCondWait can return even if associated condition was not signaled.
-