[libvirt] [PATCH] Actually fix the spec file
by Ján Tomko
There was a '%' missing before the last {rhel}.
Tested on RHEL-7 this time.
---
Trivial, but not pushed yet due to my bad commit history today.
libvirt.spec.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index e5f9fb8..8d1acfa 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -522,7 +522,7 @@ BuildRequires: libapparmor-devel
%if %{with_network}
BuildRequires: dnsmasq >= 2.41
BuildRequires: iptables
- %if (0%{?fedora} && 0%{?fedora} < 17) || (0%{?rhel} && 0{?rhel} < 7)
+ %if (0%{?fedora} && 0%{?fedora} < 17) || (0%{?rhel} && 0%{?rhel} < 7)
BuildRequires: iptables-ipv6
%endif
BuildRequires: radvd
@@ -768,7 +768,7 @@ Requires: libvirt-daemon = %{version}-%{release}
Requires: dnsmasq >= 2.41
Requires: radvd
Requires: iptables
- %if (0%{?fedora} && 0%{?fedora} < 17) || (0%{?rhel} && 0{?rhel} < 7)
+ %if (0%{?fedora} && 0%{?fedora} < 17) || (0%{?rhel} && 0%{?rhel} < 7)
Requires: iptables-ipv6
%endif
@@ -785,7 +785,7 @@ Summary: Nwfilter driver plugin for the libvirtd daemon
Group: Development/Libraries
Requires: libvirt-daemon = %{version}-%{release}
Requires: iptables
- %if (0%{?fedora} && 0%{?fedora} < 17) || (0%{?rhel} && 0{?rhel} < 7)
+ %if (0%{?fedora} && 0%{?fedora} < 17) || (0%{?rhel} && 0%{?rhel} < 7)
Requires: iptables-ipv6
%endif
Requires: ebtables
--
1.8.5.5
10 years, 11 months
[libvirt] [PATCH] properly indent virSecurityLabelDefsParseXML() parameters
by Martin Kletzander
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
Notes:
Pushed as trivial
src/conf/domain_conf.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 70f1103..b80e7cf 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -4664,9 +4664,9 @@ virSecurityLabelDefParseXML(xmlXPathContextPtr ctxt,
static int
virSecurityLabelDefsParseXML(virDomainDefPtr def,
- xmlXPathContextPtr ctxt,
- virCapsPtr caps,
- unsigned int flags)
+ xmlXPathContextPtr ctxt,
+ virCapsPtr caps,
+ unsigned int flags)
{
size_t i = 0;
int n;
--
2.0.0
10 years, 11 months
[libvirt] [PATCH] Don't require iptables-ipv6 on >= F17 and RHEL >= 7
by Ján Tomko
We only need ip6tables, which is now a part of the iptables package:
http://pkgs.fedoraproject.org/cgit/iptables.git/commit/?h=1392835
This needlessly pulls in iptables-services:
https://bugzilla.redhat.com/show_bug.cgi?id=1101510
which can conflict with firewalld:
https://bugzilla.redhat.com/show_bug.cgi?id=1101484
---
libvirt.spec.in | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 8802746..ba6054c 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -522,7 +522,9 @@ BuildRequires: libapparmor-devel
%if %{with_network}
BuildRequires: dnsmasq >= 2.41
BuildRequires: iptables
+ %if 0%{?fedora} < 17 && 0%{?rhel} < 7
BuildRequires: iptables-ipv6
+ %endif
BuildRequires: radvd
%endif
%if %{with_nwfilter}
@@ -766,7 +768,9 @@ Requires: libvirt-daemon = %{version}-%{release}
Requires: dnsmasq >= 2.41
Requires: radvd
Requires: iptables
+ %if 0%{?fedora} < 17 && 0%{?rhel} < 7
Requires: iptables-ipv6
+ %endif
%description daemon-driver-network
The network driver plugin for the libvirtd daemon, providing
@@ -781,7 +785,9 @@ Summary: Nwfilter driver plugin for the libvirtd daemon
Group: Development/Libraries
Requires: libvirt-daemon = %{version}-%{release}
Requires: iptables
+ %if 0%{?fedora} < 17 && 0%{?rhel} < 7
Requires: iptables-ipv6
+ %endif
Requires: ebtables
%description daemon-driver-nwfilter
--
1.8.5.5
10 years, 11 months
[libvirt] [PATCH] properly set video ram size for qemu VGA video device
by Pavel Hrdina
https://bugzilla.redhat.com/show_bug.cgi?id=1076098
We support vram option for video devices in domain xml, but so far
only for QXL it had some effect. VGA video device in QEMU can also
accept the size of video ram and we should pass it.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/qemu/qemu_command.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index fb64cda..09e29c9 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4800,6 +4800,9 @@ qemuBuildDeviceVideoStr(virDomainDefPtr def,
/* QEMU accepts bytes for vram_size. */
virBufferAsprintf(&buf, ",vram_size=%u", video->vram * 1024);
+ } else if (video->type == VIR_DOMAIN_VIDEO_TYPE_VGA) {
+ /* QEMU accepts megabytes for vgamem_mb. */
+ virBufferAsprintf(&buf, ",vgamem_mb=%u", video->vram / 1024);
}
if (qemuBuildDeviceAddressStr(&buf, def, &video->info, qemuCaps) < 0)
--
1.8.5.5
10 years, 11 months
[libvirt] [PATCH] Document the need to free vir*Ptr objects
by Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=994731
---
docs/api.html.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/docs/api.html.in b/docs/api.html.in
index eae7657..68ffa0b 100644
--- a/docs/api.html.in
+++ b/docs/api.html.in
@@ -159,6 +159,10 @@
</ul>
</li>
</ul>
+ <p>Note: functions returning vir*Ptr (like the virDomainLookup functions)
+ allocate memory which needs to be freed by the caller by the corresponding
+ vir*Free function (e.g. virDomainFree for a virDomainPtr object).
+ </p>
<p> For more in-depth details of the storage related APIs see
<a href="storage.html">the storage management page</a>.
</p>
--
1.8.5.5
10 years, 11 months
[libvirt] guest-fsfreeze-freeze: Does it allow for any guest-fsfreeze_hook in Windows guest machine.
by Puneet Bakshi
Hi,
When guest agent command "guest-fsfreeze-freeze" is invoked on a linux VM,
a hook is provided to do execute any pre-script before actually doing a
freeze.
int64_t qmp_guest_fsfreeze_freeze(Error **errp)
{
:::
execute_fsfreeze_hook(FSFREEZE_HOOK_FREEZE, &local_err);
:::
}
Can the same thing be done in case of Windows guest machine? I could not
find similar thing in case of Windows
("qga_vss_fsfreeze()->requester_freeze()") where I can put a script (a
hook) to do some preprocessing.
Regards,
~Puneet
10 years, 11 months
[libvirt] [PATCHv7 0/4] Rest of the relative backing and network commit series
by Peter Krempa
Rebased to current master.
Peter Krempa (4):
lib: Introduce flag VIR_DOMAIN_BLOCK_COMMIT_RELATIVE
lib: Introduce flag VIR_DOMAIN_BLOCK_REBASE_RELATIVE
qemu: Add support for networked disks for block commit
qemu: Add support for networked disks for block pull/block rebase
include/libvirt/libvirt.h.in | 6 ++++
src/libvirt.c | 8 +++++
src/qemu/qemu_driver.c | 83 +++++++++++++++++++++++++++++++++++++++-----
tools/virsh-domain.c | 18 ++++++++--
tools/virsh.pod | 9 +++--
5 files changed, 112 insertions(+), 12 deletions(-)
--
1.9.3
10 years, 11 months
[libvirt] [PATCH 0/4] qemu: Support qemuDomainGetBlockInfo on remote storage
by Peter Krempa
And a few refactors.
Peter Krempa (4):
util: storage: Inline use of virStorageFileGetMetadataFromFDInternal
util: storage: Allow specifying format for
virStorageFileGetMetadataFromBuf
storage: gluster: Optimize header reader functions
qemu: refactor qemuDomainGetBlockInfo to work with remote storage
src/libvirt_private.syms | 1 +
src/qemu/qemu_driver.c | 84 ++++++++++++++---------
src/storage/storage_backend_gluster.c | 48 ++-----------
src/util/virstoragefile.c | 124 +++++++++++++++-------------------
src/util/virstoragefile.h | 5 +-
5 files changed, 118 insertions(+), 144 deletions(-)
--
2.0.0
10 years, 11 months
[libvirt] [PATCH] tools/wireshark: fix rpm build
by Pavel Hrdina
There is a missing include of $(top_srcdir)/include to handle
"libvirt/libvirt.h" header file.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
tools/wireshark/src/Makefile.am | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/wireshark/src/Makefile.am b/tools/wireshark/src/Makefile.am
index 40fe368..61ddb38 100644
--- a/tools/wireshark/src/Makefile.am
+++ b/tools/wireshark/src/Makefile.am
@@ -18,7 +18,11 @@
#
# Author: Yuto KAWAMURA(kawamuray)
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/gnulib/lib
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/gnulib/lib
ws_plugin_LTLIBRARIES = libvirt.la
libvirt_la_SOURCES = packet-libvirt.h packet-libvirt.c plugin.c
--
1.8.5.5
10 years, 11 months
[libvirt] [PATCH] LXC: introduce lxcDomainSetMemoryFlags
by Chen Hanxiao
In lxc, we could not use setmem command
with --config options.
This patch will add support for this.
Signed-off-by: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
---
src/lxc/lxc_driver.c | 52 ++++++++++++++++++++++++++++++++++++++++++----------
1 file changed, 42 insertions(+), 10 deletions(-)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 79c3b4a..68795cb 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -706,11 +706,19 @@ static int lxcDomainSetMaxMemory(virDomainPtr dom, unsigned long newmax)
return ret;
}
-static int lxcDomainSetMemory(virDomainPtr dom, unsigned long newmem)
+static int lxcDomainSetMemoryFlags(virDomainPtr dom, unsigned long newmem,
+ unsigned int flags)
{
virDomainObjPtr vm;
+ virDomainDefPtr persistentDef = NULL;
+ virCapsPtr caps = NULL;
int ret = -1;
virLXCDomainObjPrivatePtr priv;
+ virLXCDriverPtr driver = dom->conn->privateData;
+ virLXCDriverConfigPtr cfg = NULL;
+
+ virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
+ VIR_DOMAIN_AFFECT_CONFIG, -1);
if (!(vm = lxcDomObjFromDomain(dom)))
goto cleanup;
@@ -720,22 +728,38 @@ static int lxcDomainSetMemory(virDomainPtr dom, unsigned long newmem)
if (virDomainSetMemoryEnsureACL(dom->conn, vm->def) < 0)
goto cleanup;
+ if (!(caps = virLXCDriverGetCapabilities(driver, false)))
+ goto cleanup;
+
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
+ &persistentDef) < 0)
+ goto cleanup;
+
if (newmem > vm->def->mem.max_balloon) {
virReportError(VIR_ERR_INVALID_ARG,
"%s", _("Cannot set memory higher than max memory"));
goto cleanup;
}
- if (!virDomainObjIsActive(vm)) {
- virReportError(VIR_ERR_OPERATION_INVALID,
- "%s", _("Domain is not running"));
- goto cleanup;
- }
+ if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
+ cfg = virLXCDriverGetConfig(driver);
+ persistentDef->mem.cur_balloon = newmem;
+ if (virDomainSaveConfig(cfg->configDir, persistentDef) < 0)
+ goto cleanup;
+ }
- if (virCgroupSetMemory(priv->cgroup, newmem) < 0) {
- virReportError(VIR_ERR_OPERATION_FAILED,
- "%s", _("Failed to set memory for domain"));
- goto cleanup;
+ if (flags & VIR_DOMAIN_AFFECT_LIVE) {
+ if (!virDomainObjIsActive(vm)) {
+ virReportError(VIR_ERR_OPERATION_INVALID,
+ "%s", _("Domain is not running"));
+ goto cleanup;
+ }
+
+ if (virCgroupSetMemory(priv->cgroup, newmem) < 0) {
+ virReportError(VIR_ERR_OPERATION_FAILED,
+ "%s", _("Failed to set memory for domain"));
+ goto cleanup;
+ }
}
ret = 0;
@@ -743,9 +767,16 @@ static int lxcDomainSetMemory(virDomainPtr dom, unsigned long newmem)
cleanup:
if (vm)
virObjectUnlock(vm);
+ virObjectUnref(caps);
+ virObjectUnref(cfg);
return ret;
}
+static int lxcDomainSetMemory(virDomainPtr dom, unsigned long newmem)
+{
+ return lxcDomainSetMemoryFlags(dom, newmem, VIR_DOMAIN_AFFECT_LIVE);
+}
+
static int
lxcDomainSetMemoryParameters(virDomainPtr dom,
virTypedParameterPtr params,
@@ -5698,6 +5729,7 @@ static virDriver lxcDriver = {
.domainGetMaxMemory = lxcDomainGetMaxMemory, /* 0.7.2 */
.domainSetMaxMemory = lxcDomainSetMaxMemory, /* 0.7.2 */
.domainSetMemory = lxcDomainSetMemory, /* 0.7.2 */
+ .domainSetMemoryFlags = lxcDomainSetMemoryFlags, /* 1.2.7 */
.domainSetMemoryParameters = lxcDomainSetMemoryParameters, /* 0.8.5 */
.domainGetMemoryParameters = lxcDomainGetMemoryParameters, /* 0.8.5 */
.domainSetBlkioParameters = lxcDomainSetBlkioParameters, /* 0.9.8 */
--
1.9.0
10 years, 11 months