[Libvir] Request for libvirt/ChangeLog
by Atsushi SAKAI
Hi, Dan
I have one request for libvirt/ChangeLog.
Please add the submitter Mail address to libvirt/ChangeLog
for ease of contribution counting.
Or If you have any good Idea to get the contribution statistics,
please notice me.
If you consider this, I would be appreciate it.
Thanks
Atsushi SAKAI
17 years, 10 months
[Libvir] Patch: include <locale.h> for setlocale
by Richard W.M. Jones
Very trivial, but useful for me because I'm trying to debug the remote
stuff without -O, and without -O it turns out that libvirt doesn't compile.
Rich.
---------------------------------------
Index: proxy/libvirt_proxy.c
===================================================================
RCS file: /data/cvs/libvirt/proxy/libvirt_proxy.c,v
retrieving revision 1.12
diff -u -r1.12 libvirt_proxy.c
--- proxy/libvirt_proxy.c 23 Jan 2007 14:39:45 -0000 1.12
+++ proxy/libvirt_proxy.c 28 Feb 2007 16:08:05 -0000
@@ -17,6 +17,7 @@
#include <sys/poll.h>
#include <sys/socket.h>
#include <sys/un.h>
+#include <locale.h>
#include "internal.h"
#include "proxy_internal.h"
#include "xen_internal.h"
---------------------------------------
--
Emerging Technologies, Red Hat http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421
"[Negative numbers] darken the very whole doctrines of the equations
and make dark of the things which are in their nature excessively
obvious and simple" (Francis Maseres FRS, mathematician, 1759)
17 years, 10 months
[Libvir] Patch: export virConf* symbols
by Richard W.M. Jones
The standalone parts of libvirt (particularly libvirtd) use the
configuration mini-lib.
Rich.
--
Emerging Technologies, Red Hat http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421
"[Negative numbers] darken the very whole doctrines of the equations
and make dark of the things which are in their nature excessively
obvious and simple" (Francis Maseres FRS, mathematician, 1759)
17 years, 10 months
[Libvir] Patch: Define SYSCONFDIR symbol
by Richard W.M. Jones
--
Emerging Technologies, Red Hat http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421
"[Negative numbers] darken the very whole doctrines of the equations
and make dark of the things which are in their nature excessively
obvious and simple" (Francis Maseres FRS, mathematician, 1759)
17 years, 10 months
[Libvir] Patch: tabstops
by Richard W.M. Jones
I've been slowly adding the Emacs & vi tabstop code to the end of files.
Rich.
--
Emerging Technologies, Red Hat http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421
"[Negative numbers] darken the very whole doctrines of the equations
and make dark of the things which are in their nature excessively
obvious and simple" (Francis Maseres FRS, mathematician, 1759)
17 years, 10 months
[Libvir] [PATCH] parsing virsh options is wrong
by Saori Fukuta
Hi,
When I specified -t (or -q) option with virsh command, the result is
something wrong.
It is likely to be caused by the way to parse the virsh options.
(example)
I would like to know the node information with timing information.
So, I try some cases.
1) virsh with "-t nodeinfo"
ran virsh interactive terminal. Hmm, I didn't expect that...
# virsh -t nodeinfo
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh #
2) virsh with "-t aa nodeinfo"
I got the node information with timing information. But what does
"aa" option mean?? (Of course no meaning.)
# virsh -t aa nodeinfo
CPU model: i686
CPU(s): 2
CPU frequency: 1828 MHz
CPU socket(s): 1
Core(s) per socket: 2
Thread(s) per core: 1
NUMA cell(s): 1
Memory size: 1037312 kB
(Time: 2.821 ms)
3) virsh with "-t tt nodeinfo"
ran virsh interactive terminal. What's the difference with "aa"?
# virsh -t tt nodeinfo
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh #
I think the cause is missing a conditional before getopt_long at
vshParseArgv and add to check whether "o->has_arg" is 1 or not.
After the fix, I can use virsh options normally.
(example)
1) virsh with "-t nodeinfo"
# ./virsh -t nodeinfo
CPU model: i686
CPU(s): 2
CPU frequency: 1828 MHz
CPU socket(s): 1
Core(s) per socket: 2
Thread(s) per core: 1
NUMA cell(s): 1
Memory size: 1037312 kB
(Time: 2.626 ms)
2) virsh with "-t aa nodeinfo"
# ./virsh -t aa nodeinfo
error: unknown command: 'aa'
3) virsh with "-t tt nodeinfo"
# ./virsh -t tt nodeinfo
error: unknown command: 'tt'
Signed-off-by: Saori Fukuta <fukuta.saori(a)jp.fujitsu.com>
Thanks,
Saori Fukuta.
Index: virsh.c
===================================================================
RCS file: /data/cvs/libvirt/src/virsh.c,v
retrieving revision 1.55
diff -u -p -r1.55 virsh.c
--- virsh.c 23 Feb 2007 10:27:53 -0000 1.55
+++ virsh.c 27 Feb 2007 07:35:28 -0000
@@ -3344,12 +3344,14 @@ vshParseArgv(vshControl * ctl, int argc,
int sz = strlen(last);
for (o = opt; o->name; o++) {
- if (sz == 2 && *(last + 1) == o->val)
- /* valid virsh short option */
- valid = TRUE;
- else if (sz > 2 && strcmp(o->name, last + 2) == 0)
- /* valid virsh long option */
- valid = TRUE;
+ if (o->has_arg == 1){
+ if (sz == 2 && *(last + 1) == o->val)
+ /* valid virsh short option */
+ valid = TRUE;
+ else if (sz > 2 && strcmp(o->name, last + 2) == 0)
+ /* valid virsh long option */
+ valid = TRUE;
+ }
}
}
if (!valid) {
17 years, 10 months
[Libvir] Linker dependancoes [Re: [kvm-devel] QEMU / KVM support in libvirt & virt-manager]
by Daniel P. Berrange
See this thread on kvm-devel for a question about link time dependancies
in libvirt. I'm not sure what the optimal approach is for us to deal with
this is - just something we should think about in an idle moment...
----- Forwarded message from Avi Kivity <avi(a)qumranet.com> -----
> Date: Sun, 25 Feb 2007 18:48:44 +0200
> From: Avi Kivity <avi(a)qumranet.com>
> To: "Daniel P. Berrange" <berrange(a)redhat.com>
> CC: kvm-devel(a)lists.sourceforge.net
> Subject: Re: [kvm-devel] QEMU / KVM support in libvirt & virt-manager
>
> Daniel P. Berrange wrote:
> > On Sun, Feb 25, 2007 at 07:32:58AM +0200, Avi Kivity wrote:
> >
> >> Daniel P. Berrange wrote:
> >>
> >>> FYI, as of libvirt 0.2.0 and virt-manager 0.3.1 there is now
> >>> (experimental!)
> >>> support for managing virtual machines running under QEMU or KVM
> >>> virtualization
> >>> platforms, as well as the existing Xen support.
> >>>
> >> Great; as I see it hit FC6-updates I'll give it a shot.
> >>
> >> One thing I saw is that it pulls in Xen as part of the dependencies;
> >> perhaps a libvirt-xen and libvirt-kvm subpackage split is called for?
> >
> > Yeah, we've not figured out exactly how to address that dependancy
> > issue yet - the libvirt.so has to link to libxenstore as part of the
> > Xen driver, so even if you only want to manage QEMU instances we still
> > end up pulling in Xen. We're certainly going to make it possible to
> > turn off the Xen stuff at compile time. Not clear how we'd address the
> > RPM dep issue though because the Fedora builds of libvirt will include
> > both Xen & QEMU support. Perhaps we'll have to try a dlopen() approach.
>
> I would suggest a /usr/lib/libvirt/xen.so and a
> /usr/lib/libvirt/qemu.so, which are enumerated by reading
> /usr/lib/libvirt, and dlopen()ed by libvirt.so. Only
> /usr/lib/libvirt/xen.so links to libxenstore.
>
> That way, a third party can add a backend by dropping a .so into
> /usr/lib/libvirt, and libvirt.so itself has no backend-related
> dependencies -- it doesn't know anything concrete about the backends, in
> fact.
----- End forwarded message -----
Dan
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
17 years, 10 months
[Libvir] Remote patch, 2007-02-26
by Richard W.M. Jones
I was really hoping to have a patch which could be applied out today.
This isn't quite that patch, so my apologies. Nevertheless, this
demonstrates what can be done, and works on a selection of the important
libvirt API calls.
http://www.annexia.org/tmp/libvirt-tls-20070226.patch
List of things that need to be done:
* Audit incoming IP addresses / virConnectOpen names to syslog.
* GnuTLS handshake DoS fix (see danpb's email).
* GnuTLS client crashing bug (I have a fix, just needs to be applied).
* Complete the wrappers for the remaining API calls.
* Testing(!)
Apart from that list above, I'm hoping that this patch addresses
everything that people have raised on list and privately about previous
patches. If I've missed anything, let me know.
Rich.
----------------------------------------- "screenshot" ---
rjones@oirase:~/d/libvirt-remote$ src/virsh -c test://localhost/default
nodeinfo
proceeding with name = test:///default
loading CA file demoCA/cacert.pem
loading client cert and key from files 127001cert.pem and 127001key.pem
CPU model: i686
CPU(s): 16
CPU frequency: 1400 MHz
CPU socket(s): 2
Core(s) per socket: 2
Thread(s) per core: 2
NUMA cell(s): 2
Memory size: 3145728 kB
rjones@oirase:~/d/libvirt-remote$ src/virsh -c test://localhost/default
create tests/xmconfigdata/test-fullvirt-new-cdrom.xml
proceeding with name = test:///default
loading CA file demoCA/cacert.pem
loading client cert and key from files 127001cert.pem and 127001key.pem
Domain XenGuest2 created from tests/xmconfigdata/test-fullvirt-new-cdrom.xml
rjones@oirase:~/d/libvirt-remote$ src/libvirtd -d
libvir: error : failed to open /home/rjones/local/etc/libvirtd.conf for
reading
libvirtd: loading CA cert from demoCA/cacert.pem
libvirtd: loading cert and key from servercert.pem and serverkey.pem
libvirtd: TLS service listening on port 16514
libvirtd: Unix service listening on socket
/home/rjones/local/var/run/libvirtd/socket
libvirtd: create_mapping: xprt = 0x647680
libvirtd: lookup_connection: xprt = 0x647680
libvirtd: set_connection: xprt = 0x647680
libvirtd: lookup_connection: xprt = 0x647680
libvirtd: lookup_connection: xprt = 0x647680
libvirtd: set_connection: xprt = 0x647680
libvirtd: destroy_mapping: xprt = 0x647680
libvirtd: create_mapping: xprt = 0x647b20
libvirtd: lookup_connection: xprt = 0x647b20
libvirtd: set_connection: xprt = 0x647b20
libvirtd: lookup_connection: xprt = 0x647b20
libvirtd: lookup_connection: xprt = 0x647b20
libvirtd: set_connection: xprt = 0x647b20
libvirtd: destroy_mapping: xprt = 0x647b20
--
Emerging Technologies, Red Hat http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421
"[Negative numbers] darken the very whole doctrines of the equations
and make dark of the things which are in their nature excessively
obvious and simple" (Francis Maseres FRS, mathematician, 1759)
17 years, 10 months
Re: [Libvir] [patch 3/3] Use libuuid to generate UUIDs
by Daniel P. Berrange
On Mon, Feb 26, 2007 at 02:28:30PM +0000, Mark McLoughlin wrote:
> If libuuid from e2fsprogs is available, we use that to
> generate UUIDs.
On the one hand I think its good to re-use existing libraries where
they fullfill our needs, but then we need to keep a built-in impl of
UUID generator for non-Linux systems which typically won't have a
e2fsprogs available. So rather than maintaining two separate impls
of the UUID code, which splits the testing coverage, I'd be inclined
to just always use the builtin version. Guarenteeing consistent
algorithm / semantics for UUID generation across all platforms.
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
17 years, 10 months