- 17 7月, 2012 1 次提交
-
-
由 Stefan Berger 提交于
Introduce new members in the virMacAddr 'class' - virMacAddrSet: set virMacAddr from a virMacAddr - virMacAddrSetRaw: setting virMacAddr from raw 6 byte MAC address buffer - virMacAddrGetRaw: writing virMacAddr into raw 6 byte MAC address buffer - virMacAddrCmp: comparing two virMacAddr - virMacAddrCmpRaw: comparing a virMacAddr with a raw 6 byte MAC address buffer then replace raw MAC addresses by replacing - 'unsigned char *' with virMacAddrPtr - 'unsigned char ... [VIR_MAC_BUFLEN]' with virMacAddr and introduce usage of above functions where necessary.
-
- 14 7月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
When the guest changes its memory balloon applications may want to know what the new value is, without having to periodically poll on XML / domain info. Introduce a "balloon change" event to let apps see this * include/libvirt/libvirt.h.in: Define the virConnectDomainEventBalloonChangeCallback callback and VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE constant * python/libvirt-override-virConnect.py, python/libvirt-override.c: Wire up helpers for new event * daemon/remote.c: Helper for serializing balloon event * examples/domain-events/events-c/event-test.c, examples/domain-events/events-python/event-test.py: Add example of balloon event usage * src/conf/domain_event.c, src/conf/domain_event.h: Handling of balloon events * src/remote/remote_driver.c: Add handler of balloon events * src/remote/remote_protocol.x: Define wire protocol for balloon events * src/remote_protocol-structs: Likewise. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 11 7月, 2012 2 次提交
-
-
由 Osier Yang 提交于
Per the typical use of libvirt is to fork the qemu process with qemu:qemu. Setting the pool permission mode as 0700 by default will prevent the guest start with permission reason. Define macro for the default pool and vol permission modes incidentally.
-
由 Viktor Mihajlovski 提交于
The s390(x) architecture doesn't feature a PCI bus. For the purpose of supporting virtio devices a virtual bus called virtio-s390 is used. A new address type VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_S390 is used to distinguish the virtio devices on s390 from PCI-based virtio devices. V3 Change: updated QEMU_CAPS_VIRTIO_S390 to fit upstream. Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
-
- 09 7月, 2012 1 次提交
-
-
由 Peter Krempa 提交于
-
- 03 7月, 2012 1 次提交
-
-
由 Hendrik Schwartke 提交于
Introducing the attribute vendor_id to force the CPUID instruction in a kvm guest to return the specified vendor.
-
- 30 6月, 2012 2 次提交
-
-
由 Eric Blake 提交于
Reported by Jason Helfman as a build-breaker on FreeBSD. * src/conf/domain_conf.c (virDomainFSDefParseXML): Use POSIX spelling. * src/openvz/openvz_conf.c (openvzReadFSConf): Likewise.
-
由 Stefan Berger 提交于
Below patch fixes this coverity report: /libvirt/src/conf/nwfilter_conf.c:382: leaked_storage: Variable "varAccess" going out of scope leaks the storage it points to.
-
- 29 6月, 2012 1 次提交
-
-
由 Peter Krempa 提交于
If the user specified invalid protocol type in a network's SRV record the error path ended up in freeing uninitialized pointers causing a daemon crash. *network_conf.c: virNetworkDNSSrvDefParseXML(): initialize local variables
-
- 28 6月, 2012 2 次提交
-
-
由 Peter Krempa 提交于
virGetDomain() does a good job of reporting errors itself. This patch removes shadowing of that error in virDomainListPopulate().
-
由 Peter Krempa 提交于
The ignore_value macro is used across libvirt. This patch includes it in the internal header and cleans all other includes.
-
- 27 6月, 2012 1 次提交
-
-
由 Michal Privoznik 提交于
virConnectDomainEventRegisterAny() takes a domain as an argument. So it should be possible to register the same event (be it VIR_DOMAIN_EVENT_ID_LIFECYCLE for example) for two different domains. That is, we need to take domain into account when searching for duplicate event being already registered.
-
- 25 6月, 2012 3 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
Currently you can configure LXC to bind a host directory to a guest directory, but not to bind a guest directory to a guest directory. While the guest container init could do this itself, allowing it in the libvirt XML means a stricter SELinux policy can be written
-
由 Daniel P. Berrange 提交于
Introduce a new syntax for filesystems to allow use of a RAM filesystem <filesystem type='ram'> <source usage='10' units='MiB'/> <target dir='/mnt'/> </filesystem> The usage units default to KiB to limit consumption of host memory. * docs/formatdomain.html.in: Document new syntax * docs/schemas/domaincommon.rng: Add new attributes * src/conf/domain_conf.c: Parsing/formatting of RAM filesystems * src/lxc/lxc_container.c: Mounting of RAM filesystems Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 21 6月, 2012 1 次提交
-
-
由 Gerd Hoffmann 提交于
qemu 1.1 features a xhci controller, this patch adds support for it. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 20 6月, 2012 3 次提交
-
-
由 Eric Blake 提交于
Wraps the conversion from 'char *name' to virDomainSnapshotPtr in a reusable manner. * src/conf/virdomainlist.h (virDomainListSnapshots): New declaration. * src/conf/virdomainlist.c (virDomainListSnapshots): Implement it. * src/libvirt_private.syms (virdomainlist.h): Export it.
-
由 Eric Blake 提交于
It turns out that one-bit filtering makes it hard to select the inverse set, so it is easier to provide filtering groups. For back-compat, omitting all bits within a group means the group is not used for filtering, and by definition of a group (each snapshot matches exactly one bit within the group, and the set of bits in the group covers all snapshots), selecting all bits also makes the group useless. Unfortunately, virDomainSnapshotListChildren defined the bit VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS as an expansion rather than a filter, so we cannot make it part of a filter group, so that bit (and its counterpart VIR_DOMAIN_SNAPSHOT_LIST_ROOTS for virDomainSnapshotList) remains a single control bit. * include/libvirt/libvirt.h.in (virDomainSnapshotListFlags): Add a couple more flags. * src/libvirt.c (virDomainSnapshotNum) (virDomainSnapshotNumChildren): Document them. (virDomainSnapshotListNames, virDomainSnapshotListChildrenNames): Likewise, and add thread-safety caveats. * src/conf/virdomainlist.h (VIR_DOMAIN_SNAPSHOT_FILTERS_*): New convenience macros. * src/conf/domain_conf.c (virDomainSnapshotObjListCopyNames) (virDomainSnapshotObjListCount): Support the new flags.
-
由 Martin Kletzander 提交于
Until now, it was possible to crash libvirtd when defining domain with channel device with missing source element. When creating new virDomainChrDef, target.port is set to -1, but unfortunately it is an union with addresses that virDomainChrDefFree tries to free in case the deviceType is channel. Having the port set to -1 is intended, however the cleanest way to get around the problems with the crash seems to be renumbering the VIR_DOMAIN_CHR_CHANNEL_ target types to cover new NONE type (with value 0) being the default (no target type yet).
-
- 19 6月, 2012 5 次提交
-
-
由 Eric Blake 提交于
Another case where we can do the same amount of work with fewer lines of redundant code, which will make adding new filters easier. * src/conf/domain_conf.c (virDomainSnapshotNameData): Adjust struct. (virDomainSnapshotObjListCount): Delete, now taken care of... (virDomainSnapshotObjListCopyNames): ...here. (virDomainSnapshotObjListGetNames): Adjust caller to handle counting. (virDomainSnapshotObjListNum): Simplify.
-
由 Eric Blake 提交于
Now that domain listing is a thin wrapper around child listing, it's easier to have a common entry point. This restores the hashForEach optimization lost in the previous patch when there are no snapshots being filtered out of the entire list. * src/conf/domain_conf.h (virDomainSnapshotObjListGetNames) (virDomainSnapshotObjListNum): Add parameter. (virDomainSnapshotObjListGetNamesFrom) (virDomainSnapshotObjListNumFrom): Delete. * src/libvirt_private.syms (domain_conf.h): Drop deleted functions. * src/conf/domain_conf.c (virDomainSnapshotObjListGetNames): Merge, and (re)add an optimization. * src/qemu/qemu_driver.c (qemuDomainUndefineFlags) (qemuDomainSnapshotListNames, qemuDomainSnapshotNum) (qemuDomainSnapshotListChildrenNames) (qemuDomainSnapshotNumChildren): Update callers. * src/qemu/qemu_migration.c (qemuMigrationIsAllowed): Likewise. * src/conf/virdomainlist.c (virDomainListPopulate): Likewise.
-
由 Eric Blake 提交于
This idea was first suggested by Daniel Veillard here: https://www.redhat.com/archives/libvir-list/2011-October/msg00353.html Now that I am about to add more complexity to snapshot listing, it makes sense to avoid code duplication and special casing for domain listing (all snapshots) vs. snapshot listing (descendants); adding a metaroot reduces the number of code lines by having the domain listing turn into a descendant listing of the metaroot. Note that this has one minor pessimization - if we are going to list ALL snapshots without filtering, then virHashForeach is more efficient than recursing through the child relationships; restoring that minor optimization will occur in the next patch. * src/conf/domain_conf.h (_virDomainSnapshotObj) (_virDomainSnapshotObjList): Repurpose some fields. (virDomainSnapshotDropParent): Drop unused parameter. * src/conf/domain_conf.c (virDomainSnapshotObjListGetNames) (virDomainSnapshotObjListCount): Simplify. (virDomainSnapshotFindByName, virDomainSnapshotSetRelations) (virDomainSnapshotDropParent): Match new field semantics. * src/qemu/qemu_driver.c (qemuDomainSnapshotCreateXML) (qemuDomainSnapshotReparentChildren, qemuDomainSnapshotDelete): Adjust clients.
-
由 Peter Krempa 提交于
This patch adds common code to list domains in fashion used by virListAllDomains with all currently supported flags. The header file also contains macros that group filters together that are used to shorten filter conditions.
-
由 Peter Krempa 提交于
This patch stores existence of the image in the object. At start of the daemon the state is checked and then updated in key moments in domain lifecycle.
-
- 16 6月, 2012 1 次提交
-
-
由 Jim Fehlig 提交于
The return status of virInterfaceDefParseBridge() was not being checked, potentially resulting in the creation of a broken interface.
-
- 15 6月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
Tell the user what CPU mode value is wrong
-
- 12 6月, 2012 1 次提交
-
-
由 Guido Günther 提交于
for containers matching virDomainDiskIndexByName.
-
- 08 6月, 2012 1 次提交
-
-
- 02 6月, 2012 2 次提交
-
-
由 Stefan Berger 提交于
The goal of this patch is to prepare for support for multiple IP addresses per interface in the DHCP snooping code. Move the code for the IP address map that maps interface names to IP addresses into their own file. Rename the functions on the way but otherwise leave the code as-is. Initialize this new layer separately before dependent layers (iplearning, dhcpsnooping) and shut it down after them.
-
由 Stefan Berger 提交于
This patch adds DHCP snooping support to libvirt. The learning method for IP addresses is specified by setting the "CTRL_IP_LEARNING" variable to one of "any" [default] (existing IP learning code), "none" (static only addresses) or "dhcp" (DHCP snooping). Active leases are saved in a lease file and reloaded on restart or HUP. The following interface XML activates and uses the DHCP snooping: <interface type='bridge'> <source bridge='virbr0'/> <filterref filter='clean-traffic'> <parameter name='CTRL_IP_LEARNING' value='dhcp'/> </filterref> </interface> All filters containing the variable 'IP' are automatically adjusted when the VM receives an IP address via DHCP. However, multiple IP addresses per interface are silently ignored in this patch, thus only supporting one IP address per interface. Multiple IP address support is added in a later patch in this series. Signed-off-by: NDavid L Stevens <dlstevens@us.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
- 24 5月, 2012 2 次提交
-
-
由 Guido Günther 提交于
-
由 Guido Günther 提交于
and use it for virDomainParseMemory. This allows to parse arbitrary scaled value, not only memory related values as needed for the filesystem limits code following later in this series.
-
- 22 5月, 2012 2 次提交
-
-
由 Wido den Hollander 提交于
This patch adds support for a new storage backend with RBD support. RBD is the RADOS Block Device and is part of the Ceph distributed storage system. It comes in two flavours: Qemu-RBD and Kernel RBD, this storage backend only supports Qemu-RBD, thus limiting the use of this storage driver to Qemu only. To function this backend relies on librbd and librados being present on the local system. The backend also supports Cephx authentication for safe authentication with the Ceph cluster. For storing credentials it uses the built-in secret mechanism of libvirt. Signed-off-by: NWido den Hollander <wido@widodh.nl>
-
由 Daniel P. Berrange 提交于
When the last reference to a virConnectPtr is released by libvirtd, it was possible for a deadlock to occur in the virDomainEventState functions. The virDomainEventStatePtr holds a reference on virConnectPtr for each registered callback. When removing a callback, the virUnrefConnect function is run. If this causes the last reference on the virConnectPtr to be released, then virReleaseConnect can be run, which in turns calls qemudClose. This function has a call to virDomainEventStateDeregisterConn which is intended to remove all callbacks associated with the virConnectPtr instance. This will try to grab a lock on virDomainEventState but this lock is already held. Deadlock ensues Thread 1 (Thread 0x7fcbb526a840 (LWP 23185)): Since each callback associated with a virConnectPtr holds a reference on virConnectPtr, it is impossible for the qemudClose method to be invoked while any callbacks are still registered. Thus the call to virDomainEventStateDeregisterConn must in fact be a no-op. Thus it is possible to just remove all trace of virDomainEventStateDeregisterConn and avoid the deadlock. * src/conf/domain_event.c, src/conf/domain_event.h, src/libvirt_private.syms: Delete virDomainEventStateDeregisterConn * src/libxl/libxl_driver.c, src/lxc/lxc_driver.c, src/qemu/qemu_driver.c, src/uml/uml_driver.c: Remove calls to virDomainEventStateDeregisterConn
-
- 21 5月, 2012 1 次提交
-
-
由 Stefan Berger 提交于
This patch adds support for the recent ipset iptables extension to libvirt's nwfilter subsystem. Ipset allows to maintain 'sets' of IP addresses, ports and other packet parameters and allows for faster lookup (in the order of O(1) vs. O(n)) and rule evaluation to achieve higher throughput than what can be achieved with individual iptables rules. On the command line iptables supports ipset using iptables ... -m set --match-set <ipset name> <flags> -j ... where 'ipset name' is the name of a previously created ipset and flags is a comma-separated list of up to 6 flags. Flags use 'src' and 'dst' for selecting IP addresses, ports etc. from the source or destination part of a packet. So a concrete example may look like this: iptables -A INPUT -m set --match-set test src,src -j ACCEPT Since ipset management is quite complex, the idea was to leave ipset management outside of libvirt but still allow users to reference an ipset. The user would have to make sure the ipset is available once the VM is started so that the iptables rule(s) referencing the ipset can be created. Using XML to describe an ipset in an nwfilter rule would then look as follows: <rule action='accept' direction='in'> <all ipset='test' ipsetflags='src,src'/> </rule> The two parameters on the command line are also the two distinct XML attributes 'ipset' and 'ipsetflags'. FYI: Here is the man page for ipset: https://ipset.netfilter.org/ipset.man.html Regards, Stefan
-
- 18 5月, 2012 1 次提交
-
-
由 Marc-André Lureau 提交于
Allow specifying sound device codecs. See formatdomain.html for more details.
-
- 16 5月, 2012 2 次提交
-
-
由 Daniel P. Berrange 提交于
The uhci1, uhci2, uhci3 companion controllers for ehci1 must have a master start port set. Since this value is predictable we should set it automatically if the app does not supply it
-
由 Daniel P. Berrange 提交于
The virDomainDeviceInfoIsSet API was only checking if an address or alias was set in the struct. Thus if only a rom bar setting / filename, boot index, or USB master value was set, they could be accidentally dropped when formatting XML
-
- 10 5月, 2012 2 次提交
-
-
由 Alex Jia 提交于
Detected by valgrind. Leaks are introduced in commit 122fa379. src/conf/storage_conf.c: fix memory leaks. How to reproduce? $ make && make -C tests check TESTS=storagepoolxml2xmltest $ cd tests && valgrind -v --leak-check=full ./storagepoolxml2xmltest actual result: ==28571== LEAK SUMMARY: ==28571== definitely lost: 40 bytes in 5 blocks ==28571== indirectly lost: 0 bytes in 0 blocks ==28571== possibly lost: 0 bytes in 0 blocks ==28571== still reachable: 1,054 bytes in 21 blocks ==28571== suppressed: 0 bytes in 0 blocks Signed-off-by: NAlex Jia <ajia@redhat.com>
-
由 Jim Fehlig 提交于
No useful error was being reported when an invalid character device target type is specified in the domainXML. E.g. ... <console type="pty"> <source path="/dev/pts/2"/> <target type="kvm" port="0"/> </console> ... resulted in error: Failed to define domain from x.xml error: An error occurred, but the cause is unknown With this small patch, the error is more helpful error: Failed to define domain from x.xml error: XML error: unknown target type 'kvm' specified for character device
-