- 04 8月, 2014 2 次提交
-
-
由 Ján Tomko 提交于
Otherwise this beautiful error would be overwritten when the function is called with a really high rate number: 2014-07-28 12:51:47.920+0000: 2304: error : virCommandWait:2399 : internal error: Child process (/sbin/tc class add dev vnet0 parent 1: classid 1:1 htb rate 4294968kbps) unexpected exit status 1: Illegal "rate" Usage: ... qdisc add ... htb [default N] [r2q N] default minor id of class to which unclassified packets are sent {0} r2q DRR quantums are computed as rate in Bps/r2q {10} debug string of 16 numbers each 0-3 {0} ... class add ... htb rate R1 [burst B1] [mpu B] [overhead O] [prio P] [slot S] [pslot PS] [ceil R2] [cburst B2] [mtu MTU] [quantum Q] rate rate allocated to this class (class can still borrow) burst max bytes burst which can be accumulated during idle period {computed} mpu minimum packet size used in rate computations overhead per-packet size overhead used in rate computations linklay adapting to a linklayer e.g. atm ceil definite upper class rate (no borrows) {rate} cburst burst but for ceil {computed} mtu max packet size we create rate map for {1600} prio priority of leaf; lowe https://bugzilla.redhat.com/show_bug.cgi?id=1043735
-
由 Martin Kletzander 提交于
There are multiple mount points after commit 725a211f, but one comment wasn't changed to use plurals. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 30 7月, 2014 4 次提交
-
-
由 Eric Blake 提交于
With this in place, I can (finally!) now do: virsh blockcommit $dom vda --shallow --verbose --pivot and watch qemu shorten the backing chain by one, followed by libvirt automatically updating the dumpxml output, effectively undoing the work of virsh snapshot-commit --no-metadata --disk-only. Commit is SOOOO much faster than blockpull, when I'm still fairly close in time to when the temporary qcow2 wrapper file was created via a snapshot operation! * src/qemu/qemu_driver.c (qemuDomainBlockCommit): Implement live commit. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 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>
-
由 Eric Blake 提交于
We were not directly saving the domain XML to file after starting or finishing a blockcopy. Without the startup write, a libvirtd restart in the middle of a copy job would forget that the job was underway. Then at pivot, we were indirectly writing new XML in reaction to events that occur as we stop and restart the guest CPUs. But there was a race: since pivot is an async action, it is possible that libvirtd is restarted before the pivot completes, so if XML changes during the event, that change was not written. The original blockcopy code cleared out the <mirror> element prior to restarting the CPUs, but this is also a race, observed if a user does an async pivot and a dumpxml before the event occurs. Furthermore, this race will interfere with active commit in a future patch, because that code will rely on the <mirror> element at the time of the qemu event to determine whether to inform the user of a normal commit or an active commit. Fix things by saving state any time we modify live XML, while delaying XML disk modifications until after the event completes. We still need a to teach libvirtd restarts to examine all existing <mirror> elements to see if the job completed in the meantime (that is, if libvirtd misses the event, the updated state still needs to be updated in live XML), but that will be a later patch, in part because we also need to to start taking advantage of newer qemu's ability to keep the job around after completion rather than the current usage where the job disappears both on error and on success. * src/qemu/qemu_driver.c (qemuDomainBlockCopy): Track XML change on disk. (qemuDomainBlockJobImpl, qemuDomainBlockPivot): Move job-end XML rewrites... * src/qemu/qemu_process.c (qemuProcessHandleBlockJob): ...here. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 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 4 次提交
-
-
由 Hu Tao 提交于
If PCI passthrough type is not supported, we should error out rather than continue building the command line. When starting a domain, the type has been already checked by qemuPrepareHostdevPCICheckSupport() before building qemu command line, so the problem doesn't emerge. But when coverting a domain xml without specifying passthrough type explictly to qemu arg, we will get a malformed command line. the xml: <hostdev mode='subsystem' type='pci' managed='yes'> <source> <address domain='0x0001' bus='0x03' slot='0x00' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </hostdev> the converted command line: -device ,host=0001:03:00.0,id=hostdev0,bus=pci.0,addr=0x5 After this patch, virsh gives an error message: virsh domxml-to-native qemu-argv /tmp/tmp.xml error: internal error: invalid PCI passthrough type 'default' Signed-off-by: NHu Tao <hutao@cn.fujitsu.com>
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 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>
-
由 Michal Privoznik 提交于
Use better detection of hugetlbfs mount points. Yes, there can be multiple mount points each serving different huge page size. Since we already have ability to override the mount point in the qemu.conf file, this crazy backward compatibility code is brought in. Now we allow multiple mount points, so the "hugetlbfs_mount" option must take an list of strings (mount points). But previously, it was just a string, so we must accept both types now. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 28 7月, 2014 3 次提交
-
-
由 Peter Krempa 提交于
Commit e5f36698 introduces a false-positive build failure in the sound card model handling switch. Initialize the model to NULL although the value should never be used.
-
由 Peter Krempa 提交于
Use correct type in the switch and handle all sound card models in it so that the compiler tracks additions.
-
由 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 4 次提交
-
-
由 Peter Krempa 提交于
Since 24e5cafb (thankfully unreleased) when a VM with an empty disk drive would be started the code would call stat() on NULL path as a check was missing from the callback rendering machines unstartable. Report success when the path is empty (denoting an empty drive).
-
由 Peter Krempa 提交于
qemu supports adding multiple RNG devices. This patch allows libvirt to support this.
-
由 Peter Krempa 提交于
The "random" backend for virtio-rng can be started with no path specified which equals to /dev/random. The cgroup code didn't consider this and called few of the functions with NULL resulting into: $ virsh start rng-vm error: Failed to start domain rng-vm error: Path '(null)' is not accessible: Bad address Problem introduced by commit c6320d34
-
由 Michal Privoznik 提交于
If user hasn't provided any @emulatorbin, the qemuCaps are searched by @arch provided (which in fact can be guessed from the host). However, there's no guarantee that the qemu binary for @arch will exist. Therefore qemu capabilities may be nonexistent too. If that's the case, we should throw an error message prior jumping onto 'cleanup' label as the helper lookup function remains silent on no search result. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 24 7月, 2014 13 次提交
-
-
由 Martin Kletzander 提交于
This was changed before: https://www.redhat.com/archives/libvir-list/2013-October/msg00525.html but not everywhere in the code. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1100769Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 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 提交于
Add a conn for future patches to be able to grab the secret when authenticating 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
-
由 Peter Krempa 提交于
Move the last operation done on local files to the storage driver API.
-
由 Peter Krempa 提交于
Use the storage driver to chown remote images.
-
由 Peter Krempa 提交于
To integrate the security driver with the storage driver we need to pass a callback for a function that will chown storage volumes. Introduce and document the callback prototype.
-
由 Michal Privoznik 提交于
Up to now, users have to pass two arguments at least: domain virt type ('qemu' vs 'kvm') and one of emulatorbin or architecture. This is not much user friendly. Nowadays users mostly use KVM and share the host architecture with the guest. So now, the API (and subsequently virsh command) can be called with all NULLs (without any arguments). Before this patch: # virsh domcapabilities error: failed to get emulator capabilities error: virttype_str in qemuConnectGetDomainCapabilities must not be NULL # virsh domcapabilities kvm error: failed to get emulator capabilities error: invalid argument: at least one of emulatorbin or architecture fields must be present After: # virsh domcapabilities <domainCapabilities> <path>/usr/bin/qemu-system-x86_64</path> <domain>kvm</domain> <machine>pc-i440fx-2.1</machine> <arch>x86_64</arch> <vcpu max='255'/> </domainCapabilities> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 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 提交于
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
-
由 Chen Hanxiao 提交于
Before: virsh # dominfo chx3 State: shut off Max memory: 92160 KiB Used memory: 92160 KiB After: virsh # dominfo container1 State: shut off Max memory: 92160 KiB Used memory: 0 KiB Similar to qemu cases. Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
-
- 22 7月, 2014 2 次提交
-
-
由 Peter Krempa 提交于
Qemu doesn't currently support them and behaves strangely. Just forbid them. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1079162
-
由 Peter Krempa 提交于
Similarly to 49a3a649 forbid creating snapshots in domain states impossible to reach in qemu.
-
- 21 7月, 2014 2 次提交
-
-
由 Peter Krempa 提交于
Report errors on some states snapshots done by qemu should never reach
-
由 Peter Krempa 提交于
Convert the target snapshot state selector to a switch statement enumerating all possible values. This points out a few mistakes in the original selector. The logic of the code is preserved until later patches.
-
- 18 7月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
As with the local SCSI passthrough devicesm qemu can't support snapshots on those as the block ops are handled by the device. This is also true for iSCSI backing of the disk. Remove the check for the local block device and just forbid snapshot when the disk is of type 'lun'. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1073368
-
- 17 7月, 2014 2 次提交
-
-
由 Martin Kletzander 提交于
When domain is started with numatune memory mode strict and the nodeset does not include host NUMA node with DMA and DMA32 zones, KVM initialization fails. This is because cgroup restrict even kernel allocations. We are already doing numa_set_membind() which does the same thing, only it does not restrict kernel allocations. This patch leaves the userspace numa_set_membind() in place and moves the cpuset.mems setting after the point where monitor comes up, but before vcpu and emulator sub-groups are created. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-