- 14 2月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
All the data for getting the actual type is present in the domain config. There is no need to have this function private to the qemu driver and it will be re-used later in other parts of libvirt
-
- 11 2月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
Add a new character device backend called 'spiceport' that uses spice's channel for communications and apart from spicevmc can be used as a backend for any character device from libvirt's point of view. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 10 2月, 2014 3 次提交
-
-
由 Peter Krempa 提交于
Add a new <timer> for the HyperV reference time counter enlightenment and the iTSC reference page for Windows guests. This feature provides a paravirtual approach to track timer events for the guest (similar to kvmclock) with the option to use real hardware clock on systems with a iTSC with compensation across various hosts.
-
由 Peter Krempa 提交于
According to the documentation various timer options are only supported by certain timer types. Add a post parse check to verify that the user didn't specify invalid options. Also fix the qemu command line parsing function to set correct default values for the kvmclock timer so that it passes the new check.
-
由 Peter Krempa 提交于
According to the documentation describing various tunables for domain timers not all the fields are supported by all the driver types. Express these in the RNG: - rtc, platform: Only these support the "track" attribute. - tsc: only one to support "frequency" and "mode" attributes - hpet, pit: tickpolicy/catchup attribute/element - kvmclock: no extra attributes are supported Additionally the attributes of the <catchup> element for tickpolicy='catchup' are optional according to the parsing code. Express this in the XML and fix a spurious space added while formatting the <catchup> element and add tests for it.
-
- 07 2月, 2014 2 次提交
-
-
由 Matthieu Coudron 提交于
This commit allows to attach/detach a <filesystem> device in qemu. For this purpose I'm introducing two new functions: virDomainFSInsert() and virDomainFSRemove() and adding necessary code in the qemu driver. It compares filesystems based on their "destination" folder. So if two filesystems share the same destination, they are considered equal and the qemu driver would reject the insertion. Signed-off-by: NMatthieu Coudron <mattator@gmail.com>
-
由 Matthieu Coudron 提交于
With this change the code gets shorter and more readable. Signed-off-by: NMatthieu Coudron <mattator@gmail.com>
-
- 21 1月, 2014 1 次提交
-
-
由 Francesco Romani 提交于
spice-server offers an API to disable file transfer messages on the agent channel between the client and the guest. This is supported in qemu through the disable-agent-file-xfer option. This patch exposes this option to libvirt. Adds a new element 'filetransfer', with one property, 'enable', which accepts a boolean. Default is enabled, for backward compatibility. Depends on the capability exported in the first patch of the series. Signed-off-by: NFrancesco Romani <fromani@redhat.com>
-
- 20 1月, 2014 1 次提交
-
-
由 Gao feng 提交于
This patch introduces new xml elements under <blkiotune>, we use these new elements to setup the throttle blkio cgroup for domain. The new blkiotune node looks like this: <blkiotune> <device> <path>/path/to/block</path> <weight>1000</weight> <read_iops_sec>10000</read_iops_sec> <write_iops_sec>10000</write_iops_sec> <read_bytes_sec>1000000</read_bytes_sec> <write_bytes_sec>1000000</write_bytes_sec> </device> </blkiotune> Signed-off-by: NGuan Qiang <hzguanqiang@corp.netease.com> Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
- 16 1月, 2014 1 次提交
-
-
由 Christophe Fergeau 提交于
Currently, during XML parsing, when a call to a FromString() function to get an enum value fails, the error which is reported is either VIR_ERR_CONFIG_UNSUPPORTED, VIR_ERR_INTERNAL_ERROR or VIR_ERR_XML_ERROR. This commit makes such conversion failures consistently return VIR_ERR_CONFIG_UNSUPPORTED.
-
- 11 1月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
Any test suite which involves a virDomainDefPtr should call virDomainDefCheckABIStability with itself just as a basic sanity check that the identity-comparison always succeeds. This would have caught the recent NULL pointer access crash. Make sure we cope with def->name being NULL since the VMWare config parser produces NULL names. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 08 1月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 31 12月, 2013 1 次提交
-
-
由 Laine Stump 提交于
This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1046337 The <driver> name attribute of an interface is interpreted in two different ways depending on the <interface> type - if the interface is type='hostdev', then the driver name describes which backend to use for the hostdev device assignment (vfio or kvm), but if the interface is any emulated type *and* the model type is "virtio", then the driver name can be "vhost" or "qemu", telling which backend qemu should use to communicate with the emulated device. The problem comes when someone has defined a an interface like this (which is accepted by the parser as long as no <driver name='xxx'/> is specified): <interface type='hostdev'> ... <model type='virtio'/> ... </interface> As libvirt storing this definition in the domain's status, the driver name is automatically filled in with the backend that was automatically decided by libvirt, so it stores this in the status: <interface type='hostdev'> ... <driver name='vfio'/> ... <model type='virtio'/> ... </interface> This isn't noticed until the next time libvirtd is restarted - as it is reading the status of all domains, it encounters the above interface definition, logs an error: internal error: Unknown interface <driver name='vfio'> has been specified and fails to reload the domain status, so the domain is marked as inactive. The solution is to stop the parser from interpreting <driver> attributes as if the device was an emulated virtio device, when it is actually a hostdev. (Although the bug has existed since vfio support was added, it has just recently become more apparent because libvirt previously didn't automatically set the driver name for hostdev interfaces in the domain status to vfio/kvm as it does since commit f094aa, first appearing in v1.1.4.)
-
- 23 12月, 2013 1 次提交
-
-
由 Laine Stump 提交于
This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1045002 If a domain has an <interface type='hostdev'> or an <interface type='network'> where the network itself is a pool of hostdev devices, then libvirt will internally keep that device on both the interface list *and* the hostdev list for the domain. One of the places this comes in handy is when a new device is being added and libvirt wants to find a unique "alias" name for it - it just scans through the hostdev array and makes sure it picks a name that doesn't match the alias of any device in that array. However, when libvirtd was restarted, if there was an <interface type='network'> with the network being a hostdev pool, the device would not be added to the reconstructed internal hostdev array, so its alias would not be found during a scan of the hostdev array, thus attempts to add a new hostdev (or <interface type='hostdev'> or <interface type='network'>) would result in a message like this: internal error: unable to execute QEMU command 'device_add': Duplicate ID 'hostdev0' for device This patch simply fixes the existing code in the domain XML parser that fixes up the hostdev array in the case of <interface type='hostdev'> to do the same thing in the case of <interface type='network'> with a hostdev network. This bug has existed since the very first addition of hostdev networks to libvirt (0.10.0).
-
- 21 12月, 2013 1 次提交
-
-
由 John Ferlan 提交于
Commit id '4313fead' added a call to virDomainPanicCheckABIStability() which did not check whether the panic device existed before making a call to virDomainDeviceInfoCheckABIStability() which ended up segfaulting: Thread 1 (Thread 0x7f5332837700 (LWP 10964)): (src=<optimized out>, dst=<optimized out>) at conf/domain_conf.c:13007 (dst=<optimized out>, src=<optimized out>) at conf/domain_conf.c:13712 (src=<optimized out>, dst=<optimized out>) at conf/domain_conf.c:14056 (domain=domain@entry=0x7f53000057c0, vm=vm@entry=0x7f53000036d0, defptr=defptr@entry=0x7f5332836978, snap=snap@entry=0x7f5332836970, update_current=update_current@entry=0x7f5332836962, flags=flags@entry=1) at conf/snapshot_conf.c:1230 (domain=0x7f53000057c0, xmlDesc=<optimized out>, flags=1) at qemu/qemu_driver.c:12719 (domain=domain@entry=0x7f53000057c0, xmlDesc=0x7f53000081d0 "<domainsnapshot>\n <name>snap2</name>\n <description>new-desc</description>\n <state>running</state>\n <parent>\n <name>snap1</name>\n </parent>\n <creationTime>1387487268</creationTime>\n <memory s"..., flags=1) at libvirt.c:19695 ... (gdb) up 3 (gdb) print *other->def->dom $2 = {virtType = 2, id = -1, .. ... rng = 0x0, panic = 0x0, namespaceData = 0x0,... ... (gdb) print *def->dom $3 = {virtType = 2, id = -1, ... ... rng = 0x0, panic = 0x0, namespaceData = 0x0,... ... (gdb) Also seen using following sequence: virsh save $dom $file virsh save-image-edit $file add (or remove) a <panic/> line <devices> ... <panic> <address type='isa' iobase='0x505'/> </panic> ... </devices>
-
- 13 12月, 2013 2 次提交
-
-
由 Hu Tao 提交于
panic device is a device that enables libvirt to receive notification of guest panic event. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Hu Tao 提交于
For example: <address type='isa' iobase='0x505' irq='0x1'/> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 12 12月, 2013 3 次提交
-
-
由 Gao feng 提交于
The throttle blkio cgroup will reuse this struct. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
由 Gao feng 提交于
Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
由 Gao feng 提交于
virDomainBlkioDeviceWeightParseXML will be used to parse the xml element read_bps, write_bps, read_iops, write_iops. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
- 10 12月, 2013 1 次提交
-
-
由 Martin Kletzander 提交于
When changing memtune limits to unlimited with AFFECT_CONFIG, the values in virDomainDef are set to PARAM_UNLIMITED, which causes the whole <memtune> to be formatted. This can be changed in all drivers, but it also makes sense to use the default (0) as another value for "unlimited", since zero memory limit makes no sense. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 06 12月, 2013 2 次提交
-
-
由 Ján Tomko 提交于
55bfd020 added a 'ram' attribute for qxl video devices but didn't update the ABI check. https://bugzilla.redhat.com/show_bug.cgi?id=1035123
-
由 Peter Krempa 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1035118 When outputting the XML for the RNG device, the code didn't format the PCI address info. Additionally the schema wasn't expecting the info although it was being parsed and used internally. Fix those mistakes and add test for the PCI info section.
-
- 02 12月, 2013 7 次提交
-
-
由 Peter Krempa 提交于
Add virDomainDiskAuthClear to help cleaning out the struct in other places too.
-
由 Peter Krempa 提交于
To simplify operations on virDomainDiskHostDef arrays we will need deep copy and freeing functions. Add and properly export them.
-
由 Peter Krempa 提交于
This code will be reused in the snapshot disk definition parser.
-
由 Peter Krempa 提交于
The code is common for all the various disk types. Split it out to a common function.
-
由 Peter Krempa 提交于
Avoid if statements when used with virBufferEscapeString which automaticaly omits the whole string. Also add some line breaks to visualy separate the code.
-
由 Peter Krempa 提交于
The <source> element formatting function was expecting a virDomainDiskDefPtr to store the data. As snapshots are not using this data structure to hold the data, we need to add an internal function which splits out individual fields separately.
-
由 Nehal J Wani 提交于
This patch fixes the memory leaks found while running qemuxml2argvtest ==8260== 3 bytes in 1 blocks are definitely lost in loss record 1 of 129 ==8260== at 0x4A0887C: malloc (vg_replace_malloc.c:270) ==8260== by 0x341F485E21: strdup (strdup.c:42) ==8260== by 0x4CADCFF: virStrdup (virstring.c:554) ==8260== by 0x4CBB839: virXPathString (virxml.c:90) ==8260== by 0x4CE753A: virDomainDefParseXML (domain_conf.c:11478) ==8260== by 0x4CEB4FE: virDomainDefParseNode (domain_conf.c:12742) ==8260== by 0x4CEB675: virDomainDefParse (domain_conf.c:12684) ==8260== by 0x425958: testCompareXMLToArgvHelper (qemuxml2argvtest.c:107) ==8260== by 0x427111: virtTestRun (testutils.c:138) ==8260== by 0x41D3FE: mymain (qemuxml2argvtest.c:452) ==8260== by 0x4277B2: virtTestMain (testutils.c:593) ==8260== by 0x341F421A04: (below main) (libc-start.c:225) ==8260== ==8260== 4 bytes in 1 blocks are definitely lost in loss record 5 of 129 ==8260== at 0x4A0887C: malloc (vg_replace_malloc.c:270) ==8260== by 0x341F485E21: strdup (strdup.c:42) ==8260== by 0x4CADCFF: virStrdup (virstring.c:554) ==8260== by 0x4CBB839: virXPathString (virxml.c:90) ==8260== by 0x4CE753A: virDomainDefParseXML (domain_conf.c:11478) ==8260== by 0x4CEB4FE: virDomainDefParseNode (domain_conf.c:12742) ==8260== by 0x4CEB675: virDomainDefParse (domain_conf.c:12684) ==8260== by 0x425958: testCompareXMLToArgvHelper (qemuxml2argvtest.c:107) ==8260== by 0x427111: virtTestRun (testutils.c:138) ==8260== by 0x41D39A: mymain (qemuxml2argvtest.c:451) ==8260== by 0x4277B2: virtTestMain (testutils.c:593) ==8260== by 0x341F421A04: (below main) (libc-start.c:225) ==8260==
-
- 26 11月, 2013 1 次提交
-
-
由 Yuri Chornoivan 提交于
-
- 21 11月, 2013 1 次提交
-
-
由 Eric Blake 提交于
Most of our code base uses space after comma but not before; fix the remaining uses before adding a syntax check. * src/conf/capabilities.c: Consistently use commas. * src/conf/domain_conf.c: Likewise. * src/conf/network_conf.c: Likewise. * src/conf/storage_conf.c: Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 12 11月, 2013 3 次提交
-
-
由 Peter Krempa 提交于
Now that the function is separate clean out a few ugly places and fix up error messages.
-
由 Peter Krempa 提交于
The function destroys only the contents not the object itself thus it should be called Clear.
-
由 Peter Krempa 提交于
To avoid code duplication between snapshot configuration code that parses the disk source too we need to split out this code that will be reused later on. This patch tries to be code movement, some aspects of this function will be refactored later.
-
- 11 11月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1027096 If there's the following snippet in the domain XML, the domain will be lost upon the daemon restart (if the domain is started prior restart): <seclabel type='dynamic' relabel='yes'/> The problem is, the 'label', 'imagelabel' and 'baselabel' are parsed whenever the VIR_DOMAIN_XML_INACTIVE is *not* present or the label is static. The latter is not our case, obviously. So, when libvirtd starts up, it finds domain state xml and parse it. During parsing, many XML flags are enabled but VIR_DOMAIN_XML_INACTIVE. Hence, our parser tries to extract 'label', 'imagelabel' and 'baselabel' from the XML which fails for model='none'. Err, this model - even though not specified in XML - can be taken from qemu wide config file: /etc/libvirtd/qemu.conf. However, in order to know we are dealing with model='none' the code in question must be moved forward a bit. Then a new check must be introduced. This is what the first two chunks are doing. But this alone is not sufficient. The domain state XML won't contain the model attribute without slight modification. The model should be inserted into the XML even if equal to 'none' and the state XML is being generated - what if the origin (the @security_driver variable in qemu.conf) changes during libvirtd restarts? At the end, a test to catch this scenario is introduced. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 08 11月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
The linux kernel recently added support for paravirtual spinlock handling to avoid performance regressions on overcomitted hosts. This feature needs to be turned in the hypervisor so that the guest OS is notified about the possible support. This patch adds a new feature "paravirt-spinlock" to the XML and supporting code to enable the "kvm_pv_unhalt" pseudo CPU feature in qemu. https://bugzilla.redhat.com/show_bug.cgi?id=1008989
-
由 Peter Krempa 提交于
Currently we were storing domain feature flags in a bit field as the they were either enabled or disabled. New features such as paravirtual spinlocks however can be tri-state as the default option may depend on hypervisor version. To allow storing tri-state feature state in the same place instead of having to declare dedicated variables for each feature this patch refactors the bit field to an array.
-
- 07 11月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
For some strange reason virDomainDiskSourcePoolDefParse accessed def of the disk and allocated the pool object in it. To avoid the need to carry over the disk definition object, refactor this function to return the allocated object instead.
-
- 01 11月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
When starting a transient VM the first thing done is to check for duplicates. The check looks if there are any running VMs with the matching name/uuid. It explicitly allows there to be inactive VMs, so that a persistent VM can be temporarily booted with a different config. There is a race condition, however, where 2 or more clients try to create the same transient VM. The first client will cause a virDomainObjPtr to be added to the domain list, and it is inactive at this stage. The second client may then come along and see this inactive VM, and mistake it for a persistent VM. If the first VM fails to start its transient guest for any reason, then it'll remove the virDomainObjPtr from the list. The second client now has a virDomainObjPtr that it can try to boot, which libvirt no longer has a record of. The result can be a running QEMU process that is orphaned. It was also, however, possible for the virDomainObjPtr to be completely free'd which will cause libvirtd to crash in some scenarios. The fix is to only allow an existing inactive VM if it is marked as persistent. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-