Re: [libvirt] [Qemu-devel] Re: Supporting hypervisor specific APIs in libvirt
by Avi Kivity
On 03/24/2010 02:30 PM, Paul Brook wrote:
>> On 03/23/2010 09:24 PM, Anthony Liguori wrote:
>>
>>> We also provide an API for guest creation (the qemu command line).
>>>
>> As an aside, I'd like to see all command line options have qmp
>> equivalents (most of them can be implemented with a 'set' command that
>> writes qdev values). This allows a uniform way to control a guest,
>> whether at startup or runtime. You start with a case, cold-plug a
>> motherboard, cpus, memory, disk controllers, and power it on.
>>
> The main blocker to this is converting all the devices to qdev. "partial"
> conversions are not sufficient. It's approximately the same problem as a
> machine config file. If you have one then the other should be fairly trivial.
>
Agreed.
> IMO the no_user flag is a bug, and should not exist.
>
Sorry, what's that?
--
error compiling committee.c: too many arguments to function
14 years, 8 months
[libvirt] prematurely pushed my build/portability/clean-up patches
by Jim Meyering
Jim Meyering wrote:
> Eric Blake wrote:
>> On 03/23/2010 09:07 AM, Philipp Hahn wrote:
>>> The conversion from seconds to milliseconds should only be done for
>>> actual delays >= 0, not for the magic -1 value used for infinite
>>> timeouts.
>>
>> ACK.
>
> Thanks. I pushed that.
Whoops.
While pushing that, I mistakenly also pushed my four unreviewed
build/portability/clean-up patches. Sorry about that.
14 years, 8 months
[libvirt] [PATCH] poll(-0.001) does not sleep forever.
by Philipp Hahn
The conversion from seconds to milliseconds should only be done for
actual delays >= 0, not for the magic -1 value used for infinite
timeouts.
Signed-off-by: Philipp Hahn <hahn(a)univention.de>
---
examples/domain-events/events-python/event-test.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
14 years, 8 months
[libvirt] [PATCH] tests: Don't add extra padding if counter mod 40 is 0
by Matthias Bolte
---
tests/test-lib.sh | 10 ++++++----
tests/testutils.c | 2 +-
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/tests/test-lib.sh b/tests/test-lib.sh
index 43265f3..57fd438 100644
--- a/tests/test-lib.sh
+++ b/tests/test-lib.sh
@@ -55,10 +55,12 @@ test_final()
if test "$verbose" = "0" ; then
mod=`eval "expr \( $counter + 1 \) % 40"`
- for i in `seq $mod 40`
- do
- echo -n " "
- done
+ if test "$mod" != "0" -a "$mod" != "1" ; then
+ for i in `seq $mod 40`
+ do
+ echo -n " "
+ done
+ fi
if test "$status" = "0" ; then
printf " %-3d OK\n" $counter
else
diff --git a/tests/testutils.c b/tests/testutils.c
index 8764673..99bd9df 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -531,7 +531,7 @@ cleanup:
virResetLastError();
if (!virTestGetVerbose()) {
int i;
- for (i = (testCounter % 40) ; i < 40 ; i++)
+ for (i = (testCounter % 40) ; i > 0 && i < 40 ; i++)
fprintf(stderr, " ");
fprintf(stderr, " %-3d %s\n", testCounter, ret == 0 ? "OK" : "FAIL");
}
--
1.6.3.3
14 years, 8 months
[libvirt] [PATCH] Don't mix relative and absolute paths.
by Philipp Hahn
autoconf goes to great lengths to calculate a proper MKINSTALLDIRS path,
so just export the variable for gettext, but don't overwrite it with a
broken path:
$(top_builddir) is a relative path, while $ac_aux_dir can be an absolute
path.
Signed-off-by: Philipp Hahn <hahn(a)univention.de>
---
configure.ac | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
14 years, 8 months
[libvirt] [PATCH 0/3] Refactor XML parsing code
by Jiri Denemark
Almost identical XML parsing code for either strings or files was copied
15 times. Since it was needed on two other places for parsing CPU XML
strings with correct error reporting, I decided to factor the parsing code
out to xml.c and used this one implementation in all other places.
Jiri Denemark (3):
Introduce XML parsing utility functions
Use common XML parsing functions
Fix error reporting when parsing CPU XML strings
src/conf/domain_conf.c | 130 ++++++---------------------------------
src/conf/interface_conf.c | 93 ++++------------------------
src/conf/network_conf.c | 93 ++++------------------------
src/conf/node_device_conf.c | 60 +-----------------
src/conf/secret_conf.c | 56 ++---------------
src/conf/storage_conf.c | 110 +++-------------------------------
src/cpu/cpu.c | 11 ++-
src/util/xml.c | 142 ++++++++++++++++++++++++++++++++++++++++++-
src/util/xml.h | 19 ++++++
9 files changed, 231 insertions(+), 483 deletions(-)
14 years, 8 months
[libvirt] [RFC] events scripts support
by Daniel Veillard
We would like to introduce a way to configure system wide a script
which would be called when some event happens. The script is a single
executable set as a libvirtd option by the system administrator
(assuming one runs the system libvirtd) or the user (assuming a
user run libvirtd).
The script could be invoked on daemon events, for example starting
stopping, or reloading (SIGHUP), on domain events for example before
a domain starts, or after its stops, and possibly on other kind of
events detected by the daemon (storage or interface ...)
My current thinking is to add the following two variables to
libvirtd.conf:
# Event scripts
# An optional path to a script handling various kind of events like
# domain start, domain end, pre and post migration, etc...
# The events_script must be a path to the script or binary handling
# the
# events.
# The events_set is a list of space separated name for the event type
# the script should receive
#
# events_script="/etc/libvirt/events"
# events_set="daemon domain"
The script aruguments would be
- the object kind: e.g. "domain"
- the object name: e.g. the domain name
- the event itself: e.g. "start"
- sub event qualifier: e.g. "before"
- an optional extra information for example in case of migration
the destination or source
So for example if the two variables as set as sugegsted,
/etc/libvirt/events domain foo start before
would be run by the daemon before the lunch of a domain which could
have been initiated by the user when running "virsh foo start".
The script exec return value is expected to be 0 unless indicating an
error, in that case the libvirtd command would fail, for example
if the command launched for "virsh foo start" failed with an error value
the domain won't be started.
This is a new kind of API in libvirt(d) so I'm submitting this for
review. There could be some challenging issues, for example naming
i.e. is the object "external" name like 'foo' the right thing to pass
or should we also provide the uuid, making sure the arguments for the
scripts and the behaviour is generic enough, and also how to handle
potential recursion and avoid deadlock if the events script happen to
use libvirt.
I hope to have some initial patches by tomorrow, but I'm probably
forgetting things, so feedback welcome !
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/
14 years, 8 months
Re: [libvirt] FW: [PATCH 1/4] Addition of XenAPI support to libvirt
by Daniel Veillard
On Fri, Feb 19, 2010 at 11:33:36AM +0000, Sharadha Prabhakar (3P) wrote:
>
> thanks for the patch, just started to look at it.
>
> I assume that by libxenserver you mean the code to be added under src
> in a following patch, right ?
>
> -> libxenserver is a library which provides APIs for performing various
> Operations on the hypervisor. You can download it from
> http://community.citrix.com/download/attachments/38633496/libxenserver-5....
> libxenserver folder should be in the same directory level of libvirt.
Sorry that's not possible. Either the code is in libvirt, and in that
case it doesn't have to be downloaded, but part of the patch submission
(and managed on this list) , or it's a new external dependancy and it's
availability must be checked by configure.ac.
If we add a new dependancy, it must also be checked for Licence
compatibility. So far we have always refused to use a third party
library to access the hypervisor itself, libvirt(d) talking directly to
the hypervisor components or launching it directly. For example we don't
rely on the VMWare libraries to talk to ESX.
> [...]
> > +endif
> > +#libvirt_driver_xenapi_la_LIBADD = $(XENAPI_LIBS)
> > +libvirt_driver_xenapi_la_CFLAGS = $(XEN_CFLAGS) \
> > + $(shell xml2-config --cflags) \
> > + $(shell curl-config --cflags)
> > +libvirt_driver_xenapi_la_LDFLAGS = -L@top_srcdir@/../libxenserver/ -lxenserver -g $(shell xml2-config --libs) \
> > + $(shell curl-config --libs)
>
> Hum, libxml2 is already fully detected in configure.ac, use the
> LIBXML_* variables instead of trying to exec xml2-config.
>
> -> I've added the LIBXML_ flags in Makefile.am and posted the patch.
okay, we will review this, but note that we start the feature freeze
for 0.7.7 this week-end, so next week is more likely to be focused on
bug fixes for already commited features.
> Similary libcurl i looked at in configure.ac for ESX, this need
> to be modified to be checked more generally and the LIBCURL_*
> variables need to be used here too.
>
> -> I didn't quite understand the libcurl part you mentioned. I too noticed that ESX has
> a piece of code in configure.ac to set the libcurl flags, do you want me to do add a similar
> bit of code in configure.ac for XenAPI that defines LIBCURL flags and then add in my Makefile.am?
the code to look for libcurl in configure.ac is currently only
activated if esx support is on. It must be run if either esx or xen-api
are selected, the ESX portion need to be modified accordingly, and
your parts and Makefiles patches too.
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/
14 years, 8 months
[libvirt] XenAPI remote storage - target path
by Sharadha Prabhakar (3P)
Hi,
I'm trying to write a Remote Storage driver for XenAPI.
I see that target-path is used for both storage pools and volumes.
In the case of XenAPI remote storage, the storage is not mounted on the
local host where libvirt is running. Storage is maintained in a remote location only.
In this case how do I specify target-path and how do I go about creating
a VM with storage using libvirt APIs with virsh and virt-manager.
Virt-manager expects me to give an absolute path for target-path. But In my case
I don't have an absolute path.
Can I have a target path like this for a particular storage volume
"/storage pool uuid/storage-vol uuid"? This will help me identify which storage pool is
Libvirt talking about and which volume in it. Using this information I can fetch data from
The remote location and give it back to libvirt. Is this approach
ok or does libvirt support my specific remote storage case in some way. Could someone
clarify please?
Regards,
Sharadha
14 years, 8 months
[libvirt] Can not display graphical console of lxc Virtual Machine.
by Kumar L Srikanth-B22348
Hi all,
I am trying to display the graphical console of a lxc virtual machine
which was already created and running.
For this, I am using 'virt-viewer'. But, when I execute the following
command, it's throwing some errors.
[root@localhost lxc_devel]# virt-viewer --connect lxc:/// vm2_fedora
--debug
** (virt-viewer:11988): DEBUG: Add handle 4 1 0x217c140
** (virt-viewer:11988): DEBUG: Add timeout 0x217e4f0 -1 0x7fda386cb990
0x217c140 1
** (virt-viewer:11988): DEBUG: Skipping inactive resize
** (virt-viewer:11988): DEBUG: Failed to activate viewer
can anyone help me.
Please suggest me if any other ways of doing it.
Regards,
Srikanth.
14 years, 8 months