[libvirt] [PATCH] build: Fix the typo in configure.ac
by Osier Yang
s/nuamd/numad/,
--
Pushed under trivial rule.
---
configure.ac | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index 93cc3e8..f7e15f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1525,7 +1525,7 @@ if test "$with_numad" != "no" ; then
if test -z "$NUMAD" || test $fail = 1; then
with_numad="no"
else
- with_nuamd="yes"
+ with_numad="yes"
fi
else
test -z "$NUMAD" &&
--
1.7.7.3
12 years, 6 months
[libvirt] [PATCHv2] conf: Fix memory leaks in virStoragePoolDefParseSource
by Alex Jia
Detected by valgrind. Leaks are introduced in commit 122fa379.
src/conf/storage_conf.c: fix memory leaks.
How to reproduce?
$ make && make -C tests check TESTS=storagepoolxml2xmltest
$ cd tests && valgrind -v --leak-check=full ./storagepoolxml2xmltest
actual result:
==28571== LEAK SUMMARY:
==28571== definitely lost: 40 bytes in 5 blocks
==28571== indirectly lost: 0 bytes in 0 blocks
==28571== possibly lost: 0 bytes in 0 blocks
==28571== still reachable: 1,054 bytes in 21 blocks
==28571== suppressed: 0 bytes in 0 blocks
Signed-off-by: Alex Jia <ajia(a)redhat.com>
---
src/conf/storage_conf.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 0b34f28..188af6d 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -465,6 +465,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt,
}
}
+ VIR_FREE(nodeset);
source->initiator.iqn = virXPathString("string(./initiator/iqn/@name)", ctxt);
nsource = virXPathNodeSet("./device", ctxt, &nodeset);
--
1.7.1
12 years, 6 months
[libvirt] [PATCH] qemu: fix build when !HAVE_NUMACTL
by Eric Blake
Commit 97010eb1f forgot to change the other side of an #ifdef.
* src/qemu/qemu_process.c (qemuProcessInitNumaMemoryPolicy): Add
argument.
---
Pushing under the build-breaker rule.
src/qemu/qemu_process.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index e34cc6d..b7c53ea 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -1751,7 +1751,8 @@ cleanup:
}
#else
static int
-qemuProcessInitNumaMemoryPolicy(virDomainObjPtr vm)
+qemuProcessInitNumaMemoryPolicy(virDomainObjPtr vm,
+ const char *nodemask ATTRIBUTE_UNUSED)
{
if (vm->def->numatune.memory.nodemask) {
qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
--
1.7.7.6
12 years, 6 months
[libvirt] [PATCH] Report error when parsing character device target type
by Jim Fehlig
No useful error was being reported when an invalid character device
target type is specified in the domainXML. E.g.
...
<console type="pty">
<source path="/dev/pts/2"/>
<target type="kvm" port="0"/>
</console>
...
resulted in
error: Failed to define domain from x.xml
error: An error occurred, but the cause is unknown
With this small patch, the error is more helpful
error: Failed to define domain from x.xml
error: XML error: unknown target type 'kvm' specified for character device
---
src/conf/domain_conf.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 976e42b..54ac1db 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -4895,6 +4895,9 @@ virDomainChrDefParseTargetXML(virCapsPtr caps,
if ((def->targetType =
virDomainChrTargetTypeFromString(caps, vmdef,
def->deviceType, targetType)) < 0) {
+ virDomainReportError(VIR_ERR_XML_ERROR,
+ _("unknown target type '%s' specified for character device"),
+ targetType);
goto error;
}
--
1.7.8.3
12 years, 6 months
[libvirt] [PATCHv2 0/2] a new flag VIR_DOMAIN_CPU_STATS_VCPU
by Hu Tao
From: root <root(a)KERNEL-128.(none)>
This series adds a new flag VIR_DOMAIN_CPU_STATS_VCPU to
virDomainGetCPUStats, which is for getting statistics of
physical cpu time consumed by virtual cpus.
Changes:
v2:
- added detailed documentation
- added some error checks and fix some memleaks
- the two patches rearranged slightly
Hu Tao (2):
Add a new flag VIR_DOMAIN_CPU_STATS_VCPU to virDomainGetCPUStats
Adds support to VIR_DOMAIN_CPU_STATS_VCPU in qemu_driver.
include/libvirt/libvirt.h.in | 8 ++
src/libvirt.c | 9 ++-
src/qemu/qemu_driver.c | 186 ++++++++++++++++++++++++++++++++++++++----
src/util/cgroup.c | 4 +-
tools/virsh.c | 16 +++-
5 files changed, 199 insertions(+), 24 deletions(-)
12 years, 6 months
[libvirt] Entering freeze for libvirt-0.9.12
by Daniel Veillard
A bit late compared to my estimate from last week, I have just tagged
the git tree and made an rc1 snapshot for testing:
ftp://libvirt.org/libvirt/libvirt-0.9.12-rc1.tar.gz
and currently pushing along the large set of rpms.
We still have a number of pending patches as pointed out by
http://libvirt.org/pending.html
I think the patches from Wen for "cpu bandwidth for hypervisor threads"
are a new feature which should wait for after 0.9.12, maybe we should
do the same with the remaining patches from Stephan for multiple IP
learning the dhcpsnooping code, but there are others pending.
The rc1 seems to compile and work okay for me using the set of rpms
(notice the change in the set !), please raise potential portability
and stability issues,
thanks !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
12 years, 6 months
[libvirt] [PATCH] conf: Fix memory leaks in virStoragePoolDefParseSource
by Alex Jia
Detected by valgrind. Leaks are introduced in commit 122fa379.
src/conf/storage_conf.c: fix memory leaks.
How to reproduce?
$ make && make -C tests check TESTS=storagepoolxml2xmltest
$ cd tests && valgrind -v --leak-check=full ./storagepoolxml2xmltest
actual result:
==28571== LEAK SUMMARY:
==28571== definitely lost: 40 bytes in 5 blocks
==28571== indirectly lost: 0 bytes in 0 blocks
==28571== possibly lost: 0 bytes in 0 blocks
==28571== still reachable: 1,054 bytes in 21 blocks
==28571== suppressed: 0 bytes in 0 blocks
Signed-off-by: Alex Jia <ajia(a)redhat.com>
---
src/conf/storage_conf.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 0b34f28..668e679 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -462,6 +462,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt,
goto cleanup;
}
}
+ VIR_FREE(nodeset);
}
}
--
1.7.1
12 years, 6 months
[libvirt] [PATCH] netlink: Fix build with libnl-3
by Jiri Denemark
Commit 642973135c54b93242c4548ef27d591b52b0994c added three direct
references to nl_handle_* instead of using our aliases which hide
differences between libnl-3 and libnl-1.
---
Pushed as a build-breaker.
src/util/virnetlink.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c
index ac61ff0..e316137 100644
--- a/src/util/virnetlink.c
+++ b/src/util/virnetlink.c
@@ -98,7 +98,7 @@ static int nextWatch = 1;
# define NETLINK_EVENT_ALLOC_EXTENT 10
static virNetlinkEventSrvPrivatePtr server = NULL;
-static struct nl_handle *placeholder_nlhandle = NULL;
+static virNetlinkHandle *placeholder_nlhandle = NULL;
/* Function definitions */
@@ -130,7 +130,7 @@ virNetlinkStartup(void)
{
if (placeholder_nlhandle)
return 0;
- placeholder_nlhandle = nl_handle_alloc();
+ placeholder_nlhandle = virNetlinkAlloc();
if (!placeholder_nlhandle) {
virReportSystemError(errno, "%s",
_("cannot allocate placeholder nlhandle for netlink"));
@@ -149,7 +149,7 @@ void
virNetlinkShutdown(void)
{
if (placeholder_nlhandle) {
- nl_handle_destroy(placeholder_nlhandle);
+ virNetlinkFree(placeholder_nlhandle);
placeholder_nlhandle = NULL;
}
}
--
1.7.8.6
12 years, 6 months
[libvirt] [PATCH] [libvirt-test-API] introduce "machine" option to supprot choose machine type in more architectures
by Qing Lin
With machine option,user can specify macine type to emulate.
For example : define in xml file , machine='pc' or machine='pseries'.
Signed-off-by: Qing Lin <qinglbj(a)linux.vnet.ibm.com>
---
repos/domain/create.py | 1 +
repos/domain/define.py | 2 ++
repos/domain/install_linux_cdrom.py | 1 +
repos/domain/install_linux_net.py | 1 +
repos/domain/install_windows_cdrom.py | 1 +
repos/domain/xmls/kvm_guest_define.xml | 2 +-
.../domain/xmls/kvm_linux_guest_install_cdrom.xml | 2 +-
repos/domain/xmls/kvm_linux_guest_install_net.xml | 2 +-
.../xmls/kvm_windows_guest_install_cdrom.xml | 2 +-
.../multiple_thread_block_on_domain_create.py | 1 +
repos/regression/xmls/domain.xml | 2 +-
11 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/repos/domain/create.py b/repos/domain/create.py
index cfe0efd..bb20a99 100644
--- a/repos/domain/create.py
+++ b/repos/domain/create.py
@@ -26,6 +26,7 @@ optional_params = {'memory': 1048576,
'xml': 'xmls/kvm_guest_define.xml',
'flags' : 'none',
'xml': 'xmls/kvm_guest_define.xml'
+ 'guestmachine': 'pc',
}
def create(params):
diff --git a/repos/domain/define.py b/repos/domain/define.py
index 42dea86..0e72a7f 100644
--- a/repos/domain/define.py
+++ b/repos/domain/define.py
@@ -24,6 +24,8 @@ optional_params = {'memory': 1048576,
'password': None,
'virt_type': 'kvm',
'xml': 'xmls/kvm_guest_define.xml'
+ 'guestarch': 'x86_64',
+ 'guestmachine': 'pc',
}
def check_define_domain(guestname, virt_type, hostname, username, \
diff --git a/repos/domain/install_linux_cdrom.py b/repos/domain/install_linux_cdrom.py
index 9bbd6da..239f85e 100644
--- a/repos/domain/install_linux_cdrom.py
+++ b/repos/domain/install_linux_cdrom.py
@@ -29,6 +29,7 @@ optional_params = {
'uuid' : '05867c1a-afeb-300e-e55e-2673391ae080',
'type' : 'define',
'xml': 'xmls/kvm_linux_guest_install_cdrom.xml',
+ 'guestmachine': 'pc',
}
VIRSH_QUIET_LIST = "virsh --quiet list --all|awk '{print $2}'|grep \"^%s$\""
diff --git a/repos/domain/install_linux_net.py b/repos/domain/install_linux_net.py
index d976ce1..4367d97 100644
--- a/repos/domain/install_linux_net.py
+++ b/repos/domain/install_linux_net.py
@@ -29,6 +29,7 @@ optional_params = {'memory': 1048576,
'netmethod' : 'http',
'type' : 'define',
'xml': 'xmls/kvm_linux_guest_install_net.xml',
+ 'guestmachine': 'pc',
}
VIRSH_QUIET_LIST = "virsh --quiet list --all|awk '{print $2}'|grep \"^%s$\""
diff --git a/repos/domain/install_windows_cdrom.py b/repos/domain/install_windows_cdrom.py
index 3104bcd..b4fb552 100644
--- a/repos/domain/install_windows_cdrom.py
+++ b/repos/domain/install_windows_cdrom.py
@@ -36,6 +36,7 @@ optional_params = {'memory': 1048576,
'type' : 'define',
'uuid' : '05867c1a-afeb-300e-e55e-2673391ae080',
'xml' : 'xmls/kvm_windows_guest_install_cdrom.xml',
+ 'guestmachine': 'pc',
}
def cleanup(mount):
diff --git a/repos/domain/xmls/kvm_guest_define.xml b/repos/domain/xmls/kvm_guest_define.xml
index 385ec66..4599b2e 100644
--- a/repos/domain/xmls/kvm_guest_define.xml
+++ b/repos/domain/xmls/kvm_guest_define.xml
@@ -5,7 +5,7 @@
<currentMemory unit='KiB'>MEMORY</currentMemory>
<vcpu>VCPU</vcpu>
<os>
- <type arch='x86_64' machine='pc-0.14'>hvm</type>
+ <type arch='GUESTARCH' machine="GUESTMACHINE">hvm</type>
<boot dev='hd'/>
</os>
<features>
diff --git a/repos/domain/xmls/kvm_linux_guest_install_cdrom.xml b/repos/domain/xmls/kvm_linux_guest_install_cdrom.xml
index 84aed75..cb59e76 100644
--- a/repos/domain/xmls/kvm_linux_guest_install_cdrom.xml
+++ b/repos/domain/xmls/kvm_linux_guest_install_cdrom.xml
@@ -4,7 +4,7 @@
<memory>MEMORY</memory>
<vcpu>VCPU</vcpu>
<os>
- <type>hvm</type>
+ <type machine="GUESTMACHINE">hvm</type>
<boot dev="cdrom"/>
</os>
<features>
diff --git a/repos/domain/xmls/kvm_linux_guest_install_net.xml b/repos/domain/xmls/kvm_linux_guest_install_net.xml
index 7d5cb45..c4a7de7 100644
--- a/repos/domain/xmls/kvm_linux_guest_install_net.xml
+++ b/repos/domain/xmls/kvm_linux_guest_install_net.xml
@@ -3,7 +3,7 @@
<memory>MEMORY</memory>
<vcpu>VCPU</vcpu>
<os>
- <type>hvm</type>
+ <type machine="GUESTMACHINE">hvm</type>
<kernel>KERNEL</kernel>
<initrd>INITRD</initrd>
<cmdline>ks=KS</cmdline>
diff --git a/repos/domain/xmls/kvm_windows_guest_install_cdrom.xml b/repos/domain/xmls/kvm_windows_guest_install_cdrom.xml
index 759a386..62bd002 100644
--- a/repos/domain/xmls/kvm_windows_guest_install_cdrom.xml
+++ b/repos/domain/xmls/kvm_windows_guest_install_cdrom.xml
@@ -4,7 +4,7 @@
<memory>MEMORY</memory>
<vcpu>VCPU</vcpu>
<os>
- <type>hvm</type>
+ <type machine="GUESTMACHINE">hvm</type>
<boot dev="cdrom"/>
</os>
<features>
diff --git a/repos/regression/multiple_thread_block_on_domain_create.py b/repos/regression/multiple_thread_block_on_domain_create.py
index 571621f..6238905 100644
--- a/repos/regression/multiple_thread_block_on_domain_create.py
+++ b/repos/regression/multiple_thread_block_on_domain_create.py
@@ -19,6 +19,7 @@ from src import env_parser
required_params = ('guestos', 'guestarch', 'guestnum', 'uri')
optional_params = {'xml' : 'xmls/domain.xml',
+ 'guestmachine': 'pc',
}
IMAG_PATH = "/var/lib/libvirt/images/"
diff --git a/repos/regression/xmls/domain.xml b/repos/regression/xmls/domain.xml
index 407f086..e70492d 100644
--- a/repos/regression/xmls/domain.xml
+++ b/repos/regression/xmls/domain.xml
@@ -3,7 +3,7 @@
<memory>1048576</memory>
<vcpu>1</vcpu>
<os>
- <type>hvm</type>
+ <type machine="GUESTMACHINE">hvm</type>
<kernel>/var/lib/libvirt/boot/vmlinuz</kernel>
<initrd>/var/lib/libvirt/boot/initrd.img</initrd>
<cmdline>KS</cmdline>
--
1.7.4.1
12 years, 6 months