[libvirt] [PATCH v2 0/2] Check disk serial strings for uniqueness
by Peter Krempa
Peter Krempa (2):
qemu: Perform the disk WWN check only on fresh starts
conf: Reuse virDomainDefCheckDuplicateDiskWWN to check disk serial too
src/conf/domain_conf.c | 17 ++++++++++++++---
src/conf/domain_conf.h | 2 +-
src/libvirt_private.syms | 2 +-
src/qemu/qemu_process.c | 3 ++-
4 files changed, 18 insertions(+), 6 deletions(-)
--
2.4.5
8 years, 11 months
[libvirt] [PATCH] libvirt.spec: fix accidental conditional inclusion of polkit docs
by Daniel P. Berrange
In previous change:
commit 29b5167417483ef80f6c3fce12811b59a1e2bd55
Author: Jiri Denemark <jdenemar(a)redhat.com>
Date: Tue Aug 4 14:05:52 2015 +0200
examples: Add example polkit ACL rules
The polkit examples were accidentally added to the spec inside
a %if %{with_network} conditional.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
Pushed as a trivial build fix
libvirt.spec.in | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 547f750..ed401f7 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -2038,10 +2038,9 @@ exit 0
%endif
%endif # ! %{with_driver_modules}
- %if %{with_network}
-
%doc examples/polkit/*.rules
+ %if %{with_network}
%files daemon-config-network
%defattr(-, root, root)
%dir %{_datadir}/libvirt/networks/
--
2.4.3
8 years, 11 months
[libvirt] [PATCH 0/5] Fix migration from older libvirt with hugepages
by Martin Kletzander
Since libvirt is able to use memory-backend-{ram,file}, we were using
it unconditionally, then we realized it might break migration from
older libvirt, so we fixed the memory-backend-ram, but forgot about
memory-backend-file. This series fixes the file backend as well and
uses the memory-backend-file only when it is needed. Fortunately,
there is no verison of libvirt that would know about such
configuration and, at the same time, not use these new objects, so
there is no old libvirt from which the migration would be broken from
(due to this particular reason).
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1266856
Martin Kletzander (5):
qemu: Move simplification variable to begining of the function
qemu: Move memory size detection to the top of the function
qemu: Extract -mem-path building into its own function
qemu: Add -mem-path even with numa
qemu: Use memory-backing-file only when needed
src/qemu/qemu_command.c | 166 ++++++++++++---------
.../qemuxml2argv-hugepages-numa.args | 6 +-
.../qemuxml2argv-hugepages-pages6.args | 2 +-
3 files changed, 100 insertions(+), 74 deletions(-)
--
2.6.0
8 years, 11 months
[libvirt] Release of libvirt-1.2.20
by Daniel Veillard
Apparently RC2 was absolutely perfect and bug-free so I tagged 1.2.20
in git and pushed signed tarball and rpms to the usual place earlier
today :
ftp://libvirt.org/libvirt/
This is a relatively small release with less than 150 commit but since
it includes a security update people are really invited to update. Of course
that's still including a decent number of bug fixes and improvements:
Security:
- storage: Handle failure from refreshVol (John Ferlan)
- storage: Correct the 'mode' check (John Ferlan)
- virfile: Introduce virFileUnlink (John Ferlan)
Documentation:
- docs: Add yet another libvirt based app (Michal Privoznik)
- conf: Document all VIR_DOMAIN_DEF_PARSE_* flags (Peter Krempa)
- Minor typo fixes in documentation (Christian Loehle)
- util: Add space before comment end marker (Andrea Bolognani)
- docs: Update devguide.html to point to the new Python dev guide (Daniel P. Berrange)
- docs: Remove last use of double semicolon in Makefile (Martin Kletzander)
Portability:
- tools: Link libvirt.la and readline to libvirt_shell.a (Michal Privoznik)
- util: Add win32 version of virFileUnlink (Martin Kletzander)
Bug Fixes:
- qemu: Fix dynamic_ownership qemu.conf setting (Cole Robinson)
- virsh: Preserve startupPolicy in change-media command (Michal Privoznik)
- Create a shallow copy for volume building only if supported (Ján Tomko)
- Update pool allocation with new values on volume creation (Ján Tomko)
- conf: Fix virtType check (John Ferlan)
- qemu: Make virtType of type virDomainVirtType (Shivangi Dhir)
- Use daemon log facility for journald (Guido Günther)
- domain: Fix migratable XML with graphics/@listen (Jiri Denemark)
- qemu: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- qemu: Clean up ret in qemuDomainSaveMemory and qemuDomainSaveInternal (John Ferlan)
- qemu: Resolve Coverity CHECKED_RETURN (John Ferlan)
- virsh: Resolve Coverity DEADCODE (John Ferlan)
- tests: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- tests: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- virDomainRestore: Don't keep transient domains around (Michal Privoznik)
- virDomainCreateXML: Make domain definition transient (Michal Privoznik)
- virDomainCreateXML: Don't remove persistent domains on error (Michal Privoznik)
- virsh: Fix job status indicator for 0 length block jobs (Peter Krempa)
- qemu: Refresh memory size only on fresh starts (Peter Krempa)
- client rpc: Process pending data on error (Jiri Denemark)
- conf: escape string for disk driver name attribute (Luyao Huang)
- Makefile: fix build fail when make rpm (Luyao Huang)
- tests: Avoid use of virQEMUDriverCreateXMLConf(NULL) (Michal Privoznik)
- qemuTestDriverInit: init the driver lock too (Michal Privoznik)
- Revert "qemu: Fix integer/boolean logic in qemuSetUnprivSGIO" (John Ferlan)
- qemu: ppc64: Align memory sizes to 256MiB blocks (Peter Krempa)
- qemu: command: Align memory sizes only on fresh starts (Peter Krempa)
- test driver: don't unlock pool after freeing it (David Mansfield)
- qemuDomainChangeDiskLive: Allow startupPolicy change (Michal Privoznik)
- qemu: Fix some corner cases in persistent migration (Jiri Denemark)
- qemu: Don't report false errors in migration protocol v2 (Jiri Denemark)
- qemu: Kill domain when migration finish fails (Jiri Denemark)
- libxl: fix AttachDeviceConfig on hostdev type (Chunyan Liu)
- qemu: Fix using guest architecture as lookup key (Andrea Bolognani)
- libxl: fix compiler error introduced by commit ba25c214 (Jim Fehlig)
- Ignore virtio-mmio disks in qemuAssignDevicePCISlots() (Pavel Fedin)
- security_selinux: Take @privileged into account (Michal Privoznik)
- qemu: Allow others to browse /var/lib/libvirt/qemu (Martin Kletzander)
- qemu: hotplug: Properly clean up drive backend if frontend hotplug fails (Peter Krempa)
- xen: fix race in refresh of config cache (Daniel P. Berrange)
- libxl: don't end job for ephemeal domain on start failure (Ian Campbell)
- qemu: Report error if per-VM directory cannot be created (Martin Kletzander)
- Revert "docs: Drop unused rule for internals/%.html.tmp target" (Martin Kletzander)
- conf: fix crash when parsing a unordered NUMA <cell/> (Luyao Huang)
- admin: Resolve leaked reference to private data (Erik Skultety)
- util: Avoid Coverity FORWARD_NULL (John Ferlan)
- virfile: Avoid Coverity IDENTICAL_BRANCHES error (John Ferlan)
- lxc: Avoid Coverity SIZEOF_MISMATCH (John Ferlan)
- qemu: Check virGetLastError return value for migration finish failure (John Ferlan)
- qemu: Need to check for machine.os when using ADDRESS_TYPE_CCW (John Ferlan)
- libxl: don't overwrite error from virNetSocketNewConnectTCP() (Jim Fehlig)
- util: don't use netlink to save/set mac for macvtap+passthrough+802.1Qbh (Laine Stump)
- remoteClientCloseFunc: Don't mangle connection object refcount (Michal Privoznik)
- vshInit: Don't leak @histsize_env (Michal Privoznik)
Improvements:
- conf: Add new VIR_DOMAIN_VIRT_NONE enum (Shivangi Dhir)
- vsh: create a noinstall libvirt_shell library (Erik Skultety)
- qemu: Move vm->persistent check into qemuDomainRemoveInactive (Michal Privoznik)
- Remove redundand assignment (Martin Kletzander)
- qemuDomainDeviceDefPostParse: Drop useless checks (Michal Privoznik)
- qemu: Align memory module sizes to 2MiB (Peter Krempa)
- virsh: Notify users about disconnects (Jiri Denemark)
- client rpc: Report proper error for keepalive disconnections (Jiri Denemark)
- Use VIR_DIV_UP macro where possible (Martin Kletzander)
- spec: Fix some warnings with latest rpmbuild (Cole Robinson)
- test: Add test to validate that memory sizes don't get updated on migration (Peter Krempa)
- conf: Don't always recalculate initial memory size from NUMA size totals (Peter Krempa)
- conf: Pre-calculate initial memory size instead of always calculating it (Peter Krempa)
- conf: Rename max_balloon to total_memory (Peter Krempa)
- conf: Split memory related post parse stuff into separate function (Peter Krempa)
- conf: Add XML parser flag that will allow us to do incompatible updates (Peter Krempa)
- conf: Drop VIR_DOMAIN_DEF_PARSE_CLOCK_ADJUST flag (Peter Krempa)
- qemu: Make memory alignment helper more universal (Peter Krempa)
- conf: Add helper to determine whether memory hotplug is enabled for a vm (Peter Krempa)
- libxl: vz: Use accessor instead of direct access for max_balloon (Peter Krempa)
- Removed unneeded check (Pavel Fedin)
- tests: use mockup cache (Pavel Fedin)
- Implement infrastracture for mocking up QEMU capabilities cache (Pavel Fedin)
- tests: split out common qemu driver initialization (Pavel Fedin)
- virfile: Use virProcessWait in virDirCreate (John Ferlan)
- virfile: Use virProcessWait in virFileUnlink (John Ferlan)
- virfile: Use virProcessWait in virFileOpenForked (John Ferlan)
- virfile: Rename virFileUnlink to virFileRemove (John Ferlan)
- vz: remove error logging from prlsdkUUIDParse (Maxim Nestratov)
- qemuDomainDiskChangeSupported: Fill in missing checks (Michal Privoznik)
- qemu: s/virDomainDiskDiffersSourceOnly/qemuDomainDiskChangeSupported/ (Michal Privoznik)
- qemuDomainChangeDiskLive: rework slightly (Michal Privoznik)
- qemu_domain: Introduce qemuDomainDiskSourceDiffers (Michal Privoznik)
- qemu: s/qemuDomainChangeDiskMediaLive/qemuDomainChangeDiskLive/ (Michal Privoznik)
- qemuDomainUpdateDeviceConfig: Allow startupPolicy update, yet again (Michal Privoznik)
- qemu: Queue events in migration Finish phase ASAP (Jiri Denemark)
- qemuDomainEventQueue: Check if event is non-NULL (Jiri Denemark)
- qemu: Don't fail migration on save status failure (Jiri Denemark)
- qemu: Simplify qemuMigrationFinish (Jiri Denemark)
- qemu: Split qemuMigrationFinish (Jiri Denemark)
- vmx: Expose datacenter path in domain XML (Matthias Bolte)
- virfile: Check for existence of dir in virFileDeleteTree (John Ferlan)
- virsh: Teach attach-interface to --print-xml (Michal Privoznik)
- libxl: open libxl log stream with libvirtd log_level (Jim Fehlig)
- virSecurityManager: Track if running as privileged (Michal Privoznik)
- security_selinux: Replace SELinuxSCSICallbackData with proper struct (Michal Privoznik)
- virSecuritySELinuxSetSecurityAllLabel: drop useless virFileIsSharedFSType (Michal Privoznik)
- qemu: Do not allow others into per-VM subdirectories (Martin Kletzander)
- qemu: command: Report stderr from qemu-bridge-helper (Cole Robinson)
- tests: Don't use testutils in mock libraries (Martin Kletzander)
- qemu: Try several network devices when looking for a default (Andrea Bolognani)
- qemu: Introduce QEMU_CAPS_DEVICE_VIRTIO_NET (Andrea Bolognani)
- qemu: Introduce QEMU_CAPS_DEVICE_E1000 (Andrea Bolognani)
- qemu: Introduce QEMU_CAPS_DEVICE_RTL8139 (Andrea Bolognani)
- qemu: migration: Relax enforcement of memory hotplug support (Peter Krempa)
- vmx: Add handling for CDROM devices with SCSI passthru (Matthias Bolte)
- vmx: The virVMXParseDisk deviceType can be NULL, add some missing checks (Matthias Bolte)
- cpu: Introduce IvyBridge CPU model (Jiri Denemark)
- virsh: Slightly rework cmdDomblklist (Michal Privoznik)
- .gitignore: Ignore the correct rename example binary (Michal Privoznik)
- examples: Add missing build data for 'rename' (Martin Kletzander)
- conf: Remove need for a couple of sa_asserts (John Ferlan)
- Change name of the domain upon successful rename (Martin Kletzander)
- Add example that renames domain there and back (Martin Kletzander)
- examples: Add example polkit ACL rules (Jiri Denemark)
- qemu: Introduce qemuDomainMachineIsS390CCW (John Ferlan)
- vsh: Make vshInitDebug static (Erik Skultety)
- virsh: Do not make interactive mode default (Erik Skultety)
- vsh: Introduce vshInitReload (Erik Skultety)
- vsh: adjust vshInit signature and remove redundant error label (Erik Skultety)
- domain-conf: escape string for socket attribute (Pavel Hrdina)
- util: make virNetDev(Replace|Restore)MacAddress public functions (Laine Stump)
- virfile: Add error for root squash change mode failure (John Ferlan)
- qemu: add udp interface support (Jonathan Toppins)
- Post release version bump to 1.2.20 (Ján Tomko)
Cleanups:
- maint: Remove control characters from LGPL license file (Andrea Bolognani)
- vmx: Some whitespace cleanup (Matthias Bolte)
Thanks everybody who contributed to this release, be it with code, ideas,
bug reports, etc !
Enjoy !
Daniel
--
Daniel Veillard | Open Source and Standards, Red Hat
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
8 years, 11 months
[libvirt] [PATCH 0/6] Fix some Coverity issues
by John Ferlan
Newer Coverity (7.7.0) found a couple real issues and a few more
false positives. There's still a few more to be resolved, but still
trying to figure them out...
libxlDomainMigrationPrepare - claim is args is leaked. Although
it seems to be handled in libxlMigrateReceive or libxlDoMigrateReceive.
Don't know the code well enough to do proper triage.
qemuProcessStop - claim is usage of net->ifname in the condition
(vport->virtPortType == VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH)
is using a NULL net->ifname that would have been VIR_FREE()'d
when case VIR_DOMAIN_NET_TYPE_DIRECT a few lines above.
qemuDomainBlockRebase - claim is overwriting 'dest' after call to
qemuDomainBlockCopyCommon causes resource leak. Although reading
code says otherwise, except of course if CopyCommon goes to cleanup
rather than endjob. Even changing the location doesn't resolve
the issue.
Fix the Coverity tag for the DEADCODE... It's always a coin-flip either
dead_error_begin or dead_error_condition - I gave Jiri bad advice as
to which one to use it seems.
John Ferlan (6):
Avoid Coverity FORWARD_NULL prior to strtok_r calls
tests: Resolve Coverity RESOURCE_LEAK
tests: Resolve Coverity RESOURCE_LEAK
virsh: Resolve Coverity DEADCODE
qemu: Resolve Coverity CHECKED_RETURN
qemu: Resolve Coverity RESOURCE_LEAK
src/esx/esx_vi.c | 1 +
src/libxl/libxl_conf.c | 1 +
src/openvz/openvz_conf.c | 2 ++
src/qemu/qemu_driver.c | 24 +++++++++++-------------
src/qemu/qemu_process.c | 6 +++---
src/xenapi/xenapi_utils.c | 1 +
tests/qemucaps2xmltest.c | 1 +
tests/virnetdaemontest.c | 2 ++
tools/virsh.c | 2 +-
9 files changed, 23 insertions(+), 17 deletions(-)
--
2.1.0
8 years, 11 months
[libvirt] [PATCH] qemu: Add conditions for qemu-kvm use on ppc64
by Andrea Bolognani
qemu-kvm can be used to run ppc64 guests on ppc64le hosts and vice
versa, since the hardware is actually the same and the endianness
is chosen by the guest kernel.
Up until now, however, libvirt didn't allow the use of qemu-kvm
to run guests if their endianness didn't match the host's.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1267882
---
src/qemu/qemu_capabilities.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index eb2edf5..8253398 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -768,7 +768,7 @@ virQEMUCapsInitGuest(virCapsPtr caps,
char *binary = NULL;
virQEMUCapsPtr qemubinCaps = NULL;
virQEMUCapsPtr kvmbinCaps = NULL;
- bool native_kvm, x86_32on64_kvm, arm_32on64_kvm;
+ bool native_kvm, x86_32on64_kvm, arm_32on64_kvm, ppc64_kvm;
int ret = -1;
/* Check for existence of base emulator, or alternate base
@@ -788,14 +788,16 @@ virQEMUCapsInitGuest(virCapsPtr caps,
* - host & guest arches match
* - hostarch is x86_64 and guest arch is i686 (needs -cpu qemu32)
* - hostarch is aarch64 and guest arch is armv7l (needs -cpu aarch64=off)
+ * - hostarch and guestarch are both ppc64*
*/
native_kvm = (hostarch == guestarch);
x86_32on64_kvm = (hostarch == VIR_ARCH_X86_64 &&
guestarch == VIR_ARCH_I686);
arm_32on64_kvm = (hostarch == VIR_ARCH_AARCH64 &&
guestarch == VIR_ARCH_ARMV7L);
+ ppc64_kvm = (ARCH_IS_PPC64(hostarch) && ARCH_IS_PPC64(guestarch));
- if (native_kvm || x86_32on64_kvm || arm_32on64_kvm) {
+ if (native_kvm || x86_32on64_kvm || arm_32on64_kvm || ppc64_kvm) {
const char *kvmbins[] = {
"/usr/libexec/qemu-kvm", /* RHEL */
"qemu-kvm", /* Fedora */
--
2.4.3
8 years, 11 months
[libvirt] nested HVM in libxl againagain.
by Alvin Starr
A while back I posted a patch to add nested HVM to libvirt and libxl.
Something made me think the patch got accepted and incorporated into
libvirt(It must have been the sleep deprivation).
I noticed that the latest still does not support nested hvm(under xen).
Should I try posting a patch again or just live with keeping my own copy?
--
Alvin Starr || voice: (905)513-7688
Netvel Inc. || Cell: (416)806-0133
alvin(a)netvel.net ||
8 years, 11 months
[libvirt] [PATCH v3 0/14] migration: support all toURI and proto combos
by Nikolay Shirokovskiy
Current implementation of 'toURI' migration interfaces does not support all
combinations of interface versions and protocol versions. For example 'toURI2'
with p2p flag will not migrate if driver supports only v3params proto.
This is not convinient as drivers that starts to support migration have to
manually support older versions of protocol. I guess this should be done in
one place, namely here.
Another issue is that there are a lot of code duplication in implementation of
toURI interfaces and it is not obvious from code how are they related.
This implementation uses extensible parameters as intermediate parameters
representation. This is possible as interfaces are done backward compatible in
terms of parameters and later versions supports all parameters of former
versions.
= Changes from version2
1. fix misc typos and overall english in commit messages
2. fix misc style issues
3. add 2 new patches
1. migration: refactor: rename uri parameter to miguri
2. migration: check dconnuri in p2p mode
4. rework succession of 2 patches
1. migration: refactor: prepare to reuse flag vs feature checks
2. migration: reuse flags vs features checks in toURI family
into
1. migration: refactor: introduce parameter checking function
2. migration: reuse parameters check in toURI2 and toURI3
5. rearrange functions as suggested by reviwer to make better diffs
The overall diff as compared to the previous patchset is really small.
src/libvirt-domain.c | 531 ++++++++++++++++++++++---------------------------
1 files changed, 238 insertions(+), 293 deletions(-)
8 years, 11 months
[libvirt] [PATCH] docs: Add Cuckoo Sandbox into apps.html
by Martin Kletzander
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
docs/apps.html.in | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/docs/apps.html.in b/docs/apps.html.in
index 86b301660df3..2ee24bb382f9 100644
--- a/docs/apps.html.in
+++ b/docs/apps.html.in
@@ -441,5 +441,19 @@
</dd>
</dl>
+ <h2><a name="other">Other</a></h2>
+
+ <dl>
+ <dt><a href="http://cuckoosandbox.org/">Cuckoo Sandbox</a></dt>
+ <dd>
+ Cuckoo Sandbox is a malware analysis system. You can throw
+ any suspicious file at it and in a matter of seconds Cuckoo
+ will provide you back some detailed results outlining what
+ such file did when executed inside an isolated environment.
+ And it's this isolated environment that libvirt, amongsth
+ other backends, can be used.
+ </dd>
+ </dl>
+
</body>
</html>
--
2.6.0
8 years, 11 months