[libvirt] [PATCH] docs: revamp api_extension example, using vcpu patch series
by Eric Blake
Complete patch is compressed and attached, because it is so large. But
the bulk of it consisted mainly of running 'git format-patch -15
b0137887' to pick up the top of my vcpu series, then replacing the
contents of docs/api_extension/ with the new patches.
The meat of the patch is the overview html file, copied here if you
don't want to unzip the attachment:
2010-10-20 Eric Blake <eblake(a)redhat.com>
docs: revamp api_extension example, using vcpu patch series
* docs/api_extension/*: Replace example files.
* docs/api_extension.html.in: Rewrite to match new example files.
diff --git c/docs/api_extension.html.in w/docs/api_extension.html.in
index de6eedc..1396e91 100644
--- c/docs/api_extension.html.in
+++ w/docs/api_extension.html.in
@@ -10,8 +10,12 @@
<p>
This document walks you through the process of implementing a new
- API in libvirt. It uses as an example the addition of the node
device
- create and destroy APIs.
+ API in libvirt. It uses as an example the addition of
+ separating maximum from current vcpu usage of a domain.
+ Remember that new API includes any new public functions, but it
+ also includes addition of flags or extension of XML used through
+ existing functions. The example in this document adds both
+ types of API, and not all extensions require quite as many patches.
</p>
<p>
@@ -23,7 +27,12 @@
added to libvirt. Someone may already be working on the feature you
want. Also, recognize that everything you write is likely to
undergo
significant rework as you discuss it with the other developers, so
- don't wait too long before getting feedback.
+ don't wait too long before getting feedback. In the vcpu example
+ below, list feedback was first requested
+ <a
href="https://www.redhat.com/archives/libvir-list/2010-September/msg00423.html">here</a>,
+ and resulted in several rounds of improvements before coding
+ began, and this example is slightly rearranged from the actual
+ order of the commits.
</p>
<p>
@@ -46,11 +55,22 @@
<li>define the public API</li>
<li>define the internal driver API</li>
<li>implement the public API</li>
- <li>define the wire protocol format</li>
- <li>implement the RPC client</li>
- <li>implement the server side dispatcher</li>
- <li>implement the driver methods</li>
+ <li>implement the remote protocol:
+ <ol>
+ <li>define the wire protocol format</li>
+ <li>implement the RPC client</li>
+ <li>implement the server side dispatcher</li>
+ </ol>
+ </li>
+ <li>use new API where appropriate in drivers</li>
<li>add virsh support</li>
+ <li>add common handling for new API</li>
+ <li>for each driver that can support the new API:
+ <ol>
+ <li>add prerequisite support</li>
+ <li>fully implement new API</li>
+ </ol>
+ </li>
</ol>
<p>
@@ -66,11 +86,10 @@
functionality--get the whole thing working and make sure you're
happy
with it. Then use git or some other version control system that
lets
you rewrite your commit history and break patches into pieces so you
- don't drop a big blob of code on the mailing list at one go. For
- example, I didn't follow my own advice when I originally
submitted the
- example code to the libvirt list but rather submitted it in several
- large chunks. I've used git's ability to rewrite my commit
history to
- break the code apart into the example patches shown.
+ don't drop a big blob of code on the mailing list at one go.
+ The example code used in this document was rebased several
+ times between the original list posting and the final committed
+ version.
</p>
<p>
@@ -86,9 +105,23 @@
<h2><a name='publicapi'>Defining the public API</a></h2>
- <p>The first task is to define the public API and add it to:</p>
+ <p>The first task is to define the public API. If the addition
+ involves XML, this includes enhancing the RelaxNG schema and
+ documenting the new elements or attributes:</p>
- <p><code>include/libvirt/libvirt.h.in</code></p>
+ <p><code>
+ docs/schemas/domain.rng<br/>
+ docs/formatdomain.html.in
+ </code></p>
+
+ <p>If the addition involves a new function, this involves adding
+ a declaration in the public header, and arranging to export the
+ symbol:</p>
+
+ <p><code>
+ include/libvirt/libvirt.h.in
+ src/libvirt_public.syms
+ </code></p>
<p>
This task is in many ways the most important to get right, since
once
@@ -99,12 +132,9 @@
rework it as you go through the process of implementing it.
</p>
- <p>Once you have defined the API, you have to add the symbol names
to:</p>
-
- <p><code>src/libvirt_public.syms</code></p>
-
- <p class="example">See <a
href="api_extension/0001-Step-1-of-8-Define-the-public-API.patch">0001-Step-1-of-8-Define-the-public-API.patch</a>
for example code.</p>
-
+ <p class="example">See <a
href="api_extension/0001-Step-1-of-15-add-to-xml.patch">0001-Step-1-of-15-add-to-xml.patch</a>
+ and <a
href="api_extension/0002-Step-2-of-15-add-new-public-API.patch">0002-Step-2-of-15-add-new-public-API.patch</a>
+ for example code.</p>
<h2><a name='internalapi'>Defining the internal API</a></h2>
@@ -118,7 +148,7 @@
<p>
Of course, it's possible that the new API will involve the
creation of
- an entire new driver type, in which case the changes will include the
+ an entirely new driver type, in which case the changes will
include the
creation of a new struct type to represent the new driver type.
</p>
@@ -129,10 +159,11 @@
<p>
To define the internal API, first typedef the driver function
prototype and then add a new field for it to the relevant driver
- struct.
+ struct. Then, update all existing instances of the driver to
+ provide a <code>NULL</code> stub for the new function.
</p>
- <p class="example">See <a
href="api_extension/0002-Step-2-of-8-Define-the-internal-driver-API.patch">0002-Step-2-of-8-Define-the-internal-driver-API.patch</a></p>
+ <p class="example">See <a
href="api_extension/0003-Step-3-of-15-define-internal-driver-API.patch">0003-Step-3-of-15-define-internal-driver-API.patch</a></p>
<h2><a name='implpublic'>Implementing the public API</a></h2>
@@ -166,16 +197,23 @@
<p><code>src/libvirt.c</code></p>
- <p class="example">See <a
href="api_extension/0003-Step-3-of-8-Implement-the-public-API.patch">0003-Step-3-of-8-Implement-the-public-API.patch</a></p>
+ <p class="example">See <a
href="api_extension/0004-Step-4-of-15-implement-the-public-APIs.patch">0004-Step-4-of-15-implement-the-public-APIs.patch</a></p>
+
+ <h2><a name='remoteproto'>Implementing the remote protocol</a></h2>
+
+ <p>
+ Implementing the remote protocol is essentially a
+ straightforward exercise which is probably most easily
+ understood by referring to the existing code and the example
+ patch. It involves several related changes, followed by
+ regenerating derived files.</p>
+ <p class="example">See <a
href="api_extension/0005-Step-5-of-15-implement-the-remote-protocol.patch">0005-Step-5-of-15-implement-the-remote-protocol.patch</a></p>
- <h2><a name='wireproto'>Defining the wire protocol format</a></h2>
+ <h3><a name='wireproto'>Defining the wire protocol format</a></h3>
<p>
- Defining the wire protocol is essentially a straightforward exercise
- which is probably most easily understood by referring to the existing
- remote protocol wire format definitions and the example patch. It
- involves making two additions to:
+ Defining the wire protocol involves making additions to:
</p>
<p><code>src/remote/remote_protocol.x</code></p>
@@ -185,7 +223,7 @@
to the API. One struct describes the parameters to be passed to the
remote function, and a second struct describes the value returned by
the remote function. The one exception to this rule is that
functions
- that return only integer status do not require a struct for returned
+ that return only 0 or -1 for status do not require a struct for
returned
data.
</p>
@@ -194,23 +232,19 @@
added to the API.
</p>
- <p class="example">See <a
href="api_extension/0004-Step-4-of-8-Define-the-wire-protocol-format.patch">0004-Step-4-of-8-Define-the-wire-protocol-format.patch</a></p>
-
<p>
Once these changes are in place, it's necessary to run 'make rpcgen'
in the src directory to create the .c and .h files required by the
remote protocol code. This must be done on a Linux host using the
GLibC rpcgen program. Other rpcgen versions may generate code which
- results in bogus compile time warnings
+ results in bogus compile time warnings.
</p>
-
- <h2><a name='rpcclient'>Implement the RPC client</a></h2>
+ <h3><a name='rpcclient'>Implement the RPC client</a></h3>
<p>
- Implementing the RPC client is also relatively mechanical, so
refer to
- the exising code and example patch for guidance. The RPC client uses
- the rpcgen generated .h files. The remote method calls go in:
+ Implementing the uses the rpcgen generated .h files. The remote
+ method calls go in:
</p>
<p><code>src/remote/remote_internal.c</code></p>
@@ -227,17 +261,10 @@
<li>unlocks the remote driver.</li>
</ol>
- <p>
- Once you have created the remote method calls, you have to add fields
- for them to the driver structs for the appropriate remote driver.
- </p>
-
- <p class="example">See <a
href="api_extension/0005-Step-5-of-8-Implement-the-RPC-client.patch">0005-Step-5-of-8-Implement-the-RPC-client.patch</a></p>
-
- <h2><a name="serverdispatch">Implement the server side
dispatcher</a></h2>
+ <h3><a name="serverdispatch">Implement the server side
dispatcher</a></h3>
<p>
- Implementing the server side of the remote function calls is simply a
+ Implementing the server side of the remote function call is simply a
matter of deserializing the parameters passed in from the remote
caller and passing them to the corresponding internal API function.
The server side dispatchers are implemented in:
@@ -247,8 +274,65 @@
<p>Again, this step uses the .h files generated by make rpcgen.</p>
- <p class="example">See <a
href="api_extension/0006-Step-6-of-8-Implement-the-server-side-dispatcher.patch">0006-Step-6-of-8-Implement-the-server-side-dispatcher.patch</a></p>
+ <p>
+ After all three pieces of the remote protocol are complete, and
+ the generated files have been updated, it will be necessary to
+ update the file:</p>
+
+ <p><code>src/remote_protocol-structs</code></p>
+
+ <p>
+ This file should only have new lines added; modifications to
+ existing lines probably imply a backwards-incompatible API change.
+ </p>
+
+ <p class="example">See <a
href="api_extension/0005-Step-5-of-15-implement-the-remote-protocol.patch">0005-Step-5-of-15-implement-the-remote-protocol.patch</a></p>
+
+ <h2><a name="internaluseapi">Use the new API internally</a></h2>
+
+ <p>
+ Many times, a new API is merely an extension of existing
+ concepts that accomplished a subset of the same actions. When
+ this is the case, it makes sense to share a common
+ implementation by making the older API become a trivial wrapper
+ around the new API, rather than duplicating the common code.
+ This step should not introduce any semantic differences for the
+ old API. This step is optional if the new API has no relation
+ to existing API.
+ </p>
+
+ <p class="example">See <a
href="api_extension/0006-Step-6-of-15-make-old-API-trivially-wrap-to-new-API.patch">0006-Step-6-of-15-make-old-API-trivially-wrap-to-new-API.patch</a></p>
+
+ <h2><a name="virshuseapi">Expose the new API in virsh</a></h2>
+
+ <p>
+ All new API should be manageable from the virsh command line
+ shell. This proves that the API is sufficient for the purpose,
+ and makes it possible to identify if the proposed API needs slight
+ changes for easier usage. However, remember that virsh is used
+ to connect to hosts running older versions of libvirtd, so the
+ new commands should have fallbacks to the older API when
+ possible; implementing the virsh hooks at this point makes it
+ very easy to test these fallbacks. Also remember to document
+ virsh additions.
+ </p>
+
+ <p>
+ A virsh command is composed of a few pieces of code. You need to
+ define an array of vshCmdInfo structs for each new command that
+ contain the help text and the command description text. You also
need
+ an array of vshCmdOptDef structs to describe the command options.
+ Once you have those pieces of data in place you can write the
function
+ implementing the virsh command. Finally, you need to add the new
+ command to the commands[] array. The following files need changes:
+ </p>
+ <p><code>
+ tools/virsh.c<br/>
+ tools/virsh.pod
+ </code></p>
+
+ <p class="example">See <a
href="api_extension/0007-Step-7-of-15-add-virsh-support.patch">0007-Step-7-of-15-add-virsh-support.patch</a></p>
<h2><a name="driverimpl">Implement the driver methods</a></h2>
@@ -261,42 +345,72 @@
adding.
</p>
+ <h3><a name="commonimpl">Implement common handling</a></h3>
+
<p>
- In the example code, the extension is only an additional two function
- calls in the node device API, so most of the new code is additions to
- existing files. The only new files are there for multi-platform
- implementation convenience, as some of the new code is Linux
specific.
+ If the new API is applicable to more than one driver, it may
+ make sense to provide some utility routines, or to factor some
+ of the work into the dispatcher, to avoid reimplementing the
+ same code in every driver. In the example code, this involved
+ adding a member to the virDomainDefPtr struct for mapping
+ between the XML API addition and the in-memory representation of
+ a domain, along with updating all clients to use the new member.
+ Up to this point, there have been no changes to existing
+ semantics, and the new APIs will fail unless they are used in
+ the same way as the older API wrappers.
</p>
+ <p class="example">See <a
href="api_extension/0008-Step-8-of-15-support-new-xml.patch">0008-Step-8-of-15-support-new-xml.patch</a></p>
+
+ <h3><a name="drivercode">Implement driver handling</a></h3>
+
<p>
- The example code is probably uninteresting unless you're concerned
- with libvirt storage, but I've included it here to show how new files
- are added to the build environment.
+ The remaining patches should only touch one driver at a time.
+ It is possible to implement all changes for a driver in one
+ patch, but for review purposes, it may still make sense to break
+ things into simpler steps. Here is where the new APIs finally
+ start working.
</p>
- <p class="example">See <a
href="api_extension/0007-Step-7-of-8-Implement-the-driver-methods.patch">0007-Step-7-of-8-Implement-the-driver-methods.patch</a></p>
+ <p>
+ In the example patches, three separate drivers are supported:
+ test, qemu, and xen. It is always a good idea to patch the test
+ driver in addition to the target driver, to prove that the API
+ can be used for more than one driver. The example updates the
+ test driver in one patch:
+ </p>
- <h2><a name="virsh">Implement virsh commands</a></h2>
+ <p class="example">See <a
href="api_extension/0009-Step-9-of-15-support-all-flags-in-test-driver.patch">0009-Step-9-of-15-support-all-flags-in-test-driver.patch</a></p>
<p>
- Once you have the new functionality in place, the easiest way to test
- it and also to provide it to end users is to implement support for it
- in virsh.
+ The qemu changes were easier to split into two phases, one for
+ updating the mapping between the new XML and the hypervisor
+ command line arguments, and one for supporting all possible
+ flags of the new API:
</p>
+ <p class="example">See <a
href="api_extension/0010-Step-10-of-15-improve-vcpu-support-in-qemu-command-line.patch">0010-Step-10-of-15-improve-vcpu-support-in-qemu-command-line.patch</a>
+ and <a
href="api_extension/0011-Step-11-of-15-complete-vcpu-support-in-qemu-driver.patch">0011-Step-11-of-15-complete-vcpu-support-in-qemu-driver.patch</a></p>
+
<p>
- A virsh command is composed of a few pieces of code. You need to
- define an array of vshCmdInfo structs for each new command that
- contain the help text and the command description text. You also
need
- an array of vshCmdOptDef structs to describe the command options.
- Once you have those pieces of data in place you can write the
function
- implementing the virsh command. Finally, you need to add the new
- command to the commands[] array.
+ Finally, the example breaks the xen driver changes across four
+ patches, mapping the XML changes to the hypervisor command
+ lines, implementing the getter API independently of the setter
+ API, and cleanup of up code rendered dead by the new API:
</p>
- <p class="example">See <a
href="api_extension/0008-Step-8-of-8-Add-virsh-support.patch">0008-Step-8-of-8-Add-virsh-support.patch</a></p>
+ <p class="example">See <a
href="api_extension/0012-Step-12-of-15-improve-vcpu-support-in-xen-command-line.patch">0012-Step-12-of-15-improve-vcpu-support-in-xen-command-line.patch</a>,
+ <a
href="api_extension/0013-Step-13-of-15-improve-support-for-getting-xen-vcpu-counts.patch">0013-Step-13-of-15-improve-support-for-getting-xen-vcpu-counts.patch</a>,
+ <a
href="api_extension/0014-Step-14-of-15-improve-support-for-setting-xen-vcpu-counts.patch">0014-Step-14-of-15-improve-support-for-setting-xen-vcpu-counts.patch</a>,
+ and <a
href="api_extension/0015-Step-15-of-15-remove-dead-xen-code.patch">0015-Step-15-of-15-remove-dead-xen-code.patch</a></p>
+
+ <p>
+ The exact details of the example code are probably uninteresting
+ unless you're concerned with virtual cpu management.
+ </p>
<p>Once you have working functionality, run make check and make
- syntax-check before generating patches.</p>
+ syntax-check on each patch of the series before submitting
+ patches.</p>
</body>
</html>
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
14 years, 6 months
[libvirt] [PATCH] docs: reworded and reordered the bindings page, plus minor tweaks
by Justin Clift
Reordered the bindings into alphabetical order, added a link to
the php-libvirt source on Github, plus gave the direct package
names needed for Python usage on RHEL/Fedora, and Ubuntu.
---
At some point the "Windows" statement on this page should be reworded or made
a bit neater too. Not just yet though. :)
docs/bindings.html.in | 62 +++++++++++++++++++++++++++++++++---------------
1 files changed, 42 insertions(+), 20 deletions(-)
diff --git a/docs/bindings.html.in b/docs/bindings.html.in
index 0bc997e..7a90ad6 100644
--- a/docs/bindings.html.in
+++ b/docs/bindings.html.in
@@ -4,42 +4,64 @@
<h1 >Bindings for other languages</h1>
<p>
- Libvirt comes with bindings to support other languages than
- pure <strong>C</strong>. First the headers embeds the necessary
- declarations to allow direct access from <strong>C++</strong>
- code, but also we have bindings for higher level kind of languages:
+ Libvirt supports C and C++ directly, and has bindings available
+ for other languages:
</p>
<ul>
<li>
- <strong>Python</strong>: Libvirt comes with direct support for
- the Python language (just make sure you installed the libvirt-python
- package if not compiling from sources). See below for more
- information about using libvirt with python
+ <strong>C#</strong>: Arnaud Champion develops
+ <a href="csharp.html">C# bindings</a>.
</li>
<li>
- <strong>Perl</strong>: Daniel Berrange provides
- <a href="http://search.cpan.org/dist/Sys-Virt/">bindings for Perl</a>.
+ <strong>Java</strong>: Daniel Veillard develops
+ <a href="java.html">Java bindings</a>.
</li>
<li>
- <strong>OCaml</strong>: Richard Jones supplies
- <a href="http://libvirt.org/ocaml/">bindings for OCaml</a>.
+ <strong>OCaml</strong>: Richard Jones develops
+ <a href="http://libvirt.org/ocaml/">OCaml bindings</a>.
</li>
<li>
- <strong>Ruby</strong>: David Lutterkort provides
- <a href="http://libvirt.org/ruby/">bindings for Ruby</a>.
+ <strong>Perl</strong>: Daniel Berrange develops
+ <a href="http://search.cpan.org/dist/Sys-Virt/">Perl bindings</a>.
</li>
<li>
- <strong>Java</strong>: Daniel Veillard maintains
- <a href="java.html">Java bindings</a>.
+ <p>
+ <strong>PHP</strong>: Radek Hladik develops
+ <a href="http://phplibvirt.cybersales.cz/">PHP bindings</a>.
+ </p>
+ <p>
+ The php-libvirt bindings also have their source online
+ <a href="http://github.com/Kedarius/php-libvirt">here in Github</a>.
+ </p>
+ <p>
+ This allows you to easily see the code, make comments on it,
+ create your own forks, and contribute the changes back.
+ </p>
</li>
<li>
- <strong>C#</strong>: Arnaud Champion maintains
- <a href="csharp.html">C# bindings</a>.
+ <p>
+ <strong>Python</strong>: Libvirt comes with direct support for
+ the Python language.
+ </p>
+ <p>
+ If your libvirt is installed as packages, rather than compiled
+ by you from source code, ensure you have the appropriate
+ package installed.
+ </p>
+ <p>
+ This is named <b>libvirt-python</b> on RHEL/Fedora,
+ <a href="http://packages.ubuntu.com/search?keywords=python-libvirt"><b>python-libvirt</b></a>
+ on Ubuntu, and may be named differently on others.
+ </p>
+ <p>
+ For usage information, see the
+ <a href="python.html">Python API bindings</a> page.
+ </p>
</li>
<li>
- <strong>PHP</strong>: Radek Hladik is developing
- <a href="http://phplibvirt.cybersales.cz/">PHP bindings</a>.
+ <strong>Ruby</strong>: David Lutterkort develops
+ <a href="http://libvirt.org/ruby/">Ruby bindings</a>.
</li>
</ul>
--
1.7.2.3
14 years, 6 months
[libvirt] [PATCH] mingw: Add body for virFork and remove double virDriverLoadModule export
by Matthias Bolte
Commit 9bd3cce0d2d54e6ab893bb8137218b83d9294714 added virFork and
virDriverLoadModule to libvirt_private.syms, but virFork didn't have
a body on Win32 and virDriverLoadModule was already correctly
exported conditional via libvirt_driver_modules.syms.
---
src/libvirt_private.syms | 4 ----
src/util/util.c | 9 +++++++++
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 1a71e79..670e9f2 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -314,10 +314,6 @@ virDomainConfNWFilterTeardown;
virDomainConfVMNWFilterTeardown;
-# driver.h
-virDriverLoadModule;
-
-
# ebtables.h
ebtablesAddForwardAllowIn;
ebtablesAddForwardPolicyReject;
diff --git a/src/util/util.c b/src/util/util.c
index 586baee..fd4d6d4 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -927,6 +927,15 @@ virExecDaemonize(const char *const*argv ATTRIBUTE_UNUSED,
return -1;
}
+int
+virFork(pid_t *pid)
+{
+ *pid = -1;
+ errno = ENOTSUP;
+
+ return -1;
+}
+
# endif /* WIN32 */
int
--
1.7.0.4
14 years, 6 months
[libvirt] [libvirt-csharp][PATCH] Make examples works on mono compiled in 64 bits, simply the ConnectOpenAuth process, and finalise renaming
by arnaud.champion@devatom.fr
?Hi,
I have finally find the problem with examples on mono compiled in 64 bits. The problem was the "ToInt32" method of an IntPtr which failed on mono 64 bits (have to use ToInt64 instead).
This path solve this problem.
Also, I have put marshaling complexity of the ConnectOpenAuth callback in bindings, this make the callback of ConnectOpenAuth more simple to achieve the authentification. In the example, the callback is treated like this :
private static int AuthCallback(ref ConnectCredential[] creds, IntPtr cbdata)
{
AuthData authData = (AuthData)Marshal.PtrToStructure(cbdata, typeof(AuthData));
foreach (ConnectCredential cred in creds)
{
switch (cred.type)
{
case ConnectCredentialType.VIR_CRED_AUTHNAME:
// Fill the user name
cred.Result = authData.user_name;
break;
case ConnectCredentialType.VIR_CRED_PASSPHRASE:
// Fill the password
cred.Result = authData.password;
break;
default:
return -1;
}
}
return 0;
}
The bindings user has no marshaling to do, and believe me, it's simpler.
Finally, this patch finalize renaming.
Best regards,
Arnaud Champion
14 years, 6 months
[libvirt] Xen: Stream-API or XML-RPC or XenAPI for managedSave, snapshots
by Philipp Hahn
Hello,
for our project I need libvirts "managed save" functionality for Xen-3.4. In
my implementation I tried to use Xens 'suspend' and 'resume', which would
nicely match, but these two functions are not available throu the legacy
streaming API (xend-http-server, xend-unix-server), which libvirt seems to
still use. They are available throu the XML-RPC interface and the XenAPI
interface, which libvirt doesn't seem to use.
Are there any plans to convert libvirt to use one of the newer interfaces?
My other option would be to either implement another subdriver for
xenUnified*, which would implement domainManagedSave(),
domainHasManagedSaveImage() and domainManagedSaveRemove() using XML-RPC (or
XenAPI), or to implement suspend() and resume() in Xend.
I also will need to look at snapshots next: Has someone already investigated
adding snapshot support to Xen(-3.4)?
Sincerely
Philipp Hahn
--
Philipp Hahn Open Source Software Engineer hahn(a)univention.de
Univention GmbH Linux for Your Business fon: +49 421 22 232- 0
Mary-Somerville-Str.1 28359 Bremen fax: +49 421 22 232-99
http://www.univention.de
Besuchen Sie uns auf unseren nächsten Veranstaltungen:
26. - 28.10.: IT & Business 2010 in Stuttgart
27. - 28.10.: MODERNER STAAT 2010 in Berlin
http://www.univention.de/univention/termine/veranstaltungstermin/
14 years, 6 months
[libvirt] dommemstat won't work
by 黄亮
Hi all.
I try "virsh dommemstat <domain>" and it returns as follows
:Failed to get memory statistics for domain vm_unfw
:this function is not supported by the connection driver: virDomainMemoryStats
So what may be the problem?
I'm using CentOS release 5.5. Updated it's libvirt from 0.6.3 to 0.8.4 through "./configure; make; make install" procedure, and ran "autobuild.sh" in the directory of libvirt-0.8.4.
Using "virsh version", it tells xen api version is 3.0.1, and xm version is 3.3.0
Thanks!
2010-10-27
黄亮
14 years, 6 months
[libvirt] [PATCH 0/7]: Rewrite all the auditing hooks
by Daniel P. Berrange
This patch series reverts two previous commits which added auditing
hooks to the daemon/remote.c dispatcher code. This is then replaced
with hooks added directly to the QEMU driver code. This has the
downside that auditing only works for the QEMU driver, but it is
unavoidable because the dispatcher code has insufficient information
to properly generate audit records. It also handles escaping of
strings which contain user supplied arbitrary formatted data.
It finishes up by adding auditing of disk/net resources.
14 years, 6 months
[libvirt] [PATCH] Tell automake to use tar-pax instead of tar-v7 for make dist
by Matthias Bolte
Commit 66a04090673a5e21700d11bdea0084f1ee870c24 updated the
API extention example patch series and added files that
results in filenames longer than 99 chars during make dist.
This is a problem because automake uses tar with the old v7
format during make dist. The v7 format is limited to 99 chars
per filename.
Use the newer and unlimited POSIX format instead.
---
configure.ac | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index d942d3c..838dac7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,7 @@ AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
dnl Make automake keep quiet about wildcards & other GNUmake-isms
-AM_INIT_AUTOMAKE([-Wno-portability])
+AM_INIT_AUTOMAKE([1.9 -Wno-portability tar-pax])
# Use the silent-rules feature when possible.
m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
--
1.7.0.4
14 years, 6 months
[libvirt] [PATCH] Fix xen API documentation.
by Philipp Hahn
Add missing 'on'.
Change 'dom' to 'domain' as used in xenDaemonDomainBlockPeek()
Signed-off-by: Philipp Hahn <hahn(a)univention.de>
---
src/xen/xend_internal.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
14 years, 6 months