- 20 8月, 2014 3 次提交
-
-
由 Martin Kletzander 提交于
And add a syntax-check for '){$'. It's not perfect, but better than nothing. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Peter Krempa 提交于
All checks are based on the storage source, thus there's no need to pass the complete disk def.
-
由 Giuseppe Scrivano 提交于
Signed-off-by: NGiuseppe Scrivano <gscrivan@redhat.com>
-
- 18 8月, 2014 2 次提交
-
-
由 Peter Krempa 提交于
Tidy up control flow, change boolean argument to use 'bool', improve error message in case the function is used to parse emulator pinning info and avoid a few temp variables that made no sense. Also when the function is called to parse emulator pinning info, there's no need to check the processor ID in that case.
-
由 Peter Krempa 提交于
The check doesn't make much sense as right below it the entries are either checked for duplicity or ignored in some cases. Having this check doesn't actually forbid passing invalid values.
-
- 14 8月, 2014 1 次提交
-
-
由 Mo yuxiang 提交于
commit d9504941 introduces two new attributes "cmd_per_lun" and "max_sectors" same with the names QEMU uses for virtio-scsi. But the case of parsing them is not exact. Change to parse them if controller has "driver" element. Signed-off-by: NMo yuxiang <moyuxiang@huawei.com>
-
- 12 8月, 2014 1 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1128751 There's this <driver/> element under <interface/> which can have several attributes. However, the driver element is currently formated only if the driver's name or txmode has been specified. This makes only a little sense as we parse even partial <driver/>, for instance: <interface type='user'> <mac address='52:54:00:e5:48:58'/> <model type='virtio'/> <driver ioeventfd='on' event_idx='on' queues='5'/> </interface> But such XML would never get formatted back. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 08 8月, 2014 3 次提交
-
-
由 Peter Krempa 提交于
-
由 John Ferlan 提交于
Introduce a new structure to handle an iSCSI host device based on the existing virDomainHostdevSubsysSCSI by adding a "protocol='iscsi'" to the <source/> element. The existing scsi_host subsystem RNG was modified to read an optional "protocol='adapter'", although it won't be written out nor is it documented as an option (by choice). The new hostdev structure mimics the existing <disk/> element for an iSCSI device (network) device. New XML is: <hostdev mode='subsystem' type='scsi' managed='yes'> <source protocol='iscsi' name='iqn.1992-01.com.example'> <host name='example.org' port='3260'/> <auth username='myname'> <secret type='iscsi' usage='mycluster_myname'/> </auth> </source> <address type='drive' controller='0' bus='0' target='2' unit='5'/> </hostdev> The controller element will mimic the existing scsi_host code insomuch as when 'lsi' and 'virtio-scsi' are used.
-
由 John Ferlan 提交于
In preparation for hostdev support for iSCSI and a virStorageNetHostDefPtr, split out the network disk storage parsing of the 'host' element into a separate routine.
-
- 30 7月, 2014 3 次提交
-
-
由 Eric Blake 提交于
A future patch is going to wire up qemu active block commit jobs; but as they have similar events and are canceled/pivoted in the same way as block copy jobs, it is easiest to track all bookkeeping for the commit job by reusing the <mirror> element. This patch adds domain XML to track which job was responsible for creating a mirroring situation, and adds a job='copy' attribute to all existing uses of <mirror>. Along the way, it also massages the qemu monitor backend to read the new field in order to generate the correct type of libvirt job (even though it requires a future patch to actually cause a qemu event that can be reported as an active commit). It also prepares to update persistent XML to match changes made to live XML when a copy completes. * docs/schemas/domaincommon.rng: Enhance schema. * docs/formatdomain.html.in: Document it. * src/conf/domain_conf.h (_virDomainDiskDef): Add a field. * src/conf/domain_conf.c (virDomainBlockJobType): String conversion. (virDomainDiskDefParseXML): Parse job type. (virDomainDiskDefFormat): Output job type. * src/qemu/qemu_process.c (qemuProcessHandleBlockJob): Distinguish active from regular commit. * src/qemu/qemu_driver.c (qemuDomainBlockCopy): Set job type. (qemuDomainBlockPivot, qemuDomainBlockJobImpl): Clean up job type on completion. * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-old.xml: Update tests. * tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: Likewise. * tests/qemuxml2argvdata/qemuxml2argv-disk-active-commit.xml: New file. * tests/qemuxml2xmltest.c (mymain): Drive new test. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Cédric Bosdonnat 提交于
If all features are set to default (including the capabilities policy), but some capabilities are toggled, we need to output the <features> element when formatting the config.
-
由 Eric Blake 提交于
Doing a blockcopy operation across a libvirtd restart is not very robust at the moment. In particular, we are clearing the <mirror> element prior to telling qemu to finish the job. Also, thanks to the ability to request async completion, the user can easily regain control prior to qemu actually finishing the effort, and they should be able to poll the domain XML to see if the job is still going. A future patch will fix things to actually wait until qemu is done before modifying the XML to reflect the job completion. But since qemu issues identical BLOCK_JOB_COMPLETE events regardless of whether the job was cancelled (kept the original disk) or completed (pivoted to the new disk), we have to track which of the two operations were used to end the job. Furthermore, we'd like to avoid attempts to end a job where we are already waiting on an earlier request to qemu to end the job. Likewise, if we miss the qemu event (perhaps because it arrived during a libvirtd restart), we still need enough state recorded to be able to determine how to modify the domain XML once we reconnect to qemu and manually learn whether the job still exists. Although this patch doesn't actually fix the problem, it is a preliminary step that makes it possible to track whether a job has already begun steps towards completion. * src/conf/domain_conf.h (virDomainDiskMirrorState): New enum. (_virDomainDiskDef): Convert bool mirroring to new enum. * src/conf/domain_conf.c (virDomainDiskDefParseXML) (virDomainDiskDefFormat): Handle new values. * src/qemu/qemu_process.c (qemuProcessHandleBlockJob): Adjust client. * src/qemu/qemu_driver.c (qemuDomainBlockPivot) (qemuDomainBlockJobImpl): Likewise. * docs/schemas/domaincommon.rng (diskMirror): Expose new values. * docs/formatdomain.html.in (elementsDisks): Document it. * tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: Test it. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 29 7月, 2014 1 次提交
-
-
由 Michal Privoznik 提交于
<memoryBacking> <hugepages> <page size="1" unit="G" nodeset="0-3,5"/> <page size="2" unit="M" nodeset="4"/> </hugepages> </memoryBacking> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 28 7月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
Libvirt documents that the default entropy source for the 'random' backend of a RNG device is /dev/random. Instead of storing and propagating NULL across our code and checking it in multiple places fill the default in the post parse callback and use that in the other places.
-
- 25 7月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
qemu supports adding multiple RNG devices. This patch allows libvirt to support this.
-
- 24 7月, 2014 8 次提交
-
-
由 John Ferlan 提交于
Create the structures and API's to hold and manage the iSCSI host device. This extends the 'scsi_host' definitions added in commit id '5c811dce'. A future patch will add the XML parsing, but that code requires some infrastructure to be in place first in order to handle the differences between a 'scsi_host' and an 'iSCSI host' device.
-
由 John Ferlan 提交于
Split virDomainHostdevSubsysSCSI further. In preparation for having either SCSI or iSCSI data, create a union in virDomainHostdevSubsysSCSI to contain just a virDomainHostdevSubsysSCSIHost to describe the 'scsi_host' host device
-
由 John Ferlan 提交于
Create a separate typedef for the hostdev union data describing SCSI Then adjust the code to use the new pointer
-
由 John Ferlan 提交于
Create a separate typedef for the hostdev union data describing PCI. Then adjust the code to use the new pointer
-
由 John Ferlan 提交于
Create a separate typedef for the hostdev union data describing USB. Then adjust the code to use the new pointer
-
由 Martin Kletzander 提交于
This patch adds back the virDomainDef typedef into domain_conf and makes all the numatune_conf functions independent of any virDomainDef definitions. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Eric Blake 提交于
Our seclabel parsing was repeatedly assigning malloc'd data into a temporary variable, without first freeing the previous use. Among other leaks flagged by valgrind: ==9312== 8 bytes in 1 blocks are definitely lost in loss record 88 of 821 ==9312== at 0x4A0645D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==9312== by 0x8C40369: strdup (strdup.c:42) ==9312== by 0x50EA799: virStrdup (virstring.c:676) ==9312== by 0x50FAEB9: virXPathString (virxml.c:90) ==9312== by 0x50FAF1E: virXPathStringLimit (virxml.c:112) ==9312== by 0x510F516: virSecurityLabelDefParseXML (domain_conf.c:4571) ==9312== by 0x510FB20: virSecurityLabelDefsParseXML (domain_conf.c:4720) While it was multiple problems, it looks like commit da78351b (thankfully unreleased) was to blame for all of them. * src/conf/domain_conf.c (virSecurityLabelDefParseXML): Plug leaks detected by valgrind. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1122205 Although the edits were changing in-memory XML, it was not flushed to disk; so unless some other action changes XML, a libvirtd restart would lose the changed information. * src/conf/domain_conf.c (virDomainObjSetMetadata): Add parameter, to save live status across restarts. (virDomainSaveXML): Allow for test driver. * src/conf/domain_conf.h (virDomainObjSetMetadata): Adjust signature. * src/bhyve/bhyve_driver.c (bhyveDomainSetMetadata): Adjust caller. * src/lxc/lxc_driver.c (lxcDomainSetMetadata): Likewise. * src/qemu/qemu_driver.c (qemuDomainSetMetadata): Likewise. * src/test/test_driver.c (testDomainSetMetadata): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 23 7月, 2014 3 次提交
-
-
由 Ján Tomko 提交于
For the values "default", "on", "off" Replaces virDeviceAddressPCIMulti virDomainFeatureState virDomainIoEventFd virDomainVirtioEventIdx virDomainDiskCopyOnRead virDomainMemDump virDomainPCIRombarMode virDomainGraphicsSpicePlaybackCompression
-
由 Ján Tomko 提交于
Replace all three-state (default/yes/no) enums with it: virDomainBIOSUseserial virDomainBootMenu virDomainPMState virDomainGraphicsSpiceClipboardCopypaste virDomainGraphicsSpiceAgentFileTransfer virNetworkDNSForwardPlainNames
-
由 Cédric Bosdonnat 提交于
Added <capabilities> in the <features> section of LXC domains configuration. This section can contain elements named after the capabilities like: <mknod state="on"/>, keep CAP_MKNOD capability <sys_chroot state="off"/> drop CAP_SYS_CHROOT capability Users can restrict or give more capabilities than the default using this mechanism.
-
- 18 7月, 2014 1 次提交
-
-
由 Cédric Bosdonnat 提交于
LXC network devices can now be assigned a custom NIC device name on the container side. For example, this is configured with: <interface type='network'> <source network='default'/> <guest dev="eth1"/> </interface> In this example the network card will appear as eth1 in the guest.
-
- 17 7月, 2014 4 次提交
-
-
由 Martin Kletzander 提交于
There were numerous places where numatune configuration (and thus domain config as well) was changed in different ways. On some places this even resulted in persistent domain definition not to be stable (it would change with daemon's restart). In order to uniformly change how numatune config is dealt with, all the internals are now accessible directly only in numatune_conf.c and outside this file accessors must be used. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Since there was already public virDomainNumatune*, I changed the private virNumaTune to match the same, so all the uses are unified and public API is kept: s/vir\(Domain\)\?Numa[tT]une/virDomainNumatune/g then shrunk long lines, and mainly functions, that were created after that: sed -i 's/virDomainNumatuneMemPlacementMode/virDomainNumatunePlacement/g' And to cope with the enum name, I haad to change the constants as well: s/VIR_NUMA_TUNE_MEM_PLACEMENT_MODE/VIR_DOMAIN_NUMATUNE_PLACEMENT/g Last thing I did was at least a little shortening of already long name: s/virDomainNumatuneDef/virDomainNumatune/g Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
to ease the review of commits to follow. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Michele Paolino 提交于
This patch adds support for the QEMU vhost-user feature to libvirt. vhost-user enables the communication between a QEMU virtual machine and other userspace process using the Virtio transport protocol. It uses a char dev (e.g. Unix socket) for the control plane, while the data plane based on shared memory. The XML looks like: <interface type='vhostuser'> <mac address='52:54:00:3b:83:1a'/> <source type='unix' path='/tmp/vhost.sock' mode='server'/> <model type='virtio'/> </interface> Signed-off-by: NMichele Paolino <m.paolino@virtualopensystems.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 14 7月, 2014 2 次提交
-
-
由 Michal Privoznik 提交于
Instead of allocating the virSecurityLabelDef structure ourselves, we can utilize virSecurityLabelDefNew which even sets the default values for us. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1113860 We've always done that. Well, until 990e46c4. Point is, if we don't format model, we may lose a domain on libvirtd restart. If the seclabel is implicit however, we should skip it's formatting. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 11 7月, 2014 3 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1066894 With current code it's possible to have for instance: virsh dumpxml mydomain | grep seclabel <seclabel type='dynamic' model='selinux' relabel='yes'/> <seclabel type='dynamic' model='selinux' relabel='yes'/> <seclabel type='dynamic' model='selinux' relabel='yes'/> <seclabel type='dynamic' model='selinux' relabel='yes'/> <seclabel type='dynamic' model='selinux' relabel='yes'/> what doesn't make any sense. We should reject the XML in the config parsing phase. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Similarly to the previous commit, boolean variables should not start with 'no-' prefix. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
This negation in names of boolean variables is driving me insane. The code is much more readable if we drop the 'no-' prefix. Well, at least for me. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 09 7月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
Split out checking of invalid metadata type from the switch statement so that we can use the typecasted enum value to allow tracking addition of new items by the compliler. Also avoids two dead-code break statements.
-
- 08 7月, 2014 2 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Peter Krempa 提交于
In the future we might need to track state of individual images. Move the readonly and shared flags to the virStorageSource struct so that we can keep them in a per-image basis.
-