- 26 11月, 2015 4 次提交
-
-
由 Daniel P. Berrange 提交于
Add virRotatingFileReader and virRotatingFileWriter objects which allow reading & writing from/to files with automation rotation to N backup files when a size limit is reached. This is useful for guest logging when a guaranteed finite size limit is required. Use of external tools like logrotate is inadequate since it leaves the possibility for guest to DOS the host in between invokations of logrotate. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Martin Kletzander 提交于
According to the documentation, CreateMachine accepts only 7bit ASCII characters in the machinename parameter, so let's make sure we can start machines with unicode names with systemd. We already have a function for that, we just forgot to use it. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1062943 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1282846Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
When adding a new media with change-media and --print-xml, let's try making it more readable and nice. Before: <disk type="file" device="cdrom"> ... <target dev="hdb" bus="ide"/> <address type="drive" controller="0" bus="0" target="0" unit="1"/> <source file="/tmp/a.iso"/></disk> After: <disk type="file" device="cdrom"> ... <source file="/tmp/a.iso"/> <target dev="hdb" bus="ide"/> <address type="drive" controller="0" bus="0" target="0" unit="1"/> </disk> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1219719Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Ján Tomko 提交于
A domain with '::' as the listen address fails to validate. Reuse the 'ipAddr' and 'dnsName' regexes from basictypes instead of reinventing them. https://bugzilla.redhat.com/show_bug.cgi?id=1285665
-
- 25 11月, 2015 17 次提交
-
-
由 Jiri Denemark 提交于
Link it to virDomainDetachDeviceFlags. https://bugzilla.redhat.com/show_bug.cgi?id=1257280Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Using qemuProcess{Init,Launch,FinishStartup} allows us to run pre-migration commands on destination before asking QEMU to wait for incoming migration data. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
NBD storage migration will not work with offline migration anyway and we already checked that the user did not ask for it. Thus it doesn't make sense to keep the code after 'done' label where we jump in case of offline migration. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Some failure paths in qemuMigrationPrepareAny forgot to kill the just started QEMU process. This patch fixes this by combining 'stop' and 'endjob' label into a new label 'stopjob'. This name was chosen to avoid confusion with the most common semantics of 'endjob'. Normally, 'endjob' is always called at the end of an API to stop the job we entered at the beginning. In qemuMigrationPrepareAny we only want to stop the job in failure path; on success we need to carry the job over to the Finish phase. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Finishes starting a new domain launched by qemuProcessLaunch. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Once qemuProcessInit was called, qemuProcessLaunch will launch a new QEMU process with stopped virtual CPUs. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
qemuProcessStart is going to be split in three parts: qemuProcessInit, qemuProcessLaunch, and qemuProcessFinish so that migration Prepare phase can insert additional code in the process. qemuProcessStart will be a small wrapper for all other callers. qemuProcessInit prepares the domain up to the point when priv->qemuCaps is initialized. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Dmitry Andreev 提交于
Only one panic device per model is allowed.
-
由 Dmitry Andreev 提交于
'model' attribute was added to a panic device but only one panic device is allowed. This patch changes panic device presence from 'optional' to 'zeroOrMore'.
-
由 Dmitry Andreev 提交于
Panic device type used depends on 'model' attribute. If no model is specified then device type depends on hypervisor and guest arch. 'pseries' model is used for pSeries guest and 'isa' model is used in other cases. XML: <devices> <panic model='hyperv'/> </devices> QEMU command line: qemu -cpu <cpu_model>,hv_crash
-
由 Dmitry Andreev 提交于
-
由 Dmitry Andreev 提交于
Libvirt already has two types of panic devices - pvpanic and pSeries firmware. This patch introduces the 'model' attribute and a new type of panic device. 'isa' model is for ISA pvpanic device. 'pseries' model is a default value for pSeries guests. 'hyperv' model is the new type. It's used for Hyper-V crash. Schema and docs are updated for the new attribute.
-
由 Dmitry Andreev 提交于
-
由 Guido Günther 提交于
This adds the qemu binaries as of 1.2.4 in Debian. It also removes a duplicate sparc64 entry.
-
由 Laine Stump 提交于
A PCI device may have the capability to setup virtual functions (VFs) but have them currently all disabled. Prior to this patch, if that was the case the the node device XML for the device wouldn't report any virtual_functions capability. With this patch, if a file called "sriov_totalvfs" is found in the device's sysfs directory, its contents will be interpreted as a decimal number, and that value will be reported as "maxCount" in a capability element of the device's XML, e.g.: <capability type='virtual_functions' maxCount='7'/> This will be reported regardless of whether or not any VFs are currently enabled for the device. NB: sriov_numvfs (the number of VFs currently active) is also available in sysfs, but that value is implied by the number of items in the list that is inside the capability element, so there is no reason to explicitly provide it as an attribute. sriov_totalvfs and sriov_numvfs are available in kernels at least as far back as the 2.6.32 that is in RHEL6.7, but in the case that they simply aren't there, libvirt will behave as it did prior to this patch - no maxCount will be displayed, and the virtual_functions capability will be absent from the device's XML when 0 VFs are enabled.
-
由 Laine Stump 提交于
Report the maximum possible number of VFs for an SRIOV PF, like this: <capability type='virtual_functions' maxCount='7'> ... </capability> I've just discovered that the virtual_functions and physical_functions capabilities are not supported in the virNodeDeviceParse functions, only in virNodeDeviceFormat (I suppose because they are only reported, not set from XML). This should probably be remedied, but is less immediately useful than the current patch.
-
- 24 11月, 2015 9 次提交
-
-
由 Peter Krempa 提交于
The return value has non-obvious semantics. Document it.
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Peter Krempa 提交于
The checked predicate is a deduction from the following checks: 1) maximum cpu id is checked for every parsed <vcpusched> element 2) the resulting bitmaps are checked for overlaps 3) there has to be at least one cpu per <vcpusched> From the above checks we can indeed deduce that if we have one <vcpusched> element per CPU we will have at most 'maxvcpus' of them. Drop the explicit check since it's redundant.
-
由 Ján Tomko 提交于
Now that new domains are started inside a QEMU_ASYNC_JOB_START job, we need to pass it down to qemuProcessStartCPUs too. This removes the warning: qemuDomainObjEnterMonitorInternal:1750 : This thread seems to be the async job owner; entering monitor without asking for a nested job is dangerous Introduced by commit 04c721f2, before that this code path was only executed with QEMU_ASYNC_JOB_NONE. (This code is not executed on migration, because qemuMigrationPrepareAny sets the VIR_QEMU_PROCESS_START_PAUSED flag.)
-
由 Peter Krempa 提交于
To simplify further refactors change the way the vcpu count is extracted to use a temp variable rather than juggling with def->maxvcpus.
-
由 Peter Krempa 提交于
To simplify further refactors change the way the vcpu count is extracted to use a temp variable rather than juggling with def.maxvcpus.
-
由 Peter Krempa 提交于
To simplify further refactors change the way the vcpu count is extracted to use a temp variable rather than juggling with def->maxvcpus.
-
由 Peter Krempa 提交于
Use the helper that is necessary to fill out some values rather than allocating it directly.
-
由 Christian Loehle 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 23 11月, 2015 4 次提交
-
-
由 Ján Tomko 提交于
We do not have a pointer to the device here, just its source.
-
由 Ján Tomko 提交于
The domain definition is not needed in any of these functions. Only pass it to qemuSetupChardevCgroup, which is used as a callback for virDomainChrDefForeach. Use the right type for passing virDomainObjPtr instead of void* where possible.
-
由 Ján Tomko 提交于
Change CGroup to Cgroup to match other functions in the file.
-
由 Guido Günther 提交于
like I440FX by moving the condition into qemuDomainMachineHasBuiltinIDE and adding more machines. Reference: http://bugs.debian.org/805189
-
- 21 11月, 2015 2 次提交
-
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1282288 Rather than using just open on the path, allow for the possibility that the path to be opened resides on an NFS root-squash target and was created under a different uid/gid. Without using virFileOpenAs an attempt to get the volume size data may fail if the current user doesn't have permissions to read the volume, such as would be the case if mode wasn't supplied in the volume XML and the default VIR_STORAGE_DEFAULT_VOL_PERM_MODE (e.g. 0600) was used. Under this scenario the owner/group is not root:root, thus this path run under root would fail to open/read the volume. NB: The virFileOpenAs code using OPEN_FORK will only work when the failure is not EACESS/EPERM and the path resolves to a shared file system.
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1282288 Although commit id '77346f27' resolves part of the problem regarding creating a qemu-img image in an NFS root-squash environment, it really didn't fix the entire problem. Unfortunately it only masked the problem. It seems qemu-img must open/create the image using 0644, which if used by target.perms would result in the chmod not being called since the mode desired and set match. Although qemu-img could conceivably ignore the mode when creating, libvirt has more knowledge of the environment and can make the adjustment to the mode far more easily by using virFileOpenAs with VIR_FILE_OPEN_FORCE_MODE. If that's successful, then we know on return the file will have the right owner and mode, so we can declare success
-
- 20 11月, 2015 4 次提交
-
-
由 Andrea Bolognani 提交于
Unlike other architectures, ppc64 domains need to lock memory even when VFIO is not used. Change qemuDomainRequiresMlock() to reflect this fact.
-
由 Andrea Bolognani 提交于
The amount of memory a ppc64 domain might need to lock is different than that of a equally-sized x86 domain, so we need to check the domain's architecture and act accordingly. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1273480
-
由 Andrea Bolognani 提交于
The function is used everywhere else to check whether the locked memory limit should be set / updated, and it should be used here as well. Moreover, qemuDomainGetMlockLimitBytes() expects the hostdev to have already been added to the domain definition, but we only do that at the end of qemuDomainAttachHostPCIDevice(). Work around the issue by adding the hostdev before adjusting the locked memory limit and removing it immediately afterwards.
-
由 Andrea Bolognani 提交于
This removes a duplication of the logic used to decide whether the memory locking limit should be set.
-