[libvirt] [PATCH] S390: Buffer too small for large CPU numbers.
by Viktor Mihajlovski
The output buffer for virFileReadAll was too small for systems with
more than 30 CPUs which leads to a log entry and incorrect behavior.
The new size will be sufficient for the current
architectural limits.
Signed-off-by: Viktor Mihajlovski <mihajlov(a)linux.vnet.ibm.com>
---
src/util/sysinfo.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/util/sysinfo.c b/src/util/sysinfo.c
index d38b4ff..8add936 100644
--- a/src/util/sysinfo.c
+++ b/src/util/sysinfo.c
@@ -361,7 +361,7 @@ virSysinfoRead(void) {
goto no_memory;
/* Gather info from /proc/cpuinfo */
- if (virFileReadAll(CPUINFO, 2048, &outbuf) < 0) {
+ if (virFileReadAll(CPUINFO, 8192, &outbuf) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Failed to open %s"), CPUINFO);
return NULL;
@@ -376,7 +376,7 @@ virSysinfoRead(void) {
VIR_FREE(outbuf);
/* Gather info from /proc/sysinfo */
- if (virFileReadAll(SYSINFO, 4096, &outbuf) < 0) {
+ if (virFileReadAll(SYSINFO, 8192, &outbuf) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Failed to open %s"), SYSINFO);
return NULL;
--
1.7.0.4
12 years, 1 month
[libvirt] [PATCH] Check for private symbols presence as well
by Michal Privoznik
Currently, we are checking if libvirt.so contains public symbols.
However, sometimes we rename an internal symbol and forget to
change libvirt_private.syms accordingly. Hence, it's safer to check
for internal symbols as well.
---
src/Makefile.am | 7 ++++++-
src/check-symfile.pl | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index ae3d491..c5840c0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -318,8 +318,13 @@ if WITH_LINUX
check-symfile: libvirt.syms libvirt.la
$(AM_V_GEN)$(PERL) $(srcdir)/check-symfile.pl libvirt.syms \
.libs/libvirt.so
+
+check-private-symfile: libvirt_private.syms libvirt.la
+ $(AM_V_GEN)$(PERL) $(srcdir)/check-symfile.pl libvirt_private.syms \
+ .libs/libvirt.so
else
check-symfile:
+check-private-symfile:
endif
PROTOCOL_STRUCTS = \
@@ -344,7 +349,7 @@ else !WITH_REMOTE
check-protocol:
endif
EXTRA_DIST += $(PROTOCOL_STRUCTS) check-symfile.pl
-check-local: check-protocol check-symfile
+check-local: check-protocol check-symfile check-private-symfile
.PHONY: check-protocol $(PROTOCOL_STRUCTS:structs=struct)
# Mock driver, covering domains, storage, networks, etc
diff --git a/src/check-symfile.pl b/src/check-symfile.pl
index ac37b46..435e045 100755
--- a/src/check-symfile.pl
+++ b/src/check-symfile.pl
@@ -44,7 +44,7 @@ foreach my $elflib (@elflibs) {
close NM;
}
-foreach my $sym (@wantsyms) {
+foreach my $sym (keys(%wantsyms)) {
next if exists $gotsyms{$sym};
print STDERR "Expected symbol $sym is not in ELF library\n";
--
1.7.8.6
12 years, 1 month
[libvirt] [libvirt-php] Function calls blocking on Ubuntu 12.04
by Rory Slegtenhorst
Dear List,
Please note I am not subscribed to this list.
I just wanted to state my problem, and will wait for a fix when it comes.
I have sucessfully compiled libvirt-php-0.4.5 on Ubuntu 12.04. I ran into
some problems when
using the library in simple php code, specifically trying to retrieve a
screenshot.
1. libvirt_domain_get_screenshot_api returns a PHP fatal about it not being
defined ?!?
I have not looked into this at all. It was the first of the two I tried,
and went on for the other :)
2. libvirt_domain_get_screenshot blocks forever
I investigated this one, as from my debug logging, I could see things were
going right. My browser just never
finishes loading. I traced it down vnc.c on line x where a loop is started.
The loop never seems to finish (unsure why though), and commenting out the
loop fixes my problem.
With kind regards,
Rory Slegtenhorst
rory dot slegtenhorst at gmail dot com
12 years, 1 month
[libvirt] [PATCH] private.syms: Drop virKillProcess
by Michal Privoznik
After it got renamed to virProcessKill (cf470068a11)
it is no longer needed in the private syms file.
---
It is trivial, but maybe worth inventing cfg.mk macro
that does check if all symbols fro private syms are
defined somewhere. However, I am not that familiar
with cfg.mk, so if anybody has any idea ...
src/libvirt_private.syms | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index eebc52a..a8c81e7 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1246,7 +1246,6 @@ virGetUserName;
virHexToBin;
virIndexToDiskName;
virIsDevMapperDevice;
-virKillProcess;
virParseNumber;
virParseVersionString;
virPipeReadUntilEOF;
--
1.7.8.6
12 years, 1 month
[libvirt] [PATCH v3 0/2] security: support for names on DAC labels
by Marcelo Cerri
This patch series extends label parsing for DAC security driver and updates
the related documentation.
This version basically uses virReportError instead of VIR_DEBUG for error
messages.
Marcelo Cerri (2):
security: also parse user/group names instead of just IDs for DAC
labels
doc: update description about security labels on formatdomain.html
docs/formatdomain.html.in | 14 ++++++-
src/security/security_dac.c | 92 ++++++++++++++++++++++++++++++++++-----------
2 files changed, 82 insertions(+), 24 deletions(-)
--
1.7.12
12 years, 1 month
[libvirt] [PATCH] spec: prefer canonical name of util-linux
by Eric Blake
I noticed that in two places, we require util-linux, and in a third,
we require util-linux-ng. On Fedora (I tested F15 through rawhide),
util-linux-ng is obsoleted by util-linux; on RHEL 6, util-linux
is obsoleted by util-linux-ng. That is, on either platform, either
name will get you the correct package installed (where the preferred
name on fedora is util-linux, and on RHEL 6 is util-linux-ng). But
on RHEL 5, there is no util-linux-ng
* libvirt.spec.in (Requires): Use util-linux, not util-linux-ng.
---
I debated about pushing this under the trivial rule, but decided
not to. Also, if you look at Fedora's git repository for libvirt,
you'll notice that Peter Robinson attempted this same patch for
F17 in commit f9de2f6, but with no explanation why.
libvirt.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 11e3199..e3d0a2d 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -614,7 +614,7 @@ Requires: PolicyKit >= 0.6
%if %{with_storage_fs}
Requires: nfs-utils
# For mkfs
-Requires: util-linux-ng
+Requires: util-linux
# For pool-build probing for existing pools
BuildRequires: libblkid-devel >= 2.17
# For glusterfs
--
1.7.11.4
12 years, 1 month
[libvirt] migration.html page issues
by Eric Blake
Compare the table of contents on http://libvirt.org/migration.html to
most other pages on libvirt.org. For some reason, the build process of
converting migration.html.in into live html is rendering all links to
internal anchors as '#' instead of full '#name' links. I'm throwing
this out there in case someone else knows more quickly how to fix the
problem (I'm not very fluent with all the xsltproc conversion stuff in
the docs directory).
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
12 years, 1 month
[libvirt] feature or bug
by Gene Czarcinski
I notice that radvd is started for any ISOLATED (non-forwarding) network
with an IPv6 definition.
Why?
In fact, I believe that there should be a way of defining a virtual
network where neither dnsmasq nor radvd are started. My assumption is
that virtual servers will be defined on the network as needed.
I assume that the network addresses, etc. are needed by software
somewhere deep in the bowels of the kernel and related software. Thus,
it should not be possible to have guests use IPv4 or IPv6 addresses on a
network other than those defined.
Comments?
Gene
12 years, 1 month
[libvirt] Problems live migrating a Windows VM - Inconsistent?
by Shawn Starr
Hello,
I noticed some issues migrating a VM
1) I had to have ssh key authentication exchanged or it would refuse to
connect tunneled to the remote libvirtd server
2) When it attempts to finish live migrating the VM it fails saying it can't
find the domain on the remote libvirtd server host
However, if I run the command again to migrate, it DOES migrate the VM over, however the Windows guest is not usable, cant type/use mouse, but i can see the VM display fine. I can gracefully shut the VM down from virt-manager and
I see the VM shut down gracefully from display attached via spice.
This seems like two bugs?
Versions:
host kernel: 3.6.0-0.rc7.git0.1.fc18.x86_64
libvirt-XXXXXXX-0.10.2-3.fc18.x86_64
qemu-kvm-1.2.0-8.fc18.x86_64 (will upgrade to latest on koji but unrelated I believe)
Command:
LIBVIRT_DEBUG=1 virsh --debug=4 migrate --verbose --live --tunnelled --p2p Windows_7 qemu+ssh://root@172.18.2.3/system
Output:
...
<snip>
2012-09-30 17:59:14.814+0000: 24710: debug : virKeepAliveCheckMessage:384 : ka=0x266a470, client=0x2669ee0, msg=0x2669f48
2012-09-30 17:59:14.814+0000: 24710: debug : virNetClientIOEventLoopRemoveDone:1380 : Waking up sleep 0x2669cb0
2012-09-30 17:59:14.814+0000: 24708: debug : virNetClientIO:1754 : Woken up from sleep head=0x7f4830400e60 call=0x2669cb0
2012-09-30 17:59:14.814+0000: 24708: debug : virNetClientIO:1807 : All done with our call head=0x7f4830400e60 call=0x2669cb0 rv=0
2012-09-30 17:59:14.814+0000: 24708: debug : virNetMessageFree:73 : msg=0x2669640 nfds=0 cb=(nil)
Migration: [ 95 %]2012-09-30 17:59:15.315+0000: 24708: debug : virDomainGetJobInfo:17129 : dom=0x2669e70, (VM: name=Windows, uuid=41562d70-d0a8-25bc-10ec-a3dc46b3d258), info=0x7fffb64d72d0
2012-09-30 17:59:15.315+0000: 24708: debug : virNetMessageNew:45 : msg=0x2669640 tracked=0
2012-09-30 17:59:15.315+0000: 24708: debug : virNetMessageEncodePayload:358 : Encode length as 64
2012-09-30 17:59:15.315+0000: 24708: debug : virNetClientSendInternal:1955 : RPC_CLIENT_MSG_TX_QUEUE: client=0x2669ee0 len=64 prog=536903814 vers=1 proc=163 type=0 status=0 serial=50
2012-09-30 17:59:15.315+0000: 24708: debug : virNetClientCallNew:1908 : New call 0x2669150: msg=0x2669640, expectReply=1, nonBlock=0
2012-09-30 17:59:15.315+0000: 24708: debug : virNetClientIO:1718 : Outgoing message prog=536903814 version=1 serial=50 proc=163 type=0 length=64 dispatch=0x7f4830400e60
2012-09-30 17:59:15.315+0000: 24708: debug : virNetClientIO:1744 : Going to sleep head=0x7f4830400e60 call=0x2669150
2012-09-30 17:59:15.315+0000: 24710: debug : virNetClientIOEventLoop:1558 : Woken up from poll by other thread
2012-09-30 17:59:15.317+0000: 24710: debug : virNetMessageDecodeLength:152 : Got length, now need 120 total (116 more)
2012-09-30 17:59:15.317+0000: 24710: debug : virNetClientCallDispatch:1127 : RPC_CLIENT_MSG_RX: client=0x2669ee0 len=120 prog=536903814 vers=1 proc=163 type=1 status=0 serial=50
2012-09-30 17:59:15.317+0000: 24710: debug : virKeepAliveCheckMessage:384 : ka=0x266a470, client=0x2669ee0, msg=0x2669f48
2012-09-30 17:59:15.317+0000: 24710: debug : virNetClientIOEventLoopRemoveDone:1380 : Waking up sleep 0x2669150
2012-09-30 17:59:15.317+0000: 24708: debug : virNetClientIO:1754 : Woken up from sleep head=0x7f4830400e60 call=0x2669150
2012-09-30 17:59:15.317+0000: 24708: debug : virNetClientIO:1807 : All done with our call head=0x7f4830400e60 call=0x2669150 rv=0
2012-09-30 17:59:15.317+0000: 24708: debug : virNetMessageFree:73 : msg=0x2669640 nfds=0 cb=(nil)
Migration: [ 95 %]2012-09-30 17:59:15.751+0000: 24710: debug : virNetMessageDecodeLength:152 : Got length, now need 204 total (200 more)
2012-09-30 17:59:15.751+0000: 24710: debug : virNetClientCallDispatch:1127 : RPC_CLIENT_MSG_RX: client=0x2669ee0 len=204 prog=536903814 vers=1 proc=216 type=1 status=1 serial=8
2012-09-30 17:59:15.751+0000: 24710: debug : virKeepAliveCheckMessage:384 : ka=0x266a470, client=0x2669ee0, msg=0x2669f48
2012-09-30 17:59:15.751+0000: 24710: debug : virNetClientIOEventLoopPassTheBuck:1424 : Giving up the buck 0x7f4830400e60
2012-09-30 17:59:15.751+0000: 24710: debug : virNetClientIOEventLoopPassTheBuck:1438 : No thread to pass the buck to
2012-09-30 17:59:15.751+0000: 24710: debug : virEventPollUpdateHandle:146 : EVENT_POLL_UPDATE_HANDLE: watch=2 events=1
2012-09-30 17:59:15.751+0000: 24710: debug : virEventPollInterruptLocked:701 : Interrupting
2012-09-30 17:59:15.751+0000: 24710: debug : virNetClientIO:1807 : All done with our call head=(nil) call=0x7f4830400e60 rv=0
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollRunOnce:625 : Poll got 1 event(s)
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollDispatchTimeouts:410 : Dispatch 0
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollDispatchHandles:455 : Dispatch 1
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollDispatchHandles:469 : i=0 w=1
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollDispatchHandles:483 : EVENT_POLL_DISPATCH_HANDLE: watch=1 events=1
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollCleanupTimeouts:501 : Cleanup 0
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollCleanupTimeouts:537 : Found 0 out of 0 timeout slots used, releasing 0
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollCleanupHandles:549 : Cleanup 2
2012-09-30 17:59:15.751+0000: 24709: debug : virEventRunDefaultImpl:244 : running default event implementation
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollCleanupTimeouts:501 : Cleanup 0
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollCleanupTimeouts:537 : Found 0 out of 0 timeout slots used, releasing 0
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollCleanupHandles:549 : Cleanup 2
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollMakePollFDs:378 : Prepare n=0 w=1, f=4 e=1 d=0
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollMakePollFDs:378 : Prepare n=1 w=2, f=6 e=1 d=0
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollCalculateTimeout:320 : Calculate expiry of 0 timers
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollCalculateTimeout:346 : Timeout at 0 due in -1 ms
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollRunOnce:614 : EVENT_POLL_RUN: nhandles=2 timeout=-1
2012-09-30 17:59:15.751+0000: 24710: debug : virNetMessageFree:73 : msg=0x7f4830000de0 nfds=0 cb=(nil)
2012-09-30 17:59:15.751+0000: 24710: debug : virDomainFree:2281 : dom=0x7f4830000af0, (VM: name=Windows, uuid=41562d70-d0a8-25bc-10ec-a3dc46b3d258)
2012-09-30 17:59:15.751+0000: 24710: debug : virObjectUnref:135 : OBJECT_UNREF: obj=0x7f4830000af0
2012-09-30 17:59:15.751+0000: 24710: debug : virObjectUnref:137 : OBJECT_DISPOSE: obj=0x7f4830000af0
2012-09-30 17:59:15.751+0000: 24710: debug : virDomainDispose:225 : release domain 0x7f4830000af0 Windows 41562d70-d0a8-25bc-10ec-a3dc46b3d258
2012-09-30 17:59:15.751+0000: 24710: debug : virObjectUnref:135 : OBJECT_UNREF: obj=0x26693b0
2012-09-30 17:59:15.751+0000: 24708: debug : virDomainFree:2281 : dom=0x2669e70, (VM: name=Windows, uuid=41562d70-d0a8-25bc-10ec-a3dc46b3d258)
2012-09-30 17:59:15.751+0000: 24708: debug : virObjectUnref:135 : OBJECT_UNREF: obj=0x2669e70
2012-09-30 17:59:15.751+0000: 24708: debug : virObjectUnref:137 : OBJECT_DISPOSE: obj=0x2669e70
2012-09-30 17:59:15.751+0000: 24708: debug : virDomainDispose:225 : release domain 0x2669e70 Windows 41562d70-d0a8-25bc-10ec-a3dc46b3d258
2012-09-30 17:59:15.752+0000: 24708: debug : virObjectUnref:135 : OBJECT_UNREF: obj=0x26693b0
2012-09-30 17:59:15.752+0000: 24708: debug : virFileClose:72 : Closed fd 9
2012-09-30 17:59:15.752+0000: 24708: debug : virFileClose:72 : Closed fd 10
error: Domain not found: no domain with matching name 'Windows'
12 years, 1 month