- 05 4月, 2013 9 次提交
-
-
由 Peter Krempa 提交于
Use the virDomainXMLConf structure to hold this data and tweak the code to avoid semantic change. Without configuration the KVM mac prefix is used by default. I chose it as it's in the privately administered segment so it should be usable for any purposes.
-
由 Peter Krempa 提交于
Use the virDomainXMLConf structure to hold this data.
-
由 Peter Krempa 提交于
Use the qemu specific callback to fill this data in the qemu driver as it's the only place where it was used and fix tests as the qemu test capability object didn't configure the defaults for the tests.
-
由 Peter Krempa 提交于
This patch removes the emulatorRequired field and associated infrastructure from the virCaps object. Instead the driver specific callbacks are used as this field isn't enforced by all drivers. This patch implements the appropriate callbacks in the qemu and lxc driver and moves to check to that location.
-
由 Peter Krempa 提交于
This patch removes the defaultDiskDriverName from the virCaps structure. This particular default value is used only in the qemu driver so this patch uses the recently added callback to fill the driver name if it's needed instead of propagating it through virCaps.
-
由 Peter Krempa 提交于
This gets rid of the parameter in favor of using the new callback infrastructure to do the same stuff. This patch implements the domain adjustment callback in the openVZ driver and moves the check from the parser to a new validation method in the callback infrastructure.
-
由 Peter Krempa 提交于
Move the xmlopt and caps arguments to the end of the argument list.
-
由 Peter Krempa 提交于
This patch adds instrumentation that will allow hypervisor drivers to fill and validate domain and device definitions after parsed by the XML parser. With this patch, after the XML is parsed, a callback to the driver is issued requesting to fill and validate driver specific details of the configuration. This allows to use sensible defaults and checks on a per driver basis at the time the XML is parsed. Two callback pointers are stored in the new virDomainXMLConf object: * virDomainDeviceDefPostParseCallback (devicesPostParseCallback) - called for a single device parsed and for every single device in a domain config. A virDomainDeviceDefPtr is passed along with the domain definition and virCaps. * virDomainDefPostParseCallback, (domainPostParseCallback) - A callback that is meant to process the domain config after it's parsed. A virDomainDefPtr is passed along with virCaps. Both types of callbacks support arbitrary opaque data passed for the callback functions. Errors may be reported in those callbacks resulting in a XML parsing failure.
-
由 Peter Krempa 提交于
This patch is the result of running: for i in $(git ls-files | grep -v html | grep -v \.po$ ); do sed -i -e "s/virDomainXMLConf/virDomainXMLOption/g" -e "s/xmlconf/xmlopt/g" $i done and a few manual tweaks.
-
- 02 4月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
Format the address using the helper instead of having similar code in multiple places. This patch also fixes leak of the MAC address string in ebtablesRemoveForwardAllowIn() and ebtablesAddForwardAllowIn() in src/util/virebtables.c
-
由 Peter Krempa 提交于
The limits are documented at http://libvirt.org/formatdomain.html#elementsCPUTuning . Enforce them when going through XML parsing in addition to being enforced by the API.
-
- 28 3月, 2013 2 次提交
-
-
由 Michal Privoznik 提交于
The virDomainDefGetSecurityLabelDef was modifying the domain XML. It tried to find a seclabel corresponding to given sec driver. If the label wasn't found, the function created one which is wrong. In fact it's security manager which should modify this part of domain XML.
-
由 Guannan Ren 提交于
When libvirtd loads active network configs from network state directory, it should release the class_id memory block which was allocated at the time of loading xml from network config directory. virBitmapParse will create a new memory block of bitmap class_id which causes a memory leak. This happens when at least one virtual network is active before. ==12234== 8,216 (24 direct, 8,192 indirect) bytes in 1 blocks are definitely \ lost in loss record 702 of 709 ==12234== at 0x4A06B2F: calloc (vg_replace_malloc.c:593) ==12234== by 0x37AB04D77D: virAlloc (in /usr/lib64/libvirt.so.0.1000.3) ==12234== by 0x37AB04EF89: virBitmapNew (in /usr/lib64/libvirt.so.0.1000.3) ==12234== by 0x37AB0BFB37: virNetworkAssignDef (in /usr/lib64/libvirt.so.0.1000.3) ==12234== by 0x37AB0BFD31: ??? (in /usr/lib64/libvirt.so.0.1000.3) ==12234== by 0x37AB0BFE92: virNetworkLoadAllConfigs (in /usr/lib64/libvirt.so.0.1000.3) ==12234== by 0x10650E5A: ??? (in /usr/lib64/libvirt/connection-driver/libvirt_driver_network.so) ==12234== by 0x37AB0EB72F: virStateInitialize (in /usr/lib64/libvirt.so.0.1000.3) ==12234== by 0x40DE04: ??? (in /usr/sbin/libvirtd) ==12234== by 0x37AB0832E8: ??? (in /usr/lib64/libvirt.so.0.1000.3) ==12234== by 0x3796807D14: start_thread (in /usr/lib64/libpthread-2.16.so) ==12234== by 0x37960F246C: clone (in /usr/lib64/libc-2.16.so)
-
- 27 3月, 2013 1 次提交
-
-
由 Guannan Ren 提交于
#virsh detach-device $guest usb.xml error: Failed to detach device from usb2.xml error: operation failed: host usb device vendor=0x0951 \ product=0x1625 not found This regresstion is due to a typo in matching function. The first argument is always the usb device that we are checking for. If the usb xml file provided by user contains bus and device info, we try to search it by them, otherwise, we use vendor and product info. The bug occurred only when detaching a usb device with no bus and device info provided in the usb xml file.
-
- 25 3月, 2013 3 次提交
-
-
由 Osier Yang 提交于
This enrichs HBA's xml by dumping the number of max vports and vports in use. Format is like: <capability type='vport_ops'> <max_vports>164</max_vports> <vports>5</vports> </capability> * docs/formatnode.html.in: (Document the new XML) * docs/schemas/nodedev.rng: (Add the schema) * src/conf/node_device_conf.h: (New member for data.scsi_host) * src/node_device/node_device_linux_sysfs.c: (Collect the value of max_vports and vports)
-
由 Osier Yang 提交于
VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST to filter the FC HBA, and VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPORTS to filter the FC HBA which supports vport.
-
由 Osier Yang 提交于
Guess it was created for the fc_host and vports_ops capabilities purpose, but there is enum virNodeDevScsiHostCapFlags for them, and enum virNodeDevHBACapType is unused, and actually both VIR_ENUM_DECL and VIR_ENUM_IMPL use the wrong enum name "virNodeDevHBACap".
-
- 23 3月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virDomainGetRootFilesystem was only returning filesystems with type=mount. This is bogus - any type of filesystem is valid as the root, if dst=/. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 22 3月, 2013 5 次提交
-
-
由 Jim Fehlig 提交于
Noticed that parsing bond interface XML containing the miimon element fails <interface type="bond" name="bond0"> ... <bond mode="active-backup"> <miimon freq="100" carrier="netif"/> ... </bond> </interface> This configuration does not contain the optional updelay and downdelay attributes, but parsing will fail due to returning the result of virXPathULong (a -1 when the attribute doesn't exist) from virInterfaceDefParseBond after examining the updelay attribute. While fixing this bug, cleanup the function to use virXPathInt instead of virXPathULong, and store the result directly instead of using a tmp variable. Using virXPathInt actually fixes a potential silent truncation bug noted by Eric Blake. Also, there is no cleanup in the error label. Remove the label, returning failure where failure occurs and success if the end of the function is reached.
-
由 Paolo Bonzini 提交于
This does nothing more than adding the new device and capability. The device is present since QEMU 1.2.0. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Only sheepdog actually required it in the code, and we can use 7000 as the default---the same value that QEMU uses for the simple "sheepdog:VOLUME" syntax. With this change, the schema can be fixed to allow no port. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 21 3月, 2013 1 次提交
-
-
由 Paolo Bonzini 提交于
This plumbs in the XML description of iSCSI shares. The next patches will add support for the libiscsi userspace initiator. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 20 3月, 2013 2 次提交
-
-
由 Gao feng 提交于
Intend to reduce the redundant code,use virNumaSetupMemoryPolicy to replace virLXCControllerSetupNUMAPolicy and qemuProcessInitNumaMemoryPolicy. This patch also moves the numa related codes to the file virnuma.c and virnuma.h Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
由 Olivia Yin 提交于
-
- 15 3月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
This patch adds auditing of resources used by Virtio RNG devices. Only resources on the local filesystems are audited. The audit logs look like: For the 'random' backend: type=VIRT_RESOURCE msg=audit(1363099126.643:31): pid=995252 uid=0 auid=4294967295 ses=4294967295 msg='virt=kvm resrc=rng reason=start vm="qcow-test" uuid=118733ed-b658-3e22-a2cb-4fe5cb3ddf79 old-rng="?" new-rng="/dev/random": exe="/home/pipo/libvirt/daemon/.libs/libvirtd" hostname=? addr=? terminal=pts/0 res=success' For local character device source: type=VIRT_RESOURCE msg=audit(1363100164.240:96): pid=995252 uid=0 auid=4294967295 ses=4294967295 msg='virt=kvm resrc=rng reason=start vm="qcow-test" uuid=118733ed-b658-3e22-a2cb-4fe5cb3ddf79 old-rng="?" new-rng="/tmp/unix.sock": exe="/home/pipo/libvirt/daemon/.libs/libvirtd" hostname=? addr=? terminal=pts/0 res=success'
-
- 14 3月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
Qemu's implementation of virtio RNG supports rate limiting of the entropy used. This patch exposes the option to tune this functionality. This patch is based on qemu commit 904d6f588063fb5ad2b61998acdf1e73fb4 The rate limiting is exported in the XML as: <devices> ... <rng model='virtio'> <rate bytes='123' period='1234'/> <backend model='random'/> </rng> ...
-
由 Viktor Mihajlovski 提交于
Add necessary handling code for the new s390 CCW address type to virDomainDeviceInfo. Further, introduce memory management, XML parsing, output formatting and range validation for the new virDomainDeviceCCWAddress type. Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
-
- 13 3月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
The virCaps structure gathered a ton of irrelevant data over time that. The original reason is that it was propagated to the XML parser functions. This patch aims to create a new data structure virDomainXMLConf that will contain immutable data that are used by the XML parser. This will allow two things we need: 1) Get rid of the stuff from virCaps 2) Allow us to add callbacks to check and add driver specific stuff after domain XML is parsed. This first attempt removes pointers to private data allocation functions to this new structure and update all callers and function that require them.
-
- 09 3月, 2013 1 次提交
-
-
由 Dusty Mabe 提交于
'virsh capabilities' will now include a new <memory> element per <cell> of the topology, as in: <topology> <cells num='2'> <cell id='0'> <memory unit='KiB'>12572412</memory> <cpus num='12'> ... </cell> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 08 3月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
To allow the efficient correlation of container audit messages with host hosts, include the pid namespace inode in audit messages.
-
- 07 3月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
Code that validates the whitelist for the RNG device filename didn't account for fact that filename may be NULL. This led to a NULL reference crash. This wasn't caught since the test suite was not covering this XML syntax Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 John Ferlan 提交于
Resolves the following valgrind error from qemuxml2argvtest: ==20393== 5 bytes in 1 blocks are definitely lost in loss record 2 of 60 ==20393== at 0x4A0883C: malloc (vg_replace_malloc.c:270) ==20393== by 0x38D690A167: __vasprintf_chk (in /usr/lib64/libc-2.16.so) ==20393== by 0x4CB0D97: virVasprintf (stdio2.h:210) ==20393== by 0x4CB0E53: virAsprintf (virutil.c:2017) ==20393== by 0x428DC5: qemuAssignDeviceAliases (qemu_command.c:791) ==20393== by 0x41DF93: testCompareXMLToArgvHelper (qemuxml2argvtest.c:151) ==20393== by 0x41F53F: virtTestRun (testutils.c:157) ==20393== by 0x41DA9B: mymain (qemuxml2argvtest.c:885) ==20393== by 0x41FB7A: virtTestMain (testutils.c:719) ==20393== by 0x38D6821A04: (below main) (in /usr/lib64/libc-2.16.so) ==20393== From qemu_command.c/line 791: if (def->rng) { if (virAsprintf(&def->rng->info.alias, "rng%d", 0) < 0) goto no_memory; }
-
- 05 3月, 2013 4 次提交
-
-
由 Peter Krempa 提交于
This patch adds proper error reporting if parsing of cputune parameters fails due to incorrect values provided by the user. Previously no errors were reported in such a case and the failure was silently ignored.
-
由 Peter Krempa 提交于
Make the iterator function usable in the next patches. Also refactor some parts to avoid strcmp if not necessary. This commit tweaks and shadows the change that was done in commit babe7dad and was needed after the support for multiple console devices was added. Historically the first <console> element is alias for the <serial> device.
-
由 Peter Krempa 提交于
This patch changes many unrelated places to simplify the code or update code style. This patch should not have any semantic impact on the code.
-
由 Eric Blake 提交于
There is some controversy[1] on the qemu list on whether qemu should have ever allowed arbitrary file name passthrough, or whether it should be restricted to JUST /dev/random and /dev/hwrng. It is always easier to add support for additional filenames than it is to remove support for something once released, so this patch restricts libvirt 1.0.3 (where the virtio-random backend was first supported) to just the two uncontroversial names, letting us defer to a later date any decision on whether supporting arbitrary files makes sense. Additionally, since qemu 1.4 does NOT support /dev/fdset/nnn fd passthrough for the backend, limiting to just two known names means that we don't get tempted to try fd passthrough where it won't work. [1]https://lists.gnu.org/archive/html/qemu-devel/2013-03/threads.html#00023 * src/conf/domain_conf.c (virDomainRNGDefParseXML): Only allow /dev/random and /dev/hwrng. * docs/schemas/domaincommon.rng: Flag invalid files. * docs/formatdomain.html.in (elementsRng): Document this. * tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.args: Update test to match. * tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.xml: Likewise.
-
- 27 2月, 2013 2 次提交
-
-
由 Laine Stump 提交于
This reverts commit 383ebc46. We decided the xml for this feature needed more thought to make sure we are doing it the best way, in particular wrt option values that have multiple items.
-
由 Eric Blake 提交于
This reverts commit 0bbbd42c. The design for this feature is not complete, and may change the name of the 'schid' attribute. Revert requested by Viktor Mihajlovski.
-