[PATCH] build: Don't use /bin/sh unconditionally
by Viktor Mihajlovski
provider-register.sh implicitly assumes that the shell has bash-like
capabilities. On systems like Ubuntu this is not the case leading
to a make postinstall failure when used with Pegasus.
Changing the script shebang to /bin/bash to make this explicit.
Further replace occurrences of sh to $(SHELL) in the Makefile
invocations of provider-register.sh.
Signed-off-by: Viktor Mihajlovski <mihajlov(a)linux.vnet.ibm.com>
---
May not be relevant as libvirt-cim/pegasus isn't part of Debian-ish distros
as far as I am aware of. But it is a constant source of annoyance...
Makefile.am | 18 +++++++++---------
provider-register.sh | 2 +-
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 63ed3c7..9e8e96b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -201,26 +201,26 @@ uninstall-local:
done
preinstall:
- sh -x base_schema/install_base_schema.sh `pwd`/base_schema
+ $(SHELL) -x base_schema/install_base_schema.sh `pwd`/base_schema
# Un/Register the providers and class definitions from/to the current CIMOM.
# @CIMSERVER@ is set by the configure script
postinstall:
- sh provider-register.sh -v -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(MOFS))
- sh provider-register.sh -v -t @CIMSERVER@ -n root/interop -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(INTEROP_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(INTEROP_MOFS))
- sh provider-register.sh -v -t @CIMSERVER@ -n root/cimv2 -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(CIMV2_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(CIMV2_MOFS))
+ $(SHELL) provider-register.sh -v -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(MOFS))
+ $(SHELL) provider-register.sh -v -t @CIMSERVER@ -n root/interop -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(INTEROP_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(INTEROP_MOFS))
+ $(SHELL) provider-register.sh -v -t @CIMSERVER@ -n root/cimv2 -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(CIMV2_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(CIMV2_MOFS))
if [[ @CIMSERVER@ = pegasus ]]; then \
- sh provider-register.sh -v -t @CIMSERVER@ -n root/PG_InterOp -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(PGINTEROP_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(PGINTEROP_MOFS)); \
+ $(SHELL) provider-register.sh -v -t @CIMSERVER@ -n root/PG_InterOp -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(PGINTEROP_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(PGINTEROP_MOFS)); \
fi
virsh -v | grep -q '^0.3' && cp examples/diskpool.conf $(DISK_POOL_CONFIG) || true
mkdir -p $(INFO_STORE)
preuninstall:
- sh provider-register.sh -v -d -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(MOFS))
- sh provider-register.sh -v -d -t @CIMSERVER@ -n root/interop -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(INTEROP_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(INTEROP_MOFS))
- sh provider-register.sh -v -d -t @CIMSERVER@ -n root/cimv2 -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(CIMV2_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(CIMV2_MOFS))
+ $(SHELL) provider-register.sh -v -d -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(MOFS))
+ $(SHELL) provider-register.sh -v -d -t @CIMSERVER@ -n root/interop -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(INTEROP_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(INTEROP_MOFS))
+ $(SHELL) provider-register.sh -v -d -t @CIMSERVER@ -n root/cimv2 -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(CIMV2_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(CIMV2_MOFS))
if [[ @CIMSERVER@ = pegasus ]]; then \
- sh provider-register.sh -v -d -t @CIMSERVER@ -n root/PG_InterOp -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(PGINTEROP_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(PGINTEROP_MOFS)); \
+ $(SHELL) provider-register.sh -v -d -t @CIMSERVER@ -n root/PG_InterOp -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(PGINTEROP_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(PGINTEROP_MOFS)); \
fi
rpm: clean
diff --git a/provider-register.sh b/provider-register.sh
index b907df1..b730ef3 100755
--- a/provider-register.sh
+++ b/provider-register.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# $Id$
# ==================================================================
# Copyright IBM Corp. 2005
--
1.7.9.5
11 years, 1 month
[PATCH 0/3] Address 'cimtest' issues
by John Ferlan
These patches resolve some issues with test logging and there's one test
fix that I've had just hanging around that I figure I'd put out there since
there was some activity.
John Ferlan (3):
Allow adding bridged network for running domain
Remove extranous or unnecessary parameter from error messages
Ensure get_provider_version() returns strings as expected
.../cimtest/Profile/03_rprofile_gi_errs.py | 2 +-
suites/libvirt-cim/cimtest/RASD/03_rasd_errs.py | 2 +-
.../cimtest/ResourcePool/02_rp_gi_errors.py | 2 +-
.../22_addmulti_brg_interface.py | 9 +++++++--
suites/libvirt-cim/lib/XenKvmLib/const.py | 2 +-
suites/libvirt-cim/lib/XenKvmLib/vsms_util.py | 23 +++++++++++++++++-----
6 files changed, 29 insertions(+), 11 deletions(-)
--
1.8.3.1
11 years, 1 month
[PATCHv2 0/5] Initial Enablement of S390
by Viktor Mihajlovski
The current libvirt-cim implementation makes some assumptions
that are only true for x86 architectures. As we want to
enable libvirt-cim for s390 we need to makes sure that
valid libvirt guest definitions are being built for that
architecture while not breaking the existing implementation.
Patch 1 fixes potential memory access problems.
Patches 2 and 3 introduce two new properties arch and machine,
effectively a pass-through of the underlying libvirt
properties, for the necessary distinction between x86 and
other guests, and suppress the default framebuffer for
s390.
Patches 4 and 5 make sure that a minimal SVPC guest definition
(VSSD and RASD) will result in a correct libvirt guest definition
for the current hypervisor.
Boris Fiuczynski (2):
libxkutil: Provide easy access to the libvirt capabilities
VSSM: Set default values based on libvirt capabilities on
DefineSystem calls
Viktor Mihajlovski (3):
libxkutil: Improve domain.os_info cleanup
VSSD: Add properties for arch and machine
S390: Avoid the generation of default input and graphics
libxkutil/Makefile.am | 2 +
libxkutil/capability_parsing.c | 556 +++++++++++++++++++++++++++++
libxkutil/capability_parsing.h | 97 +++++
libxkutil/device_parsing.c | 114 +++---
libxkutil/device_parsing.h | 4 +-
libxkutil/xml_parse_test.c | 201 ++++++++++-
libxkutil/xmlgen.c | 6 +
schema/VSSD.mof | 6 +
src/Virt_VSSD.c | 9 +
src/Virt_VirtualSystemManagementService.c | 165 +++++----
10 files changed, 1033 insertions(+), 127 deletions(-)
create mode 100644 libxkutil/capability_parsing.c
create mode 100644 libxkutil/capability_parsing.h
V2 Changes
# Split original patch 1 into 2 patches (fix, new feature), otherwise unchanged
# Patch 3 also considers QEMU domains now, was KVM only
# Patches 4 and 5 address memory leaks and overwrites
# cimtest run completes without regressions on x86
--
1.7.9.5
11 years, 1 month
[PATCH 0/2] Address a couple of spec file issues
by John Ferlan
These patches resolve a couple of issues with the spec file.
John Ferlan (2):
spec: Replace the path to the tar.gz file
spec: Fix capitalization for version check
libvirt-cim.spec.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
1.8.3.1
11 years, 1 month
[PATCH 0/4] Initial Enablement of S390
by Viktor Mihajlovski
The current libvirt-cim implementation makes some assumptions
that are only true for x86 architectures. As we want to
enable libvirt-cim for s390 we need to makes sure that
valid libvirt guest definitions are being built for that
architecture while not breaking the existing implementation.
Patches 1 and 2 introduce two new properties arch and machine,
effectively a pass-through of the underlying libvirt
properties, for the necessary distinction between x86 and
other guests, and suppress the default framebuffer for
s390.
Patches 3 and 4 make sure that a minimal SVPC guest definition
(VSSD and RASD) will result in a correct libvirt guest definition
for the current hypervisor.
Boris Fiuczynski (2):
libxkutil: Provide easy access to the libvirt capabilities
VSSM: Set default values based on libvirt capabilities on
DefineSystem calls
Viktor Mihajlovski (2):
VSSD: Add properties for arch and machine
S390: Avoid the generation of default input and graphics
libxkutil/Makefile.am | 2 +
libxkutil/capability_parsing.c | 462 +++++++++++++++++++++++++++++
libxkutil/capability_parsing.h | 93 ++++++
libxkutil/device_parsing.c | 85 ++++--
libxkutil/device_parsing.h | 2 +
libxkutil/xml_parse_test.c | 134 ++++++++-
libxkutil/xmlgen.c | 6 +
schema/VSSD.mof | 6 +
src/Virt_VSSD.c | 9 +
src/Virt_VirtualSystemManagementService.c | 128 ++++----
10 files changed, 842 insertions(+), 85 deletions(-)
create mode 100644 libxkutil/capability_parsing.c
create mode 100644 libxkutil/capability_parsing.h
--
1.7.9.5
11 years, 1 month
[PATCH V3] Add dumpCore tag support to memory
by Xu Wang
dumpCore tag in the <memory> is not supported by libvirt-cim and
it will be dropped during updating any element in the xml definition
of a domain. This patch keep the tag all the time.
Signed-off-by: Xu Wang <gesaint(a)linux.vnet.ibm.com>
---
libxkutil/device_parsing.c | 28 +++++++++++++++++++++++++++-
libxkutil/device_parsing.h | 3 +++
libxkutil/xmlgen.c | 9 +++++++++
3 files changed, 39 insertions(+), 1 deletions(-)
diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c
index 7900e06..96db532 100644
--- a/libxkutil/device_parsing.c
+++ b/libxkutil/device_parsing.c
@@ -605,8 +605,17 @@ static int parse_mem_device(xmlNode *node, struct virt_device **vdevs)
if (XSTREQ(node->name, "currentMemory"))
sscanf(content, "%" PRIu64, &mdev->size);
- else if (XSTREQ(node->name, "memory"))
+ else if (XSTREQ(node->name, "memory")) {
sscanf(content, "%" PRIu64, &mdev->maxsize);
+ content = get_attr_value(node, "dumpCore");
+ if (XSTREQ(content, "on")) {
+ mdev->dumpCore = MEM_DUMP_CORE_ON;
+ } else if (XSTREQ(content, "off")) {
+ mdev->dumpCore = MEM_DUMP_CORE_OFF;
+ } else {
+ mdev->dumpCore = MEM_DUMP_CORE_NOT_SET;
+ }
+ }
free(content);
@@ -968,6 +977,7 @@ static int _get_mem_device(const char *xml, struct virt_device **list)
struct virt_device *mdevs = NULL;
struct virt_device *mdev = NULL;
int ret;
+ bool mem_dump_core_set = false;
ret = parse_devices(xml, &mdevs, CIM_RES_TYPE_MEM);
if (ret <= 0)
@@ -987,10 +997,26 @@ static int _get_mem_device(const char *xml, struct virt_device **list)
mdevs[1].dev.mem.size);
mdev->dev.mem.maxsize = MAX(mdevs[0].dev.mem.maxsize,
mdevs[1].dev.mem.maxsize);
+ /* libvirt dumpCore tag always belong to memory xml node, but
+ * here we may have two mdev for memory node and currentMemory
+ * node. So pick up one value.
+ */
+ if (mdevs[0].dev.mem.dumpCore != MEM_DUMP_CORE_NOT_SET) {
+ mdev->dev.mem.dumpCore = mdevs[0].dev.mem.dumpCore;
+ mem_dump_core_set = true;
+ } else if (mdevs[1].dev.mem.dumpCore !=
+ MEM_DUMP_CORE_NOT_SET) {
+ if (mem_dump_core_set) {
+ CU_DEBUG("WARN: libvirt set memory core dump in"
+ "two nodes!");
+ }
+ mdev->dev.mem.dumpCore = mdevs[1].dev.mem.dumpCore;
+ }
} else {
mdev->dev.mem.size = MAX(mdevs[0].dev.mem.size,
mdevs[0].dev.mem.maxsize);
mdev->dev.mem.maxsize = mdev->dev.mem.size;
+ mdev->dev.mem.dumpCore = mdevs[0].dev.mem.dumpCore;
}
mdev->type = CIM_RES_TYPE_MEM;
diff --git a/libxkutil/device_parsing.h b/libxkutil/device_parsing.h
index 2b6d3d1..979b792 100644
--- a/libxkutil/device_parsing.h
+++ b/libxkutil/device_parsing.h
@@ -75,6 +75,9 @@ struct net_device {
struct mem_device {
uint64_t size;
uint64_t maxsize;
+ enum { MEM_DUMP_CORE_NOT_SET,
+ MEM_DUMP_CORE_ON,
+ MEM_DUMP_CORE_OFF } dumpCore;
};
struct vcpu_device {
diff --git a/libxkutil/xmlgen.c b/libxkutil/xmlgen.c
index 4287d42..30e9a5e 100644
--- a/libxkutil/xmlgen.c
+++ b/libxkutil/xmlgen.c
@@ -498,6 +498,15 @@ static const char *mem_xml(xmlNodePtr root, struct domain *dominfo)
BAD_CAST string);
free(string);
+
+ if (tmp == NULL)
+ return XML_ERROR;
+ if (mem->dumpCore == MEM_DUMP_CORE_ON) {
+ xmlNewProp(tmp, BAD_CAST "dumpCore", BAD_CAST "on");
+ } else if (mem->dumpCore == MEM_DUMP_CORE_OFF) {
+ xmlNewProp(tmp, BAD_CAST "dumpCore", BAD_CAST "off");
+ }
+
out:
if (tmp == NULL)
return XML_ERROR;
--
1.7.1
11 years, 1 month
[PATCH] libvirt-cim.spec.in: Uninstall open-pegasus-specific providers
by Ján Tomko
Older libvirt-cim might've installed these in the sblim-sfcb
repository, causing errors when calling sfcbrepos on libvirt-cim update.
---
libvirt-cim.spec.in | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libvirt-cim.spec.in b/libvirt-cim.spec.in
index a027246..cd399b1 100644
--- a/libvirt-cim.spec.in
+++ b/libvirt-cim.spec.in
@@ -84,6 +84,13 @@ rm -fr $RPM_BUILD_ROOT
-n @CIM_VIRT_NS@ \
-r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true
+# Remove open-pegasus-specific providers installed in sfcb repository
+# by older libvirt-cim packages
+%{_datadir}/%{name}/provider-register.sh -d -t sfcb \
+ -n root/PG_InterOp \
+ -r %{PGINTEROP_REG} -m %{PGINTEROP_MOF} >/dev/null 2>&1 || true
+
+
%post
/sbin/ldconfig
--
1.8.1.5
11 years, 1 month
[PATCH V2] Add dumpCore tag support to memory
by Xu Wang
Signed-off-by: Xu Wang <gesaint(a)linux.vnet.ibm.com>
---
libxkutil/device_parsing.c | 26 +++++++++++++++++++++++++-
libxkutil/device_parsing.h | 1 +
libxkutil/xmlgen.c | 4 ++++
3 files changed, 30 insertions(+), 1 deletions(-)
diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c
index 7900e06..23fa6d4 100644
--- a/libxkutil/device_parsing.c
+++ b/libxkutil/device_parsing.c
@@ -141,6 +141,15 @@ static void cleanup_input_device(struct input_device *dev)
free(dev->bus);
}
+static void cleanup_mem_device(struct mem_device *dev)
+{
+ if (dev == NULL)
+ return;
+
+ if (dev->dumpCore)
+ free(dev->dumpCore);
+}
+
void cleanup_virt_device(struct virt_device *dev)
{
if (dev == NULL)
@@ -156,6 +165,8 @@ void cleanup_virt_device(struct virt_device *dev)
cleanup_graphics_device(&dev->dev.graphics);
else if (dev->type == CIM_RES_TYPE_INPUT)
cleanup_input_device(&dev->dev.input);
+ else if (dev->type == CIM_RES_TYPE_MEM)
+ cleanup_mem_device(&dev->dev.mem);
free(dev->id);
@@ -605,8 +616,10 @@ static int parse_mem_device(xmlNode *node, struct virt_device **vdevs)
if (XSTREQ(node->name, "currentMemory"))
sscanf(content, "%" PRIu64, &mdev->size);
- else if (XSTREQ(node->name, "memory"))
+ else if (XSTREQ(node->name, "memory")) {
sscanf(content, "%" PRIu64, &mdev->maxsize);
+ mdev->dumpCore = get_attr_value(node, "dumpCore");
+ }
free(content);
@@ -987,10 +1000,21 @@ static int _get_mem_device(const char *xml, struct virt_device **list)
mdevs[1].dev.mem.size);
mdev->dev.mem.maxsize = MAX(mdevs[0].dev.mem.maxsize,
mdevs[1].dev.mem.maxsize);
+ /* If both of them have dumpCore field, the first one
+ * will be saved. If one of them has that field, it will
+ * be saved too. If none of them has that field, the
+ * value will be left null.
+ */
+ if (mdevs[0].dev.mem.dumpCore) {
+ mdev->dev.mem.dumpCore = strdup(mdevs[0].dev.mem.dumpCore);
+ } else if (mdevs[1].dev.mem.dumpCore) {
+ mdev->dev.mem.dumpCore = strdup(mdevs[1].dev.mem.dumpCore);
+ }
} else {
mdev->dev.mem.size = MAX(mdevs[0].dev.mem.size,
mdevs[0].dev.mem.maxsize);
mdev->dev.mem.maxsize = mdev->dev.mem.size;
+ mdev->dev.mem.dumpCore = strdup(mdevs[0].dev.mem.dumpCore);
}
mdev->type = CIM_RES_TYPE_MEM;
diff --git a/libxkutil/device_parsing.h b/libxkutil/device_parsing.h
index 2b6d3d1..73810c9 100644
--- a/libxkutil/device_parsing.h
+++ b/libxkutil/device_parsing.h
@@ -75,6 +75,7 @@ struct net_device {
struct mem_device {
uint64_t size;
uint64_t maxsize;
+ char *dumpCore;
};
struct vcpu_device {
diff --git a/libxkutil/xmlgen.c b/libxkutil/xmlgen.c
index 4287d42..7c16657 100644
--- a/libxkutil/xmlgen.c
+++ b/libxkutil/xmlgen.c
@@ -498,6 +498,10 @@ static const char *mem_xml(xmlNodePtr root, struct domain *dominfo)
BAD_CAST string);
free(string);
+
+ if (tmp == NULL)
+ return XML_ERROR;
+ xmlNewProp(tmp, BAD_CAST "dumpCore", BAD_CAST mem->dumpCore);
out:
if (tmp == NULL)
return XML_ERROR;
--
1.7.1
11 years, 1 month
[PATCH V2] Add dumpCore tag support to memory
by Xu Wang
Signed-off-by: Xu Wang <gesaint(a)linux.vnet.ibm.com>
---
libxkutil/device_parsing.c | 26 +++++++++++++++++++++++++-
libxkutil/device_parsing.h | 1 +
libxkutil/xmlgen.c | 4 ++++
3 files changed, 30 insertions(+), 1 deletions(-)
diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c
index 7900e06..23fa6d4 100644
--- a/libxkutil/device_parsing.c
+++ b/libxkutil/device_parsing.c
@@ -141,6 +141,15 @@ static void cleanup_input_device(struct input_device *dev)
free(dev->bus);
}
+static void cleanup_mem_device(struct mem_device *dev)
+{
+ if (dev == NULL)
+ return;
+
+ if (dev->dumpCore)
+ free(dev->dumpCore);
+}
+
void cleanup_virt_device(struct virt_device *dev)
{
if (dev == NULL)
@@ -156,6 +165,8 @@ void cleanup_virt_device(struct virt_device *dev)
cleanup_graphics_device(&dev->dev.graphics);
else if (dev->type == CIM_RES_TYPE_INPUT)
cleanup_input_device(&dev->dev.input);
+ else if (dev->type == CIM_RES_TYPE_MEM)
+ cleanup_mem_device(&dev->dev.mem);
free(dev->id);
@@ -605,8 +616,10 @@ static int parse_mem_device(xmlNode *node, struct virt_device **vdevs)
if (XSTREQ(node->name, "currentMemory"))
sscanf(content, "%" PRIu64, &mdev->size);
- else if (XSTREQ(node->name, "memory"))
+ else if (XSTREQ(node->name, "memory")) {
sscanf(content, "%" PRIu64, &mdev->maxsize);
+ mdev->dumpCore = get_attr_value(node, "dumpCore");
+ }
free(content);
@@ -987,10 +1000,21 @@ static int _get_mem_device(const char *xml, struct virt_device **list)
mdevs[1].dev.mem.size);
mdev->dev.mem.maxsize = MAX(mdevs[0].dev.mem.maxsize,
mdevs[1].dev.mem.maxsize);
+ /* If both of them have dumpCore field, the first one
+ * will be saved. If one of them has that field, it will
+ * be saved too. If none of them has that field, the
+ * value will be left null.
+ */
+ if (mdevs[0].dev.mem.dumpCore) {
+ mdev->dev.mem.dumpCore = strdup(mdevs[0].dev.mem.dumpCore);
+ } else if (mdevs[1].dev.mem.dumpCore) {
+ mdev->dev.mem.dumpCore = strdup(mdevs[1].dev.mem.dumpCore);
+ }
} else {
mdev->dev.mem.size = MAX(mdevs[0].dev.mem.size,
mdevs[0].dev.mem.maxsize);
mdev->dev.mem.maxsize = mdev->dev.mem.size;
+ mdev->dev.mem.dumpCore = strdup(mdevs[0].dev.mem.dumpCore);
}
mdev->type = CIM_RES_TYPE_MEM;
diff --git a/libxkutil/device_parsing.h b/libxkutil/device_parsing.h
index 2b6d3d1..73810c9 100644
--- a/libxkutil/device_parsing.h
+++ b/libxkutil/device_parsing.h
@@ -75,6 +75,7 @@ struct net_device {
struct mem_device {
uint64_t size;
uint64_t maxsize;
+ char *dumpCore;
};
struct vcpu_device {
diff --git a/libxkutil/xmlgen.c b/libxkutil/xmlgen.c
index 4287d42..7c16657 100644
--- a/libxkutil/xmlgen.c
+++ b/libxkutil/xmlgen.c
@@ -498,6 +498,10 @@ static const char *mem_xml(xmlNodePtr root, struct domain *dominfo)
BAD_CAST string);
free(string);
+
+ if (tmp == NULL)
+ return XML_ERROR;
+ xmlNewProp(tmp, BAD_CAST "dumpCore", BAD_CAST mem->dumpCore);
out:
if (tmp == NULL)
return XML_ERROR;
--
1.7.1
11 years, 1 month
[PATCH] cimtest: fix guest images generation
by Jincheng Miao
Parted-3.1 remove mkpartfs capability. When generating guest images, it should
use external tools (like mke2fs) to create filesystem.
Signed-off-by: Jincheng Miao <jmiao(a)redhat.com>
---
suites/libvirt-cim/images/xmt-makefv.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/suites/libvirt-cim/images/xmt-makefv.sh b/suites/libvirt-cim/images/xmt-makefv.sh
index 1cf6a0f..85a340c 100755
--- a/suites/libvirt-cim/images/xmt-makefv.sh
+++ b/suites/libvirt-cim/images/xmt-makefv.sh
@@ -51,7 +51,7 @@ partition() {
local file=$1
$PARTED $file mklabel msdos
- $PARTED $file mkpartfs primary ext2 0 $(($SIZE - 1))
+ $PARTED $file mkpart primary ext2 0 $(($SIZE - 1))
}
mount_partition() {
@@ -62,7 +62,10 @@ mount_partition() {
losetup /dev/$loopdev $file || die "Failed to losetup $file"
kpartx -a /dev/$loopdev || die "Failed to kpartx $loopdev"
+ sleep 2
+ mke2fs -t ext2 /dev/mapper/${loopdev}p1 >/dev/null 2>&1 || die "Failed to mkfs ${loopdev}p1"
tune2fs -j /dev/mapper/${loopdev}p1 >/dev/null 2>&1|| die "Failed to add journal"
+ sleep 2
mount /dev/mapper/${loopdev}p1 $TMPMOUNT || die "Failed to mount ${loopdev}p1"
echo $loopdev
--
1.8.3.1
11 years, 2 months