[libvirt] Remote virConnect.listDomainsID() returns invalid IDs (Python, Xen)
by Russell Haering
I'm working with the Libvirt Python bindings and have discovered the
following:
If I run virConnect.listDomainsID() locally I get a list of valid IDs.
For example:
>>> import libvirt
>>> conn = libvirt.open('xen://')
>>> conn.listDomainsID()
[0, 35, 36, 37, 38, 39, 40, 61]
If I run the exact same thing remotely I get a list including numerous
invalid IDs. This example shows the same host as shown above, about 20
seconds earlier (everything essentially identical):
>>> import libvirt
>>> conn = libvirt.open('xen+tls://xxxx.xxxxx')
>>> conn.listDomainsID()
[0, 35, 36, 37, 38, 39, 40, 51, 52, 53, 54, 60, 61]
IDs 51, 52, 53, 54 and 60 are invalid.
I first noticed this problem working with libvirt 0.6.0 on the client
and 0.6.2 on the server, and noticed that with those versions the
problem also occurred with virsh.
Locally(0.6.0):
local ~ # virsh list
Id Name State
----------------------------------
0 Domain-0 running
35 xxxxxxx idle
36 xxxxx idle
37 xxxxxx idle
38 xxxxxxxxx idle
39 xxxxxx idle
40 xxxxx idle
61 xxxxxxxxxx idle
Whereas remotely(0.6.0):
remote # virsh -c xen+tls://xxxxx.xxxxx list
Id Name State
----------------------------------
0 Domain-0 running
35 xxxxxxx idle
36 xxxxx idle
37 xxxxxx idle
38 xxxxxxxxx idle
39 xxxxxx idle
40 xxxxx idle
libvir: Xen Daemon error : GET operation failed: xend_get: error from
xen daemon:
libvir: Xen Daemon error : GET operation failed: xend_get: error from
xen daemon:
libvir: Xen Daemon error : GET operation failed: xend_get: error from
xen daemon:
libvir: Xen Daemon error : GET operation failed: xend_get: error from
xen daemon:
libvir: Xen Daemon error : GET operation failed: xend_get: error from
xen daemon:
61 xxxxxxxxxx idle
However with virsh 0.6.2 on the client this appears to be fixed.
Thanks,
--
Russell Haering
Systems Administrator
OSU Open Source Lab
15 years, 12 months
[libvirt] Has anyone ever gotten the client or full to compile on OS X?
by Schley Andrew Kutz
It's me. The original instigator of the long Leopard thread from early
2008. I once again need to do libvirt development from my Mac, and I
still cannot seem to get it to compile :(
It is currently bugging out at:
gcc -DHAVE_CONFIG_H -I. -I.. -I../gnulib/lib -I../gnulib/lib -I../
include -I../include -I../qemud -I/usr/include/libxml2 -DLIBDIR=\"/opt/
libvirt//lib\" -DBINDIR=\"/opt/libvirt//libexec\" -DSBINDIR=\"/opt/
libvirt//sbin\" -DSYSCONF_DIR=\"/opt/libvirt//etc\" -DLOCALEBASEDIR=\"/
opt/libvirt//share/locale\" -DLOCAL_STATE_DIR=\"/opt/libvirt//var\" -
DGETTEXT_PACKAGE=\"libvirt\" -Wall -Wformat -Wmissing-prototypes -
Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-
strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-
decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -
fasynchronous-unwind-tables -I/opt/local/include -g -O2 -MT pci.lo -MD
-MP -MF .deps/pci.Tpo -c pci.c -fno-common -DPIC -o .libs/pci.o
pci.c: In function 'pciFindStubDriver':
pci.c:652: error: 'MODPROBE' undeclared (first use in this function)
pci.c:652: error: (Each undeclared identifier is reported only once
pci.c:652: error: for each function it appears in.)
make[3]: *** [pci.lo] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Any help is appreciated.
--
-a
"Ideally, a code library must be immediately usable by naive
developers, easily customized by more sophisticated developers, and
readily extensible by experts." -- L. Stein
15 years, 12 months
[libvirt] LibvirtException: socket closed unexpectedly
by Marcel Michelmann
Hi *,
I wrote a program in Java communicating with libvirt/XEN over SSH, with
libvirt-java-0.2.1.
I poll the CPU and RAM usage quite often (about 5 times a second).
My program runs well about between 5-8 minutes, but then I get
LibvirtException: socket closed unexpectedly.
Although I try to catch the LibvirtExceptions with special
System.out.println messages I have no idea where this is coming from.
Now my question: what leads to this exception?
exception caught: org.libvirt.LibvirtException: socket closed unexpectedly
level:VIR_ERR_ERROR
code:VIR_ERR_RPC
domain:VIR_FROM_REMOTE
hasConn:false
hasDom:false
hasNet:false
message:socket closed unexpectedly
str1:%s
str2:socket closed unexpectedly
str3:null
int1:0
int2:0
After that I can start my program again, and it is the same again (runs some
minutes and then throws the exception).
Perhaps someone knows? I would be very thankful for any help!
Best regards,
Marcel
15 years, 12 months
[libvirt] Latest git tree doesn't compile
by Florian Vichot
Hello everyone,
I just got the latest and grooviest libvirt from the git tree at :
git://git.et.redhat.com/libvirt.git
but compiling fails:
/bin/bash ../mylibtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.
-I.. -I../gnulib/lib -I../gnulib/lib -I../include -I../include
-I../qemud -I/usr/include/libxml2 -DLIBDIR=\""/usr/local/lib"\"
-DBINDIR=\""/usr/local/libexec"\" -DSBINDIR=\""/usr/local/sbin"\"
-DSYSCONF_DIR="\"/usr/local/etc\""
-DLOCALEBASEDIR=\""/usr/local/share/locale"\"
-DLOCAL_STATE_DIR=\""/usr/local/var"\" -DGETTEXT_PACKAGE=\"libvirt\"
-Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs
-Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings
-Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls
-Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fasynchronous-unwind-tables -g -O2 -MT lxc_driver.lo -MD -MP -MF
.deps/lxc_driver.Tpo -c -o lxc_driver.lo lxc_driver.c
(CC) -o lxc_driver.lo lxc_driver.c
lxc_container.c: In function 'lxcContainerDropCapabilities':
lxc_container.c:657: error: 'PR_CAPBSET_DROP' undeclared (first use in
this function)
lxc_container.c:657: error: (Each undeclared identifier is reported only
once
lxc_container.c:657: error: for each function it appears in.)
Apparently, my machine doesn't have the PR_CAPBSET_DROP flag defined.
It's inexistent in sys/capability.h and "man prctl".
I run a Ubuntu 8.04, kernel is 2.6.24-24-openvz.
Am I missing headers that are not tested for in the ./configure ? If
not, any way that functionality could be disabled on distros that don't
support it ?
Thanks,
Florian
16 years
[libvirt] create domain for existing xp image
by Gunnar Thielebein
I want to create a domain for an existing xp machine via virt-install.
The command is taken from this wiki article
http://wiki.libvirt.org/page/QEMUSwitchToLibvirt:
> virt-install --accelerate --hvm --connect qemu:///system -n xp -r 512
> --cdrom=/dev/null --file=WinXP.img --vnc --noautoconsole --os-type
> windows --os-variant winxp --force
When I start and connect I see message:
> We apologize for the inconvenience,
> ...
> A recent hardware or software change might have caused this.
When I look at the features I saw that it lacks acpi so it changes image
HAL table. Is it intentional missing for that os/variant?
16 years
[libvirt] [PATCH 0/5] Interface Config public APIs and remote stubs
by Laine Stump
These 5 patches contain the public virInterface*() API definition, the
local plumbing, and the RPC glue. The test driver and real driver are
still TBI, but having this in will allow other people to work on related
stuff.
Other things still needed:
python/java bindings
cli commands in virsh
I'm sure lots of other things I don't know about yet.
Note that I have added a couple things to the API that I previously
didn't realize were needed (virInterfaceRef and virInterfaceFree - I
had figured the client side would just pass around a cookie, not
actually have storage associated with it).
16 years
[libvirt] PATCH: Fix virsh reporting open errors
by Daniel P. Berrange
The error handling refactor we did in virsh a few months back, accidentally
means we never report the real libvirt error message for the initial
connection attempt. This patch fixes it
Daniel
Index: src/virsh.c
===================================================================
RCS file: /data/cvs/libvirt/src/virsh.c,v
retrieving revision 1.202
diff -u -p -r1.202 virsh.c
--- src/virsh.c 28 Apr 2009 10:55:45 -0000 1.202
+++ src/virsh.c 8 May 2009 16:36:30 -0000
@@ -6876,6 +6876,7 @@ vshInit(vshControl *ctl)
* such as "help".
*/
if (!ctl->conn) {
+ virshReportError(ctl);
vshError(ctl, FALSE, "%s", _("failed to connect to the hypervisor"));
return FALSE;
}
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
16 years
[libvirt] qemu error: package not installed
by Nigel Goddard
I get the following error on Ubuntu 8.04 when tryint to install the
libvirt-bin package:
Setting up libvirt-bin (0.4.0-2ubuntu8.1) ...
* Starting libvirt management daemon libvirtd
libvir: QEMU error : cannot create bridge 'vnet%d' : Package not installed
Failed to autostart network 'default': cannot create bridge 'vnet%d' :
Package not installed
Can anyone advise which package I need to install?
thanks
Nigel
--
============================================
Nigel Goddard Axiope Limited
ngoddard(a)axiope.com Tel: +44 787 967 1811
http://www.axiope.com Fax: +44 871 251 4870
--------------------------------------------
Registered in Scotland. Registered address:
Quartermile One, 15 Lauriston Place
Edinburgh EH3 9EP, United Kingdom
============================================
16 years