[libvirt] Release of libvirt-1.2.7
by Daniel Veillard
As planned it's out, tagged in git, source tarball and rpms are
available as usual from:
ftp://libvirt.org/libvirt/
This is a rather large release for the month of July, close to 300
commits, mostly around incremental improvements and bug fixes. There
is a new API however:
Features:
- Introduce virConnectGetDomainCapabilities (Michal Privoznik)
Documentation:
- bhyve: document recent changes (Roman Bogorodskiy)
- fix an incorrect example for memoryBacking (Chen Hanxiao)
- libvirt-guests: fix some typos in a comment (Martin Kletzander)
- libvirt: Fix 'quest' typo in comment (Li Yang)
- Point to list of valid pool target volume formats (John Ferlan)
- Documented VIR_DOMAIN_FEATURE_CAPABILITIES use of virDomainCapabilitesPolicy (Cédric Bosdonnat)
- Explicitly specify how to override spice channel mode (Peter Krempa)
- add domain to address of hostdev pci (Hu Tao)
- domain: Clarify that disk type 'lun' works with iSCSI too (Peter Krempa)
- esx: Fix a comment about VSphere versions (Geoff Hickey)
- virsh: Document bandwidth maximum more clearly (John Ferlan)
- mention more about older capability feature bits (Eric Blake)
- Be more specific about semantics of _REUSE_EXT flag (Peter Krempa)
- Document that snapshot name of block-backed disk isn't autogenerated (Peter Krempa)
- virsh: document the possibility of accepting integers for numatune mode (Martin Kletzander)
- Document the need to free vir*Ptr objects per-function (Ján Tomko)
- Document the need to free vir*Ptr objects (Ján Tomko)
- LXC: fix an improper comments for lxcDomainDestroyFlags (Chen Hanxiao)
- formatdomain.html fixes (Michele Paolino)
- Fix broken link in the HACKING page (Michele Paolino)
- formatdomain: Fix issues found describing auth (John Ferlan)
- LXC: update comments of lxcDomainCreateXMLWithFiles() and lxcDomainCreateXML() (Yue wenyuan)
Portability:
- build: fix build on cygwin (Eric Blake)
- domtop: Fix build on mingw (Michal Privoznik)
- build: fix build without numactl (Eric Blake)
- Fix build on non-Linux platforms (Roman Bogorodskiy)
- check for cfg->spiceTLS earlier in qemuProcessSPICEAllocatePorts (Ján Tomko)
- build: package .pc files for mingw64 (Eric Blake)
- build: fix gnulib build for mingw (Eric Blake)
- util: cgroup: Fix build on non-cgroup platforms (Peter Krempa)
- Don't require iptables-ipv6 on >= F17 and RHEL >= 7 (Ján Tomko)
- tools/wireshark: fix rpm build (Pavel Hrdina)
- tests: Avoid double linking some libraries (Michal Privoznik)
Bug fixes:
- network: always set disable_ipv6, even when it should be 0 (Laine Stump)
- Fix a crash when cloning a volume with no backing store (Ján Tomko)
- qemu: error out if PCI passthrough type is not supported (Hu Tao)
- storage: create: Create files with correct mode (Peter Krempa)
- nodedev: fix a uninitialized variable build failure (Chen Hanxiao)
- nodedev: fix pci express memory leak (Eric Blake)
- qemu: sound: Fix uninitialized model string (Peter Krempa)
- qemu: Fix starting of VMs with empty CDROM drives (Peter Krempa)
- util: virTimeFieldsThenRaw never returns negative (James)
- qemu: cgroup: Don't use NULL path on default backed RNGs (Peter Krempa)
- qemuConnectGetDomainCapabilities: Report error on unknown arch (Michal Privoznik)
- remove range checking for blkiotune weight (Martin Kletzander)
- qemuConnectGetDomainCapabilities: Use wiser defaults (Michal Privoznik)
- leaseshelper: avoid mem leak after storing lease entries (Nehal J Wani)
- conf: avoid memory leaks while parsing seclabel (Eric Blake)
- nwfilter: plug memory leak with firewall (Eric Blake)
- metadata: track title edits across libvirtd restart (Eric Blake)
- Fix build after 47e5b5ae3262f140955abd57bbb13337c65a3497 (Peter Krempa)
- qemu: snapshot: Forbid taking/reverting snapshots in PMSUSPENDED state (Peter Krempa)
- qemu: snapshot: Forbid taking snapshot in invalid state (Peter Krempa)
- schema: pool: netfs: Don't enforce slash in glusterfs pool source (Peter Krempa)
- examples: domtop: Avoid leaking memory (Peter Krempa)
- examples: domtop: Fix uninitialized variable use (Peter Krempa)
- qemu: snapshot: Forbid snapshots of iSCSI passthrough devices (Peter Krempa)
- storage: Disallow vol_wipe for sparse logical volumes (John Ferlan)
- virsh vol-upload/download disallow negative offset (John Ferlan)
- storage: Split out volume wiping as separate backend function (Peter Krempa)
- esx: Fix a bug in the XML code for storage pools (Geoff Hickey)
- blockjob: wait for pivot to complete (Eric Blake)
- Fix const correctness (Michal Privoznik)
- Fix assignment of comparison against zero (Ján Tomko)
- Fix error on fs pool build failure (Ján Tomko)
- spec: fix invalid syntax (Eric Blake)
- libxl: fix return value error Attach|DetachDeviceFlags (Chunyan Liu)
- qemu: blockcopy: Initialize correct source structure (Peter Krempa)
- GetBlockInfo: Use the correct path to qemuOpenFile (John Ferlan)
- virseclabel: Resolve Coverity FORWARD_NULL issue (John Ferlan)
- conf: Always format seclabel's model (Michal Privoznik)
- conf: Fix possible NULL dereference in virStorageVolTargetDefFormat (Matthias Bolte)
- conf: Don't allow multiple seclabels for same model (Michal Privoznik)
- qemu: don't error out when cgroups don't exist (Martin Kletzander)
- util: storage: Fix build after 25924dec0f9329d429aadae14e273602307e2214 (Peter Krempa)
- qemu: fix domxml-to-native failing when spice_tls is not enabled (Jincheng Miao)
- virEventPollDispatchHandles: Honour array boundaries (Michal Privoznik)
- Allow updating names in DHCP hosts by matching IPs. (Ján Tomko)
- Actually fix the spec file (Ján Tomko)
- libxl: fix crash in migrate confirm for transient domains (Jim Fehlig)
- libxl: acquire job though begin phase only (Jim Fehlig)
- libxl: remove domain when migration prepare fails (Jim Fehlig)
- qemu: raise an eror when using aio=native without cache=none (Giuseppe Scrivano)
- Do not allow changing the UUID of a nwfilter (Hu Jianwei)
- LXC: Allow setting max mem lower than current mem (Ján Tomko)
- virsh: domain: Use inactive XML when unplugging interface with --config (Peter Krempa)
- Free the return value of virFileFindResource (Ján Tomko)
- qemu_domain: fix startup policy for disks (Pavel Hrdina)
- Fix segfault when starting a domain with no cpu definition (Ján Tomko)
- qemu: raise an error when trying to use readonly ide disks (Giuseppe Scrivano)
Improvements:
- blockcommit: turn on active commit (Eric Blake)
- blockcommit: track job type in xml (Eric Blake)
- Domain config: write <features/> if some capabilities are set. (Cédric Bosdonnat)
- blockjob: properly track blockcopy xml changes on disk (Eric Blake)
- blockcopy: add more XML for state tracking (Eric Blake)
- qemu: Implement ./hugepages/page/[@size, @unit, @nodeset] (Michal Privoznik)
- domain: Introduce ./hugepages/page/[@size, @unit, @nodeset] (Michal Privoznik)
- virbitmap: Introduce virBitmapOverlaps (Michal Privoznik)
- qemu: Utilize virFileFindHugeTLBFS (Michal Privoznik)
- Introduce virFileFindHugeTLBFS (Michal Privoznik)
- schema: bhyve and nmdm updates (Roman Bogorodskiy)
- nodedev: move pci express types to virpci.h (Eric Blake)
- nodedev: let compiler help us on switches (Eric Blake)
- qemu: sound: Handle all possible sound cards in switch statement (Peter Krempa)
- conf: RNG: Always fill in default random source path for default backend (Peter Krempa)
- spec: arm and aarch64 have kvm support with F20+ (Cole Robinson)
- spec: Use power64 macro (Cole Robinson)
- test: qemu: Add tests for multiple virtio-rng devices (Peter Krempa)
- virtio-rng: allow multiple RNG devices (Peter Krempa)
- bhyve: cdrom support (Roman Bogorodskiy)
- virsh: add option for selecting domdisplay type (Martin Kletzander)
- virsh: add error message when no graphical display is found (Martin Kletzander)
- hostdev: Introduce virDomainHostdevSubsysSCSIiSCSI (John Ferlan)
- Add virConnectPtr for qemuBuildSCSIHostdevDrvStr (John Ferlan)
- hostdev: Introduce virDomainHostdevSubsysSCSIHost (John Ferlan)
- hostdev: Introduce virDomainHostdevSubsysSCSI (John Ferlan)
- hostdev: Introduce virDomainHostdevSubsysPCI (John Ferlan)
- hostdev: Introduce virDomainHostdevSubsysUSB (John Ferlan)
- qemu: snapshot: Use storage driver to pre-create snapshot file (Peter Krempa)
- storage: Implement virStorageFileCreate for local and gluster files (Peter Krempa)
- qemu: Implement DAC driver chown callback to co-operate with storage drv (Peter Krempa)
- security: DAC: Plumb usage of chown callback (Peter Krempa)
- security: DAC: Introduce callback to perform image chown (Peter Krempa)
- security: DAC: Remove superfluous link resolution (Peter Krempa)
- storage: Add witness for checking storage volume use in security driver (Peter Krempa)
- storage: Implement storage driver helper to chown disk images (Peter Krempa)
- numatune: finish the split from domain_conf and remove all dependencies (Martin Kletzander)
- maint: simplify some syntax check exemptions (Eric Blake)
- spec: Enable sanlock on qemu_kvm_arches for RHEL (Jiri Denemark)
- Added myself in AUTHORS.in (Cédric Bosdonnat)
- Introduce virTristateSwitch enum (Ján Tomko)
- Introduce virTristateBool enum type (Ján Tomko)
- LXC: show used memory as 0 when domain is not active (Chen Hanxiao)
- lxc domain from xml: convert lxc.cap.drop (Cédric Bosdonnat)
- lxc: allow to keep or drop capabilities (Cédric Bosdonnat)
- LXC: create a bind mount for sysfs when enable userns but disable netns (Chen Hanxiao)
- storage: logical: drop useless if (Roman Bogorodskiy)
- getAdapterName: Lookup stable scsi_host (John Ferlan)
- scsi_host: Introduce virFindSCSIHostByPCI (John Ferlan)
- Add unique_id to nodedev output (John Ferlan)
- virutil: Introduce virReadSCSIUniqueId (John Ferlan)
- scsi_backend: Use existing LINUX_SYSFS_SCSI_HOST_PREFIX definition (John Ferlan)
- storage: Introduce parentaddr into virStoragePoolSourceAdapter (Osier Yang)
- virStoragePoolSourceAdapter: Refine the SCSI_HOST adapter name (Osier Yang)
- getAdapterName: check for SCSI_HOST (John Ferlan)
- node_device: HAL: Ignore return value of virStrToLong_ui (Peter Krempa)
- util: Check return value from virStrToLong* functions (Peter Krempa)
- qemu: snapshot: Reject revertion from clearly bad states (Peter Krempa)
- qemu: snapshot: Convert if-else switch to switch statement (Peter Krempa)
- bhyve: reconnect to domains after libvirtd restart (Roman Bogorodskiy)
- examples: Introduce domtop (Michal Privoznik)
- Kill last strto{l,ll,d} scouts (Michal Privoznik)
- lxc conf2xml: convert lxc.network.name for veth networks (Cédric Bosdonnat)
- lxc network configuration allows setting target container NIC name (Cédric Bosdonnat)
- spec: Consolidate with_qemu* definitions (Jiri Denemark)
- storage: Convert 'building' into a bool (John Ferlan)
- Fix build by dropping redefined typedefs (Roman Bogorodskiy)
- test: metadata: Improve test coverage (Peter Krempa)
- Log an error when we fail to set the COW attribute (Ján Tomko)
- storage: wipe: Move helper code into storage backend (Peter Krempa)
- schema: put interleave at correct level (Eric Blake)
- schema: add interleave inside numatune (Martin Kletzander)
- qemu: leave restricting cpuset.mems after initialization (Martin Kletzander)
- qemu: split out cpuset.mems setting (Martin Kletzander)
- qemu: pass numa node binding preferences to qemu (Martin Kletzander)
- qemu: enable disjoint numa cpu ranges (Martin Kletzander)
- qemu: newer -numa parameter capability probing (Martin Kletzander)
- qemu: memory-backend-ram capability probing (Martin Kletzander)
- qemu: allow qmp probing for cmdline options without params (Martin Kletzander)
- numatune: add support for per-node memory bindings in private APIs (Martin Kletzander)
- conf, schema: add support for memnode elements (Martin Kletzander)
- numatune: Encapsulate numatune configuration in order to unify results (Martin Kletzander)
- numatune: unify numatune struct and enum names (Martin Kletzander)
- numatune: create new module for numatune (Martin Kletzander)
- conf, schema: add 'id' field for cells (Martin Kletzander)
- conf: purely a code movement (Martin Kletzander)
- qemu: remove useless error check (Martin Kletzander)
- qemu: purely a code movement (Martin Kletzander)
- support for QEMU vhost-user (Michele Paolino)
- util: forbid freeing const pointers (Eric Blake)
- add nocow test case (Chunyan Liu)
- storagevol: add nocow to vol xml (Chunyan Liu)
- storage: fs: Don't fail volume update if backing store isn't accessible (Peter Krempa)
- storage: fs: Properly parse backing store info (Peter Krempa)
- storage: fs: Process backing store data in virStorageBackendProbeTarget (Peter Krempa)
- storage: backend: fs: Touch up coding style (Peter Krempa)
- storage: Track backing store of a volume in the target struct (Peter Krempa)
- storage: backend: Fix formatting of function arguments (Peter Krempa)
- Rework lxc apparmor profile (Cédric Bosdonnat)
- Implement interface stats for BSD (Roman Bogorodskiy)
- util: virstatslinux: make more generic (Roman Bogorodskiy)
- libxl: support hotplug of <interface> (Chunyan Liu)
- libxl: add HOSTDEV type in libxlDomainDetachDeviceConfig (Chunyan Liu)
- spec: Update polkit dependencies for CVE-2013-4311 (Jiri Denemark)
- capabilities: use bool instead of int (Eric Blake)
- openvswitch: Delete port if it exists while adding a new one (Chunhe Li)
- virSecurityLabelDefParseXML: Rework (Michal Privoznik)
- aa-helper: adjust previous patch (Cédric Bosdonnat)
- Don't output libvirt-UUID.files for LXC apparmor profiles (Cédric Bosdonnat)
- libxl: Correct cast to virDomainDiskDiscard enum. (Ian Campbell)
- LXC: add support for --config in setmem command (Chen Hanxiao)
- virSecurityDeviceLabelDef: substitute 'norelabel' with 'relabel' (Michal Privoznik)
- virSecurityLabelDef: substitute 'norelabel' with 'relabel' (Michal Privoznik)
- storage: Split out volume upload/download as separate backend function (Peter Krempa)
- libxl: add discard support to libxl_device_disk (Olaf Hering)
- conf: Improve metadata type verification (Peter Krempa)
- qemu: snapshot: Refactor image labelling of new snapshot files (Peter Krempa)
- qemu: Refactor qemuDomainPrepareDiskChainElement (Peter Krempa)
- qemu: snapshot: Improve approach to deal with snapshot metadata (Peter Krempa)
- qemu: block: Properly track disk source while pivoting to new image (Peter Krempa)
- qemu: blockcopy: Use the mirror disk source to label the files (Peter Krempa)
- util: storage: Return complete parent info from virStorageFileChainLookup (Peter Krempa)
- util: storage: Make virStorageFileChainLookup more network storage aware (Peter Krempa)
- security: AppArmor: Implement per-image seclabel set (Peter Krempa)
- security: AppArmor: Implement per-image seclabel restore (Peter Krempa)
- security: DAC: Implement per-image seclabel set (Peter Krempa)
- security: DAC: Implement per-image seclabel restore (Peter Krempa)
- security: selinux: Implement per-image seclabel set (Peter Krempa)
- security: selinux: Implement per-image seclabel restore (Peter Krempa)
- security: Introduce APIs to label single images (Peter Krempa)
- locking: Add APIs to lock individual image files (Peter Krempa)
- qemu: cgroup: Setup only the top level disk image for read-write access (Peter Krempa)
- qemu: cgroup: Add functions to set cgroup image stuff on individual imgs (Peter Krempa)
- util: XML: Avoid forward function declaration (Peter Krempa)
- libxl: rename goto label (Jim Fehlig)
- maint: update to latest gnulib (Eric Blake)
- properly indent virSecurityLabelDefsParseXML() parameters (Martin Kletzander)
- Fix the indentation in libvirt.spec.in (Ján Tomko)
- util: cgroup: Add helper to convert device mode to string (Peter Krempa)
- util: storage: Copy parent's disk metadata to backing chain elements (Peter Krempa)
- util: storage: Add function to transfer config parts to new chain element (Peter Krempa)
- util: storagefile: Add deep copy for struct virStorageSource (Peter Krempa)
- storage: Move readonly and shared flags to disk source from disk def (Peter Krempa)
- conf: Don't output seclabels for backingStore elements (Peter Krempa)
- storage: file: Tolerate NULL src when uninitializing the backend (Peter Krempa)
- qemu: Add helper to initialize storage file backend with correct uid/gid (Peter Krempa)
- qemu: Don't propagate whole disk definition into qemuDomainGetImageIds (Peter Krempa)
- qemu: Add support for networked disks for block pull/block rebase (Peter Krempa)
- qemu: Add support for networked disks for block commit (Peter Krempa)
- lib: Introduce flag VIR_DOMAIN_BLOCK_REBASE_RELATIVE (Peter Krempa)
- lib: Introduce flag VIR_DOMAIN_BLOCK_COMMIT_RELATIVE (Peter Krempa)
- qemu: refactor qemuDomainGetBlockInfo to work with remote storage (Peter Krempa)
- storage: gluster: Optimize header reader functions (Peter Krempa)
- util: storage: Allow specifying format for virStorageFileGetMetadataFromBuf (Peter Krempa)
- util: storage: Inline use of virStorageFileGetMetadataFromFDInternal (Peter Krempa)
- audit: Audit smartcard devices (Peter Krempa)
- audit: Add auditing for serial/parallel/channel/console character devs (Peter Krempa)
- virt-lxc-convert: make free return values in bytes (Cédric Bosdonnat)
- qemu: dump: Report better error when dumping VM with passthrough devices (Peter Krempa)
- LXC: remove duplicate controller check code (Chen Hanxiao)
- wireshark: Honor API change coming with 1.12 release (Michal Privoznik)
- wireshark: Include more of libvirt internals (Michal Privoznik)
- qemu: monitor: Add support for backing name specification for block-stream (Peter Krempa)
- qemu: monitor: Add argument for specifying backing name for block commit (Peter Krempa)
- qemu: caps: Add capability for change-backing-file command (Peter Krempa)
- audit: disk: Refactor disk auditing to avoid auditing remote storage (Peter Krempa)
- conf: audit: Split out common steps to audit domain devices (Peter Krempa)
- conf: audit: rng: Reorder new and old RNG device definitions (Peter Krempa)
- util: storage: Add helper to determine whether storage is local (Peter Krempa)
- Utilize virDomainDiskAuth for storage pools (John Ferlan)
- Utilize virDomainDiskAuth for domain disk (John Ferlan)
- qemuargv2xmltest: Resurrect RBD and iSCSI auth (John Ferlan)
- virstorage: Introduce virStorageAuthDef (John Ferlan)
- blockjob: turn on qemu capability bit for active commit (Eric Blake)
- blockjob: allow omitted arguments to QMP block-commit (Eric Blake)
- qemu: Implement virConnectGetDomainCapabilities (Michal Privoznik)
- qemu_capabilities: Introduce virQEMUCapsGetDefaultMachine (Michal Privoznik)
- qemu_capabilities: Introduce virQEMUCapsIsMachineSupported (Michal Privoznik)
- qemu_capabilities: Introduce virQEMUCapsCacheLookupByArch (Michal Privoznik)
- tests: Move qemu caps XML parsing into shared unit (Michal Privoznik)
- virsh: expose virConnectGetDomainCapabilities (Michal Privoznik)
- Introduce domain_capabilities (Michal Privoznik)
- Remove double OOM error reporting (Ján Tomko)
- Remove double OOM error reporting from JSON monitor (Ján Tomko)
- Add OOM error reporting to a few fucntions (Ján Tomko)
- Set errno on OOM in lxcProcReadMeminfo (Ján Tomko)
- Use virBufferCheckError everywhere we report OOM error (Ján Tomko)
- Report errors in virCapabilitiesFormatXML (Ján Tomko)
- Introduce virBufferCheckError (Ján Tomko)
- Use virStringReplace instead of openvz_replace (Ján Tomko)
- Remove useless condition in networkRadvdConfContents (Ján Tomko)
- usb: Remove redundant comment (Ján Tomko)
- More indentation fixes (Ján Tomko)
- Fix indentation in bridge driver (Ján Tomko)
- virsh: Allow attach-disk to specify disk target bus (Yanbing Du)
- qemu: Add cmd_per_lun, max_sectors to virtio-scsi (Mike Perez)
- Add invariant TSC cpu flag (Ján Tomko)
- util: unify extra asterisk in viralloc.h (Martin Kletzander)
Cleanups:
- tests: Remove stale scsihostdata dir (Michal Privoznik)
- xenapiConnectGetCapabilities: Remove unused 'cleanup' label (Michal Privoznik)
Thanks everybody for the help with this release, be it with ideas,
bug reports, patch and reviews or translations !
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/
10 years, 4 months
[libvirt] [PATCH] build: fix build on cygwin
by Eric Blake
Cygwin has getifaddrs(), but not AF_LINK, leading to:
util/virstats.c: In function 'virNetInterfaceStats':
util/virstats.c:138:41: error: 'AF_LINK' undeclared (first use in this function)
if (ifa->ifa_addr->sa_family != AF_LINK)
...
* src/util/virstats.c (virNetInterfaceStats): Only use getifaddrs
if AF_LINK is present.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Pushing under the build-breaker rule.
src/util/virstats.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/util/virstats.c b/src/util/virstats.c
index 910803f..b10fd85 100644
--- a/src/util/virstats.c
+++ b/src/util/virstats.c
@@ -1,7 +1,7 @@
/*
* virstats.c: Block and network stats.
*
- * Copyright (C) 2007-2010 Red Hat, Inc.
+ * Copyright (C) 2007-2010, 2014 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -29,7 +29,7 @@
#include <unistd.h>
#include <regex.h>
-#ifdef HAVE_GETIFADDRS
+#if defined(HAVE_GETIFADDRS) && defined(AF_LINK)
# include <net/if.h>
# include <ifaddrs.h>
#endif
@@ -119,7 +119,7 @@ virNetInterfaceStats(const char *path,
_("/proc/net/dev: Interface not found"));
return -1;
}
-#elif defined(HAVE_GETIFADDRS)
+#elif defined(HAVE_GETIFADDRS) && defined(AF_LINK)
int
virNetInterfaceStats(const char *path,
struct _virDomainInterfaceStats *stats)
--
1.9.3
10 years, 4 months
[libvirt] [PATCH] network: always set disable_ipv6, even when it should be 0
by Laine Stump
libvirt previously only touched an interface's disable_ipv6 setting in
sysfs if it needed to be set to 1, assuming that 0 is the
default. Apparently that isn't always the case though (kernel 3.15.7-1
in Arch Linux reportedly defaults a new interface's disable_ipv6
setting to 1) so this patch explicitly sets it to 0 or 1 as
appropriate.
---
src/network/bridge_driver.c | 41 +++++++++++++++++++++--------------------
1 file changed, 21 insertions(+), 20 deletions(-)
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 6ccc6e2..965fdec 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -1824,33 +1824,34 @@ networkSetIPv6Sysctls(virNetworkObjPtr network)
{
char *field = NULL;
int ret = -1;
+ bool enableIPv6 = !!virNetworkDefGetIpByIndex(network->def, AF_INET6, 0);
- if (!virNetworkDefGetIpByIndex(network->def, AF_INET6, 0)) {
- /* Only set disable_ipv6 if there are no ipv6 addresses defined for
- * the network.
- */
- if (virAsprintf(&field, SYSCTL_PATH "/net/ipv6/conf/%s/disable_ipv6",
- network->def->bridge) < 0)
- goto cleanup;
+ /* set disable_ipv6 if there are no ipv6 addresses defined for the
+ * network. But also unset it if there *are* ipv6 addresses, as we
+ * can't be sure of its default value.
+ */
+ if (virAsprintf(&field, SYSCTL_PATH "/net/ipv6/conf/%s/disable_ipv6",
+ network->def->bridge) < 0)
+ goto cleanup;
- if (access(field, W_OK) < 0 && errno == ENOENT) {
+ if (access(field, W_OK) < 0 && errno == ENOENT) {
+ if (!enableIPv6)
VIR_DEBUG("ipv6 appears to already be disabled on %s",
network->def->bridge);
- ret = 0;
- goto cleanup;
- }
+ ret = 0;
+ goto cleanup;
+ }
- if (virFileWriteStr(field, "1", 0) < 0) {
- virReportSystemError(errno,
- _("cannot write to %s to disable IPv6 on bridge %s"),
- field, network->def->bridge);
- goto cleanup;
- }
- VIR_FREE(field);
+ if (virFileWriteStr(field, enableIPv6 ? "0" : "1", 0) < 0) {
+ virReportSystemError(errno,
+ _("cannot write to %s to enable/disable IPv6 "
+ "on bridge %s"), field, network->def->bridge);
+ goto cleanup;
}
+ VIR_FREE(field);
- /* The rest of the ipv6 sysctl tunables should always be set,
- * whether or not we're using ipv6 on this bridge.
+ /* The rest of the ipv6 sysctl tunables should always be set the
+ * same, whether or not we're using ipv6 on this bridge.
*/
/* Prevent guests from hijacking the host network by sending out
--
1.9.3
10 years, 4 months
[libvirt] How to reboot domain(virtual machine) after shutdown it through php-libvirt
by Subhu G
How to reboot domain(virtual machine) after shutdown it through php-libvirt:
Hi,
Am new to php livbvirt. and i successfully listed the all domains in server. and get resource of particular domain and call the shutdown function.
$res = libvirt_domain_lookup_by_name($conn, $name);
$stop = libvirt_domain_shutdown($res);
Now shutdowned domain is not display in domain list.
Now the problem is how to reboot/restart that domain again? libvirt having function for reboot, that is,
libvirt_domain_create($res);
My doubt is what is argument here, how to get that shutdowned domain resources.
Any one kindly help me.
10 years, 4 months
[libvirt] [PATCH] qemu: fix comment in qemu.conf
by Martin Kletzander
There are multiple mount points after commit 725a211f, but one comment
wasn't changed to use plurals.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/qemu/qemu.conf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index a079b93..7bbbe09 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -339,8 +339,8 @@
# The size of huge page served by specific mount point is determined by
# libvirt at the daemon startup.
#
-# NB, within this mount point, guests will create memory backing files
-# in a location of $MOUNTPOINT/libvirt/qemu
+# NB, within these mount points, guests will create memory backing
+# files in a location of $MOUNTPOINT/libvirt/qemu
#
#hugetlbfs_mount = "/dev/hugepages"
--
2.0.2
10 years, 4 months
[libvirt] [PATCH] Fix a crash when cloning a volume with no backing store
by Ján Tomko
Introduced by commit 15213d1, not yet released.
---
src/storage/storage_backend.c | 2 +-
tests/storagevolxml2argvdata/qcow2-convert-nobacking.argv | 2 ++
tests/storagevolxml2argvtest.c | 3 +++
3 files changed, 6 insertions(+), 1 deletion(-)
create mode 100644 tests/storagevolxml2argvdata/qcow2-convert-nobacking.argv
diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index 27b02cb..5cada39 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -887,7 +887,7 @@ virStorageBackendCreateQemuImgCmd(virConnectPtr conn,
* backing store, not really sure what use it serves though, and it
* may cause issues with lvm. Untested essentially.
*/
- if (inputvol &&
+ if (inputvol && inputvol->target.backingStore &&
STRNEQ_NULLABLE(inputvol->target.backingStore->path,
vol->target.backingStore->path)) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
diff --git a/tests/storagevolxml2argvdata/qcow2-convert-nobacking.argv b/tests/storagevolxml2argvdata/qcow2-convert-nobacking.argv
new file mode 100644
index 0000000..fd1f4c0
--- /dev/null
+++ b/tests/storagevolxml2argvdata/qcow2-convert-nobacking.argv
@@ -0,0 +1,2 @@
+qemu-img convert -f raw -O qcow2 -o encryption=on \
+/var/lib/libvirt/images/sparse.img /var/lib/libvirt/images/OtherDemo.img
diff --git a/tests/storagevolxml2argvtest.c b/tests/storagevolxml2argvtest.c
index 2a45f6f..f9d2d2d 100644
--- a/tests/storagevolxml2argvtest.c
+++ b/tests/storagevolxml2argvtest.c
@@ -237,6 +237,9 @@ mymain(void)
"qcow2-nobacking-convert-prealloc", flags, FMT_OPTIONS);
DO_TEST_FAIL("pool-dir", "vol-qcow2",
"pool-dir", "vol-file",
+ "qcow2-convert-nobacking", 0, FMT_OPTIONS);
+ DO_TEST_FAIL("pool-dir", "vol-qcow2",
+ "pool-dir", "vol-file",
"qcow2-convert-prealloc", flags, FMT_OPTIONS);
DO_TEST("pool-dir", "vol-qcow2",
NULL, NULL,
--
1.8.5.5
10 years, 4 months
[libvirt] [Query] In search of 'lost' fc_host adapters ?
by Prerna Saxena
Hi,
I recently found that libvirt failed to display Fiber Channel adapters on systems with FC cards.This occured both on x86 as well as powerpc, as follows:
virsh # nodedev-list --cap fc_host
virsh #
The system had legitimate fc_hosts :
[root@localhost ~]# ls /sys/class/fc_host/
host1 host2 host3 host4
[root@localhost ~]#
Debugging further, I found that libvirt has correctly identified the fiber channel host adapters. This could be independently verified by checking capabilities for individual
host adapters. As an example,
[root@localhost ~]# virsh nodedev-dumpxml scsi_host1
<device>
<name>scsi_host1</name>
<path>/sys/devices/pci0000:00/0000:00:00.0/0000:01:00.0/host1</path>
<parent>pci_0000_01_00_0</parent>
<capability type='scsi_host'>
<host>1</host>
<capability type='fc_host'> ===> Fiber channel host.
<wwnn>20000120fa2cf086</wwnn>
<wwpn>10000090fa2cf086</wwpn>
<fabric_wwn>1000000533bedc10</fabric_wwn>
</capability>
<capability type='vport_ops'>
<max_vports>255</max_vports>
<vports>0</vports>
</capability>
</capability>
</device>
However, a virsh query for available fc_host adapters seemed to fail.
I found this was happening because the callbacks pertaining to NodeDevice for the virsh connection pointer were those of "Remote" driver, in place of the "Udev" Node device driver.
The remote driver callback :
static int remoteConnectListAllNodeDevices(virConnectPtr conn,
virNodeDevicePtr **devices,
unsigned int flags)
This didnt seem to process fiber channel host flag, and so my query returned a blank list.
For the problem at hand , it is easy to fix the remote driver to process fc_hosts. But this would unnecessarily duplicate code between udev & remote drivers.
I need some pointers on how callbacks get chosen by libvirt.
The logs show that:
2014-07-31 10:45:43.226+0000: 22913: debug : virRegisterNodeDeviceDriver:619 : registering Test as device driver 0
...
2014-07-31 10:45:43.226+0000: 22913: debug : virRegisterNodeDeviceDriver:619 : registering ESX as device driver 1
...
2014-07-31 10:45:43.226+0000: 22913: debug : virRegisterNodeDeviceDriver:619 : registering remote as device driver 2
...
2014-07-31 10:45:43.228+0000: 22913: debug : virRegisterNodeDeviceDriver:619 : registering udevNodeDeviceDriver as device driver 3
How does libvirt connection register all callbacks for the remote driver, given choice of 4 drivers --test, ESX, remote or Udev ?
Is there a way we can set a preference for the udev driver to be used first -- such that the remote can just be a sane "default" if nothing else is available??
Looking forward to suggestions on how I can fix this ?
BTW, I tried disabling the remote using configure script, but that meant scsi driver (and a few others) got disabled too.
Regards,
--
Prerna Saxena
Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India
10 years, 4 months
[libvirt] [PATCH 0/9] LXC network configuration support
by Cédric Bosdonnat
Hi all,
This patch series aims at filling one of the remaining gaps between lxc and our
lxc driver. It opens up the possibilities to setup IP addresses on network devices,
adds the possibility to add them default gateways, and uses them all in the libvirt
driver. The LXC conf2xml conversion has also been updated to help migrating the
remaining untouched lxc.network.ipv[46]* properties.
The first patch in the series has almost nothing to do with the rest: it just adds
some forgotten VIR_FREE from one of my previous patch.
--
Cedric
Cédric Bosdonnat (9):
Domain conf: allow more than one IP address for net devices
LXC: set IP addresses to veth devices in the container
lxc conf2xml: convert IP addresses
Allow network capabilities hostdev to configure IP addresses
lxc conf2xml: convert ip addresses for hostdev NICs
Domain network devices can now have a <gateway> element
lxc conf2xml: convert lxc.network.ipv[46].gateway
LXC: use the new net devices gateway definition
LXC: honour network devices link state
docs/formatdomain.html.in | 39 ++++
docs/schemas/domaincommon.rng | 55 +++++-
src/conf/domain_conf.c | 211 +++++++++++++++++++--
src/conf/domain_conf.h | 22 ++-
src/libvirt_private.syms | 2 +
src/lxc/lxc_container.c | 66 ++++++-
src/lxc/lxc_native.c | 173 ++++++++++++-----
src/openvz/openvz_conf.c | 2 +-
src/openvz/openvz_driver.c | 6 +-
src/qemu/qemu_driver.c | 25 ++-
src/qemu/qemu_hotplug.c | 6 +-
src/uml/uml_conf.c | 2 +-
src/vbox/vbox_tmpl.c | 3 +-
src/xenxs/xen_sxpr.c | 12 +-
src/xenxs/xen_xm.c | 12 +-
.../lxcconf2xmldata/lxcconf2xml-physnetwork.config | 4 +
tests/lxcconf2xmldata/lxcconf2xml-physnetwork.xml | 3 +
tests/lxcconf2xmldata/lxcconf2xml-simple.config | 4 +
tests/lxcconf2xmldata/lxcconf2xml-simple.xml | 3 +
tests/lxcxml2xmldata/lxc-hostdev.xml | 3 +
tests/lxcxml2xmldata/lxc-idmap.xml | 3 +
21 files changed, 548 insertions(+), 108 deletions(-)
--
1.8.4.5
10 years, 4 months
[libvirt] CPU model API (v3)
by Zeeshan Ali (Khattak)
v3: Two classes for CPU model:
* CapabilitiesCpuModel
* DomainCpuModel that derives from CapabilitiesCpuModel.
10 years, 4 months