- 20 3月, 2012 1 次提交
-
-
由 Laine Stump 提交于
A few times libvirt users manually setting mac addresses have complained of a networking failure that ends up being due to a multicast mac address being used for a guest interface. This patch prevents that by logging an error and failing if a multicast mac address is encountered in each of the three following cases: 1) domain xml <interface> mac address. 2) network xml bridge mac address. 3) network xml dhcp/host mac address. There are several other places where a mac address can be input that aren't controlled in this manner because failure to do so has no consequences (e.g., if the address will be used to search through existing interfaces for a match). The RNG has been updated to add multiMacAddr and uniMacAddr along with the existing macAddr, and macAddr was switched to uniMacAddr where appropriate.
-
- 16 3月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
If no <interface> elements are included in an LXC guest XML description, then the LXC guest will just see the host's network interfaces. It is desirable to be able to hide the host interfaces, without having to define any guest interfaces. This patch introduces a new feature flag <privnet/> to allow forcing of a private network namespace for LXC. In the future I also anticipate that we will add <privuser/> to force a private user ID namespace. * src/conf/domain_conf.c, src/conf/domain_conf.h: Add support for <privnet/> feature. Auto-set <privnet> if any <interface> devices are defined * src/lxc/lxc_container.c: Honour request for private network namespace
-
- 15 3月, 2012 1 次提交
-
-
由 Osier Yang 提交于
numad is an user-level daemon that monitors NUMA topology and processes resource consumption to facilitate good NUMA resource alignment of applications/virtual machines to improve performance and minimize cost of remote memory latencies. It provides a pre-placement advisory interface, so significant processes can be pre-bound to nodes with sufficient available resources. More details: http://fedoraproject.org/wiki/Features/numad "numad -w ncpus:memory_amount" is the advisory interface numad provides currently. This patch add the support by introducing a new XML attribute for <vcpu>. e.g. <vcpu placement="auto">4</vcpu> <vcpu placement="static" cpuset="1-10^6">4</vcpu> The returned advisory nodeset from numad will be printed in domain's dumped XML. e.g. <vcpu placement="auto" cpuset="1-10^6">4</vcpu> If placement is "auto", the number of vcpus and the current memory amount specified in domain XML will be used for numad command line (numad uses MB for memory amount): numad -w $num_of_vcpus:$current_memory_amount / 1024 The advisory nodeset returned from numad will be used to set domain process CPU affinity then. (e.g. qemuProcessInitCpuAffinity). If the user specifies both CPU affinity policy (e.g. (<vcpu cpuset="1-10,^7,^8">4</vcpu>) and placement == "auto" the specified CPU affinity will be overridden. Only QEMU/KVM drivers support it now. See docs update in patch for more details.
-
- 13 3月, 2012 2 次提交
-
-
由 Michal Privoznik 提交于
Even though we say in documentation setting (tls-)port to -1 is legacy compat style for enabling autoport, we're roughly doing this for VNC. However, in case of SPICE auto enable autoport iff both port & tlsPort are equal -1 as documentation says autoport plays with both.
-
由 Jiri Denemark 提交于
When host-model and host-passthrouh CPU modes were introduced, qemu driver was properly modify to update guest CPU definition during migration so that we use the right CPU at the destination. However, similar treatment is needed for (managed)save and snapshots since they need to save the exact CPU so that a domain can be properly restored. To avoid repetition of such situation, all places that need live XML share the code which generates it. As a side effect, this patch fixes error reporting from qemuDomainSnapshotWriteMetadata().
-
- 09 3月, 2012 3 次提交
-
-
由 Peng Zhou 提交于
spice agent-mouse support Usage: <graphics type='spice'> <mouse mode='client'|'server'/> <graphics/> Signed-off-by: NOsier Yang <jyang@redhat.com>
-
由 Laine Stump 提交于
There are several functions in domain_conf.c that remove a device object from the domain's list of that object type, but don't free the object or return it to the caller to free. In many cases this isn't a problem because the caller already had a pointer to the object and frees it afterward, but in several cases the removed object was just left floating around with no references to it. In particular, the function qemuDomainDetachDeviceConfig() calls functions to locate and remove net (virDomainNetRemoveByMac), disk (virDomainDiskRemoveByName()), and lease (virDomainLeaseRemove()) devices, but neither it nor its caller qemuDomainModifyDeviceConfig() ever obtain a pointer to the device being removed, much less free it. This patch modifies the following "remove" functions to return a pointer to the device object being removed from the domain device arrays, to give the caller the option of freeing the device object using that pointer if needed. In places where the object was previously leaked, it is now freed: virDomainDiskRemove virDomainDiskRemoveByName virDomainNetRemove virDomainNetRemoveByMac virDomainHostdevRemove virDomainLeaseRemove virDomainLeaseRemoveAt The functions that had been leaking: libxlDomainDetachConfig - leaked a virDomainDiskDef qemuDomainDetachDeviceConfig - could leak a virDomainDiskDef, a virDomainNetDef, or a virDomainLeaseDef qemuDomainDetachLease - leaked a virDomainLeaseDef
-
由 Laine Stump 提交于
It will be used in a different file in an upcoming patch.
-
- 08 3月, 2012 5 次提交
-
-
由 Michal Privoznik 提交于
Some members are generated during XML parse (e.g. MAC address of an interface); However, with current implementation, if we are plugging a device both to persistent and live config, we parse given XML twice: first time for live, second for config. This is wrong then as the second time we are not guaranteed to generate same values as we did for the first time. To prevent that we need to create a copy of DeviceDefPtr; This is done through format/parse process instead of writing functions for deep copy as it is easier to maintain: adding new field to any virDomain*DefPtr doesn't require change of copying function.
-
由 Eric Blake 提交于
Output is still in kibibytes, but input can now be in different scales for ease of typing. * src/conf/domain_conf.c (virDomainParseMemory): New helper. (virDomainDefParseXML): Use it when parsing. * docs/schemas/domaincommon.rng: Expand XML; rename memoryKBElement to memoryElement and update callers. * docs/formatdomain.html.in (elementsMemoryAllocation): Document scaling. * tests/qemuxml2argvdata/qemuxml2argv-memtune.xml: Adjust test. * tests/qemuxml2xmltest.c: Likewise. * tests/qemuxml2xmloutdata/qemuxml2xmlout-memtune.xml: New file.
-
由 Eric Blake 提交于
Using 'unsigned long' for memory values is risky on 32-bit platforms, as a PAE guest can have more than 4GiB memory. Our API is (unfortunately) locked at 'unsigned long' and a scale of 1024, but the rest of our system should consistently use 64-bit values, especially since the previous patch centralized overflow checking. * src/conf/domain_conf.h (_virDomainDef): Always use 64-bit values for memory. Change hugepage_backed to a bool. * src/conf/domain_conf.c (virDomainDefParseXML) (virDomainDefCheckABIStability, virDomainDefFormatInternal): Fix clients. * src/vmx/vmx.c (virVMXFormatConfig): Likewise. * src/xenxs/xen_sxpr.c (xenParseSxpr, xenFormatSxpr): Likewise. * src/xenxs/xen_xm.c (xenXMConfigGetULongLong): New function. (xenXMConfigGetULong, xenXMConfigSetInt): Avoid truncation. (xenParseXM, xenFormatXM): Fix clients. * src/phyp/phyp_driver.c (phypBuildLpar): Likewise. * src/openvz/openvz_driver.c (openvzDomainSetMemoryInternal): Likewise. * src/vbox/vbox_tmpl.c (vboxDomainDefineXML): Likewise. * src/qemu/qemu_command.c (qemuBuildCommandLine): Likewise. * src/qemu/qemu_process.c (qemuProcessStart): Likewise. * src/qemu/qemu_monitor.h (qemuMonitorGetBalloonInfo): Likewise. * src/qemu/qemu_monitor_text.h (qemuMonitorTextGetBalloonInfo): Likewise. * src/qemu/qemu_monitor_text.c (qemuMonitorTextGetBalloonInfo): Likewise. * src/qemu/qemu_monitor_json.h (qemuMonitorJSONGetBalloonInfo): Likewise. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONGetBalloonInfo): Likewise. * src/qemu/qemu_driver.c (qemudDomainGetInfo) (qemuDomainGetXMLDesc): Likewise. * src/uml/uml_conf.c (umlBuildCommandLine): Likewise.
-
由 Eric Blake 提交于
The test domain allows <memory>0</memory>, but the RNG was stating that memory had to be at least 4096000 bytes. Hypervisors should enforce their own limits, rather than complicating the RNG. Meanwhile, some copy and paste had introduced some fishy constructs in various unit tests. * docs/schemas/domaincommon.rng (memoryKB, memoryKBElement): Drop limit that isn't enforced in code. * src/conf/domain_conf.c (virDomainDefParseXML): Require current <= maximum. * tests/qemuxml2argvdata/*.xml: Fix offenders.
-
由 Eric Blake 提交于
Make it obvious to 'dumpxml' readers what unit we are using, since our default of KiB for memory (1024) differs from qemu's default of MiB; and differs from our use of bytes for storage. Tests were updated via: $ find tests/*data tests/*out -name '*.xml' | \ xargs sed -i 's/<\(memory\|currentMemory\|hard_limit\|soft_limit\|min_guarantee\|swap_hard_limit\)>/<\1 unit='"'KiB'>/" $ find tests/*data tests/*out -name '*.xml' | \ xargs sed -i 's/<\(capacity\|allocation\|available\)>/<\1 unit='"'bytes'>/" followed by a few fixes for the stragglers. Note that with this patch, the RNG for <memory> still forbids validation of anything except unit='KiB', since the code silently ignores the attribute; a later patch will expand <memory> to allow scaled input in the code and update the RNG to match. * docs/schemas/basictypes.rng (unit): Add 'bytes'. (scaledInteger): New define. * docs/schemas/storagevol.rng (sizing): Use it. * docs/schemas/storagepool.rng (sizing): Likewise. * docs/schemas/domaincommon.rng (memoryKBElement): New define; use for memory elements. * src/conf/storage_conf.c (virStoragePoolDefFormat) (virStorageVolDefFormat): Likewise. * src/conf/domain_conf.h (_virDomainDef): Document unit used internally. * src/conf/storage_conf.h (_virStoragePoolDef, _virStorageVolDef): Likewise. * tests/*data/*.xml: Update all tests. * tests/*out/*.xml: Likewise. * tests/define-dev-segfault: Likewise. * tests/openvzutilstest.c (testReadNetworkConf): Likewise. * tests/qemuargv2xmltest.c (blankProblemElements): Likewise.
-
- 06 3月, 2012 10 次提交
-
-
由 Laine Stump 提交于
This exact code is duplicated in qemuDomainDetachNetDevice().
-
由 Laine Stump 提交于
This patch makes sure that each network device ("interface") of type='hostdev' appears on both the hostdevs list and the nets list of the virDomainDef, and it modifies the qemu driver startup code so that these devices will be presented to qemu on the commandline as hostdevs rather than as network devices. It does not add support for hotplug of these type of devices, or code to honor the <mac address> or <virtualport> given in the config (both of those will be done in separate patches). Once each device is placed on both lists, much of what this patch does is modify places in the code that traverse all the device lists so that these hybrid devices are only acted on once - either along with the other hostdevs, or along with the other network interfaces. (In many cases, only one of the lists is traversed / a specific operation is performed on only one type of device. In those instances, the code can remain unchanged.) There is one special case - when building the commandline, interfaces are allowed to proceed all the way through networkAllocateActualDevice() before deciding to skip the rest of netdev-specific processing - this is so that (once we have support for networks with pools of hostdev devices) we can get the actual device allocated, then rely on the loop processing all hostdevs to generate the correct commandline. (NB: <interface type='hostdev'> is only supported for PCI network devices that are SR-IOV Virtual Functions (VF). Standard PCI[e] and USB devices, and even the Physical Functions (PF) of SR-IOV devices can only be assigned to a guest using the more basic <hostdev> device entry. This limitation is mostly due to the fact that non-SR-IOV ethernet devices tend to lose mac address configuration whenever the card is reset, which happens when a card is assigned to a guest; SR-IOV VFs fortunately don't suffer the same problem.)
-
由 Laine Stump 提交于
This is the new interface type that sets up an SR-IOV PCI network device to be assigned to the guest with PCI passthrough after initializing some network device-specific things from the config (e.g. MAC address, virtualport profile parameters). Here is an example of the syntax: <interface type='hostdev' managed='yes'> <source> <address type='pci' domain='0' bus='0' slot='4' function='3'/> </source> <mac address='00:11:22:33:44:55'/> <address type='pci' domain='0' bus='0' slot='7' function='0'/> </interface> This would assign the PCI card from bus 0 slot 4 function 3 on the host, to bus 0 slot 7 function 0 on the guest, but would first set the MAC address of the card to 00:11:22:33:44:55. NB: The parser and formatter don't care if the PCI card being specified is a standard single function network adapter, or a virtual function (VF) of an SR-IOV capable network adapter, but the upcoming code that implements the back end of this config will work *only* with SR-IOV VFs. This is because modifying the mac address of a standard network adapter prior to assigning it to a guest is pointless - part of the device reset that occurs during that process will reset the MAC address to the value programmed into the card's firmware. Although it's not supported by any of libvirt's hypervisor drivers, usb network hostdevs are also supported in the parser and formatter for completeness and consistency. <source> syntax is identical to that for plain <hostdev> devices, except that the <address> element should have "type='usb'" added if bus/device are specified: <interface type='hostdev'> <source> <address type='usb' bus='0' device='4'/> </source> <mac address='00:11:22:33:44:55'/> </interface> If the vendor/product form of usb specification is used, type='usb' is implied: <interface type='hostdev'> <source> <vendor id='0x0012'/> <product id='0x24dd'/> </source> <mac address='00:11:22:33:44:55'/> </interface> Again, the upcoming patch to fill in the backend of this functionality will log an error and fail with "Unsupported Config" if you actually try to assign a USB network adapter to a guest using <interface type='hostdev'> - just use a standard <hostdev> entry in that case (and also for single-port PCI adapters).
-
由 Laine Stump 提交于
Three new functions useful in other files: virDomainHostdevInsert: Add a new hostdev at the end of the array. This would more sensibly be called virDomainHostdevAppend, but the existing functions for other types of devices are called Insert. virDomainHostdevRemove: Eliminates one entry from the hostdevs array, but doesn't free it; patterned after the code at the end of the two qemuDomainDetachHostXXXDevice functions (and also other pre-existing virDomainXXXRemove functions for other device types). virDomainHostdevFind: This function is patterned from the search loops at the top of qemuDomainDetachHostPciDevice and qemuDomainDetachHostUsbDevice, and will be used to re-factor those (and other detach-related) functions.
-
由 Laine Stump 提交于
The parent can be any type of device. It defaults to type=none, and a NULL pointer. The intent is that if a hostdevdef is contained in the def for a higher level device (e.g. virDomainNetDef), hostdev->parent will point to the higher level device, and type will be set to that type of device. This way, during attach and detach of the device, parent can be checked, and appropriate callouts made to do higher level device initialization (e.g. setting MAC address). Also, although these hostdevs with parents will be added to a domain's hostdevs list, they will be treated slightly differently when traversing the list, e.g. virDomainHostdefDefFree for a hostdev that has a parent doesn't need to be called (and will be a NOP); it will simply be removed from the list (since the parent device object is in its own type-specific list, and will be freed from there).
-
由 Laine Stump 提交于
In an upcoming patch, virDomainNetDef will acquire a virDomainHostdevDef, and the <interface> XML will take on some of the elements of a <hostdev>. To avoid duplicating the code for parsing and formatting the <source> element (which will be nearly identical in these two cases), this patch factors those parts out of the HostdevDef's parse and format functions, and puts them into separate helper functions that are now called by the HostdevDef parser/formatter, and will soon be called by the NetDef parser/formatter. One change in behavior - previously virDomainHostdevDefParseXML() had diverged from current common coding practice by logging an error and failing if it found any subelements of <hostdev> other than those it understood (standard libvirt practice is to ignore/discard unknown elements and attributes during parse). The new helper function ignores unknown elements, and thus so does the new virDomainHostdevDefParseXML.
-
由 Laine Stump 提交于
In order to allow for a virDomainHostdevDef that uses the virDomainDeviceInfo of a "higher level" device (such as a virDomainNetDef), this patch changes the virDomainDeviceInfo in the HostdevDef into a virDomainDeviceInfoPtr. Rather than adding checks all over the code to check for a null info, we just guarantee that it is always valid. The new function virDomainHostdevDefAlloc() allocates a virDomainDeviceInfo and plugs it in, and virDomainHostdevDefFree() makes sure it is freed. There were 4 places allocating virDomainHostdevDefs, all of them parsers of one sort or another, and those have all had their VIR_ALLOC(hostdev) changed to virDomainHostdevDefAlloc(). Other than that, and the new functions, all the rest of the changes are just mechanical removals of "&" or changing "." to "->".
-
由 Laine Stump 提交于
There will be cases where the iterator callback will need to know the type of the device whose info is being operated on, and possibly even need to use some of the device's config. This patch adds a virDomainDeviceDefPtr to the args of every callback, and fills it in appropriately as the devices are iterated through.
-
由 Laine Stump 提交于
No code change, movement only. This is necessary to eliminate forward references.
-
由 Laine Stump 提交于
Not all device types were represented in virDomainDeviceType, so some types of devices couldn't be represented in a virDomainDeviceDef (which requires a different type of pointer in the union for each different kind of device). Since serial, parallel, channel, and console devices are all virDomainChrDef, and the virDomainDeviceType is never used to produce a string from the type (and only used in the other direction internally to code, never to produce XML), I only added one "CHR" type, which is associated with "virDomainChrDefPtr chr" in the union.
-
- 28 2月, 2012 4 次提交
-
-
由 Osier Yang 提交于
* src/conf/domain_conf.h: Add new member "target" to struct _virDomainDeviceDriveAddress. * src/conf/domain_conf.c: Parse and format "target" * Lots of tests (.xml) in tests/domainsnapshotxml2xmlout, tests/qemuxml2argvdata, tests/qemuxml2xmloutdata, and tests/vmx2xmldata/ are modified for newly introduced attribute "target" for address of "drive" type.
-
由 Osier Yang 提交于
-
由 Paolo Bonzini 提交于
Adding a new model for virtio-scsi roughly follows the same scheme as the previous patch. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
KVM will be able to use a PCI SCSI controller even on POWER. Let the user specify the vSCSI controller by other means than a default. After this patch, the QEMU driver will actually look at the model and reject anything but auto, lsilogic and ibmvscsi. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NOsier Yang <jyang@redhat.com>
-
- 21 2月, 2012 1 次提交
-
-
由 Cole Robinson 提交于
Previously we would have: "os type 'hvm' & arch 'idontexist' combination is not supported" Now we get "No guest options available for arch 'idontexist'" or if options available but guest OS type not applicable: "No os type 'xen' available for arch 'x86_64'"
-
- 16 2月, 2012 3 次提交
-
-
由 Eric Blake 提交于
Bug introduced in commit 35abced2. On an inactive domain, $ virsh snapshot-create-as dom snap $ virsh snapshot-create dom $ virsh snapshot-create dom $ virsh snapshot-delete --children dom snap could crash libvirtd, due to a use-after-free that results when the callback freed the current element in the iteration. * src/conf/domain_conf.c (virDomainSnapshotForEachChild) (virDomainSnapshotActOnDescendant): Allow iteration to delete current child.
-
由 Ansis Atteka 提交于
This patch allows libvirt to add interfaces to already existing Open vSwitch bridges. The following syntax in domain XML file can be used: <interface type='bridge'> <mac address='52:54:00:d0:3f:f2'/> <source bridge='ovsbr'/> <virtualport type='openvswitch'> <parameters interfaceid='921a80cd-e6de-5a2e-db9c-ab27f15a6e1d'/> </virtualport> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> or if libvirt should auto-generate the interfaceid use following syntax: <interface type='bridge'> <mac address='52:54:00:d0:3f:f2'/> <source bridge='ovsbr'/> <virtualport type='openvswitch'> </virtualport> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> It is also possible to pass an optional profileid. To do that use following syntax: <interface type='bridge'> <source bridge='ovsbr'/> <mac address='00:55:1a:65:a2:8d'/> <virtualport type='openvswitch'> <parameters interfaceid='921a80cd-e6de-5a2e-db9c-ab27f15a6e1d' profileid='test-profile'/> </virtualport> </interface> To create Open vSwitch bridge install Open vSwitch and run the following command: ovs-vsctl add-br ovsbr
-
由 Laine Stump 提交于
An upcoming patch will add a <virtualport> element to interfaces of type='bridge', so it makes sense to give this function a more generic name.
-
- 13 2月, 2012 2 次提交
-
-
由 Daniel Veillard 提交于
This reverts commit 7b345b69. Conflicts: tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-vscsi.xml
-
由 Daniel Veillard 提交于
This reverts commit c9abfadf. Conflicts: tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-virtio-scsi.xml
-
- 10 2月, 2012 1 次提交
-
-
由 Marc-André Lureau 提交于
Some tools, such as virt-manager, prefers having the default USB controller explicit in the XML document. This patch makes sure there is one. With this patch, it is now possible to switch from USB1 to USB2 from the release 0.9.1 of virt-manager. Fix tests to pass with this change.
-
- 08 2月, 2012 1 次提交
-
-
由 Jiri Denemark 提交于
Security label type 'none' requires relabel to be set to 'no' so there's no reason to output this extra attribute. Moreover, since relabel is internally stored in a negative from (norelabel), the default value for relabel would be 'yes' in case there is no <seclabel> element in domain configuration. In case VIR_DOMAIN_SECLABEL_DEFAULT turns into VIR_DOMAIN_SECLABEL_NONE, we would incorrectly output relabel='yes' for seclabel type 'none'.
-
- 07 2月, 2012 1 次提交
-
-
由 Eric Blake 提交于
Commit b170eb99 introduced a bug: domains that had an explicit <seclabel type='none'/> when started would not be reparsed if libvirtd restarted. It turns out that our testsuite was not exercising this because it never tried anything but inactive parsing. Additionally, the live XML for such a domain failed to re-validate. Applying just the tests/ portion of this patch will expose the bugs that are fixed by the other two files. * docs/schemas/domaincommon.rng (seclabel): Allow relabel under type='none'. * src/conf/domain_conf.c (virSecurityLabelDefParseXML): Per RNG, presence of <seclabel> with no type implies dynamic. Don't require sub-elements for type='none'. * tests/qemuxml2xmltest.c (mymain): Add test. * tests/qemuxml2argvtest.c (mymain): Likewise. * tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.xml: Add file. * tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.args: Add file. Reported by Ansis Atteka.
-
- 04 2月, 2012 2 次提交
-
-
由 Laine Stump 提交于
This eliminates the warning message reported in: https://bugzilla.redhat.com/show_bug.cgi?id=624447 It was caused by a failure to open an image file that is not accessible by root (the uid libvirtd is running as) because it's on a root-squash NFS share, owned by a different user, with permissions of 660 (or maybe 600). The solution is to use virFileOpenAs() rather than open(). The codepath that generates the error is during qemuSetupDiskCGroup(), but the actual open() is in a lower-level generic function called from many places (virDomainDiskDefForeachPath), so some other pieces of the code were touched just to add dummy (or possibly useful) uid and gid arguments. Eliminating this warning message has the nice side effect that the requested operation may even succeed (which in this case isn't necessary, but shouldn't hurt anything either).
-
由 Philipp Hahn 提交于
compat{a->i}bility erron{->e}ous nec{c->}essary. Either "the" or "a". Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
- 03 2月, 2012 2 次提交
-
-
由 Alex Jia 提交于
Detected by valgrind. Leak is introduced in commit 397e6a70. * src/conf/domain_conf.c(virDomainDiskDefParseXML): fix memory leak. How to reproduce? % make -C tests check TESTS=qemuxml2argvtest % cd tests && valgrind -v --leak-check=full ./qemuxml2argvtest * Actual result: ==16352== 4 bytes in 1 blocks are definitely lost in loss record 12 of 147 ==16352== at 0x4A05FDE: malloc (vg_replace_malloc.c:236) ==16352== by 0x39D90A67DD: xmlStrndup (xmlstring.c:45) ==16352== by 0x4E83D5: virDomainDiskDefParseXML (domain_conf.c:2894) ==16352== by 0x4F542D: virDomainDefParseXML (domain_conf.c:7626) ==16352== by 0x4F8683: virDomainDefParseNode (domain_conf.c:8390) ==16352== by 0x4F904E: virDomainDefParse (domain_conf.c:8340) ==16352== by 0x41C626: testCompareXMLToArgvHelper (qemuxml2argvtest.c:105) ==16352== by 0x41DED1: virtTestRun (testutils.c:142) ==16352== by 0x418172: mymain (qemuxml2argvtest.c:486) ==16352== by 0x41D5C7: virtTestMain (testutils.c:697) ==16352== by 0x39CF01ECDC: (below main) (in /lib64/libc-2.12.so) Signed-off-by: NAlex Jia <ajia@redhat.com>
-
由 Daniel P. Berrange 提交于
Curently security labels can be of type 'dynamic' or 'static'. If no security label is given, then 'dynamic' is assumed. The current code takes advantage of this default, and avoids even saving <seclabel> elements with type='dynamic' to disk. This means if you temporarily change security driver, the guests can all still start. With the introduction of sVirt to LXC though, there needs to be a new default of 'none' to allow unconfined LXC containers. This patch introduces two new security label types - default: the host configuration decides whether to run the guest with type 'none' or 'dynamic' at guest start - none: the guest will run unconfined by security policy The 'none' label type will obviously be undesirable for some deployments, so a new qemu.conf option allows a host admin to mandate confined guests. It is also possible to turn off default confinement security_default_confined = 1|0 (default == 1) security_require_confined = 1|0 (default == 0) * src/conf/domain_conf.c, src/conf/domain_conf.h: Add new seclabel types * src/security/security_manager.c, src/security/security_manager.h: Set default sec label types * src/security/security_selinux.c: Handle 'none' seclabel type * src/qemu/qemu.conf, src/qemu/qemu_conf.c, src/qemu/qemu_conf.h, src/qemu/libvirtd_qemu.aug: New security config options * src/qemu/qemu_driver.c: Tell security driver about default config
-