- 25 2月, 2014 3 次提交
-
-
由 Laine Stump 提交于
This moves the call to virNetDevBandwidthFormat() in virDomainNetDefFormat() to be called right after the call to virNetDevVPortProfileFormat(), so that a single chunk of that function can be placed inside an if that conditionally calls virDomainActualNetDefContentsFormat() instead (next patch). The re-ordering necessitates modifying a couple of test data files.
-
由 Laine Stump 提交于
We will need to call virDomainNetDefFormat() from the network hook (in the network driver).
-
由 Laine Stump 提交于
In practice, if a virDomainNetDef has a virDomainActualNetDef allocated, the ActualNetDef will *always* contain the bandwidth and vlan data from the NetDef (unless there was also a portgroup involved - see networkAllocateActualDevice()). However, virDomainNetGetActual(Bandwidth|Vlan)() were coded to make it appear as if it might be possible to have a valid bandwidth/vlan in the NetDef, but a NULL in the ActualNetDef. Believing this un-truth could lead to writing unnecessarily defensive code when dealing with the virDomainGetActual*() functions, so this patch makes it more obvious: If there is an ActualNetDef, it will always have a copy of the various appropriate bits from its parent NetDef, and the virDomainGetActual* function will *always* return the data from the ActualNetDef, not from the NetDef. The reason for this effective-NOP patch is that a subsequent patch to change virDomainNetDefFormat will rely on the above rule.
-
- 20 2月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virDomainGetRootFilesystem method can be generalized to allow any filesystem path to be obtained. While doing this, start a new test case for purpose of testing various helper methods in the domain_conf.{c,h} files, such as this one. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 19 2月, 2014 4 次提交
-
-
由 Roman Bogorodskiy 提交于
At this point it has a limited functionality and is highly experimental. Supported domain operations are: * define * start * destroy * dumpxml * dominfo It's only possible to have only one disk device and only one network, which should be of type bridge.
-
由 Li Zhang 提交于
PS2 devices only work on X86 platform, other platforms may need USB devices instead. Athough it doesn't influence the QEMU command line, it's not right to add PS2 mouse/keyboard for non-X86 platform. Signed-off-by: NLi Zhang <zhlcindy@linux.vnet.ibm.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Li Zhang 提交于
There is no keyboard support currently in libvirt. For some platforms (PPC64 QEMU) this makes graphics unusable, since the keyboard is not implicit and it can't be added via libvirt. Signed-off-by: NLi Zhang <zhlcindy@linux.vnet.ibm.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Li Zhang 提交于
Use it for the default mouse. Signed-off-by: NLi Zhang <zhlcindy@linux.vnet.ibm.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 17 2月, 2014 2 次提交
-
-
由 Daniel P. Berrange 提交于
virDomainDefCompatibleDevice blocks use of USB if no USB controller is present. This is not correct for containers since devices can be assigned directly regardless of any controllers. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Michal Privoznik 提交于
This new flag is to be used for tainting domains which XML definition was altered at runtime by a hook script. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 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==
-