mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-10-14 15:33:50 +03:00
Compare commits
36 Commits
v1.0.6-rc2
...
v1.0.2-mai
Author | SHA1 | Date | |
---|---|---|---|
|
139a426577 | ||
|
7b334c1660 | ||
|
905f2281e3 | ||
|
d30fea03a5 | ||
|
66de726e21 | ||
|
20326db6a5 | ||
|
fdcd63fe81 | ||
|
de8545c8b8 | ||
|
2d03487b70 | ||
|
2c84a8f6de | ||
|
f4d67fdb05 | ||
|
7fad864afa | ||
|
e3ca9d3d62 | ||
|
d0a4e2498d | ||
|
c568368057 | ||
|
c973eb035e | ||
|
324279f2c8 | ||
|
561b03f916 | ||
|
939edc4182 | ||
|
c4c6fc42be | ||
|
144e764138 | ||
|
9579f4576c | ||
|
bbdbe1905a | ||
|
30cf3b7490 | ||
|
eec80bcde8 | ||
|
e4c674f831 | ||
|
9fb378777b | ||
|
bced0c14af | ||
|
b385809e4e | ||
|
89c7490895 | ||
|
b97a2fc129 | ||
|
1b2f243956 | ||
|
570145e391 | ||
|
ae80f481cb | ||
|
7b6175db6d | ||
|
01496e3911 |
10
.gitignore
vendored
10
.gitignore
vendored
@@ -28,6 +28,7 @@
|
||||
.sc-start-sc_*
|
||||
/ABOUT-NLS
|
||||
/AUTHORS
|
||||
/COPYING
|
||||
/ChangeLog
|
||||
/GNUmakefile
|
||||
/INSTALL
|
||||
@@ -120,7 +121,6 @@
|
||||
/src/lxc/lxc_monitor_dispatch.h
|
||||
/src/lxc/lxc_monitor_protocol.c
|
||||
/src/lxc/lxc_monitor_protocol.h
|
||||
/src/lxc/lxc_protocol.[ch]
|
||||
/src/lxc/test_libvirtd_lxc.aug
|
||||
/src/qemu/test_libvirtd_qemu.aug
|
||||
/src/remote/*_client_bodies.h
|
||||
@@ -143,8 +143,6 @@
|
||||
/tests/domainsnapshotxml2xmltest
|
||||
/tests/esxutilstest
|
||||
/tests/eventtest
|
||||
/tests/fchosttest
|
||||
/tests/fdstreamtest
|
||||
/tests/hashtest
|
||||
/tests/jsontest
|
||||
/tests/libvirtdconftest
|
||||
@@ -173,24 +171,18 @@
|
||||
/tests/statstest
|
||||
/tests/storagebackendsheepdogtest
|
||||
/tests/sysinfotest
|
||||
/tests/test_conf
|
||||
/tests/utiltest
|
||||
/tests/viratomictest
|
||||
/tests/virauthconfigtest
|
||||
/tests/virbitmaptest
|
||||
/tests/virbuftest
|
||||
/tests/vircgrouptest
|
||||
/tests/virdrivermoduletest
|
||||
/tests/virendiantest
|
||||
/tests/virhashtest
|
||||
/tests/viridentitytest
|
||||
/tests/virkeycodetest
|
||||
/tests/virkeyfiletest
|
||||
/tests/virlockspacetest
|
||||
/tests/virnet*test
|
||||
/tests/virportallocatortest
|
||||
/tests/virshtest
|
||||
/tests/virstoragetest
|
||||
/tests/virstringtest
|
||||
/tests/virtimetest
|
||||
/tests/viruritest
|
||||
|
2
.gnulib
2
.gnulib
Submodule .gnulib updated: a363f4ed4a...61c7b1e32e
@@ -24,7 +24,6 @@ Ján Tomko <jtomko@redhat.com>
|
||||
Jim Fehlig <jfehlig@suse.com>
|
||||
Jim Meyering <meyering@redhat.com>
|
||||
Jiří Denemark <jdenemar@redhat.com>
|
||||
John Ferlan <jferlan@redhat.com>
|
||||
John Levon <john.levon@sun.com>
|
||||
Justin Clift <jclift@redhat.com>
|
||||
Laine Stump <laine@redhat.com>
|
||||
|
339
COPYING
339
COPYING
@@ -1,339 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
@@ -1,8 +1,9 @@
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
@@ -22,7 +23,8 @@ specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
strategy to use in any particular case, based on the explanations
|
||||
below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
@@ -55,7 +57,7 @@ modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
^L
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
@@ -87,9 +89,9 @@ libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
encourage the widest possible use of a certain library, so that it
|
||||
becomes a de-facto standard. To achieve this, non-free programs must
|
||||
be allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
@@ -111,7 +113,7 @@ modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
^L
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
@@ -136,8 +138,8 @@ included without limitation in the term "modification".)
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
interface definition files, plus the scripts used to control
|
||||
compilation and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
@@ -216,7 +218,7 @@ instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
^L
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
@@ -267,7 +269,7 @@ Library will still fall under Section 6.)
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
^L
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
@@ -303,10 +305,10 @@ of these things:
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
c) Accompany the work with a written offer, valid for at least
|
||||
three years, to give the same user the materials specified in
|
||||
Subsection 6a, above, for a charge no more than the cost of
|
||||
performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
@@ -329,7 +331,7 @@ restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
^L
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
@@ -370,7 +372,7 @@ subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
^L
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
@@ -384,9 +386,10 @@ all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply, and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
@@ -404,11 +407,11 @@ be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
original copyright holder who places the Library under this License
|
||||
may add an explicit geographical distribution limitation excluding those
|
||||
countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
@@ -422,7 +425,7 @@ conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
^L
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
@@ -456,19 +459,21 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
^L
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
redistribution under these terms (or, alternatively, under the terms
|
||||
of the ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library.
|
||||
It is safest to attach them to the start of each source file to most
|
||||
effectively convey the exclusion of warranty; and each file should
|
||||
have at least the "copyright" line and a pointer to where the full
|
||||
notice is found.
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
@@ -485,16 +490,17 @@ convey the exclusion of warranty; and each file should have at least the
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
You should also get your employer (if you work as a programmer) or
|
||||
your school, if any, to sign a "copyright disclaimer" for the library,
|
||||
if necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
library `Frob' (a library for tweaking knobs) written by James
|
||||
Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
141
HACKING
141
HACKING
@@ -103,11 +103,7 @@ and run the tests:
|
||||
make syntax-check
|
||||
make -C tests valgrind
|
||||
|
||||
|
||||
|
||||
Valgrind
|
||||
http://valgrind.org/is a test that checks for memory management issues, such as leaks or use of
|
||||
uninitialized variables.
|
||||
The latter test checks for memory leaks.
|
||||
|
||||
If you encounter any failing tests, the VIR_TEST_DEBUG environment variable
|
||||
may provide extra information to debug the failures. Larger values of
|
||||
@@ -122,90 +118,11 @@ Also, individual tests can be run from inside the "tests/" directory, like:
|
||||
|
||||
There is also a "./run" script at the top level, to make it easier to run
|
||||
programs that have not yet been installed, as well as to wrap invocations of
|
||||
various tests under gdb or Valgrind.
|
||||
various tests under gdb or valgrind.
|
||||
|
||||
|
||||
|
||||
(7) The Valgrind test should produce similar output to "make check". If the output
|
||||
has traces within libvirt API's, then investigation is required in order to
|
||||
determine the cause of the issue. Output such as the following indicates some
|
||||
sort of leak:
|
||||
|
||||
==5414== 4 bytes in 1 blocks are definitely lost in loss record 3 of 89
|
||||
==5414== at 0x4A0881C: malloc (vg_replace_malloc.c:270)
|
||||
==5414== by 0x34DE0AAB85: xmlStrndup (in /usr/lib64/libxml2.so.2.7.8)
|
||||
==5414== by 0x4CC97A6: virDomainVideoDefParseXML (domain_conf.c:7410)
|
||||
==5414== by 0x4CD581D: virDomainDefParseXML (domain_conf.c:10188)
|
||||
==5414== by 0x4CD8C73: virDomainDefParseNode (domain_conf.c:10640)
|
||||
==5414== by 0x4CD8DDB: virDomainDefParse (domain_conf.c:10590)
|
||||
==5414== by 0x41CB1D: testCompareXMLToArgvHelper (qemuxml2argvtest.c:100)
|
||||
==5414== by 0x41E20F: virtTestRun (testutils.c:161)
|
||||
==5414== by 0x41C7CB: mymain (qemuxml2argvtest.c:866)
|
||||
==5414== by 0x41E84A: virtTestMain (testutils.c:723)
|
||||
==5414== by 0x34D9021734: (below main) (in /usr/lib64/libc-2.15.so)
|
||||
|
||||
In this example, the "virDomainDefParseXML()" had an error path where the
|
||||
"virDomainVideoDefPtr video" pointer was not properly disposed. By simply
|
||||
adding a "virDomainVideoDefFree(video);" in the error path, the issue was
|
||||
resolved.
|
||||
|
||||
Another common mistake is calling a printing function, such as "VIR_DEBUG()"
|
||||
without initializing a variable to be printed. The following example involved
|
||||
a call which could return an error, but not set variables passed by reference
|
||||
to the call. The solution was to initialize the variables prior to the call.
|
||||
|
||||
==4749== Use of uninitialised value of size 8
|
||||
==4749== at 0x34D904650B: _itoa_word (in /usr/lib64/libc-2.15.so)
|
||||
==4749== by 0x34D9049118: vfprintf (in /usr/lib64/libc-2.15.so)
|
||||
==4749== by 0x34D9108F60: __vasprintf_chk (in /usr/lib64/libc-2.15.so)
|
||||
==4749== by 0x4CAEEF7: virVasprintf (stdio2.h:199)
|
||||
==4749== by 0x4C8A55E: virLogVMessage (virlog.c:814)
|
||||
==4749== by 0x4C8AA96: virLogMessage (virlog.c:751)
|
||||
==4749== by 0x4DA0056: virNetTLSContextCheckCertKeyUsage (virnettlscontext.c:225)
|
||||
==4749== by 0x4DA06DB: virNetTLSContextCheckCert (virnettlscontext.c:439)
|
||||
==4749== by 0x4DA1620: virNetTLSContextNew (virnettlscontext.c:562)
|
||||
==4749== by 0x4DA26FC: virNetTLSContextNewServer (virnettlscontext.c:927)
|
||||
==4749== by 0x409C39: testTLSContextInit (virnettlscontexttest.c:467)
|
||||
==4749== by 0x40AB8F: virtTestRun (testutils.c:161)
|
||||
|
||||
Valgrind will also find some false positives or code paths which cannot be
|
||||
resolved by making changes to the libvirt code. For these paths, it is
|
||||
possible to add a filter to avoid the errors. For example:
|
||||
|
||||
==4643== 7 bytes in 1 blocks are possibly lost in loss record 4 of 20
|
||||
==4643== at 0x4A0881C: malloc (vg_replace_malloc.c:270)
|
||||
==4643== by 0x34D90853F1: strdup (in /usr/lib64/libc-2.15.so)
|
||||
==4643== by 0x34EEC2C08A: ??? (in /usr/lib64/libnl.so.1.1)
|
||||
==4643== by 0x34EEC15B81: ??? (in /usr/lib64/libnl.so.1.1)
|
||||
==4643== by 0x34D8C0EE15: call_init.part.0 (in /usr/lib64/ld-2.15.so)
|
||||
==4643== by 0x34D8C0EECF: _dl_init (in /usr/lib64/ld-2.15.so)
|
||||
==4643== by 0x34D8C01569: ??? (in /usr/lib64/ld-2.15.so)
|
||||
|
||||
|
||||
In this instance, it is acceptible to modify the "tests/.valgrind.supp" file
|
||||
in order to add a suppression filter. The filter should be unique enough to
|
||||
not suppress real leaks, but it should be generic enough to cover multiple
|
||||
code paths. The format of the entry can be found in the documentation found at
|
||||
the
|
||||
|
||||
Valgrind home page.
|
||||
http://valgrind.org/The following trace was added to "tests/.valgrind.supp" in order to suppress
|
||||
the warning:
|
||||
|
||||
{
|
||||
dlInitMemoryLeak1
|
||||
Memcheck:Leak
|
||||
fun:?alloc
|
||||
...
|
||||
fun:call_init.part.0
|
||||
fun:_dl_init
|
||||
...
|
||||
obj:*/lib*/ld-2.*so*
|
||||
}
|
||||
|
||||
|
||||
|
||||
(8) Update tests and/or documentation, particularly if you are adding a new
|
||||
(7) Update tests and/or documentation, particularly if you are adding a new
|
||||
feature or changing the output of a program.
|
||||
|
||||
|
||||
@@ -318,29 +235,6 @@ immediately prior to any closing bracket. E.g.
|
||||
int foo(int wizz); // Good
|
||||
|
||||
|
||||
Semicolons
|
||||
==========
|
||||
Semicolons should never have a space beforehand. Inside the condition of a
|
||||
"for" loop, there should always be a space or line break after each semicolon,
|
||||
except for the special case of an infinite loop (although more infinite loops
|
||||
use "while"). While not enforced, loop counters generally use post-increment.
|
||||
|
||||
for (i = 0 ;i < limit ; ++i) { // Bad
|
||||
for (i = 0; i < limit; i++) { // Good
|
||||
for (;;) { // ok
|
||||
while (1) { // Better
|
||||
|
||||
Empty loop bodies are better represented with curly braces and a comment,
|
||||
although use of a semicolon is not currently rejected.
|
||||
|
||||
while ((rc = waitpid(pid, &st, 0) == -1) &&
|
||||
errno == EINTR); // ok
|
||||
while ((rc = waitpid(pid, &st, 0) == -1) &&
|
||||
errno == EINTR) { // Better
|
||||
/* nothing */
|
||||
}
|
||||
|
||||
|
||||
Curly braces
|
||||
============
|
||||
Omit the curly braces around an "if", "while", "for" etc. body only when that
|
||||
@@ -353,7 +247,7 @@ Omitting braces with a single-line body is fine:
|
||||
while (expr) // one-line body -> omitting curly braces is ok
|
||||
single_line_stmt();
|
||||
|
||||
However, the moment your loop/if/else body extends on to a second line, for
|
||||
However, the moment your loop/if/else body extends onto a second line, for
|
||||
whatever reason (even if it's just an added comment), then you should add
|
||||
braces. Otherwise, it would be too easy to insert a statement just before that
|
||||
comment (without adding braces), thinking it is already a multi-statement loop:
|
||||
@@ -441,11 +335,6 @@ But if negating a complex condition is too ugly, then at least add braces:
|
||||
|
||||
Preprocessor
|
||||
============
|
||||
Macros defined with an ALL_CAPS name should generally be assumed to be unsafe
|
||||
with regards to arguments with side-effects (that is, MAX(a++, b--) might
|
||||
increment a or decrement b too many or too few times). Exceptions to this rule
|
||||
are explicitly documented for macros in viralloc.h and virstring.h.
|
||||
|
||||
For variadic macros, stick with C99 syntax:
|
||||
|
||||
#define vshPrint(_ctl, ...) fprintf(stdout, __VA_ARGS__)
|
||||
@@ -529,7 +418,7 @@ Low level memory management
|
||||
Use of the malloc/free/realloc/calloc APIs is deprecated in the libvirt
|
||||
codebase, because they encourage a number of serious coding bugs and do not
|
||||
enable compile time verification of checks for NULL. Instead of these
|
||||
routines, use the macros from viralloc.h.
|
||||
routines, use the macros from memory.h.
|
||||
|
||||
- To allocate a single object:
|
||||
|
||||
@@ -747,17 +636,6 @@ sizeof(dest) returns something meaningful). Note that this is a macro, so
|
||||
arguments could be evaluated more than once. This is equivalent to
|
||||
virStrncpy(dest, src, strlen(src), sizeof(dest)).
|
||||
|
||||
VIR_STRDUP(char *dst, const char *src);
|
||||
VIR_STRNDUP(char *dst, const char *src, size_t n);
|
||||
|
||||
You should avoid using strdup or strndup directly as they do not report
|
||||
out-of-memory error, and do not allow a NULL source. Use VIR_STRDUP or
|
||||
VIR_STRNDUP macros instead, which return 0 for NULL source, 1 for successful
|
||||
copy, and -1 for allocation failure with the error already reported. In very
|
||||
specific cases, when you don't want to report the out-of-memory error, you can
|
||||
use VIR_STRDUP_QUIET or VIR_STRNDUP_QUIET, but such usage is very rare and
|
||||
usually considered a flaw.
|
||||
|
||||
|
||||
Variable length string buffer
|
||||
=============================
|
||||
@@ -825,12 +703,9 @@ stick to the following general plan for all *.c source files:
|
||||
{
|
||||
...
|
||||
|
||||
Of particular note: *Do not* include libvirt/libvirt.h, libvirt/virterror.h,
|
||||
libvirt/libvirt-qemu.h, or libvirt/libvirt-lxc.h. They are included by
|
||||
"internal.h" already and there are some special reasons why you cannot include
|
||||
these files explicitly. One of the special cases, "libvirt/libvirt.h" is
|
||||
included prior to "internal.h" in "remote_protocol.x", to avoid exposing
|
||||
*_LAST enum elements.
|
||||
Of particular note: *Do not* include libvirt/libvirt.h or libvirt/virterror.h.
|
||||
It is included by "internal.h" already and there are some special reasons why
|
||||
you cannot include these files explicitly.
|
||||
|
||||
|
||||
Printf-style functions
|
||||
|
17
Makefile.am
17
Makefile.am
@@ -1,20 +1,7 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
## Copyright (C) 2005-2013 Red Hat, Inc.
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
## modify it under the terms of the GNU Lesser General Public
|
||||
## License as published by the Free Software Foundation; either
|
||||
## version 2.1 of the License, or (at your option) any later version.
|
||||
##
|
||||
## This library is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
## Lesser General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU Lesser General Public
|
||||
## License along with this library. If not, see
|
||||
## <http://www.gnu.org/licenses/>.
|
||||
## Copyright (C) 2005-2012 Red Hat, Inc.
|
||||
## See COPYING.LIB for the License of this software
|
||||
|
||||
LCOV = lcov
|
||||
GENHTML = genhtml
|
||||
|
@@ -1,18 +1,3 @@
|
||||
## Copyright (C) 2009-2010, 2013 Red Hat, Inc.
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
## modify it under the terms of the GNU Lesser General Public
|
||||
## License as published by the Free Software Foundation; either
|
||||
## version 2.1 of the License, or (at your option) any later version.
|
||||
##
|
||||
## This library is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
## Lesser General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU Lesser General Public
|
||||
## License along with this library. If not, see
|
||||
## <http://www.gnu.org/licenses/>.
|
||||
|
||||
#
|
||||
# Generated by running the following on Fedora 9:
|
||||
|
@@ -20,8 +20,7 @@ cd build
|
||||
../autogen.sh --prefix="$AUTOBUILD_INSTALL_ROOT" \
|
||||
--enable-test-coverage \
|
||||
--disable-nls \
|
||||
--enable-werror \
|
||||
--enable-static
|
||||
--enable-werror
|
||||
|
||||
# If the MAKEFLAGS envvar does not yet include a -j option,
|
||||
# add -jN where N depends on the number of processors.
|
||||
@@ -69,7 +68,6 @@ fi
|
||||
if test -x /usr/bin/i686-w64-mingw32-gcc ; then
|
||||
make distclean
|
||||
|
||||
PKG_CONFIG_LIBDIR="/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig:/usr/i686-w64-mingw32/sys-root/mingw/share/pkgconfig" \
|
||||
PKG_CONFIG_PATH="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig" \
|
||||
CC="i686-w64-mingw32-gcc" \
|
||||
../configure \
|
||||
@@ -89,7 +87,6 @@ fi
|
||||
if test -x /usr/bin/x86_64-w64-mingw32-gcc ; then
|
||||
make distclean
|
||||
|
||||
PKG_CONFIG_LIBDIR="/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig:/usr/x86_64-w64-mingw32/sys-root/mingw/share/pkgconfig" \
|
||||
PKG_CONFIG_PATH="$AUTOBUILD_INSTALL_ROOT/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig" \
|
||||
CC="x86_64-w64-mingw32-gcc" \
|
||||
../configure \
|
||||
|
67
bootstrap
67
bootstrap
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Print a version string.
|
||||
scriptversion=2013-05-08.20; # UTC
|
||||
scriptversion=2012-12-28.10; # UTC
|
||||
|
||||
# Bootstrap this package from checked-out sources.
|
||||
|
||||
@@ -140,21 +140,20 @@ po_download_command_format2=\
|
||||
"wget --mirror -nd -q -np -A.po -P '%s' \
|
||||
http://translationproject.org/latest/%s/"
|
||||
|
||||
# Prefer a non-empty tarname (4th argument of AC_INIT if given), else
|
||||
# fall back to the package name (1st argument with munging)
|
||||
extract_package_name='
|
||||
/^AC_INIT(\[*/{
|
||||
s///
|
||||
/^[^,]*,[^,]*,[^,]*,[ []*\([^][ ,)]\)/{
|
||||
s//\1/
|
||||
s/[],)].*//
|
||||
/^AC_INIT(/{
|
||||
/.*,.*,.*, */{
|
||||
s///
|
||||
s/[][]//g
|
||||
s/)$//
|
||||
p
|
||||
q
|
||||
}
|
||||
s/[],)].*//
|
||||
s/AC_INIT(\[*//
|
||||
s/]*,.*//
|
||||
s/^GNU //
|
||||
y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
|
||||
s/[^abcdefghijklmnopqrstuvwxyz0123456789_]/-/g
|
||||
s/[^A-Za-z0-9_]/-/g
|
||||
p
|
||||
}
|
||||
'
|
||||
@@ -307,34 +306,34 @@ if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
||||
die "Bootstrapping from a non-checked-out distribution is risky."
|
||||
fi
|
||||
|
||||
# Strip blank and comment lines to leave significant entries.
|
||||
gitignore_entries() {
|
||||
sed '/^#/d; /^$/d' "$@"
|
||||
# Ensure that lines starting with ! sort last, per gitignore conventions
|
||||
# for whitelisting exceptions after a more generic blacklist pattern.
|
||||
sort_patterns() {
|
||||
sort -u "$@" | sed '/^!/ {
|
||||
H
|
||||
d
|
||||
}
|
||||
$ {
|
||||
P
|
||||
x
|
||||
s/^\n//
|
||||
}' | sed '/^$/d'
|
||||
}
|
||||
|
||||
# If $STR is not already on a line by itself in $FILE, insert it at the start.
|
||||
# Entries are inserted at the start of the ignore list to ensure existing
|
||||
# entries starting with ! are not overridden. Such entries support
|
||||
# whitelisting exceptions after a more generic blacklist pattern.
|
||||
insert_if_absent() {
|
||||
# If $STR is not already on a line by itself in $FILE, insert it,
|
||||
# sorting the new contents of the file and replacing $FILE with the result.
|
||||
insert_sorted_if_absent() {
|
||||
file=$1
|
||||
str=$2
|
||||
test -f $file || touch $file
|
||||
test -r $file || die "Error: failed to read ignore file: $file"
|
||||
duplicate_entries=$(gitignore_entries $file | sort | uniq -d)
|
||||
if [ "$duplicate_entries" ] ; then
|
||||
die "Error: Duplicate entries in $file: " $duplicate_entries
|
||||
fi
|
||||
linesold=$(gitignore_entries $file | wc -l)
|
||||
linesnew=$(echo "$str" | gitignore_entries - $file | sort -u | wc -l)
|
||||
if [ $linesold != $linesnew ] ; then
|
||||
{ echo "$str" | cat - $file > $file.bak && mv $file.bak $file; } \
|
||||
|| die "insert_if_absent $file $str: failed"
|
||||
fi
|
||||
echo "$str" | sort_patterns - $file | cmp -s - $file > /dev/null \
|
||||
|| { echo "$str" | sort_patterns - $file > $file.bak \
|
||||
&& mv $file.bak $file; } \
|
||||
|| die "insert_sorted_if_absent $file $str: failed"
|
||||
}
|
||||
|
||||
# Adjust $PATTERN for $VC_IGNORE_FILE and insert it with
|
||||
# insert_if_absent.
|
||||
# insert_sorted_if_absent.
|
||||
insert_vc_ignore() {
|
||||
vc_ignore_file="$1"
|
||||
pattern="$2"
|
||||
@@ -345,7 +344,7 @@ insert_vc_ignore() {
|
||||
# .gitignore entry.
|
||||
pattern=$(echo "$pattern" | sed s,^,/,);;
|
||||
esac
|
||||
insert_if_absent "$vc_ignore_file" "$pattern"
|
||||
insert_sorted_if_absent "$vc_ignore_file" "$pattern"
|
||||
}
|
||||
|
||||
# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac.
|
||||
@@ -631,13 +630,9 @@ esac
|
||||
if $bootstrap_sync; then
|
||||
cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
|
||||
echo "$0: updating bootstrap and restarting..."
|
||||
case $(sh -c 'echo "$1"' -- a) in
|
||||
a) ignored=--;;
|
||||
*) ignored=ignored;;
|
||||
esac
|
||||
exec sh -c \
|
||||
'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
|
||||
$ignored "$GNULIB_SRCDIR/build-aux/bootstrap" \
|
||||
-- "$GNULIB_SRCDIR/build-aux/bootstrap" \
|
||||
"$0" "$@" --no-bootstrap-sync
|
||||
}
|
||||
fi
|
||||
|
@@ -71,7 +71,6 @@ listen
|
||||
localeconv
|
||||
maintainer-makefile
|
||||
manywarnings
|
||||
mkdtemp
|
||||
mkostemp
|
||||
mkostemps
|
||||
mktempd
|
||||
@@ -93,7 +92,6 @@ regex
|
||||
random_r
|
||||
sched
|
||||
send
|
||||
setenv
|
||||
setsockopt
|
||||
sigaction
|
||||
sigpipe
|
||||
|
@@ -1,7 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# bracket-spacing.pl: Report any usage of 'function (..args..)'
|
||||
# Also check for other syntax issues, such as correct use of ';'
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
@@ -32,11 +31,8 @@ foreach my $file (@ARGV) {
|
||||
while (defined (my $line = <FILE>)) {
|
||||
my $data = $line;
|
||||
|
||||
# Kill any quoted ; or "
|
||||
$data =~ s,'[";]','X',g;
|
||||
|
||||
# Kill any quoted strings
|
||||
$data =~ s,"([^\\\"]|\\.)*","XXX",g;
|
||||
# Kill any quoted strongs
|
||||
$data =~ s,".*?","XXX",g;
|
||||
|
||||
# Kill any C++ style comments
|
||||
$data =~ s,//.*$,//,;
|
||||
@@ -113,30 +109,6 @@ foreach my $file (@ARGV) {
|
||||
$ret = 1;
|
||||
last;
|
||||
}
|
||||
|
||||
# Forbid whitespace before ";". Things like below are allowed:
|
||||
#
|
||||
# 1) The expression is empty for "for" loop. E.g.
|
||||
# for (i = 0; ; i++)
|
||||
#
|
||||
# 2) An empty statement. E.g.
|
||||
# while (write(statuswrite, &status, 1) == -1 &&
|
||||
# errno == EINTR)
|
||||
# ;
|
||||
#
|
||||
while ($data =~ /[^;\s]\s+;/) {
|
||||
print "$file:$.: $line";
|
||||
$ret = 1;
|
||||
last;
|
||||
}
|
||||
|
||||
# Require EOL, macro line continuation, or whitespace after ";".
|
||||
# Allow "for (;;)" as an exception.
|
||||
while ($data =~ /;[^ \\\n;)]/) {
|
||||
print "$file:$.: $line";
|
||||
$ret = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
close FILE;
|
||||
}
|
||||
|
132
cfg.mk
132
cfg.mk
@@ -378,19 +378,10 @@ sc_prohibit_strtol:
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Use virAsprintf rather than as'printf since *strp is undefined on error.
|
||||
# But for plain %s, virAsprintf is overkill compared to strdup.
|
||||
sc_prohibit_asprintf:
|
||||
@prohibit='\<v?a[s]printf\>' \
|
||||
halt='use virAsprintf, not as'printf \
|
||||
$(_sc_search_regexp)
|
||||
@prohibit='virAsprintf.*, *"%s",' \
|
||||
halt='use VIR_STRDUP instead of virAsprintf with "%s"' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
sc_prohibit_strdup:
|
||||
@prohibit='\<strn?dup\> *\(' \
|
||||
halt='use VIR_STRDUP, not strdup' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Prefer virSetUIDGID.
|
||||
sc_prohibit_setuid:
|
||||
@@ -398,12 +389,6 @@ sc_prohibit_setuid:
|
||||
halt='use virSetUIDGID, not raw set*id' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Don't compare *id_t against raw -1.
|
||||
sc_prohibit_risky_id_promotion:
|
||||
@prohibit='\b(user|group|[ug]id) *[=!]= *-' \
|
||||
halt='cast -1 to ([ug]id_t) before comparing against id' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Use snprintf rather than s'printf, even if buffer is provably large enough,
|
||||
# since gnulib has more guarantees for snprintf portability
|
||||
sc_prohibit_sprintf:
|
||||
@@ -449,11 +434,6 @@ sc_prohibit_nonreentrant:
|
||||
done ; \
|
||||
exit $$fail
|
||||
|
||||
sc_prohibit_select:
|
||||
@prohibit="\\<select *\\(" \
|
||||
halt="use poll(), not se""lect()" \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Prohibit the inclusion of <ctype.h>.
|
||||
sc_prohibit_ctype_h:
|
||||
@prohibit='^# *include *<ctype\.h>' \
|
||||
@@ -500,11 +480,6 @@ sc_prohibit_virBufferAdd_with_string_literal:
|
||||
halt='use virBufferAddLit, not virBufferAdd, with a string literal' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
sc_prohibit_virBufferAsprintf_with_string_literal:
|
||||
@prohibit='\<virBufferAsprintf *\([^,]+, *"([^%"\]|\\.|%%)*"\)' \
|
||||
halt='use virBufferAddLit, not virBufferAsprintf, with a string literal' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Not only do they fail to deal well with ipv6, but the gethostby*
|
||||
# functions are also not thread-safe.
|
||||
sc_prohibit_gethostby:
|
||||
@@ -512,12 +487,6 @@ sc_prohibit_gethostby:
|
||||
halt='use getaddrinfo, not gethostby*' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# dirname and basename from <libgen.h> are not required to be thread-safe
|
||||
sc_prohibit_libgen:
|
||||
@prohibit='( (base|dir)name *\(|include .libgen\.h)' \
|
||||
halt='use functions from gnulib "dirname.h", not <libgen.h>' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# raw xmlGetProp requires some nasty casts
|
||||
sc_prohibit_xmlGetProp:
|
||||
@prohibit='\<xmlGetProp *\(' \
|
||||
@@ -687,22 +656,11 @@ sc_copyright_format:
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Prefer the new URL listing over the old street address listing when
|
||||
# calling out where to get a copy of the [L]GPL. Also, while we have
|
||||
# to ship COPYING (GPL) alongside COPYING.LESSER (LGPL), we want any
|
||||
# source file that calls out a top-level file to call out the LGPL
|
||||
# version. Note that our typical copyright boilerplate refers to the
|
||||
# license by name, not by reference to a top-level file.
|
||||
sc_copyright_usage:
|
||||
# calling out where to get a copy of the [L]GPL.
|
||||
sc_copyright_address:
|
||||
@prohibit=Boston,' MA' \
|
||||
halt='Point to <http://www.gnu.org/licenses/>, not an address' \
|
||||
$(_sc_search_regexp)
|
||||
@require='COPYING\.LESSER' \
|
||||
containing='COPYING' \
|
||||
halt='Refer to COPYING.LESSER for LGPL' \
|
||||
$(_sc_search_regexp)
|
||||
@prohibit='COPYING\.LIB' \
|
||||
halt='Refer to COPYING.LESSER for LGPL' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Some functions/macros produce messages intended solely for developers
|
||||
# and maintainers. Do not mark them for translation.
|
||||
@@ -744,59 +702,6 @@ sc_require_enum_last_marker:
|
||||
{ echo '$(ME): enum impl needs to use _LAST marker' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# In Python files we don't want to end lines with a semicolon like in C
|
||||
sc_prohibit_semicolon_at_eol_in_python:
|
||||
@prohibit='^[^#].*\;$$' \
|
||||
in_vc_files='\.py$$' \
|
||||
halt="Don't use semicolon at eol in python files" \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# mymain() in test files should use return, not exit, for nicer output
|
||||
sc_prohibit_exit_in_tests:
|
||||
@prohibit='\<exit *\(' \
|
||||
in_vc_files='^tests/' \
|
||||
halt='use return, not exit(), in tests' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Don't include duplicate header in the source (either *.c or *.h)
|
||||
sc_prohibit_duplicate_header:
|
||||
@fail=0; for i in $$($(VC_LIST_EXCEPT) | grep '\.[chx]$$'); do \
|
||||
awk '/# *include.*\.h/ { \
|
||||
match($$0, /[<"][^>"]*[">]/); \
|
||||
arr[substr($$0, RSTART + 1, RLENGTH - 2)]++; \
|
||||
} \
|
||||
END { \
|
||||
for (key in arr) { \
|
||||
if (arr[key] > 1) { \
|
||||
fail=1; \
|
||||
printf("%d %s are included\n", arr[key], key); \
|
||||
} \
|
||||
} \
|
||||
if (fail == 1) { \
|
||||
printf("duplicate header(s) in " FILENAME "\n"); \
|
||||
exit 1; \
|
||||
} \
|
||||
}' $$i || fail=1; \
|
||||
done; \
|
||||
if test $$fail -eq 1; then \
|
||||
{ echo '$(ME): avoid duplicate headers' 1>&2; exit 1; } \
|
||||
fi;
|
||||
|
||||
# Don't include "libvirt/*.h" in "" form.
|
||||
sc_prohibit_include_public_headers_quote:
|
||||
@prohibit='# *include *"libvirt/.*\.h"' \
|
||||
in_vc_files='\.[ch]$$' \
|
||||
halt='Do not include libvirt/*.h in internal source' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Don't include "libvirt/*.h" in <> form. Except for external tools,
|
||||
# e.g. Python binding, examples and tools subdirectories.
|
||||
sc_prohibit_include_public_headers_brackets:
|
||||
@prohibit='# *include *<libvirt/.*\.h>' \
|
||||
in_vc_files='\.[ch]$$' \
|
||||
halt='Do not include libvirt/*.h in internal source' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# We don't use this feature of maint.mk.
|
||||
prev_version_file = /dev/null
|
||||
|
||||
@@ -845,8 +750,7 @@ syntax-check: $(top_srcdir)/HACKING bracket-spacing-check
|
||||
bracket-spacing-check:
|
||||
$(AM_V_GEN)files=`$(VC_LIST) | grep '\.c$$'`; \
|
||||
$(PERL) $(top_srcdir)/build-aux/bracket-spacing.pl $$files || \
|
||||
{ echo '$(ME): incorrect whitespace, see HACKING for rules' 1>&2; \
|
||||
exit 1; }
|
||||
(echo $(ME): incorrect whitespace around brackets, see HACKING for rules && exit 1)
|
||||
|
||||
# sc_po_check can fail if generated files are not built first
|
||||
sc_po_check: \
|
||||
@@ -863,17 +767,16 @@ $(srcdir)/src/remote/remote_client_bodies.h: $(srcdir)/src/remote/remote_protoco
|
||||
# List all syntax-check exemptions:
|
||||
exclude_file_name_regexp--sc_avoid_strcase = ^tools/virsh\.h$$
|
||||
|
||||
_src1=libvirt|fdstream|qemu/qemu_monitor|util/(vircommand|virfile)|xen/xend_internal|rpc/virnetsocket|lxc/lxc_controller|locking/lock_daemon
|
||||
_test1=shunloadtest|virnettlscontexttest|vircgroupmock
|
||||
_src1=libvirt|fdstream|qemu/qemu_monitor|util/(vircommand|virutil)|xen/xend_internal|rpc/virnetsocket|lxc/lxc_controller|locking/lock_daemon
|
||||
exclude_file_name_regexp--sc_avoid_write = \
|
||||
^(src/($(_src1))|daemon/libvirtd|tools/console|tests/($(_test1)))\.c$$
|
||||
^(src/($(_src1))|daemon/libvirtd|tools/console|tests/(shunload|virnettlscontext)test)\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_bindtextdomain = ^(tests|examples)/
|
||||
|
||||
exclude_file_name_regexp--sc_copyright_usage = \
|
||||
^COPYING(|\.LESSER)$$
|
||||
exclude_file_name_regexp--sc_copyright_address = \
|
||||
^COPYING\.LIB$$
|
||||
|
||||
exclude_file_name_regexp--sc_flags_usage = ^(docs/|src/util/virnetdevtap\.c$$|tests/vircgroupmock\.c$$)
|
||||
exclude_file_name_regexp--sc_flags_usage = ^(docs/|src/util/virnetdevtap\.c$$)
|
||||
|
||||
exclude_file_name_regexp--sc_libvirt_unmarked_diagnostics = \
|
||||
^(src/rpc/gendispatch\.pl$$|tests/)
|
||||
@@ -889,13 +792,10 @@ exclude_file_name_regexp--sc_prohibit_always_true_header_tests = \
|
||||
^python/(libvirt-(lxc-|qemu-)?override|typewrappers)\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_asprintf = \
|
||||
^(bootstrap.conf$$|src/util/virstring\.c$$|examples/domain-events/events-c/event-test\.c$$|tests/vircgroupmock\.c$$)
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_strdup = \
|
||||
^(docs/|examples/|python/|src/util/virstring\.c$$)
|
||||
^(bootstrap.conf$$|src/util/virutil\.c$$|examples/domain-events/events-c/event-test\.c$$)
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_close = \
|
||||
(\.p[yl]$$|^docs/|^(src/util/virfile\.c|src/libvirt\.c|tests/vircgroupmock\.c)$$)
|
||||
(\.p[yl]$$|^docs/|^(src/util/virfile\.c|src/libvirt\.c)$$)
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
|
||||
(^tests/(qemuhelp|nodeinfo)data/|\.(gif|ico|png|diff)$$)
|
||||
@@ -913,10 +813,10 @@ exclude_file_name_regexp--sc_prohibit_newline_at_end_of_diagnostic = \
|
||||
^src/rpc/gendispatch\.pl$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_nonreentrant = \
|
||||
^((po|tests)/|docs/.*(py|html\.in)|run.in$$)
|
||||
^((po|tests)/|docs/.*py|run.in$$)
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_raw_allocation = \
|
||||
^(docs/hacking\.html\.in)|(src/util/viralloc\.[ch]|examples/.*|tests/securityselinuxhelper\.c|tests/vircgroupmock\.c)$$
|
||||
^(src/util/viralloc\.[ch]|examples/.*|tests/securityselinuxhelper.c)$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_readlink = \
|
||||
^src/(util/virutil|lxc/lxc_container)\.c$$
|
||||
@@ -926,7 +826,7 @@ exclude_file_name_regexp--sc_prohibit_setuid = ^src/util/virutil\.c$$
|
||||
exclude_file_name_regexp--sc_prohibit_sprintf = \
|
||||
^(docs/hacking\.html\.in)|(examples/systemtap/.*stp)|(src/dtrace2systemtap\.pl)|(src/rpc/gensystemtap\.pl)$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_strncpy = ^src/util/virstring\.c$$
|
||||
exclude_file_name_regexp--sc_prohibit_strncpy = ^src/util/virutil\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_strtol = \
|
||||
^src/(util/virsexpr|(vbox|xen|xenxs)/.*)\.c$$
|
||||
@@ -954,9 +854,3 @@ exclude_file_name_regexp--sc_correct_id_types = \
|
||||
(^src/locking/lock_protocol.x$$)
|
||||
|
||||
exclude_file_name_regexp--sc_m4_quote_check = m4/virt-lib.m4
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_include_public_headers_quote = \
|
||||
^src/internal\.h$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_include_public_headers_brackets = \
|
||||
^(python/|tools/|examples/|include/libvirt/(virterror|libvirt-(qemu|lxc))\.h$$)
|
||||
|
71
configure.ac
71
configure.ac
@@ -1,22 +1,9 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
dnl Copyright (C) 2005-2013 Red Hat, Inc.
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Lesser General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2.1 of the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library. If not, see
|
||||
dnl <http://www.gnu.org/licenses/>.
|
||||
dnl See COPYING.LIB for the License of this software
|
||||
|
||||
AC_INIT([libvirt], [1.0.5], [libvir-list@redhat.com], [], [http://libvirt.org])
|
||||
AC_INIT([libvirt], [1.0.2], [libvir-list@redhat.com], [], [http://libvirt.org])
|
||||
AC_CONFIG_SRCDIR([src/libvirt.c])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
@@ -136,11 +123,7 @@ AC_TYPE_UID_T
|
||||
dnl Support building Win32 DLLs (must appear *before* AM_PROG_LIBTOOL)
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
|
||||
m4_ifndef([LT_INIT], [
|
||||
AM_PROG_LIBTOOL
|
||||
], [
|
||||
LT_INIT([shared disable-static])
|
||||
])
|
||||
AM_PROG_LIBTOOL
|
||||
AM_PROG_CC_C_O
|
||||
AM_PROG_LD
|
||||
|
||||
@@ -158,8 +141,6 @@ VERSION_SCRIPT_FLAGS=-Wl,--version-script=
|
||||
AC_MSG_RESULT([$VERSION_SCRIPT_FLAGS])
|
||||
|
||||
LIBVIRT_COMPILE_WARNINGS
|
||||
LIBVIRT_COMPILE_PIE
|
||||
LIBVIRT_LINKER_RELRO
|
||||
|
||||
LIBVIRT_CHECK_APPARMOR
|
||||
LIBVIRT_CHECK_ATTR
|
||||
@@ -207,7 +188,7 @@ dnl Availability of various common functions (non-fatal if missing),
|
||||
dnl and various less common threadsafe functions
|
||||
AC_CHECK_FUNCS_ONCE([cfmakeraw geteuid getgid getgrnam_r getmntent_r \
|
||||
getpwuid_r getuid initgroups kill mmap newlocale posix_fallocate \
|
||||
posix_memalign prlimit regexec sched_getaffinity setns setrlimit symlink])
|
||||
posix_memalign regexec sched_getaffinity setns])
|
||||
|
||||
dnl Availability of pthread functions (if missing, win32 threading is
|
||||
dnl assumed). Because of $LIB_PTHREAD, we cannot use AC_CHECK_FUNCS_ONCE.
|
||||
@@ -221,7 +202,7 @@ dnl Availability of various common headers (non-fatal if missing).
|
||||
AC_CHECK_HEADERS([pwd.h paths.h regex.h sys/un.h \
|
||||
sys/poll.h syslog.h mntent.h net/ethernet.h linux/magic.h \
|
||||
sys/un.h sys/syscall.h netinet/tcp.h ifaddrs.h libtasn1.h \
|
||||
sys/ucred.h sys/mount.h])
|
||||
sys/ucred.h])
|
||||
dnl Check whether endian provides handy macros.
|
||||
AC_CHECK_DECLS([htole64], [], [], [[#include <endian.h>]])
|
||||
|
||||
@@ -1103,15 +1084,6 @@ if test "x$with_gnutls" != "xno"; then
|
||||
dnl it explicitly for the calls to gcry_control/check_version
|
||||
GNUTLS_LIBS="$GNUTLS_LIBS -lgcrypt"
|
||||
|
||||
dnl We're not using gcrypt deprecated features so define
|
||||
dnl GCRYPT_NO_DEPRECATED to avoid deprecated warnings
|
||||
GNUTLS_CFLAGS="$GNUTLS_CFLAGS -DGCRYPT_NO_DEPRECATED"
|
||||
|
||||
dnl gnutls 3.x moved some declarations to a new header
|
||||
AC_CHECK_HEADERS([gnutls/crypto.h], [], [], [[
|
||||
#include <gnutls/gnutls.h>
|
||||
]])
|
||||
|
||||
with_gnutls=yes
|
||||
fi
|
||||
|
||||
@@ -1144,6 +1116,14 @@ if test "x$with_polkit" = "xyes" || test "x$with_polkit" = "xcheck"; then
|
||||
AC_PATH_PROG([PKCHECK_PATH],[pkcheck], [], [/usr/sbin:$PATH])
|
||||
if test "x$PKCHECK_PATH" != "x" ; then
|
||||
AC_DEFINE_UNQUOTED([PKCHECK_PATH],["$PKCHECK_PATH"],[Location of pkcheck program])
|
||||
AC_MSG_CHECKING([whether pkcheck supports uid value])
|
||||
pkcheck_supports_uid=`$PKG_CONFIG --variable pkcheck_supports_uid polkit-gobject-1`
|
||||
if test "x$pkcheck_supports_uid" = "xtrue"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE_UNQUOTED([PKCHECK_SUPPORTS_UID], 1, [Pass uid to pkcheck])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([WITH_POLKIT], 1,
|
||||
[use PolicyKit for UNIX socket access checks])
|
||||
AC_DEFINE_UNQUOTED([WITH_POLKIT1], 1,
|
||||
@@ -2176,7 +2156,7 @@ if test "$with_driver_modules" = "yes" || test "$with_driver_modules" = "check";
|
||||
fi
|
||||
|
||||
if test "$with_driver_modules" = "yes" ; then
|
||||
DRIVER_MODULE_LDFLAGS="-export-dynamic"
|
||||
DRIVER_MODULE_CFLAGS="-export-dynamic"
|
||||
case $ac_cv_search_dlopen in
|
||||
no*) DRIVER_MODULE_LIBS= ;;
|
||||
*) DRIVER_MODULE_LIBS=$ac_cv_search_dlopen ;;
|
||||
@@ -2184,7 +2164,7 @@ if test "$with_driver_modules" = "yes" ; then
|
||||
AC_DEFINE_UNQUOTED([WITH_DRIVER_MODULES], 1, [whether to build drivers as modules])
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_DRIVER_MODULES], [test "$with_driver_modules" != "no"])
|
||||
AC_SUBST([DRIVER_MODULE_LDFLAGS])
|
||||
AC_SUBST([DRIVER_MODULE_CFLAGS])
|
||||
AC_SUBST([DRIVER_MODULE_LIBS])
|
||||
|
||||
|
||||
@@ -2385,21 +2365,12 @@ AM_CONDITIONAL([HAVE_LIBNL], [test "$have_libnl" = "yes"])
|
||||
AC_SUBST([LIBNL_CFLAGS])
|
||||
AC_SUBST([LIBNL_LIBS])
|
||||
|
||||
# Check for Linux vs. BSD ifreq members
|
||||
AC_CHECK_MEMBERS([struct ifreq.ifr_newname,
|
||||
struct ifreq.ifr_ifindex,
|
||||
struct ifreq.ifr_index],
|
||||
[], [],
|
||||
[#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
])
|
||||
# Check for BSD approach for setting MAC addr
|
||||
AC_CHECK_DECLS([link_addr],
|
||||
[], [],
|
||||
[#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <net/if_dl.h>
|
||||
])
|
||||
# Only COPYING.LIB is under version control, yet COPYING
|
||||
# is included as part of the distribution tarball.
|
||||
# Copy one to the other, but only if this is a srcdir-build.
|
||||
# You are unlikely to be doing distribution-related things in a non-srcdir build
|
||||
test "x$srcdir" = x. && ! test -f COPYING &&
|
||||
cp -f COPYING.LIB COPYING
|
||||
|
||||
# Detect when running under the clang static analyzer's scan-build driver
|
||||
# or Coverity-prevent's cov-build. Define STATIC_ANALYSIS accordingly.
|
||||
|
@@ -1,20 +1,7 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
## Copyright (C) 2005-2013 Red Hat, Inc.
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
## modify it under the terms of the GNU Lesser General Public
|
||||
## License as published by the Free Software Foundation; either
|
||||
## version 2.1 of the License, or (at your option) any later version.
|
||||
##
|
||||
## This library is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
## Lesser General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU Lesser General Public
|
||||
## License along with this library. If not, see
|
||||
## <http://www.gnu.org/licenses/>.
|
||||
## See COPYING.LIB for the License of this software
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib \
|
||||
@@ -76,18 +63,18 @@ QEMU_PROTOCOL = $(top_srcdir)/src/remote/qemu_protocol.x
|
||||
|
||||
$(srcdir)/remote_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
|
||||
$(REMOTE_PROTOCOL)
|
||||
$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl \
|
||||
--mode=server remote REMOTE $(REMOTE_PROTOCOL) > $@
|
||||
$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl -b remote REMOTE \
|
||||
$(REMOTE_PROTOCOL) > $@
|
||||
|
||||
$(srcdir)/lxc_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
|
||||
$(LXC_PROTOCOL)
|
||||
$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl \
|
||||
--mode=server lxc LXC $(LXC_PROTOCOL) > $@
|
||||
$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl -b lxc LXC \
|
||||
$(LXC_PROTOCOL) > $@
|
||||
|
||||
$(srcdir)/qemu_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
|
||||
$(QEMU_PROTOCOL)
|
||||
$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl \
|
||||
--mode=server qemu QEMU $(QEMU_PROTOCOL) > $@
|
||||
$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl -b qemu QEMU \
|
||||
$(QEMU_PROTOCOL) > $@
|
||||
|
||||
if WITH_LIBVIRTD
|
||||
|
||||
@@ -119,13 +106,12 @@ libvirtd_SOURCES = $(DAEMON_SOURCES)
|
||||
libvirtd_CFLAGS = \
|
||||
$(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \
|
||||
$(XDR_CFLAGS) $(POLKIT_CFLAGS) $(DBUS_CFLAGS) $(LIBNL_CFLAGS) \
|
||||
$(WARN_CFLAGS) $(PIE_CFLAGS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(COVERAGE_CFLAGS) \
|
||||
-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\""
|
||||
|
||||
libvirtd_LDFLAGS = \
|
||||
$(PIE_LDFLAGS) \
|
||||
$(RELRO_LDFLAGS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(COVERAGE_LDFLAGS)
|
||||
|
||||
libvirtd_LDADD = \
|
||||
@@ -168,10 +154,6 @@ if WITH_UML
|
||||
libvirtd_LDADD += ../src/libvirt_driver_uml.la
|
||||
endif
|
||||
|
||||
if WITH_VBOX
|
||||
libvirtd_LDADD += ../src/libvirt_driver_vbox.la
|
||||
endif
|
||||
|
||||
if WITH_STORAGE
|
||||
libvirtd_LDADD += ../src/libvirt_driver_storage.la
|
||||
endif
|
||||
|
@@ -40,7 +40,7 @@ The server lock is used in conjunction with a condition variable
|
||||
to pass jobs from the event loop thread to the workers. The main
|
||||
event loop thread handles I/O from the client socket, and once a
|
||||
complete RPC message has been read off the wire (and optionally
|
||||
decrypted), it will be placed on the 'dx' job queue for the
|
||||
decrypted), it will be placed onto the 'dx' job queue for the
|
||||
associated client object. The job condition will be signalled and
|
||||
a worker will wakup and process it.
|
||||
|
||||
|
@@ -32,8 +32,6 @@
|
||||
#include "configmake.h"
|
||||
#include "remote/remote_protocol.h"
|
||||
#include "remote/remote_driver.h"
|
||||
#include "virstring.h"
|
||||
#include "virutil.h"
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_CONF
|
||||
|
||||
@@ -59,11 +57,15 @@ remoteConfigGetStringList(virConfPtr conf, const char *key, char ***list_arg,
|
||||
key);
|
||||
return -1;
|
||||
}
|
||||
if (VIR_STRDUP(list[0], p->str) < 0) {
|
||||
list[0] = strdup(p->str);
|
||||
list[1] = NULL;
|
||||
if (list[0] == NULL) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("failed to allocate memory for %s config list value"),
|
||||
key);
|
||||
VIR_FREE(list);
|
||||
return -1;
|
||||
}
|
||||
list[1] = NULL;
|
||||
break;
|
||||
|
||||
case VIR_CONF_LIST: {
|
||||
@@ -86,11 +88,15 @@ remoteConfigGetStringList(virConfPtr conf, const char *key, char ***list_arg,
|
||||
VIR_FREE(list);
|
||||
return -1;
|
||||
}
|
||||
if (VIR_STRDUP(list[i], pp->str) < 0) {
|
||||
list[i] = strdup(pp->str);
|
||||
if (list[i] == NULL) {
|
||||
int j;
|
||||
for (j = 0; j < i; j++)
|
||||
for (j = 0 ; j < i ; j++)
|
||||
VIR_FREE(list[j]);
|
||||
VIR_FREE(list);
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("failed to allocate memory for %s config list value"),
|
||||
key);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -128,8 +134,8 @@ checkType(virConfValuePtr p, const char *filename,
|
||||
}
|
||||
|
||||
/* If there is no config data for the key, #var_name, then do nothing.
|
||||
If there is valid data of type VIR_CONF_STRING, and VIR_STRDUP succeeds,
|
||||
store the result in var_name. Otherwise, (i.e. invalid type, or VIR_STRDUP
|
||||
If there is valid data of type VIR_CONF_STRING, and strdup succeeds,
|
||||
store the result in var_name. Otherwise, (i.e. invalid type, or strdup
|
||||
failure), give a diagnostic and "goto" the cleanup-and-fail label. */
|
||||
#define GET_CONF_STR(conf, filename, var_name) \
|
||||
do { \
|
||||
@@ -138,8 +144,10 @@ checkType(virConfValuePtr p, const char *filename,
|
||||
if (checkType(p, filename, #var_name, VIR_CONF_STRING) < 0) \
|
||||
goto error; \
|
||||
VIR_FREE(data->var_name); \
|
||||
if (VIR_STRDUP(data->var_name, p->str) < 0) \
|
||||
if (!(data->var_name = strdup(p->str))) { \
|
||||
virReportOOMError(); \
|
||||
goto error; \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
@@ -190,8 +198,8 @@ int
|
||||
daemonConfigFilePath(bool privileged, char **configfile)
|
||||
{
|
||||
if (privileged) {
|
||||
if (VIR_STRDUP(*configfile, SYSCONFDIR "/libvirt/libvirtd.conf") < 0)
|
||||
goto error;
|
||||
if (!(*configfile = strdup(SYSCONFDIR "/libvirt/libvirtd.conf")))
|
||||
goto no_memory;
|
||||
} else {
|
||||
char *configdir = NULL;
|
||||
|
||||
@@ -228,9 +236,10 @@ daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
|
||||
data->listen_tls = 1;
|
||||
data->listen_tcp = 0;
|
||||
|
||||
if (VIR_STRDUP(data->tls_port, LIBVIRTD_TLS_PORT) < 0 ||
|
||||
VIR_STRDUP(data->tcp_port, LIBVIRTD_TCP_PORT) < 0)
|
||||
goto error;
|
||||
if (!(data->tls_port = strdup(LIBVIRTD_TLS_PORT)))
|
||||
goto no_memory;
|
||||
if (!(data->tcp_port = strdup(LIBVIRTD_TCP_PORT)))
|
||||
goto no_memory;
|
||||
|
||||
/* Only default to PolicyKit if running as root */
|
||||
#if WITH_POLKIT
|
||||
@@ -245,10 +254,14 @@ daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (VIR_STRDUP(data->unix_sock_rw_perms,
|
||||
data->auth_unix_rw == REMOTE_AUTH_POLKIT ? "0777" : "0700") < 0 ||
|
||||
VIR_STRDUP(data->unix_sock_ro_perms, "0777") < 0)
|
||||
goto error;
|
||||
if (data->auth_unix_rw == REMOTE_AUTH_POLKIT)
|
||||
data->unix_sock_rw_perms = strdup("0777"); /* Allow world */
|
||||
else
|
||||
data->unix_sock_rw_perms = strdup("0700"); /* Allow user only */
|
||||
data->unix_sock_ro_perms = strdup("0777"); /* Always allow world */
|
||||
if (!data->unix_sock_ro_perms ||
|
||||
!data->unix_sock_rw_perms)
|
||||
goto no_memory;
|
||||
|
||||
#if WITH_SASL
|
||||
data->auth_tcp = REMOTE_AUTH_SASL;
|
||||
@@ -277,7 +290,7 @@ daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
|
||||
data->keepalive_count = 5;
|
||||
data->keepalive_required = 0;
|
||||
|
||||
localhost = virGetHostname();
|
||||
localhost = virGetHostname(NULL);
|
||||
if (localhost == NULL) {
|
||||
/* we couldn't resolve the hostname; assume that we are
|
||||
* running in disconnected operation, and report a less
|
||||
@@ -300,7 +313,6 @@ daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
|
||||
|
||||
no_memory:
|
||||
virReportOOMError();
|
||||
error:
|
||||
daemonConfigFree(data);
|
||||
return NULL;
|
||||
}
|
||||
@@ -368,8 +380,10 @@ daemonConfigLoadOptions(struct daemonConfig *data,
|
||||
*/
|
||||
if (data->auth_unix_rw == REMOTE_AUTH_POLKIT) {
|
||||
VIR_FREE(data->unix_sock_rw_perms);
|
||||
if (VIR_STRDUP(data->unix_sock_rw_perms, "0777") < 0)
|
||||
if (!(data->unix_sock_rw_perms = strdup("0777"))) {
|
||||
virReportOOMError();
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (remoteConfigGetAuth(conf, "auth_unix_ro", &data->auth_unix_ro, filename) < 0)
|
||||
|
@@ -43,6 +43,7 @@
|
||||
#include "libvirtd.h"
|
||||
#include "libvirtd-config.h"
|
||||
|
||||
#include "virutil.h"
|
||||
#include "viruuid.h"
|
||||
#include "remote_driver.h"
|
||||
#include "viralloc.h"
|
||||
@@ -50,10 +51,10 @@
|
||||
#include "virnetlink.h"
|
||||
#include "virnetserver.h"
|
||||
#include "remote.h"
|
||||
#include "remote_driver.h"
|
||||
#include "virhook.h"
|
||||
#include "viraudit.h"
|
||||
#include "locking/lock_manager.h"
|
||||
#include "virstring.h"
|
||||
|
||||
#ifdef WITH_DRIVER_MODULES
|
||||
# include "driver.h"
|
||||
@@ -73,9 +74,6 @@
|
||||
# ifdef WITH_UML
|
||||
# include "uml/uml_driver.h"
|
||||
# endif
|
||||
# ifdef WITH_VBOX
|
||||
# include "vbox/vbox_driver.h"
|
||||
# endif
|
||||
# ifdef WITH_NETWORK
|
||||
# include "network/bridge_driver.h"
|
||||
# endif
|
||||
@@ -244,8 +242,8 @@ daemonPidFilePath(bool privileged,
|
||||
char **pidfile)
|
||||
{
|
||||
if (privileged) {
|
||||
if (VIR_STRDUP(*pidfile, LOCALSTATEDIR "/run/libvirtd.pid") < 0)
|
||||
goto error;
|
||||
if (!(*pidfile = strdup(LOCALSTATEDIR "/run/libvirtd.pid")))
|
||||
goto no_memory;
|
||||
} else {
|
||||
char *rundir = NULL;
|
||||
mode_t old_umask;
|
||||
@@ -290,9 +288,10 @@ daemonUnixSocketPaths(struct daemonConfig *config,
|
||||
goto no_memory;
|
||||
} else {
|
||||
if (privileged) {
|
||||
if (VIR_STRDUP(*sockfile, LOCALSTATEDIR "/run/libvirt/libvirt-sock") < 0 ||
|
||||
VIR_STRDUP(*rosockfile, LOCALSTATEDIR "/run/libvirt/libvirt-sock-ro") < 0)
|
||||
goto error;
|
||||
if (!(*sockfile = strdup(LOCALSTATEDIR "/run/libvirt/libvirt-sock")))
|
||||
goto no_memory;
|
||||
if (!(*rosockfile = strdup(LOCALSTATEDIR "/run/libvirt/libvirt-sock-ro")))
|
||||
goto no_memory;
|
||||
} else {
|
||||
char *rundir = NULL;
|
||||
mode_t old_umask;
|
||||
@@ -403,9 +402,6 @@ static void daemonInitialize(void)
|
||||
# ifdef WITH_UML
|
||||
virDriverLoadModule("uml");
|
||||
# endif
|
||||
# ifdef WITH_VBOX
|
||||
virDriverLoadModule("vbox");
|
||||
# endif
|
||||
#else
|
||||
# ifdef WITH_NETWORK
|
||||
networkRegister();
|
||||
@@ -440,9 +436,6 @@ static void daemonInitialize(void)
|
||||
# ifdef WITH_UML
|
||||
umlRegister();
|
||||
# endif
|
||||
# ifdef WITH_VBOX
|
||||
vboxRegister();
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -969,8 +962,7 @@ static int migrateProfile(void)
|
||||
|
||||
config_home = getenv("XDG_CONFIG_HOME");
|
||||
if (config_home && config_home[0] != '\0') {
|
||||
if (VIR_STRDUP(xdg_dir, config_home) < 0)
|
||||
goto cleanup;
|
||||
xdg_dir = strdup(config_home);
|
||||
} else {
|
||||
if (virAsprintf(&xdg_dir, "%s/.config", home) < 0) {
|
||||
goto cleanup;
|
||||
@@ -1181,7 +1173,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
case 'p':
|
||||
VIR_FREE(pid_file);
|
||||
if (VIR_STRDUP_QUIET(pid_file, optarg) < 0) {
|
||||
if (!(pid_file = strdup(optarg))) {
|
||||
VIR_ERROR(_("Can't allocate memory"));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
@@ -1189,7 +1181,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
case 'f':
|
||||
VIR_FREE(remote_config_file);
|
||||
if (VIR_STRDUP_QUIET(remote_config_file, optarg) < 0) {
|
||||
if (!(remote_config_file = strdup(optarg))) {
|
||||
VIR_ERROR(_("Can't allocate memory"));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
@@ -1296,10 +1288,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
/* Ensure the rundir exists (on tmpfs on some systems) */
|
||||
if (privileged) {
|
||||
if (VIR_STRDUP_QUIET(run_dir, LOCALSTATEDIR "/run/libvirt") < 0) {
|
||||
VIR_ERROR(_("Can't allocate memory"));
|
||||
goto cleanup;
|
||||
}
|
||||
run_dir = strdup(LOCALSTATEDIR "/run/libvirt");
|
||||
} else {
|
||||
run_dir = virGetUserRuntimeDirectory();
|
||||
|
||||
@@ -1308,6 +1297,11 @@ int main(int argc, char **argv) {
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
if (!run_dir) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (privileged)
|
||||
old_umask = umask(022);
|
||||
else
|
||||
|
@@ -8,7 +8,6 @@ Description=Virtualization daemon
|
||||
Before=libvirt-guests.service
|
||||
After=network.target
|
||||
After=dbus.service
|
||||
After=iscsid.service
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=-/etc/sysconfig/libvirtd
|
||||
|
426
daemon/remote.c
426
daemon/remote.c
@@ -35,8 +35,11 @@
|
||||
#include "datatypes.h"
|
||||
#include "viralloc.h"
|
||||
#include "virlog.h"
|
||||
#include "virutil.h"
|
||||
#include "stream.h"
|
||||
#include "viruuid.h"
|
||||
#include "libvirt/libvirt-qemu.h"
|
||||
#include "libvirt/libvirt-lxc.h"
|
||||
#include "vircommand.h"
|
||||
#include "intprops.h"
|
||||
#include "virnetserverservice.h"
|
||||
@@ -48,7 +51,7 @@
|
||||
#include "remote_protocol.h"
|
||||
#include "qemu_protocol.h"
|
||||
#include "lxc_protocol.h"
|
||||
#include "virstring.h"
|
||||
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_RPC
|
||||
|
||||
@@ -234,9 +237,12 @@ static int remoteRelayDomainEventIOError(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
|
||||
/* build return data */
|
||||
memset(&data, 0, sizeof(data));
|
||||
if (VIR_STRDUP(data.srcPath, srcPath) < 0 ||
|
||||
VIR_STRDUP(data.devAlias, devAlias) < 0)
|
||||
goto error;
|
||||
data.srcPath = strdup(srcPath);
|
||||
if (data.srcPath == NULL)
|
||||
goto mem_error;
|
||||
data.devAlias = strdup(devAlias);
|
||||
if (data.devAlias == NULL)
|
||||
goto mem_error;
|
||||
make_nonnull_domain(&data.dom, dom);
|
||||
data.action = action;
|
||||
|
||||
@@ -245,7 +251,8 @@ static int remoteRelayDomainEventIOError(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
(xdrproc_t)xdr_remote_domain_event_io_error_msg, &data);
|
||||
|
||||
return 0;
|
||||
error:
|
||||
mem_error:
|
||||
virReportOOMError();
|
||||
VIR_FREE(data.srcPath);
|
||||
VIR_FREE(data.devAlias);
|
||||
return -1;
|
||||
@@ -271,11 +278,16 @@ static int remoteRelayDomainEventIOErrorReason(virConnectPtr conn ATTRIBUTE_UNUS
|
||||
|
||||
/* build return data */
|
||||
memset(&data, 0, sizeof(data));
|
||||
if (VIR_STRDUP(data.srcPath, srcPath) < 0 ||
|
||||
VIR_STRDUP(data.devAlias, devAlias) < 0 ||
|
||||
VIR_STRDUP(data.reason, reason) < 0)
|
||||
goto error;
|
||||
data.srcPath = strdup(srcPath);
|
||||
if (data.srcPath == NULL)
|
||||
goto mem_error;
|
||||
data.devAlias = strdup(devAlias);
|
||||
if (data.devAlias == NULL)
|
||||
goto mem_error;
|
||||
data.action = action;
|
||||
data.reason = strdup(reason);
|
||||
if (data.reason == NULL)
|
||||
goto mem_error;
|
||||
|
||||
make_nonnull_domain(&data.dom, dom);
|
||||
|
||||
@@ -285,7 +297,8 @@ static int remoteRelayDomainEventIOErrorReason(virConnectPtr conn ATTRIBUTE_UNUS
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
mem_error:
|
||||
virReportOOMError();
|
||||
VIR_FREE(data.srcPath);
|
||||
VIR_FREE(data.devAlias);
|
||||
VIR_FREE(data.reason);
|
||||
@@ -315,7 +328,7 @@ static int remoteRelayDomainEventGraphics(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
authScheme);
|
||||
|
||||
VIR_DEBUG("Subject %d", subject->nidentity);
|
||||
for (i = 0; i < subject->nidentity; i++) {
|
||||
for (i = 0 ; i < subject->nidentity ; i++) {
|
||||
VIR_DEBUG(" %s=%s", subject->identities[i].type, subject->identities[i].name);
|
||||
}
|
||||
|
||||
@@ -324,23 +337,35 @@ static int remoteRelayDomainEventGraphics(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
data.phase = phase;
|
||||
data.local.family = local->family;
|
||||
data.remote.family = remote->family;
|
||||
if (VIR_STRDUP(data.authScheme, authScheme) < 0 ||
|
||||
VIR_STRDUP(data.local.node, local->node) < 0 ||
|
||||
VIR_STRDUP(data.local.service, local->service) < 0 ||
|
||||
VIR_STRDUP(data.remote.node, remote->node) < 0 ||
|
||||
VIR_STRDUP(data.remote.service, remote->service) < 0)
|
||||
goto error;
|
||||
data.authScheme = strdup(authScheme);
|
||||
if (data.authScheme == NULL)
|
||||
goto mem_error;
|
||||
|
||||
data.local.node = strdup(local->node);
|
||||
if (data.local.node == NULL)
|
||||
goto mem_error;
|
||||
data.local.service = strdup(local->service);
|
||||
if (data.local.service == NULL)
|
||||
goto mem_error;
|
||||
|
||||
data.remote.node = strdup(remote->node);
|
||||
if (data.remote.node == NULL)
|
||||
goto mem_error;
|
||||
data.remote.service = strdup(remote->service);
|
||||
if (data.remote.service == NULL)
|
||||
goto mem_error;
|
||||
|
||||
data.subject.subject_len = subject->nidentity;
|
||||
if (VIR_ALLOC_N(data.subject.subject_val, data.subject.subject_len) < 0) {
|
||||
virReportOOMError();
|
||||
goto error;
|
||||
}
|
||||
if (VIR_ALLOC_N(data.subject.subject_val, data.subject.subject_len) < 0)
|
||||
goto mem_error;
|
||||
|
||||
for (i = 0; i < data.subject.subject_len; i++) {
|
||||
if (VIR_STRDUP(data.subject.subject_val[i].type, subject->identities[i].type) < 0 ||
|
||||
VIR_STRDUP(data.subject.subject_val[i].name, subject->identities[i].name) < 0)
|
||||
goto error;
|
||||
for (i = 0 ; i < data.subject.subject_len ; i++) {
|
||||
data.subject.subject_val[i].type = strdup(subject->identities[i].type);
|
||||
if (data.subject.subject_val[i].type == NULL)
|
||||
goto mem_error;
|
||||
data.subject.subject_val[i].name = strdup(subject->identities[i].name);
|
||||
if (data.subject.subject_val[i].name == NULL)
|
||||
goto mem_error;
|
||||
}
|
||||
make_nonnull_domain(&data.dom, dom);
|
||||
|
||||
@@ -350,14 +375,15 @@ static int remoteRelayDomainEventGraphics(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
mem_error:
|
||||
virReportOOMError();
|
||||
VIR_FREE(data.authScheme);
|
||||
VIR_FREE(data.local.node);
|
||||
VIR_FREE(data.local.service);
|
||||
VIR_FREE(data.remote.node);
|
||||
VIR_FREE(data.remote.service);
|
||||
if (data.subject.subject_val != NULL) {
|
||||
for (i = 0; i < data.subject.subject_len; i++) {
|
||||
for (i = 0 ; i < data.subject.subject_len ; i++) {
|
||||
VIR_FREE(data.subject.subject_val[i].type);
|
||||
VIR_FREE(data.subject.subject_val[i].name);
|
||||
}
|
||||
@@ -384,8 +410,9 @@ static int remoteRelayDomainEventBlockJob(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
|
||||
/* build return data */
|
||||
memset(&data, 0, sizeof(data));
|
||||
if (VIR_STRDUP(data.path, path) < 0)
|
||||
goto error;
|
||||
data.path = strdup(path);
|
||||
if (data.path == NULL)
|
||||
goto mem_error;
|
||||
data.type = type;
|
||||
data.status = status;
|
||||
make_nonnull_domain(&data.dom, dom);
|
||||
@@ -395,7 +422,9 @@ static int remoteRelayDomainEventBlockJob(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
(xdrproc_t)xdr_remote_domain_event_block_job_msg, &data);
|
||||
|
||||
return 0;
|
||||
error:
|
||||
|
||||
mem_error:
|
||||
virReportOOMError();
|
||||
VIR_FREE(data.path);
|
||||
return -1;
|
||||
}
|
||||
@@ -447,18 +476,18 @@ static int remoteRelayDomainEventDiskChange(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
memset(&data, 0, sizeof(data));
|
||||
if (oldSrcPath &&
|
||||
((VIR_ALLOC(oldSrcPath_p) < 0) ||
|
||||
VIR_STRDUP(*oldSrcPath_p, oldSrcPath) < 0))
|
||||
!(*oldSrcPath_p = strdup(oldSrcPath))))
|
||||
goto mem_error;
|
||||
|
||||
if (newSrcPath &&
|
||||
((VIR_ALLOC(newSrcPath_p) < 0) ||
|
||||
VIR_STRDUP(*newSrcPath_p, newSrcPath) < 0))
|
||||
!(*newSrcPath_p = strdup(newSrcPath))))
|
||||
goto mem_error;
|
||||
|
||||
data.oldSrcPath = oldSrcPath_p;
|
||||
data.newSrcPath = newSrcPath_p;
|
||||
if (VIR_STRDUP(data.devAlias, devAlias) < 0)
|
||||
goto error;
|
||||
if (!(data.devAlias = strdup(devAlias)))
|
||||
goto mem_error;
|
||||
data.reason = reason;
|
||||
|
||||
make_nonnull_domain(&data.dom, dom);
|
||||
@@ -470,10 +499,9 @@ static int remoteRelayDomainEventDiskChange(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
return 0;
|
||||
|
||||
mem_error:
|
||||
virReportOOMError();
|
||||
error:
|
||||
VIR_FREE(oldSrcPath_p);
|
||||
VIR_FREE(newSrcPath_p);
|
||||
virReportOOMError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -495,8 +523,10 @@ static int remoteRelayDomainEventTrayChange(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
/* build return data */
|
||||
memset(&data, 0, sizeof(data));
|
||||
|
||||
if (VIR_STRDUP(data.devAlias, devAlias) < 0)
|
||||
if (!(data.devAlias = strdup(devAlias))) {
|
||||
virReportOOMError();
|
||||
return -1;
|
||||
}
|
||||
data.reason = reason;
|
||||
|
||||
make_nonnull_domain(&data.dom, dom);
|
||||
@@ -640,7 +670,7 @@ void remoteClientFreeFunc(void *data)
|
||||
if (priv->conn) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < VIR_DOMAIN_EVENT_ID_LAST; i++) {
|
||||
for (i = 0 ; i < VIR_DOMAIN_EVENT_ID_LAST ; i++) {
|
||||
if (priv->domainEventCallbackID[i] != -1) {
|
||||
VIR_DEBUG("Deregistering to relay remote events %d", i);
|
||||
virConnectDomainEventDeregisterAny(priv->conn,
|
||||
@@ -681,7 +711,7 @@ void *remoteClientInitHook(virNetServerClientPtr client,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < VIR_DOMAIN_EVENT_ID_LAST; i++)
|
||||
for (i = 0 ; i < VIR_DOMAIN_EVENT_ID_LAST ; i++)
|
||||
priv->domainEventCallbackID[i] = -1;
|
||||
|
||||
virNetServerClientSetCloseHook(client, remoteClientCloseFunc);
|
||||
@@ -691,11 +721,11 @@ void *remoteClientInitHook(virNetServerClientPtr client,
|
||||
/*----- Functions. -----*/
|
||||
|
||||
static int
|
||||
remoteDispatchConnectOpen(virNetServerPtr server,
|
||||
virNetServerClientPtr client,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr,
|
||||
struct remote_connect_open_args *args)
|
||||
remoteDispatchOpen(virNetServerPtr server,
|
||||
virNetServerClientPtr client,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr,
|
||||
struct remote_open_args *args)
|
||||
{
|
||||
const char *name;
|
||||
unsigned int flags;
|
||||
@@ -744,10 +774,10 @@ cleanup:
|
||||
|
||||
|
||||
static int
|
||||
remoteDispatchConnectClose(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr ATTRIBUTE_UNUSED)
|
||||
remoteDispatchClose(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr ATTRIBUTE_UNUSED)
|
||||
{
|
||||
virNetServerClientDelayedClose(client);
|
||||
return 0;
|
||||
@@ -823,8 +853,11 @@ remoteSerializeTypedParameters(virTypedParameterPtr params,
|
||||
}
|
||||
|
||||
/* remoteDispatchClientRequest will free this: */
|
||||
if (VIR_STRDUP(val[j].field, params[i].field) < 0)
|
||||
val[j].field = strdup(params[i].field);
|
||||
if (val[j].field == NULL) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
val[j].value.type = params[i].type;
|
||||
switch (params[i].type) {
|
||||
case VIR_TYPED_PARAM_INT:
|
||||
@@ -846,8 +879,12 @@ remoteSerializeTypedParameters(virTypedParameterPtr params,
|
||||
val[j].value.remote_typed_param_value_u.b = params[i].value.b;
|
||||
break;
|
||||
case VIR_TYPED_PARAM_STRING:
|
||||
if (VIR_STRDUP(val[j].value.remote_typed_param_value_u.s, params[i].value.s) < 0)
|
||||
val[j].value.remote_typed_param_value_u.s =
|
||||
strdup(params[i].value.s);
|
||||
if (val[j].value.remote_typed_param_value_u.s == NULL) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
virReportError(VIR_ERR_RPC, _("unknown parameter type: %d"),
|
||||
@@ -932,9 +969,12 @@ remoteDeserializeTypedParameters(remote_typed_param *args_params_val,
|
||||
args_params_val[i].value.remote_typed_param_value_u.b;
|
||||
break;
|
||||
case VIR_TYPED_PARAM_STRING:
|
||||
if (VIR_STRDUP(params[i].value.s,
|
||||
args_params_val[i].value.remote_typed_param_value_u.s) < 0)
|
||||
params[i].value.s =
|
||||
strdup(args_params_val[i].value.remote_typed_param_value_u.s);
|
||||
if (params[i].value.s == NULL) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, _("unknown parameter type: %d"),
|
||||
@@ -963,7 +1003,7 @@ remoteDispatchDomainGetSchedulerParameters(virNetServerPtr server ATTRIBUTE_UNUS
|
||||
{
|
||||
virDomainPtr dom = NULL;
|
||||
virTypedParameterPtr params = NULL;
|
||||
int nparams = 0;
|
||||
int nparams = args->nparams;
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv =
|
||||
virNetServerClientGetPrivateData(client);
|
||||
@@ -973,13 +1013,12 @@ remoteDispatchDomainGetSchedulerParameters(virNetServerPtr server ATTRIBUTE_UNUS
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (args->nparams > REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX) {
|
||||
if (nparams > REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
|
||||
goto cleanup;
|
||||
}
|
||||
if (args->nparams && VIR_ALLOC_N(params, args->nparams) < 0)
|
||||
if (nparams && VIR_ALLOC_N(params, nparams) < 0)
|
||||
goto no_memory;
|
||||
nparams = args->nparams;
|
||||
|
||||
if (!(dom = get_nonnull_domain(priv->conn, args->dom)))
|
||||
goto cleanup;
|
||||
@@ -1072,7 +1111,7 @@ remoteDispatchDomainGetSchedulerParametersFlags(virNetServerPtr server ATTRIBUTE
|
||||
{
|
||||
virDomainPtr dom = NULL;
|
||||
virTypedParameterPtr params = NULL;
|
||||
int nparams = 0;
|
||||
int nparams = args->nparams;
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv =
|
||||
virNetServerClientGetPrivateData(client);
|
||||
@@ -1082,13 +1121,12 @@ remoteDispatchDomainGetSchedulerParametersFlags(virNetServerPtr server ATTRIBUTE
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (args->nparams > REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX) {
|
||||
if (nparams > REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
|
||||
goto cleanup;
|
||||
}
|
||||
if (args->nparams && VIR_ALLOC_N(params, args->nparams) < 0)
|
||||
if (nparams && VIR_ALLOC_N(params, nparams) < 0)
|
||||
goto no_memory;
|
||||
nparams = args->nparams;
|
||||
|
||||
if (!(dom = get_nonnull_domain(priv->conn, args->dom)))
|
||||
goto cleanup;
|
||||
@@ -1127,7 +1165,7 @@ remoteDispatchDomainMemoryStats(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
remote_domain_memory_stats_ret *ret)
|
||||
{
|
||||
virDomainPtr dom = NULL;
|
||||
struct _virDomainMemoryStat *stats;
|
||||
struct _virDomainMemoryStat *stats = NULL;
|
||||
int nr_stats, i;
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv =
|
||||
@@ -1248,7 +1286,7 @@ remoteDispatchDomainBlockStatsFlags(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virTypedParameterPtr params = NULL;
|
||||
virDomainPtr dom = NULL;
|
||||
const char *path = args->path;
|
||||
int nparams = 0;
|
||||
int nparams = args->nparams;
|
||||
unsigned int flags;
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv =
|
||||
@@ -1263,15 +1301,14 @@ remoteDispatchDomainBlockStatsFlags(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
goto cleanup;
|
||||
flags = args->flags;
|
||||
|
||||
if (args->nparams > REMOTE_DOMAIN_BLOCK_STATS_PARAMETERS_MAX) {
|
||||
if (nparams > REMOTE_DOMAIN_BLOCK_STATS_PARAMETERS_MAX) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
|
||||
goto cleanup;
|
||||
}
|
||||
if (args->nparams && VIR_ALLOC_N(params, args->nparams) < 0) {
|
||||
if (nparams && VIR_ALLOC_N(params, nparams) < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
nparams = args->nparams;
|
||||
|
||||
if (virDomainBlockStatsFlags(dom, path, params, &nparams, flags) < 0)
|
||||
goto cleanup;
|
||||
@@ -1878,7 +1915,7 @@ remoteDispatchDomainGetMemoryParameters(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
{
|
||||
virDomainPtr dom = NULL;
|
||||
virTypedParameterPtr params = NULL;
|
||||
int nparams = 0;
|
||||
int nparams = args->nparams;
|
||||
unsigned int flags;
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv =
|
||||
@@ -1891,15 +1928,14 @@ remoteDispatchDomainGetMemoryParameters(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
|
||||
flags = args->flags;
|
||||
|
||||
if (args->nparams > REMOTE_DOMAIN_MEMORY_PARAMETERS_MAX) {
|
||||
if (nparams > REMOTE_DOMAIN_MEMORY_PARAMETERS_MAX) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
|
||||
goto cleanup;
|
||||
}
|
||||
if (args->nparams && VIR_ALLOC_N(params, args->nparams) < 0) {
|
||||
if (nparams && VIR_ALLOC_N(params, nparams) < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
nparams = args->nparams;
|
||||
|
||||
if (!(dom = get_nonnull_domain(priv->conn, args->dom)))
|
||||
goto cleanup;
|
||||
@@ -1943,7 +1979,7 @@ remoteDispatchDomainGetNumaParameters(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
{
|
||||
virDomainPtr dom = NULL;
|
||||
virTypedParameterPtr params = NULL;
|
||||
int nparams = 0;
|
||||
int nparams = args->nparams;
|
||||
unsigned int flags;
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv =
|
||||
@@ -1956,15 +1992,14 @@ remoteDispatchDomainGetNumaParameters(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
|
||||
flags = args->flags;
|
||||
|
||||
if (args->nparams > REMOTE_DOMAIN_NUMA_PARAMETERS_MAX) {
|
||||
if (nparams > REMOTE_DOMAIN_NUMA_PARAMETERS_MAX) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
|
||||
goto cleanup;
|
||||
}
|
||||
if (args->nparams && VIR_ALLOC_N(params, args->nparams) < 0) {
|
||||
if (nparams && VIR_ALLOC_N(params, nparams) < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
nparams = args->nparams;
|
||||
|
||||
if (!(dom = get_nonnull_domain(priv->conn, args->dom)))
|
||||
goto cleanup;
|
||||
@@ -2008,7 +2043,7 @@ remoteDispatchDomainGetBlkioParameters(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
{
|
||||
virDomainPtr dom = NULL;
|
||||
virTypedParameterPtr params = NULL;
|
||||
int nparams = 0;
|
||||
int nparams = args->nparams;
|
||||
unsigned int flags;
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv =
|
||||
@@ -2021,15 +2056,14 @@ remoteDispatchDomainGetBlkioParameters(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
|
||||
flags = args->flags;
|
||||
|
||||
if (args->nparams > REMOTE_DOMAIN_BLKIO_PARAMETERS_MAX) {
|
||||
if (nparams > REMOTE_DOMAIN_BLKIO_PARAMETERS_MAX) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
|
||||
goto cleanup;
|
||||
}
|
||||
if (args->nparams && VIR_ALLOC_N(params, args->nparams) < 0) {
|
||||
if (nparams && VIR_ALLOC_N(params, nparams) < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
nparams = args->nparams;
|
||||
|
||||
if (!(dom = get_nonnull_domain(priv->conn, args->dom)))
|
||||
goto cleanup;
|
||||
@@ -2074,7 +2108,7 @@ remoteDispatchNodeGetCPUStats(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNodeCPUStatsPtr params = NULL;
|
||||
int i;
|
||||
int cpuNum = args->cpuNum;
|
||||
int nparams = 0;
|
||||
int nparams = args->nparams;
|
||||
unsigned int flags;
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv =
|
||||
@@ -2087,15 +2121,14 @@ remoteDispatchNodeGetCPUStats(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
|
||||
flags = args->flags;
|
||||
|
||||
if (args->nparams > REMOTE_NODE_CPU_STATS_MAX) {
|
||||
if (nparams > REMOTE_NODE_CPU_STATS_MAX) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
|
||||
goto cleanup;
|
||||
}
|
||||
if (args->nparams && VIR_ALLOC_N(params, args->nparams) < 0) {
|
||||
if (VIR_ALLOC_N(params, nparams) < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
nparams = args->nparams;
|
||||
|
||||
if (virNodeGetCPUStats(priv->conn, cpuNum, params, &nparams, flags) < 0)
|
||||
goto cleanup;
|
||||
@@ -2115,8 +2148,9 @@ remoteDispatchNodeGetCPUStats(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
|
||||
for (i = 0; i < nparams; ++i) {
|
||||
/* remoteDispatchClientRequest will free this: */
|
||||
if (VIR_STRDUP(ret->params.params_val[i].field, params[i].field) < 0)
|
||||
goto cleanup;
|
||||
ret->params.params_val[i].field = strdup(params[i].field);
|
||||
if (ret->params.params_val[i].field == NULL)
|
||||
goto no_memory;
|
||||
|
||||
ret->params.params_val[i].value = params[i].value;
|
||||
}
|
||||
@@ -2152,7 +2186,7 @@ remoteDispatchNodeGetMemoryStats(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNodeMemoryStatsPtr params = NULL;
|
||||
int i;
|
||||
int cellNum = args->cellNum;
|
||||
int nparams = 0;
|
||||
int nparams = args->nparams;
|
||||
unsigned int flags;
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv =
|
||||
@@ -2165,15 +2199,14 @@ remoteDispatchNodeGetMemoryStats(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
|
||||
flags = args->flags;
|
||||
|
||||
if (args->nparams > REMOTE_NODE_MEMORY_STATS_MAX) {
|
||||
if (nparams > REMOTE_NODE_MEMORY_STATS_MAX) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
|
||||
goto cleanup;
|
||||
}
|
||||
if (args->nparams && VIR_ALLOC_N(params, args->nparams) < 0) {
|
||||
if (VIR_ALLOC_N(params, nparams) < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
nparams = args->nparams;
|
||||
|
||||
if (virNodeGetMemoryStats(priv->conn, cellNum, params, &nparams, flags) < 0)
|
||||
goto cleanup;
|
||||
@@ -2193,8 +2226,9 @@ remoteDispatchNodeGetMemoryStats(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
|
||||
for (i = 0; i < nparams; ++i) {
|
||||
/* remoteDispatchClientRequest will free this: */
|
||||
if (VIR_STRDUP(ret->params.params_val[i].field, params[i].field) < 0)
|
||||
goto cleanup;
|
||||
ret->params.params_val[i].field = strdup(params[i].field);
|
||||
if (ret->params.params_val[i].field == NULL)
|
||||
goto no_memory;
|
||||
|
||||
ret->params.params_val[i].value = params[i].value;
|
||||
}
|
||||
@@ -2271,7 +2305,7 @@ remoteDispatchDomainGetBlockIoTune(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom = NULL;
|
||||
int rv = -1;
|
||||
virTypedParameterPtr params = NULL;
|
||||
int nparams = 0;
|
||||
int nparams = args->nparams;
|
||||
struct daemonClientPrivate *priv =
|
||||
virNetServerClientGetPrivateData(client);
|
||||
|
||||
@@ -2280,16 +2314,15 @@ remoteDispatchDomainGetBlockIoTune(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (args->nparams > REMOTE_DOMAIN_BLOCK_IO_TUNE_PARAMETERS_MAX) {
|
||||
if (nparams > REMOTE_DOMAIN_BLOCK_IO_TUNE_PARAMETERS_MAX) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (args->nparams && VIR_ALLOC_N(params, args->nparams) < 0) {
|
||||
if (nparams && VIR_ALLOC_N(params, nparams) < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
nparams = args->nparams;
|
||||
|
||||
if (!(dom = get_nonnull_domain(priv->conn, args->dom)))
|
||||
goto cleanup;
|
||||
@@ -2359,8 +2392,10 @@ remoteDispatchAuthList(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
goto cleanup;
|
||||
}
|
||||
VIR_INFO("Bypass polkit auth for privileged client %s", ident);
|
||||
virNetServerClientSetAuth(client, 0);
|
||||
auth = VIR_NET_SERVER_SERVICE_AUTH_NONE;
|
||||
if (virNetServerClientSetIdentity(client, ident) < 0)
|
||||
virResetLastError();
|
||||
else
|
||||
auth = VIR_NET_SERVER_SERVICE_AUTH_NONE;
|
||||
VIR_FREE(ident);
|
||||
}
|
||||
}
|
||||
@@ -2501,7 +2536,9 @@ remoteSASLFinish(virNetServerClientPtr client)
|
||||
if (!virNetSASLContextCheckIdentity(saslCtxt, identity))
|
||||
return -2;
|
||||
|
||||
virNetServerClientSetAuth(client, 0);
|
||||
if (virNetServerClientSetIdentity(client, identity) < 0)
|
||||
goto error;
|
||||
|
||||
virNetServerClientSetSASLSession(client, priv->sasl);
|
||||
|
||||
VIR_DEBUG("Authentication successful %d", virNetServerClientGetFD(client));
|
||||
@@ -2778,10 +2815,12 @@ remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
int status = -1;
|
||||
char *ident = NULL;
|
||||
bool authdismissed = 0;
|
||||
bool supportsuid = false;
|
||||
char *pkout = NULL;
|
||||
struct daemonClientPrivate *priv =
|
||||
virNetServerClientGetPrivateData(client);
|
||||
virCommandPtr cmd = NULL;
|
||||
static bool polkitInsecureWarned;
|
||||
|
||||
virMutexLock(&priv->lock);
|
||||
action = virNetServerClientGetReadonly(client) ?
|
||||
@@ -2803,14 +2842,28 @@ remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
goto authfail;
|
||||
}
|
||||
|
||||
if (timestamp == 0) {
|
||||
VIR_WARN("Failing polkit auth due to missing client (pid=%lld) start time",
|
||||
(long long)callerPid);
|
||||
goto authfail;
|
||||
}
|
||||
|
||||
VIR_INFO("Checking PID %lld running as %d",
|
||||
(long long) callerPid, callerUid);
|
||||
|
||||
virCommandAddArg(cmd, "--process");
|
||||
if (timestamp != 0) {
|
||||
virCommandAddArgFormat(cmd, "%lld,%llu", (long long) callerPid, timestamp);
|
||||
# ifdef PKCHECK_SUPPORTS_UID
|
||||
supportsuid = true;
|
||||
# endif
|
||||
if (supportsuid) {
|
||||
virCommandAddArgFormat(cmd, "%lld,%llu,%lu",
|
||||
(long long) callerPid, timestamp, (unsigned long) callerUid);
|
||||
} else {
|
||||
virCommandAddArgFormat(cmd, "%lld", (long long) callerPid);
|
||||
if (!polkitInsecureWarned) {
|
||||
VIR_WARN("No support for caller UID with pkcheck. This deployment is known to be insecure.");
|
||||
polkitInsecureWarned = true;
|
||||
}
|
||||
virCommandAddArgFormat(cmd, "%lld,%llu", (long long) callerPid, timestamp);
|
||||
}
|
||||
virCommandAddArg(cmd, "--allow-user-interaction");
|
||||
|
||||
@@ -2838,7 +2891,7 @@ remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
action, (long long) callerPid, callerUid);
|
||||
ret->complete = 1;
|
||||
|
||||
virNetServerClientSetAuth(client, 0);
|
||||
virNetServerClientSetIdentity(client, ident);
|
||||
virMutexUnlock(&priv->lock);
|
||||
virCommandFree(cmd);
|
||||
VIR_FREE(pkout);
|
||||
@@ -2899,7 +2952,6 @@ remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
struct daemonClientPrivate *priv =
|
||||
virNetServerClientGetPrivateData(client);
|
||||
DBusConnection *sysbus;
|
||||
unsigned long long timestamp;
|
||||
|
||||
virMutexLock(&priv->lock);
|
||||
|
||||
@@ -2914,7 +2966,7 @@ remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
if (virNetServerClientGetUNIXIdentity(client, &callerUid, &callerGid,
|
||||
&callerPid, ×tamp) < 0) {
|
||||
&callerPid) < 0) {
|
||||
VIR_ERROR(_("cannot get peer socket identity"));
|
||||
goto authfail;
|
||||
}
|
||||
@@ -2994,8 +3046,8 @@ remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
action, (long long) callerPid, callerUid,
|
||||
polkit_result_to_string_representation(pkresult));
|
||||
ret->complete = 1;
|
||||
virNetServerClientSetIdentity(client, ident);
|
||||
|
||||
virNetServerClientSetAuth(client, 0);
|
||||
virMutexUnlock(&priv->lock);
|
||||
VIR_FREE(ident);
|
||||
return 0;
|
||||
@@ -3077,8 +3129,9 @@ remoteDispatchNodeDeviceGetParent(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
if (VIR_STRDUP(*parent_p, parent) < 0) {
|
||||
if (!(*parent_p = strdup(parent))) {
|
||||
VIR_FREE(parent_p);
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
ret->parent = parent_p;
|
||||
@@ -3099,11 +3152,11 @@ cleanup:
|
||||
* Register / deregister events
|
||||
***************************/
|
||||
static int
|
||||
remoteDispatchConnectDomainEventRegister(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr ATTRIBUTE_UNUSED,
|
||||
remote_connect_domain_event_register_ret *ret ATTRIBUTE_UNUSED)
|
||||
remoteDispatchDomainEventsRegister(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr ATTRIBUTE_UNUSED,
|
||||
remote_domain_events_register_ret *ret ATTRIBUTE_UNUSED)
|
||||
{
|
||||
int callbackID;
|
||||
int rv = -1;
|
||||
@@ -3141,11 +3194,11 @@ cleanup:
|
||||
}
|
||||
|
||||
static int
|
||||
remoteDispatchConnectDomainEventDeregister(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr ATTRIBUTE_UNUSED,
|
||||
remote_connect_domain_event_deregister_ret *ret ATTRIBUTE_UNUSED)
|
||||
remoteDispatchDomainEventsDeregister(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr ATTRIBUTE_UNUSED,
|
||||
remote_domain_events_deregister_ret *ret ATTRIBUTE_UNUSED)
|
||||
{
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv =
|
||||
@@ -3288,11 +3341,11 @@ cleanup:
|
||||
}
|
||||
|
||||
static int
|
||||
remoteDispatchConnectDomainEventRegisterAny(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr ATTRIBUTE_UNUSED,
|
||||
remote_connect_domain_event_register_any_args *args)
|
||||
remoteDispatchDomainEventsRegisterAny(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr ATTRIBUTE_UNUSED,
|
||||
remote_domain_events_register_any_args *args)
|
||||
{
|
||||
int callbackID;
|
||||
int rv = -1;
|
||||
@@ -3337,11 +3390,11 @@ cleanup:
|
||||
|
||||
|
||||
static int
|
||||
remoteDispatchConnectDomainEventDeregisterAny(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr ATTRIBUTE_UNUSED,
|
||||
remote_connect_domain_event_deregister_any_args *args)
|
||||
remoteDispatchDomainEventsDeregisterAny(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr ATTRIBUTE_UNUSED,
|
||||
remote_domain_events_deregister_any_args *args)
|
||||
{
|
||||
int callbackID = -1;
|
||||
int rv = -1;
|
||||
@@ -3382,12 +3435,12 @@ cleanup:
|
||||
}
|
||||
|
||||
static int
|
||||
qemuDispatchDomainMonitorCommand(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr,
|
||||
qemu_domain_monitor_command_args *args,
|
||||
qemu_domain_monitor_command_ret *ret)
|
||||
qemuDispatchMonitorCommand(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr,
|
||||
qemu_monitor_command_args *args,
|
||||
qemu_monitor_command_ret *ret)
|
||||
{
|
||||
virDomainPtr dom = NULL;
|
||||
int rv = -1;
|
||||
@@ -3674,12 +3727,13 @@ cleanup:
|
||||
}
|
||||
|
||||
|
||||
static int remoteDispatchConnectSupportsFeature(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr,
|
||||
remote_connect_supports_feature_args *args,
|
||||
remote_connect_supports_feature_ret *ret)
|
||||
static int remoteDispatchSupportsFeature(
|
||||
virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr,
|
||||
remote_supports_feature_args *args,
|
||||
remote_supports_feature_ret *ret)
|
||||
{
|
||||
int rv = -1;
|
||||
int supported;
|
||||
@@ -3707,7 +3761,7 @@ static int remoteDispatchConnectSupportsFeature(virNetServerPtr server ATTRIBUTE
|
||||
break;
|
||||
|
||||
default:
|
||||
if ((supported = virConnectSupportsFeature(priv->conn, args->feature)) < 0)
|
||||
if ((supported = virDrvSupportsFeature(priv->conn, args->feature)) < 0)
|
||||
goto cleanup;
|
||||
break;
|
||||
}
|
||||
@@ -3775,7 +3829,7 @@ remoteDispatchDomainGetInterfaceParameters(virNetServerPtr server ATTRIBUTE_UNUS
|
||||
virDomainPtr dom = NULL;
|
||||
virTypedParameterPtr params = NULL;
|
||||
const char *device = args->device;
|
||||
int nparams = 0;
|
||||
int nparams = args->nparams;
|
||||
unsigned int flags;
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv =
|
||||
@@ -3788,15 +3842,14 @@ remoteDispatchDomainGetInterfaceParameters(virNetServerPtr server ATTRIBUTE_UNUS
|
||||
|
||||
flags = args->flags;
|
||||
|
||||
if (args->nparams > REMOTE_DOMAIN_INTERFACE_PARAMETERS_MAX) {
|
||||
if (nparams > REMOTE_DOMAIN_INTERFACE_PARAMETERS_MAX) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
|
||||
goto cleanup;
|
||||
}
|
||||
if (args->nparams && VIR_ALLOC_N(params, args->nparams) < 0) {
|
||||
if (nparams && VIR_ALLOC_N(params, nparams) < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
nparams = args->nparams;
|
||||
|
||||
if (!(dom = get_nonnull_domain(priv->conn, args->dom)))
|
||||
goto cleanup;
|
||||
@@ -4486,7 +4539,7 @@ remoteDispatchNodeGetMemoryParameters(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
remote_node_get_memory_parameters_ret *ret)
|
||||
{
|
||||
virTypedParameterPtr params = NULL;
|
||||
int nparams = 0;
|
||||
int nparams = args->nparams;
|
||||
unsigned int flags;
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv =
|
||||
@@ -4499,15 +4552,15 @@ remoteDispatchNodeGetMemoryParameters(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
|
||||
flags = args->flags;
|
||||
|
||||
if (args->nparams > REMOTE_NODE_MEMORY_PARAMETERS_MAX) {
|
||||
if (nparams > REMOTE_NODE_MEMORY_PARAMETERS_MAX) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
|
||||
goto cleanup;
|
||||
}
|
||||
if (args->nparams && VIR_ALLOC_N(params, args->nparams) < 0) {
|
||||
if (nparams && VIR_ALLOC_N(params, nparams) < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
nparams = args->nparams;
|
||||
|
||||
|
||||
if (virNodeGetMemoryParameters(priv->conn, params, &nparams, flags) < 0)
|
||||
goto cleanup;
|
||||
@@ -4616,7 +4669,7 @@ lxcDispatchDomainOpenNamespace(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
* but in case they're playing games with us, prevent
|
||||
* a resource leak
|
||||
*/
|
||||
for (i = 0; i < msg->nfds; i++)
|
||||
for (i = 0 ; i < msg->nfds ; i++)
|
||||
VIR_FORCE_CLOSE(msg->fds[i]);
|
||||
VIR_FREE(msg->fds);
|
||||
msg->nfds = 0;
|
||||
@@ -4633,50 +4686,6 @@ cleanup:
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int
|
||||
remoteDispatchDomainGetJobStats(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr,
|
||||
remote_domain_get_job_stats_args *args,
|
||||
remote_domain_get_job_stats_ret *ret)
|
||||
{
|
||||
virDomainPtr dom = NULL;
|
||||
virTypedParameterPtr params = NULL;
|
||||
int nparams = 0;
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv =
|
||||
virNetServerClientGetPrivateData(client);
|
||||
|
||||
if (!priv->conn) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (!(dom = get_nonnull_domain(priv->conn, args->dom)))
|
||||
goto cleanup;
|
||||
|
||||
if (virDomainGetJobStats(dom, &ret->type, ¶ms,
|
||||
&nparams, args->flags) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (remoteSerializeTypedParameters(params, nparams,
|
||||
&ret->params.params_val,
|
||||
&ret->params.params_len,
|
||||
0) < 0)
|
||||
goto cleanup;
|
||||
|
||||
rv = 0;
|
||||
|
||||
cleanup:
|
||||
if (rv < 0)
|
||||
virNetMessageSaveError(rerr);
|
||||
virTypedParamsFree(params, nparams);
|
||||
if (dom)
|
||||
virDomainFree(dom);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/*----- Helpers. -----*/
|
||||
|
||||
/* get_nonnull_domain and get_nonnull_network turn an on-wire
|
||||
@@ -4748,14 +4757,14 @@ static void
|
||||
make_nonnull_domain(remote_nonnull_domain *dom_dst, virDomainPtr dom_src)
|
||||
{
|
||||
dom_dst->id = dom_src->id;
|
||||
ignore_value(VIR_STRDUP_QUIET(dom_dst->name, dom_src->name));
|
||||
dom_dst->name = strdup(dom_src->name);
|
||||
memcpy(dom_dst->uuid, dom_src->uuid, VIR_UUID_BUFLEN);
|
||||
}
|
||||
|
||||
static void
|
||||
make_nonnull_network(remote_nonnull_network *net_dst, virNetworkPtr net_src)
|
||||
{
|
||||
ignore_value(VIR_STRDUP_QUIET(net_dst->name, net_src->name));
|
||||
net_dst->name = strdup(net_src->name);
|
||||
memcpy(net_dst->uuid, net_src->uuid, VIR_UUID_BUFLEN);
|
||||
}
|
||||
|
||||
@@ -4763,29 +4772,29 @@ static void
|
||||
make_nonnull_interface(remote_nonnull_interface *interface_dst,
|
||||
virInterfacePtr interface_src)
|
||||
{
|
||||
ignore_value(VIR_STRDUP_QUIET(interface_dst->name, interface_src->name));
|
||||
ignore_value(VIR_STRDUP_QUIET(interface_dst->mac, interface_src->mac));
|
||||
interface_dst->name = strdup(interface_src->name);
|
||||
interface_dst->mac = strdup(interface_src->mac);
|
||||
}
|
||||
|
||||
static void
|
||||
make_nonnull_storage_pool(remote_nonnull_storage_pool *pool_dst, virStoragePoolPtr pool_src)
|
||||
{
|
||||
ignore_value(VIR_STRDUP_QUIET(pool_dst->name, pool_src->name));
|
||||
pool_dst->name = strdup(pool_src->name);
|
||||
memcpy(pool_dst->uuid, pool_src->uuid, VIR_UUID_BUFLEN);
|
||||
}
|
||||
|
||||
static void
|
||||
make_nonnull_storage_vol(remote_nonnull_storage_vol *vol_dst, virStorageVolPtr vol_src)
|
||||
{
|
||||
ignore_value(VIR_STRDUP_QUIET(vol_dst->pool, vol_src->pool));
|
||||
ignore_value(VIR_STRDUP_QUIET(vol_dst->name, vol_src->name));
|
||||
ignore_value(VIR_STRDUP_QUIET(vol_dst->key, vol_src->key));
|
||||
vol_dst->pool = strdup(vol_src->pool);
|
||||
vol_dst->name = strdup(vol_src->name);
|
||||
vol_dst->key = strdup(vol_src->key);
|
||||
}
|
||||
|
||||
static void
|
||||
make_nonnull_node_device(remote_nonnull_node_device *dev_dst, virNodeDevicePtr dev_src)
|
||||
{
|
||||
ignore_value(VIR_STRDUP_QUIET(dev_dst->name, dev_src->name));
|
||||
dev_dst->name = strdup(dev_src->name);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -4793,20 +4802,20 @@ make_nonnull_secret(remote_nonnull_secret *secret_dst, virSecretPtr secret_src)
|
||||
{
|
||||
memcpy(secret_dst->uuid, secret_src->uuid, VIR_UUID_BUFLEN);
|
||||
secret_dst->usageType = secret_src->usageType;
|
||||
ignore_value(VIR_STRDUP_QUIET(secret_dst->usageID, secret_src->usageID));
|
||||
secret_dst->usageID = strdup(secret_src->usageID);
|
||||
}
|
||||
|
||||
static void
|
||||
make_nonnull_nwfilter(remote_nonnull_nwfilter *nwfilter_dst, virNWFilterPtr nwfilter_src)
|
||||
{
|
||||
ignore_value(VIR_STRDUP_QUIET(nwfilter_dst->name, nwfilter_src->name));
|
||||
nwfilter_dst->name = strdup(nwfilter_src->name);
|
||||
memcpy(nwfilter_dst->uuid, nwfilter_src->uuid, VIR_UUID_BUFLEN);
|
||||
}
|
||||
|
||||
static void
|
||||
make_nonnull_domain_snapshot(remote_nonnull_domain_snapshot *snapshot_dst, virDomainSnapshotPtr snapshot_src)
|
||||
{
|
||||
ignore_value(VIR_STRDUP_QUIET(snapshot_dst->name, snapshot_src->name));
|
||||
snapshot_dst->name = strdup(snapshot_src->name);
|
||||
make_nonnull_domain(&snapshot_dst->dom, snapshot_src->domain);
|
||||
}
|
||||
|
||||
@@ -4819,14 +4828,12 @@ remoteSerializeDomainDiskErrors(virDomainDiskErrorPtr errors,
|
||||
remote_domain_disk_error *val = NULL;
|
||||
int i = 0;
|
||||
|
||||
if (VIR_ALLOC_N(val, nerrors) < 0) {
|
||||
virReportOOMError();
|
||||
goto error;
|
||||
}
|
||||
if (VIR_ALLOC_N(val, nerrors) < 0)
|
||||
goto no_memory;
|
||||
|
||||
for (i = 0; i < nerrors; i++) {
|
||||
if (VIR_STRDUP(val[i].disk, errors[i].disk) < 0)
|
||||
goto error;
|
||||
if (!(val[i].disk = strdup(errors[i].disk)))
|
||||
goto no_memory;
|
||||
val[i].error = errors[i].error;
|
||||
}
|
||||
|
||||
@@ -4835,12 +4842,13 @@ remoteSerializeDomainDiskErrors(virDomainDiskErrorPtr errors,
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
no_memory:
|
||||
if (val) {
|
||||
int j;
|
||||
for (j = 0; j < i; j++)
|
||||
VIR_FREE(val[j].disk);
|
||||
VIR_FREE(val);
|
||||
}
|
||||
virReportOOMError();
|
||||
return -1;
|
||||
}
|
||||
|
@@ -148,14 +148,6 @@ daemonStreamEvent(virStreamPtr st, int events, void *opaque)
|
||||
virNetServerClientClose(client);
|
||||
goto cleanup;
|
||||
}
|
||||
/* If we detected EOF during read processing,
|
||||
* then clear hangup/error conditions, since
|
||||
* we want the client to see the EOF message
|
||||
* we just sent them
|
||||
*/
|
||||
if (stream->recvEOF)
|
||||
events = events & ~(VIR_STREAM_EVENT_HANGUP |
|
||||
VIR_STREAM_EVENT_ERROR);
|
||||
}
|
||||
|
||||
/* If we have a completion/abort message, always process it */
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1>404 page not found</h1>
|
||||
|
||||
|
@@ -1,20 +1,7 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
## Copyright (C) 2005-2013 Red Hat, Inc.
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
## modify it under the terms of the GNU Lesser General Public
|
||||
## License as published by the Free Software Foundation; either
|
||||
## version 2.1 of the License, or (at your option) any later version.
|
||||
##
|
||||
## This library is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
## Lesser General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU Lesser General Public
|
||||
## License along with this library. If not, see
|
||||
## <http://www.gnu.org/licenses/>.
|
||||
## Copyright (C) 2005-2012 Red Hat, Inc.
|
||||
## See COPYING.LIB for the License of this software
|
||||
|
||||
SUBDIRS= schemas
|
||||
|
||||
@@ -162,7 +149,7 @@ todo.html.in: todo.pl
|
||||
|| { rm $@ && exit 1; }; \
|
||||
else \
|
||||
echo "Stubbing $@"; \
|
||||
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\"><body><h1>Todo list unavailable: no config file</h1></body></html>" > $@ ; \
|
||||
echo "<html><body><h1>Todo list</h1></body></html>" > $@ ; \
|
||||
fi
|
||||
|
||||
todo:
|
||||
@@ -184,7 +171,7 @@ internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in
|
||||
echo "Generating $@"; \
|
||||
$(MKDIR_P) internals; \
|
||||
name=`echo $@ | sed -e 's/.tmp//'`; \
|
||||
$(XSLTPROC) --stringparam pagename $$name --nonet \
|
||||
$(XSLTPROC) --stringparam pagename $$name --nonet --html \
|
||||
$(top_srcdir)/docs/subsite.xsl $< > $@ \
|
||||
|| { rm $@ && exit 1; }; fi
|
||||
|
||||
@@ -192,7 +179,7 @@ internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in
|
||||
@if [ -x $(XSLTPROC) ] ; then \
|
||||
echo "Generating $@"; \
|
||||
name=`echo $@ | sed -e 's/.tmp//'`; \
|
||||
$(XSLTPROC) --stringparam pagename $$name --nonet \
|
||||
$(XSLTPROC) --stringparam pagename $$name --nonet --html \
|
||||
$(top_srcdir)/docs/site.xsl $< > $@ \
|
||||
|| { rm $@ && exit 1; }; fi
|
||||
|
||||
@@ -209,7 +196,7 @@ internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in
|
||||
%.php.tmp: %.php.in site.xsl page.xsl sitemap.html.in
|
||||
@if [ -x $(XSLTPROC) ] ; then \
|
||||
echo "Generating $@"; \
|
||||
$(XSLTPROC) --stringparam pagename $(@:.tmp=) --nonet \
|
||||
$(XSLTPROC) --stringparam pagename $(@:.tmp=) --nonet --html \
|
||||
$(top_srcdir)/docs/site.xsl $< > $@ \
|
||||
|| { rm $@ && exit 1; }; fi
|
||||
|
||||
@@ -300,7 +287,6 @@ install-data-local:
|
||||
for file in $(devhelphtml) $(devhelppng) $(devhelpcss); do \
|
||||
$(INSTALL) -m 0644 $(srcdir)/$${file} $(DESTDIR)$(DEVHELP_DIR) ; \
|
||||
done
|
||||
$(INSTALL_DATA) $(srcdir)/libvirtLogo.png $(DESTDIR)$(pkgdatadir)
|
||||
|
||||
uninstall-local:
|
||||
for h in $(apihtml); do rm $(DESTDIR)$(HTML_DIR)/$$h; done
|
||||
|
266
docs/api.html.in
266
docs/api.html.in
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1>The libvirt API concepts</h1>
|
||||
|
||||
@@ -9,28 +8,26 @@
|
||||
|
||||
<ul id="toc"></ul>
|
||||
|
||||
<h2><a name="Objects">Objects Exposed</a></h2>
|
||||
<p> As defined in the <a href="goals.html">goals section</a>, the libvirt
|
||||
API is designed to expose all the resources needed to manage the
|
||||
virtualization support of recent operating systems. The first object
|
||||
manipulated through the API is the <code>virConnectPtr</code>, which
|
||||
represents the connection to a hypervisor. Any application using libvirt
|
||||
is likely to start using the
|
||||
<h2><a name="Objects">Objects exposed</a></h2>
|
||||
<p> As defined in the <a href="goals.html">goals section</a>, libvirt
|
||||
API need to expose all the resources needed to manage the virtualization
|
||||
support of recent operating systems. The first object manipulated though
|
||||
the API is <code>virConnectPtr</code> which represent a connection to
|
||||
an hypervisor. Any application using libvirt is likely to start using the
|
||||
API by calling one of <a href="html/libvirt-libvirt.html#virConnectOpen"
|
||||
>the virConnectOpen functions</a>. You will note that those functions take
|
||||
a name argument which is actually a <a href="uri.html">connection URI</a>
|
||||
to select the right hypervisor to open.
|
||||
A URI is needed to allow remote connections and also select between
|
||||
different possible hypervisors. For example, on a Linux system it may be
|
||||
possible to use both KVM and LinuxContainers on the same node. A NULL
|
||||
name will default to a preselected hypervisor, but it's probably not a
|
||||
a name argument which is actually an URI to select the right hypervisor to
|
||||
open, this is needed to allow remote connections and also select between
|
||||
different possible hypervisors (for example on a Linux system it may be
|
||||
possible to use both KVM and LinuxContainers on the same node). A NULL
|
||||
name will default to a preselected hypervisor but it's probably not a
|
||||
wise thing to do in most cases. See the <a href="uri.html">connection
|
||||
URI</a> page for a full descriptions of the values allowed.</p>
|
||||
<p> Once the application obtains a <code class='docref'>virConnectPtr</code>
|
||||
connection to the hypervisor it can then use it to manage the hypervisor's
|
||||
available domains and related virtualization
|
||||
resources, such as storage and networking. All those are
|
||||
exposed as first class objects and connected to the hypervisor connection
|
||||
<p> Once the application obtained a <code class='docref'>virConnectPtr</code>
|
||||
connection to the
|
||||
hypervisor it can then use it to manage domains and related resources
|
||||
available for virtualization like storage and networking. All those are
|
||||
exposed as first class objects, and connected to the hypervisor connection
|
||||
(and the node or cluster where it is available).</p>
|
||||
<p class="image">
|
||||
<img alt="first class objects exposed by the API"
|
||||
@@ -38,201 +35,92 @@
|
||||
</p>
|
||||
<p> The figure above shows the five main objects exported by the API:</p>
|
||||
<ul>
|
||||
<li><code class='docref'>virConnectPtr</code>
|
||||
<p>Represents the connection to a hypervisor. Use one of the
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a>
|
||||
functions to obtain connection to the hypervisor which is then used
|
||||
as a parameter to other connection API's.</p></li>
|
||||
<li><code class='docref'>virDomainPtr</code>
|
||||
<p>Represents one domain either active or defined (i.e. existing as
|
||||
permanent config file and storage but not currently running on that
|
||||
node). The function <code class='docref'>virConnectListAllDomains</code>
|
||||
lists all the domains for the hypervisor.</p></li>
|
||||
<li><code class='docref'>virNetworkPtr</code>
|
||||
<p>Represents one network either active or defined (i.e. existing
|
||||
as permanent config file and storage but not currently activated).
|
||||
The function <code class='docref'>virConnectListAllNetworks</code>
|
||||
lists all the virtualization networks for the hypervisor.</p></li>
|
||||
<li><code class='docref'>virStorageVolPtr</code>
|
||||
<p>Represents one storage volume generally used
|
||||
<li>virConnectPtr: represent a connection to an hypervisor.</li>
|
||||
<li>virDomainPtr: represent one domain either active or defined (i.e.
|
||||
existing as permanent config file and storage but not currently running
|
||||
on that node). The function <code class='docref'>virConnectListDomains</code>
|
||||
allows to list all the IDs for the domains active on this hypervisor.</li>
|
||||
<li>virNetworkPtr: represent one network either active or defined (i.e.
|
||||
existing as permanent config file and storage but not currently activated.
|
||||
The function <code class='docref'>virConnectListNetworks</code>
|
||||
allows to list all the virtualization networks activated on this node.</li>
|
||||
<li>virStorageVolPtr: represent one storage volume, usually this is used
|
||||
as a block device available to one of the domains. The function
|
||||
<code class="docref">virStorageVolLookupByPath</code> finds
|
||||
the storage volume object based on its path on the node.</p></li>
|
||||
<li><code class='docref'>virStoragePoolPtr</code>
|
||||
<p>Represents a storage pool, which is a logical area
|
||||
used to allocate and store storage volumes. The function
|
||||
<code class='docref'>virConnectListAllStoragePools</code> lists
|
||||
all of the virtualization storage pools on the hypervisor. The function
|
||||
<code class="docref">virStoragePoolLookupByVolume</code> finds
|
||||
the storage pool containing a given storage volume.</p></li>
|
||||
<code class="docref">virStorageVolLookupByPath</code> allows to find
|
||||
the object based on its path on the node.</li>
|
||||
<li>virStoragePoolPtr: represent a storage pool, i.e. a logical area
|
||||
which can be used to allocate and store storage volumes. The function
|
||||
<code class="docref">virStoragePoolLookupByVolume</code> allows to find
|
||||
the storage pool containing a given storage volume.</li>
|
||||
</ul>
|
||||
<p> Most objects manipulated by the library can also be represented using
|
||||
<p> Most object manipulated by the library can also be represented using
|
||||
XML descriptions. This is used primarily to create those object, but is
|
||||
also helpful to modify or save their description back.</p>
|
||||
<p> Domains, networks, and storage pools can be either <code>active</code>
|
||||
<p> Domains, network and storage pools can be either <code>active</code>
|
||||
i.e. either running or available for immediate use, or
|
||||
<code>defined</code> in which case they are inactive but there is
|
||||
a permanent definition available in the system for them. Based on this
|
||||
they can be activated dynamically in order to be used.</p>
|
||||
<p> Most objects can also be named in various ways:</p>
|
||||
thay can be activated dynamically in order to be used.</p>
|
||||
<p> Most kind of object can also be named in various ways:</p>
|
||||
<ul>
|
||||
<li><code>name</code>
|
||||
<p>A user friendly identifier but whose uniqueness
|
||||
cannot be guaranteed between two nodes.</p></li>
|
||||
<li><code>ID</code>
|
||||
<p>A runtime unique identifier
|
||||
provided by the hypervisor for one given activation of the object;
|
||||
however, it becomes invalid once the resource is deactivated.</p></li >
|
||||
<li><code>UUID</code>
|
||||
<p> A 16 byte unique identifier
|
||||
<li>by their <code>name</code>, an user friendly identifier but
|
||||
whose unicity cannot be guaranteed between two nodes.</li>
|
||||
<li>by their <code>ID</code>, which is a runtime unique identifier
|
||||
provided by the hypervisor for one given activation of the object,
|
||||
but it becomes invalid once the resource is deactivated.</li >
|
||||
<li>by their <code>UUID</code>, a 16 bytes unique identifier
|
||||
as defined in <a href="http://www.ietf.org/rfc/rfc4122.txt">RFC 4122</a>,
|
||||
which is guaranteed to be unique for long term usage and across a
|
||||
set of nodes.</p></li>
|
||||
set of nodes.</li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="Functions">Functions and Naming Conventions</a></h2>
|
||||
<h2><a name="Functions">Functions and naming
|
||||
conventions</a></h2>
|
||||
<p> The naming of the functions present in the library is usually
|
||||
composed by a prefix describing the object associated to the function
|
||||
made of a prefix describing the object associated to the function
|
||||
and a verb describing the action on that object.</p>
|
||||
<p> For each first class object you will find APIs
|
||||
<p> For each first class object you will find apis
|
||||
for the following actions:</p>
|
||||
<ul>
|
||||
<li><b>Lookup</b> [...LookupBy...]
|
||||
<p>Used to perform lookups on objects by some type of identifier,
|
||||
such as:</p>
|
||||
<ul>
|
||||
<li><code class='docref'>virDomainLookupByID</code></li>
|
||||
<li><code class='docref'>virDomainLookupByName</code></li>
|
||||
<li><code class='docref'>virDomainLookupByUUID</code></li>
|
||||
<li><code class='docref'>virDomainLookupByUUIDString</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Enumeration</b> [virConnectList..., virConnectNumOf...]
|
||||
<p>Used to enumerate a set of object available to an given
|
||||
hypervisor connection such as:</p>
|
||||
<ul>
|
||||
<li><code class='docref'>virConnectListDomains</code></li>
|
||||
<li><code class='docref'>virConnectNumOfDomains</code></li>
|
||||
<li><code class='docref'>virConnectListNetworks</code></li>
|
||||
<li><code class='docref'>virConnectListStoragePools</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Description</b> [...GetInfo]
|
||||
<p>Generic accessor providing a set of generic information about an
|
||||
object, such as: </p>
|
||||
<ul>
|
||||
<li><code class='docref'>virNodeGetInfo</code></li>
|
||||
<li><code class='docref'>virDomainGetInfo</code></li>
|
||||
<li><code class='docref'>virStoragePoolGetInfo</code></li>
|
||||
<li><code class='docref'>virStorageVolGetInfo</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Accessors</b> [...Get..., ...Set...]
|
||||
<p>Specific accessors used to query or modify data for the given object,
|
||||
such as: </p>
|
||||
<ul>
|
||||
<li><code class='docref'>virConnectGetType</code></li>
|
||||
<li><code class='docref'>virDomainGetMaxMemory</code></li>
|
||||
<li><code class='docref'>virDomainSetMemory</code></li>
|
||||
<li><code class='docref'>virDomainGetVcpus</code></li>
|
||||
<li><code class='docref'>virStoragePoolSetAutostart</code></li>
|
||||
<li><code class='docref'>virNetworkGetBridgeName</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Creation</b> [...Create, ...CreateXML]
|
||||
<p>Used to create and start objects. The ...CreateXML APIs will create
|
||||
the object based on an XML description, while the ...Create APIs will
|
||||
create the object based on existing object pointer, such as: </p>
|
||||
<ul>
|
||||
<li><code class='docref'>virDomainCreate</code></li>
|
||||
<li><code class='docref'>virDomainCreateXML</code></li>
|
||||
<li><code class='docref'>virNetworkCreate</code></li>
|
||||
<li><code class='docref'>virNetworkCreateXML</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Destruction</b> [...Destroy]
|
||||
<p>Used to shutdown or deactivate and destroy objects, such as: </p>
|
||||
<ul>
|
||||
<li><code class='docref'>virDomainDestroy</code></li>
|
||||
<li><code class='docref'>virNetworkDestroy</code></li>
|
||||
<li><code class='docref'>virStoragePoolDestroy</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Lookup</b>:...LookupByName,</li>
|
||||
<li><b>Enumeration</b>:virConnectList... and virConnectNumOf...:
|
||||
those are used to enumerate a set of object available to an given
|
||||
hypervisor connection like:
|
||||
<code class='docref'>virConnectListDomains</code>,
|
||||
<code class='docref'>virConnectNumOfDomains</code>,
|
||||
<code class='docref'>virConnectListNetworks</code>,
|
||||
<code class='docref'>virConnectListStoragePools</code>, etc.</li>
|
||||
<li><b>Description</b>: ...GetInfo: those are generic accessor providing
|
||||
a set of informations about an object, they are
|
||||
<code class='docref'>virNodeGetInfo</code>,
|
||||
<code class='docref'>virDomainGetInfo</code>,
|
||||
<code class='docref'>virStoragePoolGetInfo</code>,
|
||||
<code class='docref'>virStorageVolGetInfo</code>.</li>
|
||||
<li><b>Accessors</b>: ...Get... and ...Set...: those are more specific
|
||||
accessors to query or modify the given object, like
|
||||
<code class='docref'>virConnectGetType</code>,
|
||||
<code class='docref'>virDomainGetMaxMemory</code>,
|
||||
<code class='docref'>virDomainSetMemory</code>,
|
||||
<code class='docref'>virDomainGetVcpus</code>,
|
||||
<code class='docref'>virStoragePoolSetAutostart</code>,
|
||||
<code class='docref'>virNetworkGetBridgeName</code>, etc.</li>
|
||||
<li><b>Creation</b>: </li>
|
||||
<li><b>Destruction</b>: ... </li>
|
||||
</ul>
|
||||
<p> For more in-depth details of the storage related APIs see
|
||||
<a href="storage.html">the storage management page</a>.
|
||||
</p>
|
||||
<h2><a name="Drivers">The libvirt Drivers</a></h2>
|
||||
<p>Drivers are the basic building block for libvirt functionality
|
||||
to support the capability to handle specific hypervisor driver calls.
|
||||
Drivers are discovered and registered during connection processing as
|
||||
part of the <code class='docref'>virInitialize</code> API. Each driver
|
||||
has a registration API which loads up the driver specific function
|
||||
references for the libvirt APIs to call. The following is a simplistic
|
||||
view of the hypervisor driver mechanism. Consider the stacked list of
|
||||
drivers as a series of modules that can be plugged into the architecture
|
||||
depending on how libvirt is configured to be built.</p>
|
||||
<h2><a name="Driver">The libvirt drivers</a></h2>
|
||||
<p></p>
|
||||
<p class="image">
|
||||
<img alt="The libvirt driver architecture"
|
||||
src="libvirt-driver-arch.png"/>
|
||||
</p>
|
||||
<p>The driver architecture is also used to support other virtualization
|
||||
components such as storage, storage pools, host device, networking,
|
||||
network interfaces, and network filters.</p>
|
||||
<p>See the <a href="drivers.html">libvirt drivers</a> page for more
|
||||
information on hypervisor and storage specific drivers.</p>
|
||||
<p>Not all drivers support every virtualization function possible.
|
||||
The <a href="hvsupport.html">libvirt API support matrix</a> lists
|
||||
the various functions and support found in each driver by the version
|
||||
support was added into libvirt.
|
||||
</p>
|
||||
<h2><a name="Remote">Daemon and Remote Access</a></h2>
|
||||
<p>Access to libvirt drivers is primarily handled by the libvirtd
|
||||
daemon through the <a href="remote.html">remote</a> driver via an
|
||||
<a href="internals/rpc.html">RPC</a>. Some hypervisors do support
|
||||
client-side connections and responses, such as Test, OpenVZ, VMware,
|
||||
Power VM (phyp), VirtualBox (vbox), ESX, Hyper-V, Xen, and Parallels.
|
||||
The libvirtd daemon service is started on the host at system boot
|
||||
time and can also be restarted at any time by a properly privileged
|
||||
user, such as root. The libvirtd daemon uses the same libvirt API
|
||||
<code class='docref'>virInitialize</code> sequence as applications
|
||||
for client-side driver registrations, but then extends the registered
|
||||
driver list to encompass all known drivers supported for all driver
|
||||
types supported on the host. </p>
|
||||
<p>The libvirt client <a href="apps.html">applications</a> use a
|
||||
<a href="uri.html">URI</a> to obtain the <code>virConnectPtr</code>.
|
||||
The <code>virConnectPtr</code> keeps track of the driver connection
|
||||
plus a variety of other connections (network, interface, storage, etc.).
|
||||
The <code>virConnectPtr</code> is then used as a parameter to other
|
||||
virtualization <a href="#Functions">functions</a>. Depending upon the
|
||||
driver being used, calls will be routed through the remote driver to
|
||||
the libvirtd daemon. The daemon will reference the connection specific
|
||||
driver in order to retreive the requested information and then pass
|
||||
back status and/or data through the connection back to the application.
|
||||
The application can then decide what to do with that data, such as
|
||||
display, write log data, etc. <a href="migration.html">Migration</a>
|
||||
is an example of many facets of the architecture in use.</p>
|
||||
|
||||
<h2><a name="Remote">Daemon and remote access</a></h2>
|
||||
<p></p>
|
||||
<p class="image">
|
||||
<img alt="The libvirt daemon and remote architecture"
|
||||
src="libvirt-daemon-arch.png"/>
|
||||
</p>
|
||||
<p>
|
||||
The key takeaway from the above diagram is that there is a remote driver
|
||||
which handles transactions for a majority of the drivers. The libvirtd
|
||||
daemon running on the host will receive transaction requests from the
|
||||
remote driver and will then query the hypervisor driver as specified in
|
||||
the <code>virConnectPtr</code> in order to fetch the data. The data will
|
||||
then be returned through the remote driver to the client application
|
||||
for processing.
|
||||
</p>
|
||||
<p>If you are interested in contributing to libvirt, read the
|
||||
<a href="http://wiki.libvirt.org/page/FAQ">FAQ</a> and
|
||||
<a href="hacking.html">hacking</a> guidelines to gain an understanding
|
||||
of basic rules and guidelines. In order to add new API functionality
|
||||
follow the instructions regarding
|
||||
<a href="api_extension.html">implementing a new API in libvirt</a>.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Implementing a new API in Libvirt</h1>
|
||||
|
||||
|
@@ -50,7 +50,6 @@ ignored_words = {
|
||||
}
|
||||
|
||||
ignored_functions = {
|
||||
"virConnectSupportsFeature": "private function for remote access",
|
||||
"virDomainMigrateFinish": "private function for migration",
|
||||
"virDomainMigrateFinish2": "private function for migration",
|
||||
"virDomainMigratePerform": "private function for migration",
|
||||
@@ -63,7 +62,14 @@ ignored_functions = {
|
||||
"virDomainMigratePrepare3": "private function for migration",
|
||||
"virDomainMigrateConfirm3": "private function for migration",
|
||||
"virDomainMigratePrepareTunnel3": "private function for tunnelled migration",
|
||||
"virDrvSupportsFeature": "private function for remote access",
|
||||
"DllMain": "specific function for Win32",
|
||||
"virEventAddHandle": "internal function in virevent.c",
|
||||
"virEventUpdateHandle": "internal function in virevent.c",
|
||||
"virEventRemoveHandle": "internal function in virevent.c",
|
||||
"virEventAddTimeout": "internal function in virevent.c",
|
||||
"virEventUpdateTimeout": "internal function in virevent.c",
|
||||
"virEventRemoveTimeout": "internal function in virevent.c",
|
||||
"virTypedParameterArrayValidate": "internal function in virtypedparam.c",
|
||||
"virTypedParameterAssign": "internal function in virtypedparam.c",
|
||||
"virTypedParameterAssignFromStr": "internal function in virtypedparam.c",
|
||||
@@ -409,7 +415,7 @@ class CLexer:
|
||||
return self.lineno
|
||||
|
||||
def push(self, token):
|
||||
self.tokens.insert(0, token)
|
||||
self.tokens.insert(0, token);
|
||||
|
||||
def debug(self):
|
||||
print "Last token: ", self.last
|
||||
@@ -429,7 +435,7 @@ class CLexer:
|
||||
if line[0] == '#':
|
||||
self.tokens = map((lambda x: ('preproc', x)),
|
||||
string.split(line))
|
||||
break
|
||||
break;
|
||||
l = len(line)
|
||||
if line[0] == '"' or line[0] == "'":
|
||||
end = line[0]
|
||||
@@ -699,7 +705,7 @@ class CParser:
|
||||
if self.top_comment == "":
|
||||
self.top_comment = com
|
||||
if self.comment == None or com[0] == '*':
|
||||
self.comment = com
|
||||
self.comment = com;
|
||||
else:
|
||||
self.comment = self.comment + com
|
||||
token = self.lexer.token()
|
||||
@@ -897,7 +903,7 @@ class CParser:
|
||||
while i < nbargs:
|
||||
if args[i][1] == arg:
|
||||
args[i] = (args[i][0], arg, desc)
|
||||
break
|
||||
break;
|
||||
i = i + 1
|
||||
if i >= nbargs:
|
||||
if not quiet:
|
||||
@@ -1141,10 +1147,10 @@ class CParser:
|
||||
type = type + token[1]
|
||||
token = self.token()
|
||||
elif token != None and token[0] == 'sep' and token[1] == ';':
|
||||
break
|
||||
break;
|
||||
elif token != None and token[0] == 'name':
|
||||
type = base_type
|
||||
continue
|
||||
continue;
|
||||
else:
|
||||
self.error("parsing typedef: expecting ';'", token)
|
||||
return token
|
||||
@@ -1239,7 +1245,7 @@ class CParser:
|
||||
else:
|
||||
self.error("parseStruct: name", token)
|
||||
token = self.token()
|
||||
self.type = base_type
|
||||
self.type = base_type;
|
||||
self.struct_fields = fields
|
||||
#self.debug("end parseStruct", token)
|
||||
#print fields
|
||||
@@ -1289,7 +1295,7 @@ class CParser:
|
||||
else:
|
||||
self.error("parseUnion: name", token)
|
||||
token = self.token()
|
||||
self.type = base_type
|
||||
self.type = base_type;
|
||||
self.union_fields = fields
|
||||
# self.debug("end parseUnion", token)
|
||||
# print fields
|
||||
@@ -1303,7 +1309,7 @@ class CParser:
|
||||
name = None
|
||||
self.comment = None
|
||||
comment = ""
|
||||
value = "0"
|
||||
value = "-1"
|
||||
while token != None:
|
||||
if token[0] == "sep" and token[1] == "{":
|
||||
token = self.token()
|
||||
@@ -1633,7 +1639,7 @@ class CParser:
|
||||
self.type = self.type + token[1]
|
||||
token = self.token()
|
||||
if token == None or token[0] != "name" :
|
||||
self.error("parsing function type, name expected", token)
|
||||
self.error("parsing function type, name expected", token);
|
||||
return token
|
||||
self.type = self.type + token[1]
|
||||
nametok = token
|
||||
@@ -1643,14 +1649,14 @@ class CParser:
|
||||
token = self.token()
|
||||
if token != None and token[0] == "sep" and token[1] == '(':
|
||||
token = self.token()
|
||||
type = self.type
|
||||
token = self.parseSignature(token)
|
||||
self.type = type
|
||||
type = self.type;
|
||||
token = self.parseSignature(token);
|
||||
self.type = type;
|
||||
else:
|
||||
self.error("parsing function type, '(' expected", token)
|
||||
self.error("parsing function type, '(' expected", token);
|
||||
return token
|
||||
else:
|
||||
self.error("parsing function type, ')' expected", token)
|
||||
self.error("parsing function type, ')' expected", token);
|
||||
return token
|
||||
self.lexer.push(token)
|
||||
token = nametok
|
||||
@@ -1675,7 +1681,7 @@ class CParser:
|
||||
self.type = self.type + token[1]
|
||||
token = self.token()
|
||||
else:
|
||||
self.error("parsing array type, ']' expected", token)
|
||||
self.error("parsing array type, ']' expected", token);
|
||||
return token
|
||||
elif token != None and token[0] == "sep" and token[1] == ':':
|
||||
# remove :12 in case it's a limited int size
|
||||
@@ -1904,7 +1910,7 @@ class CParser:
|
||||
self.index_add(self.name, self.filename, static,
|
||||
"function", d)
|
||||
token = self.token()
|
||||
token = self.parseBlock(token)
|
||||
token = self.parseBlock(token);
|
||||
elif token[1] == ',':
|
||||
self.comment = None
|
||||
self.index_add(self.name, self.filename, static,
|
||||
@@ -1956,17 +1962,12 @@ class docBuilder:
|
||||
self.xref = {}
|
||||
self.index = {}
|
||||
self.basename = name
|
||||
self.errors = 0
|
||||
|
||||
def warning(self, msg):
|
||||
global warnings
|
||||
warnings = warnings + 1
|
||||
print msg
|
||||
|
||||
def error(self, msg):
|
||||
self.errors += 1
|
||||
print >>sys.stderr, "Error:", msg
|
||||
|
||||
def indexString(self, id, str):
|
||||
if str == None:
|
||||
return
|
||||
@@ -2014,7 +2015,7 @@ class docBuilder:
|
||||
for header in self.headers.keys():
|
||||
parser = CParser(header)
|
||||
idx = parser.parse()
|
||||
self.headers[header] = idx
|
||||
self.headers[header] = idx;
|
||||
self.idx.merge(idx)
|
||||
|
||||
def scanModules(self):
|
||||
@@ -2032,19 +2033,19 @@ class docBuilder:
|
||||
skip = 1
|
||||
for incl in self.includes:
|
||||
if string.find(file, incl) != -1:
|
||||
skip = 0
|
||||
skip = 0;
|
||||
break
|
||||
if skip == 0:
|
||||
self.modules[file] = None
|
||||
self.modules[file] = None;
|
||||
files = glob.glob(directory + "/*.h")
|
||||
for file in files:
|
||||
skip = 1
|
||||
for incl in self.includes:
|
||||
if string.find(file, incl) != -1:
|
||||
skip = 0
|
||||
skip = 0;
|
||||
break
|
||||
if skip == 0:
|
||||
self.headers[file] = None
|
||||
self.headers[file] = None;
|
||||
self.scanHeaders()
|
||||
self.scanModules()
|
||||
|
||||
@@ -2067,11 +2068,11 @@ class docBuilder:
|
||||
val = eval(info[0])
|
||||
except:
|
||||
val = info[0]
|
||||
output.write(" value='%s'" % (val))
|
||||
output.write(" value='%s'" % (val));
|
||||
if info[2] != None and info[2] != '':
|
||||
output.write(" type='%s'" % info[2])
|
||||
output.write(" type='%s'" % info[2]);
|
||||
if info[1] != None and info[1] != '':
|
||||
output.write(" info='%s'" % escape(info[1]))
|
||||
output.write(" info='%s'" % escape(info[1]));
|
||||
output.write("/>\n")
|
||||
|
||||
def serialize_macro(self, output, name):
|
||||
@@ -2119,7 +2120,7 @@ class docBuilder:
|
||||
if self.idx.structs.has_key(name) and ( \
|
||||
type(self.idx.structs[name].info) == type(()) or
|
||||
type(self.idx.structs[name].info) == type([])):
|
||||
output.write(">\n")
|
||||
output.write(">\n");
|
||||
try:
|
||||
for field in self.idx.structs[name].info:
|
||||
desc = field[2]
|
||||
@@ -2136,7 +2137,7 @@ class docBuilder:
|
||||
self.warning("Failed to serialize struct %s" % (name))
|
||||
output.write(" </struct>\n")
|
||||
else:
|
||||
output.write("/>\n")
|
||||
output.write("/>\n");
|
||||
else :
|
||||
output.write(" <typedef name='%s' file='%s' type='%s'" % (
|
||||
name, self.modulename_file(id.header), id.info))
|
||||
@@ -2176,7 +2177,7 @@ class docBuilder:
|
||||
if apstr != "":
|
||||
apstr = apstr + " && "
|
||||
apstr = apstr + cond
|
||||
output.write(" <cond>%s</cond>\n"% (apstr))
|
||||
output.write(" <cond>%s</cond>\n"% (apstr));
|
||||
try:
|
||||
(ret, params, desc) = id.info
|
||||
output.write(" <info><![CDATA[%s]]></info>\n" % (desc))
|
||||
@@ -2184,8 +2185,6 @@ class docBuilder:
|
||||
if ret[0] != None:
|
||||
if ret[0] == "void":
|
||||
output.write(" <return type='void'/>\n")
|
||||
elif (ret[1] == None or ret[1] == '') and not ignored_functions.has_key(name):
|
||||
self.error("Missing documentation for return of function `%s'" % name)
|
||||
else:
|
||||
output.write(" <return type='%s' info='%s'/>\n" % (
|
||||
ret[0], escape(ret[1])))
|
||||
@@ -2193,17 +2192,13 @@ class docBuilder:
|
||||
for param in params:
|
||||
if param[0] == 'void':
|
||||
continue
|
||||
if (param[2] == None or param[2] == ''):
|
||||
if ignored_functions.has_key(name):
|
||||
output.write(" <arg name='%s' type='%s' info=''/>\n" % (param[1], param[0]))
|
||||
else:
|
||||
self.error("Missing documentation for arg `%s' of function `%s'" % (param[1], name))
|
||||
if param[2] == None:
|
||||
output.write(" <arg name='%s' type='%s' info=''/>\n" % (param[1], param[0]))
|
||||
else:
|
||||
output.write(" <arg name='%s' type='%s' info='%s'/>\n" % (param[1], param[0], escape(param[2])))
|
||||
self.indexString(name, param[2])
|
||||
except:
|
||||
print >>sys.stderr, "Exception:", sys.exc_info()[1]
|
||||
self.warning("Failed to save function %s info: %s" % (name, `id.info`))
|
||||
self.warning("Failed to save function %s info: " % name, `id.info`)
|
||||
output.write(" </%s>\n" % (id.type))
|
||||
|
||||
def serialize_exports(self, output, file):
|
||||
@@ -2388,7 +2383,7 @@ class docBuilder:
|
||||
letter = id[0]
|
||||
output.write(" <letter name='%s'>\n" % (letter))
|
||||
output.write(" <word name='%s'>\n" % (id))
|
||||
tokens = index[id]
|
||||
tokens = index[id];
|
||||
tokens.sort()
|
||||
tok = None
|
||||
for token in tokens:
|
||||
@@ -2467,10 +2462,6 @@ class docBuilder:
|
||||
output.write("</api>\n")
|
||||
output.close()
|
||||
|
||||
if self.errors > 0:
|
||||
print >>sys.stderr, "apibuild.py: %d error(s) encountered during generation" % self.errors
|
||||
sys.exit(3)
|
||||
|
||||
filename = "%s/%s-refs.xml" % (self.path, self.name)
|
||||
if not quiet:
|
||||
print "Saving XML Cross References %s" % (filename)
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Applications using <strong>libvirt</strong></h1>
|
||||
|
||||
@@ -204,13 +202,6 @@
|
||||
<h2><a name="iaas">Infrastructure as a Service (IaaS)</a></h2>
|
||||
|
||||
<dl>
|
||||
<dt><a href="http://cc1.ifj.edu.pl">Cracow Cloud One</a></dt>
|
||||
<dd>The CC1 system provides a complete solution for Private
|
||||
Cloud Computing. An intuitive web access interface with an
|
||||
administration module and simple installation procedure make
|
||||
it easy to benefit from private Cloud Computing technology.
|
||||
</dd>
|
||||
|
||||
<dt><a href="http://www.emotivecloud.net">EMOTIVE Cloud</a></dt>
|
||||
<dd>The EMOTIVE (Elastic Management Of Tasks In Virtualized
|
||||
Environments) middleware allows executing tasks and providing
|
||||
@@ -349,7 +340,6 @@
|
||||
<li>Shows you Systems Inventory (based on Facter) and
|
||||
provides real time information about hosts status based on
|
||||
Puppet reports.</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Domain management architecture</h1>
|
||||
</body>
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1 >libvirt architecture</h1>
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1>Network management architecture</h1>
|
||||
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Node device management architecture</h1>
|
||||
</body>
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Storage management architecture</h1>
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1 >Authentication & access control</h1>
|
||||
<p>
|
||||
@@ -254,15 +253,13 @@ Plugin "gssapiv2" [loaded], API version: 4
|
||||
features: WANT_CLIENT_FIRST|PROXY_AUTHENTICATION|NEED_SERVER_FQDN
|
||||
</pre>
|
||||
<p>
|
||||
Next it is necessary for the administrator of the Kerberos realm to
|
||||
issue a principal for the libvirt server. There needs to be one
|
||||
principal per host running the libvirt daemon. The principal should be
|
||||
named <code>libvirt/full.hostname@KERBEROS.REALM</code>. This is
|
||||
typically done by running the <code>kadmin.local</code> command on the
|
||||
Kerberos server, though some Kerberos servers have alternate ways of
|
||||
setting up service principals. Once created, the principal should be
|
||||
exported to a keytab, copied to the host running the libvirt daemon
|
||||
and placed in <code>/etc/libvirt/krb5.tab</code>
|
||||
Next it is necessary for the administrator of the Kerberos realm to issue a principle
|
||||
for the libvirt server. There needs to be one principle per host running the libvirt
|
||||
daemon. The principle should be named <code>libvirt/full.hostname@KERBEROS.REALM</code>.
|
||||
This is typically done by running the <code>kadmin.local</code> command on the Kerberos
|
||||
server, though some Kerberos servers have alternate ways of setting up service principles.
|
||||
Once created, the principle should be exported to a keytab, copied to the host running
|
||||
the libvirt daemon and placed in <code>/etc/libvirt/krb5.tab</code>
|
||||
</p>
|
||||
<pre>
|
||||
# kadmin.local
|
||||
@@ -284,7 +281,7 @@ kadmin.local: quit
|
||||
</pre>
|
||||
<p>
|
||||
Any client application wishing to connect to a Kerberos enabled libvirt server
|
||||
merely needs to run <code>kinit</code> to gain a user principal. This may well
|
||||
merely needs to run <code>kinit</code> to gain a user principle. This may well
|
||||
be done automatically when a user logs into a desktop session, if PAM is setup
|
||||
to authenticate against Kerberos.
|
||||
</p>
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1 >Bindings for other languages</h1>
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<h1>Bug reporting</h1>
|
||||
|
@@ -1,285 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<body>
|
||||
<h1>Control Groups Resource Management</h1>
|
||||
|
||||
<ul id="toc"></ul>
|
||||
|
||||
<p>
|
||||
The QEMU and LXC drivers make use of the Linux "Control Groups" facility
|
||||
for applying resource management to their virtual machines and containers.
|
||||
</p>
|
||||
|
||||
<h2><a name="requiredControllers">Required controllers</a></h2>
|
||||
|
||||
<p>
|
||||
The control groups filesystem supports multiple "controllers". By default
|
||||
the init system (such as systemd) should mount all controllers compiled
|
||||
into the kernel at <code>/sys/fs/cgroup/$CONTROLLER-NAME</code>. Libvirt
|
||||
will never attempt to mount any controllers itself, merely detect where
|
||||
they are mounted.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The QEMU driver is capable of using the <code>cpuset</code>,
|
||||
<code>cpu</code>, <code>memory</code>, <code>blkio</code> and
|
||||
<code>devices</code> controllers. None of them are compulsory.
|
||||
If any controller is not mounted, the resource management APIs
|
||||
which use it will cease to operate. It is possible to explicitly
|
||||
turn off use of a controller, even when mounted, via the
|
||||
<code>/etc/libvirt/qemu.conf</code> configuration file.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The LXC driver is capable of using the <code>cpuset</code>,
|
||||
<code>cpu</code>, <code>cpuset</code>, <code>freezer</code>,
|
||||
<code>memory</code>, <code>blkio</code> and <code>devices</code>
|
||||
controllers. The <code>cpuset</code>, <code>devices</code>
|
||||
and <code>memory</code> controllers are compulsory. Without
|
||||
them mounted, no containers can be started. If any of the
|
||||
other controllers are not mounted, the resource management APIs
|
||||
which use them will cease to operate.
|
||||
</p>
|
||||
|
||||
<h2><a name="currentLayout">Current cgroups layout</a></h2>
|
||||
|
||||
<p>
|
||||
As of libvirt 1.0.5 or later, the cgroups layout created by libvirt has been
|
||||
simplified, in order to facilitate the setup of resource control policies by
|
||||
administrators / management applications. The layout is based on the concepts of
|
||||
"partitions" and "consumers". Each virtual machine or container is a consumer,
|
||||
and has a corresponding cgroup named <code>$VMNAME.libvirt-{qemu,lxc}</code>.
|
||||
Each consumer is associated with exactly one partition, which also have a
|
||||
corresponding cgroup usually named <code>$PARTNAME.partition</code>. The
|
||||
exceptions to this naming rule are the three top level default partitions,
|
||||
named <code>/system</code> (for system services), <code>/user</code> (for
|
||||
user login sessions) and <code>/machine</code> (for virtual machines and
|
||||
containers). By default every consumer will of course be associated with
|
||||
the <code>/machine</code> partition. This leads to a hierarchy that looks
|
||||
like
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
$ROOT
|
||||
|
|
||||
+- system
|
||||
| |
|
||||
| +- libvirtd.service
|
||||
|
|
||||
+- machine
|
||||
|
|
||||
+- vm1.libvirt-qemu
|
||||
| |
|
||||
| +- emulator
|
||||
| +- vcpu0
|
||||
| +- vcpu1
|
||||
|
|
||||
+- vm2.libvirt-qemu
|
||||
| |
|
||||
| +- emulator
|
||||
| +- vcpu0
|
||||
| +- vcpu1
|
||||
|
|
||||
+- vm3.libvirt-qemu
|
||||
| |
|
||||
| +- emulator
|
||||
| +- vcpu0
|
||||
| +- vcpu1
|
||||
|
|
||||
+- container1.libvirt-lxc
|
||||
|
|
||||
+- container2.libvirt-lxc
|
||||
|
|
||||
+- container3.libvirt-lxc
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
The default cgroups layout ensures that, when there is contention for
|
||||
CPU time, it is shared equally between system services, user sessions
|
||||
and virtual machines / containers. This prevents virtual machines from
|
||||
locking the administrator out of the host, or impacting execution of
|
||||
system services. Conversely, when there is no contention from
|
||||
system services / user sessions, it is possible for virtual machines
|
||||
to fully utilize the host CPUs.
|
||||
</p>
|
||||
|
||||
<h2><a name="customPartiton">Using custom partitions</a></h2>
|
||||
|
||||
<p>
|
||||
If there is a need to apply resource constraints to groups of
|
||||
virtual machines or containers, then the single default
|
||||
partition <code>/machine</code> may not be sufficiently
|
||||
flexible. The administrator may wish to sub-divide the
|
||||
default partition, for example into "testing" and "production"
|
||||
partitions, and then assign each guest to a specific
|
||||
sub-partition. This is achieved via a small element addition
|
||||
to the guest domain XML config, just below the main <code>domain</code>
|
||||
element
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<resource>
|
||||
<partition>/machine/production</partition>
|
||||
</resource>
|
||||
...
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Libvirt will not auto-create the cgroups directory to back
|
||||
this partition. In the future, libvirt / virsh will provide
|
||||
APIs / commands to create custom partitions, but currently
|
||||
this is left as an exercise for the administrator. For
|
||||
example, given the XML config above, the admin would need
|
||||
to create a cgroup named '/machine/production.partition'
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
# cd /sys/fs/cgroup
|
||||
# for i in blkio cpu,cpuacct cpuset devices freezer memory net_cls perf_event
|
||||
do
|
||||
mkdir $i/machine/production.partition
|
||||
done
|
||||
# for i in cpuset.cpus cpuset.mems
|
||||
do
|
||||
cat cpuset/machine/$i > cpuset/machine/production.partition/$i
|
||||
done
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
<strong>Note:</strong> the cgroups directory created as a ".partition"
|
||||
suffix, but the XML config does not require this suffix.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Note:</strong> the ability to place guests in custom
|
||||
partitions is only available with libvirt >= 1.0.5, using
|
||||
the new cgroup layout. The legacy cgroups layout described
|
||||
later did not support customization per guest.
|
||||
</p>
|
||||
|
||||
<h2><a name="resourceAPIs">Resource management APIs/commands</a></h2>
|
||||
|
||||
<p>
|
||||
Since libvirt aims to provide an API which is portable across
|
||||
hypervisors, the concept of cgroups is not exposed directly
|
||||
in the API or XML configuration. It is considered to be an
|
||||
internal implementation detail. Instead libvirt provides a
|
||||
set of APIs for applying resource controls, which are then
|
||||
mapped to corresponding cgroup tunables
|
||||
</p>
|
||||
|
||||
<h3>Scheduler tuning</h3>
|
||||
|
||||
<p>
|
||||
Parameters from the "cpu" controller are exposed via the
|
||||
<code>schedinfo</code> command in virsh.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
# virsh schedinfo demo
|
||||
Scheduler : posix
|
||||
cpu_shares : 1024
|
||||
vcpu_period : 100000
|
||||
vcpu_quota : -1
|
||||
emulator_period: 100000
|
||||
emulator_quota : -1</pre>
|
||||
|
||||
|
||||
<h3>Block I/O tuning</h3>
|
||||
|
||||
<p>
|
||||
Parameters from the "blkio" controller are exposed via the
|
||||
<code>bkliotune</code> command in virsh.
|
||||
</p>
|
||||
|
||||
|
||||
<pre>
|
||||
# virsh blkiotune demo
|
||||
weight : 500
|
||||
device_weight : </pre>
|
||||
|
||||
<h3>Memory tuning</h3>
|
||||
|
||||
<p>
|
||||
Parameters from the "memory" controller are exposed via the
|
||||
<code>memtune</code> command in virsh.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
# virsh memtune demo
|
||||
hard_limit : 580192
|
||||
soft_limit : unlimited
|
||||
swap_hard_limit: unlimited
|
||||
</pre>
|
||||
|
||||
<h3>Network tuning</h3>
|
||||
|
||||
<p>
|
||||
The <code>net_cls</code> is not currently used. Instead traffic
|
||||
filter policies are set directly against individual virtual
|
||||
network interfaces.
|
||||
</p>
|
||||
|
||||
<h2><a name="legacyLayout">Legacy cgroups layout</a></h2>
|
||||
|
||||
<p>
|
||||
Prior to libvirt 1.0.5, the cgroups layout created by libvirt was different
|
||||
from that described above, and did not allow for administrator customization.
|
||||
Libvirt used a fixed, 3-level hierarchy <code>libvirt/{qemu,lxc}/$VMNAME</code>
|
||||
which was rooted at the point in the hierarchy where libvirtd itself was
|
||||
located. So if libvirtd was placed at <code>/system/libvirtd.service</code>
|
||||
by systemd, the groups for each virtual machine / container would be located
|
||||
at <code>/system/libvirtd.service/libvirt/{qemu,lxc}/$VMNAME</code>. In addition
|
||||
to this, the QEMU drivers further child groups for each vCPU thread and the
|
||||
emulator thread(s). This leads to a hierarchy that looked like
|
||||
</p>
|
||||
|
||||
|
||||
<pre>
|
||||
$ROOT
|
||||
|
|
||||
+- system
|
||||
|
|
||||
+- libvirtd.service
|
||||
|
|
||||
+- libvirt
|
||||
|
|
||||
+- qemu
|
||||
| |
|
||||
| +- vm1
|
||||
| | |
|
||||
| | +- emulator
|
||||
| | +- vcpu0
|
||||
| | +- vcpu1
|
||||
| |
|
||||
| +- vm2
|
||||
| | |
|
||||
| | +- emulator
|
||||
| | +- vcpu0
|
||||
| | +- vcpu1
|
||||
| |
|
||||
| +- vm3
|
||||
| |
|
||||
| +- emulator
|
||||
| +- vcpu0
|
||||
| +- vcpu1
|
||||
|
|
||||
+- lxc
|
||||
|
|
||||
+- container1
|
||||
|
|
||||
+- container2
|
||||
|
|
||||
+- container3
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Although current releases are much improved, historically the use of deep
|
||||
hierarchies has had a significant negative impact on the kernel scalability.
|
||||
The legacy libvirt cgroups layout highlighted these problems, to the detriment
|
||||
of the performance of virtual machines and containers.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1><a name="installation">libvirt Installation</a></h1>
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1>Contacting the development team</h1>
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1>C# API bindings</h1>
|
||||
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Deployment</h1>
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1>libvirt Application Development Guide</h1>
|
||||
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Documentation</h1>
|
||||
</body>
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1>Downloads</h1>
|
||||
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Internal drivers</h1>
|
||||
|
||||
@@ -32,7 +30,6 @@
|
||||
<li><strong><a href="drvxen.html">Xen</a></strong></li>
|
||||
<li><strong><a href="drvhyperv.html">Microsoft Hyper-V</a></strong></li>
|
||||
<li><strong><a href="drvphyp.html">IBM PowerVM (phyp)</a></strong></li>
|
||||
<li><strong><a href="drvparallels.html">Parallels</a></strong></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="storage">Storage drivers</a></h2>
|
||||
|
@@ -1,7 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<body>
|
||||
<html><body>
|
||||
<h1>VMware ESX hypervisor driver</h1>
|
||||
<ul id="toc"></ul>
|
||||
<p>
|
||||
|
@@ -1,7 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<body>
|
||||
<html><body>
|
||||
<h1>Microsoft Hyper-V hypervisor driver</h1>
|
||||
<ul id="toc"></ul>
|
||||
<p>
|
||||
|
@@ -1,102 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>LXC container driver</h1>
|
||||
|
||||
<ul id="toc"></ul>
|
||||
|
||||
<p>
|
||||
The libvirt LXC driver manages "Linux Containers". At their simplest, containers
|
||||
can just be thought of as a collection of processes, separated from the main
|
||||
host processes via a set of resource namespaces and constrained via control
|
||||
groups resource tunables. The libvirt LXC driver has no dependency on the LXC
|
||||
userspace tools hosted on sourceforge.net. It directly utilizes the relevant
|
||||
kernel features to build the container environment. This allows for sharing
|
||||
of many libvirt technologies across both the QEMU/KVM and LXC drivers. In
|
||||
particular sVirt for mandatory access control, auditing of operations,
|
||||
integration with control groups and many other features.
|
||||
The libvirt LXC driver manages "Linux Containers". Containers are sets of processes
|
||||
with private namespaces which can (but don't always) look like separate machines, but
|
||||
do not have their own OS. Here are two example configurations. The first is a very
|
||||
light-weight "application container" which does not have its own root image.
|
||||
</p>
|
||||
|
||||
<h2><a name="cgroups">Control groups Requirements</a></h2>
|
||||
<h2><a name="project">Project Links</a></h2>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
The <a href="http://lxc.sourceforge.net/">LXC</a> Linux
|
||||
container system
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>Cgroups Requirements</h2>
|
||||
|
||||
<p>
|
||||
In order to control the resource usage of processes inside containers, the
|
||||
libvirt LXC driver requires that certain cgroups controllers are mounted on
|
||||
the host OS. The minimum required controllers are 'cpuacct', 'memory' and
|
||||
'devices', while recommended extra controllers are 'cpu', 'freezer' and
|
||||
'blkio'. Libvirt will not mount the cgroups filesystem itself, leaving
|
||||
this up to the init system to take care of. Systemd will do the right thing
|
||||
in this respect, while for other init systems the <code>cgconfig</code>
|
||||
init service will be required. For further information, consult the general
|
||||
libvirt <a href="cgroups.html">cgroups documentation</a>.
|
||||
</p>
|
||||
|
||||
<h2><a name="namespaces">Namespace requirements</a></h2>
|
||||
|
||||
<p>
|
||||
In order to separate processes inside a container from those in the
|
||||
primary "host" OS environment, the libvirt LXC driver requires that
|
||||
certain kernel namespaces are compiled in. Libvirt currently requires
|
||||
the 'mount', 'ipc', 'pid', and 'uts' namespaces to be available. If
|
||||
separate network interfaces are desired, then the 'net' namespace is
|
||||
required. In the near future, the 'user' namespace will optionally be
|
||||
supported.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>NOTE: In the absence of support for the 'user' namespace,
|
||||
processes inside containers cannot be securely isolated from host
|
||||
process without the use of a mandatory access control technology
|
||||
such as SELinux or AppArmor.</strong>
|
||||
</p>
|
||||
|
||||
<h2><a name="init">Default container setup</a></h2>
|
||||
|
||||
<h3><a name="cliargs">Command line arguments</a></h3>
|
||||
|
||||
<p>
|
||||
When the container "init" process is started, it will typically
|
||||
not be given any command line arguments (eg the equivalent of
|
||||
the bootloader args visible in <code>/proc/cmdline</code>). If
|
||||
any arguments are desired, then must be explicitly set in the
|
||||
container XML configuration via one or more <code>initarg</code>
|
||||
elements. For example, to run <code>systemd --unit emergency.service</code>
|
||||
would use the following XML
|
||||
The libvirt LXC driver requires that certain cgroups controllers are
|
||||
mounted on the host OS. The minimum required controllers are 'cpuacct',
|
||||
'memory' and 'devices', while recommended extra controllers are
|
||||
'cpu', 'freezer' and 'blkio'. The /etc/cgconfig.conf & cgconfig
|
||||
init service used to mount cgroups at host boot time. To manually
|
||||
mount them use:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<os>
|
||||
<type arch='x86_64'>exe</type>
|
||||
<init>/bin/systemd</init>
|
||||
<initarg>--unit</initarg>
|
||||
<initarg>emergency.service</initarg>
|
||||
</os>
|
||||
# mount -t cgroup cgroup /dev/cgroup -o cpuacct,memory,devices,cpu,freezer,blkio
|
||||
</pre>
|
||||
|
||||
<h3><a name="envvars">Environment variables</a></h3>
|
||||
<p>
|
||||
NB, the blkio controller in some kernels will not allow creation of nested
|
||||
sub-directories which will prevent correct operation of the libvirt LXC
|
||||
driver. On such kernels, it may be necessary to unmount the blkio controller.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>Environment setup for the container init</h2>
|
||||
|
||||
<p>
|
||||
When the container "init" process is started, it will be given several useful
|
||||
environment variables. The following standard environment variables are mandated
|
||||
by <a href="http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface">systemd container interface</a>
|
||||
to be provided by all container technologies on Linux.
|
||||
</p>
|
||||
|
||||
<dl>
|
||||
<dt>container</dt>
|
||||
<dd>The fixed string <code>libvirt-lxc</code> to identify libvirt as the creator</dd>
|
||||
<dt>container_uuid</dt>
|
||||
<dd>The UUID assigned to the container by libvirt</dd>
|
||||
<dt>PATH</dt>
|
||||
<dd>The fixed string <code>/bin:/usr/bin</code></dd>
|
||||
<dt>TERM</dt>
|
||||
<dd>The fixed string <code>linux</code></dd>
|
||||
</dl>
|
||||
|
||||
<p>
|
||||
In addition to the standard variables, the following libvirt specific
|
||||
environment variables are also provided
|
||||
environment variables.
|
||||
</p>
|
||||
|
||||
<dl>
|
||||
@@ -105,152 +52,9 @@ environment variables are also provided
|
||||
<dt>LIBVIRT_LXC_UUID</dt>
|
||||
<dd>The UUID assigned to the container by libvirt</dd>
|
||||
<dt>LIBVIRT_LXC_CMDLINE</dt>
|
||||
<dd>The unparsed command line arguments specified in the container configuration.
|
||||
Use of this is discouraged, in favour of passing arguments directly to the
|
||||
container init process via the <code>initarg</code> config element.</dd>
|
||||
<dd>The unparsed command line arguments specified in the container configuration</dd>
|
||||
</dl>
|
||||
|
||||
<h3><a name="fsmounts">Filesystem mounts</a></h3>
|
||||
|
||||
<p>
|
||||
In the absence of any explicit configuration, the container will
|
||||
inherit the host OS filesystem mounts. A number of mount points will
|
||||
be made read only, or re-mounted with new instances to provide
|
||||
container specific data. The following special mounts are setup
|
||||
by libvirt
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><code>/dev</code> a new "tmpfs" pre-populated with authorized device nodes</li>
|
||||
<li><code>/dev/pts</code> a new private "devpts" instance for console devices</li>
|
||||
<li><code>/sys</code> the host "sysfs" instance remounted read-only</li>
|
||||
<li><code>/proc</code> a new instance of the "proc" filesystem</li>
|
||||
<li><code>/proc/sys</code> the host "/proc/sys" bind-mounted read-only</li>
|
||||
<li><code>/sys/fs/selinux</code> the host "selinux" instance remounted read-only</li>
|
||||
<li><code>/sys/fs/cgroup/NNNN</code> the host cgroups controllers bind-mounted to
|
||||
only expose the sub-tree associated with the container</li>
|
||||
<li><code>/proc/meminfo</code> a FUSE backed file reflecting memory limits of the container</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a name="devnodes">Device nodes</a></h3>
|
||||
|
||||
<p>
|
||||
The container init process will be started with <code>CAP_MKNOD</code>
|
||||
capability removed and blocked from re-acquiring it. As such it will
|
||||
not be able to create any device nodes in <code>/dev</code> or anywhere
|
||||
else in its filesystems. Libvirt itself will take care of pre-populating
|
||||
the <code>/dev</code> filesystem with any devices that the container
|
||||
is authorized to use. The current devices that will be made available
|
||||
to all containers are
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><code>/dev/zero</code></li>
|
||||
<li><code>/dev/null</code></li>
|
||||
<li><code>/dev/full</code></li>
|
||||
<li><code>/dev/random</code></li>
|
||||
<li><code>/dev/urandom</code></li>
|
||||
<li><code>/dev/stdin</code> symlinked to <code>/proc/self/fd/0</code></li>
|
||||
<li><code>/dev/stdout</code> symlinked to <code>/proc/self/fd/1</code></li>
|
||||
<li><code>/dev/stderr</code> symlinked to <code>/proc/self/fd/2</code></li>
|
||||
<li><code>/dev/fd</code> symlinked to <code>/proc/self/fd</code></li>
|
||||
<li><code>/dev/ptmx</code> symlinked to <code>/dev/pts/ptmx</code></li>
|
||||
<li><code>/dev/console</code> symlinked to <code>/dev/pts/0</code></li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
In addition, for every console defined in the guest configuration,
|
||||
a symlink will be created from <code>/dev/ttyN</code> symlinked to
|
||||
the corresponding <code>/dev/pts/M</code> pseudo TTY device. The
|
||||
first console will be <code>/dev/tty1</code>, with further consoles
|
||||
numbered incrementally from there.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Further block or character devices will be made available to containers
|
||||
depending on their configuration.
|
||||
</p>
|
||||
|
||||
<!--
|
||||
<h2>Container configuration</h2>
|
||||
|
||||
<h3>Init process</h3>
|
||||
|
||||
<h3>Console devices</h3>
|
||||
|
||||
<h3>Filesystem devices</h3>
|
||||
|
||||
<h3>Disk devices</h3>
|
||||
|
||||
<h3>Block devices</h3>
|
||||
|
||||
<h3>USB devices</h3>
|
||||
|
||||
<h3>Character devices</h3>
|
||||
|
||||
<h3>Network devices</h3>
|
||||
-->
|
||||
|
||||
<h2>Container security</h2>
|
||||
|
||||
<h3>sVirt SELinux</h3>
|
||||
|
||||
<p>
|
||||
In the absence of the "user" namespace being used, containers cannot
|
||||
be considered secure against exploits of the host OS. The sVirt SELinux
|
||||
driver provides a way to secure containers even when the "user" namespace
|
||||
is not used. The cost is that writing a policy to allow execution of
|
||||
arbitrary OS is not practical. The SELinux sVirt policy is typically
|
||||
tailored to work with an simpler application confinement use case,
|
||||
as provided by the "libvirt-sandbox" project.
|
||||
</p>
|
||||
|
||||
<h3>Auditing</h3>
|
||||
|
||||
<p>
|
||||
The LXC driver is integrated with libvirt's auditing subsystem, which
|
||||
causes audit messages to be logged whenever there is an operation
|
||||
performed against a container which has impact on host resources.
|
||||
So for example, start/stop, device hotplug will all log audit messages
|
||||
providing details about what action occurred and any resources
|
||||
associated with it. There are the following 3 types of audit messages
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><code>VIRT_MACHINE_ID</code> - details of the SELinux process and
|
||||
image security labels assigned to the container.</li>
|
||||
<li><code>VIRT_CONTROL</code> - details of an action / operation
|
||||
performed against a container. There are the following types of
|
||||
operation
|
||||
<ul>
|
||||
<li><code>op=start</code> - a container has been started. Provides
|
||||
the machine name, uuid and PID of the <code>libvirt_lxc</code>
|
||||
controller process</li>
|
||||
<li><code>op=init</code> - the init PID of the container has been
|
||||
started. Provides the machine name, uuid and PID of the
|
||||
<code>libvirt_lxc</code> controller process and PID of the
|
||||
init process (in the host PID namespace)</li>
|
||||
<li><code>op=stop</code> - a container has been stopped. Provides
|
||||
the machine name, uuid</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><code>VIRT_RESOURCE</code> - details of a host resource
|
||||
associated with a container action.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Device access</h3>
|
||||
|
||||
<p>
|
||||
All containers are launched with the CAP_MKNOD capability cleared
|
||||
and removed from the bounding set. Libvirt will ensure that the
|
||||
/dev filesystem is pre-populated with all devices that a container
|
||||
is allowed to use. In addition, the cgroup "device" controller is
|
||||
configured to block read/write/mknod from all devices except those
|
||||
that a container is authorized to use.
|
||||
</p>
|
||||
|
||||
<h2><a name="exconfig">Example configurations</a></h2>
|
||||
|
||||
<h3>Example config version 1</h3>
|
||||
<p></p>
|
||||
@@ -315,158 +119,21 @@ debootstrap, whatever) under /opt/vm-1-root:
|
||||
</domain>
|
||||
</pre>
|
||||
|
||||
|
||||
<h2><a name="usage">Container usage / management</a></h2>
|
||||
|
||||
<p>
|
||||
As with any libvirt virtualization driver, LXC containers can be
|
||||
managed via a wide variety of libvirt based tools. At the lowest
|
||||
level the <code>virsh</code> command can be used to perform many
|
||||
tasks, by passing the <code>-c lxc:///</code> argument. As an
|
||||
alternative to repeating the URI with every command, the <code>LIBVIRT_DEFAULT_URI</code>
|
||||
environment variable can be set to <code>lxc:///</code>. The
|
||||
examples that follow outline some common operations with virsh
|
||||
and LXC. For further details about usage of virsh consult its
|
||||
manual page.
|
||||
</p>
|
||||
|
||||
<h3><a name="usageSave">Defining (saving) container configuration></a></h3>
|
||||
|
||||
<p>
|
||||
The <code>virsh define</code> command takes an XML configuration
|
||||
document and loads it into libvirt, saving the configuration on disk
|
||||
</p>
|
||||
|
||||
In both cases, you can define and start a container using:</p>
|
||||
<pre>
|
||||
# virsh -c lxc:/// define myguest.xml
|
||||
virsh --connect lxc:/// define v1.xml
|
||||
virsh --connect lxc:/// start vm1
|
||||
</pre>
|
||||
|
||||
<h3><a name="usageView">Viewing container configuration</a></h3>
|
||||
|
||||
<p>
|
||||
The <code>virsh dumpxml</code> command can be used to view the
|
||||
current XML configuration of a container. By default the XML
|
||||
output reflects the current state of the container. If the
|
||||
container is running, it is possible to explicitly request the
|
||||
persistent configuration, instead of the current live configuration
|
||||
using the <code>--inactive</code> flag
|
||||
</p>
|
||||
|
||||
and then get a console using:
|
||||
<pre>
|
||||
# virsh -c lxc:/// dumpxml myguest
|
||||
virsh --connect lxc:/// console vm1
|
||||
</pre>
|
||||
|
||||
<h3><a name="usageStart">Starting containers</a></h3>
|
||||
|
||||
<p>
|
||||
The <code>virsh start</code> command can be used to start a
|
||||
container from a previously defined persistent configuration
|
||||
<p>Now doing 'ps -ef' will only show processes in the container, for
|
||||
instance. You can undefine it using
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
# virsh -c lxc:/// start myguest
|
||||
virsh --connect lxc:/// undefine vm1
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
It is also possible to start so called "transient" containers,
|
||||
which do not require a persistent configuration to be saved
|
||||
by libvirt, using the <code>virsh create</code> command.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
# virsh -c lxc:/// create myguest.xml
|
||||
</pre>
|
||||
|
||||
|
||||
<h3><a name="usageStop">Stopping containers</a></h3>
|
||||
|
||||
<p>
|
||||
The <code>virsh shutdown</code> command can be used
|
||||
to request a graceful shutdown of the container. By default
|
||||
this command will first attempt to send a message to the
|
||||
init process via the <code>/dev/initctl</code> device node.
|
||||
If no such device node exists, then it will send SIGTERM
|
||||
to PID 1 inside the container.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
# virsh -c lxc:/// shutdown myguest
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
If the container does not respond to the graceful shutdown
|
||||
request, it can be forceably stopped using the <code>virsh destroy</code>
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
# virsh -c lxc:/// destroy myguest
|
||||
</pre>
|
||||
|
||||
|
||||
<h3><a name="usageReboot">Rebooting a container</a></h3>
|
||||
|
||||
<p>
|
||||
The <code>virsh reboot</code> command can be used
|
||||
to request a graceful shutdown of the container. By default
|
||||
this command will first attempt to send a message to the
|
||||
init process via the <code>/dev/initctl</code> device node.
|
||||
If no such device node exists, then it will send SIGHUP
|
||||
to PID 1 inside the container.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
# virsh -c lxc:/// reboot myguest
|
||||
</pre>
|
||||
|
||||
<h3><a name="usageDelete">Undefining (deleting) a container configuration</a></h3>
|
||||
|
||||
<p>
|
||||
The <code>virsh undefine</code> command can be used to delete the
|
||||
persistent configuration of a container. If the guest is currently
|
||||
running, this will turn it into a "transient" guest.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
# virsh -c lxc:/// undefine myguest
|
||||
</pre>
|
||||
|
||||
<h3><a name="usageConnect">Connecting to a container console</a></h3>
|
||||
|
||||
<p>
|
||||
The <code>virsh console</code> command can be used to connect
|
||||
to the text console associated with a container. If the container
|
||||
has been configured with multiple console devices, then the
|
||||
<code>--devname</code> argument can be used to choose the
|
||||
console to connect to
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
# virsh -c lxc:/// console myguest
|
||||
</pre>
|
||||
|
||||
<h3><a name="usageEnter">Running commands in a container</a></h3>
|
||||
|
||||
<p>
|
||||
The <code>virsh lxc-enter-namespace</code> command can be used
|
||||
to enter the namespaces and security context of a container
|
||||
and then execute an arbitrary command.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
# virsh -c lxc:/// lxc-enter-namespace myguest -- /bin/ls -al /dev
|
||||
</pre>
|
||||
|
||||
<h3><a name="usageTop">Monitoring container utilization</a></h3>
|
||||
|
||||
<p>
|
||||
The <code>virt-top</code> command can be used to monitor the
|
||||
activity and resource utilization of all containers on a
|
||||
host
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
# virt-top -c lxc:///
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html> <!-- -*- html -*- -->
|
||||
<body>
|
||||
<h1>OpenVZ container driver</h1>
|
||||
|
||||
|
@@ -1,7 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<body>
|
||||
<html><body>
|
||||
<h1>Parallels Cloud Server driver</h1>
|
||||
<ul id="toc"></ul>
|
||||
<p>
|
||||
|
@@ -1,7 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<body>
|
||||
<html><body>
|
||||
<h1>IBM PowerVM hypervisor driver (phyp)</h1>
|
||||
<ul id="toc"></ul>
|
||||
<p>
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>KVM/QEMU hypervisor driver</h1>
|
||||
|
||||
@@ -19,7 +17,6 @@
|
||||
<li>
|
||||
The <a href="http://www.linux-kvm.org/">KVM</a> Linux
|
||||
hypervisor
|
||||
</li>
|
||||
<li>
|
||||
The <a href="http://wiki.qemu.org/Index.html">QEMU</a> emulator
|
||||
</li>
|
||||
@@ -560,7 +557,6 @@ $ virsh domxml-to-native qemu-argv demo.xml
|
||||
possible to add an element <code><qemu:commandline></code>
|
||||
under <code>driver</code>, with the following sub-elements
|
||||
repeated as often as needed:
|
||||
</p>
|
||||
<dl>
|
||||
<dt><code>qemu:arg</code></dt>
|
||||
<dd>Add an additional command-line argument to the qemu
|
||||
@@ -573,6 +569,7 @@ $ virsh domxml-to-native qemu-argv demo.xml
|
||||
pair recorded in the attributes <code>name</code>
|
||||
and optional <code>value</code>.</dd>
|
||||
</dl>
|
||||
|
||||
<p>Example:</p><pre>
|
||||
<domain type='qemu' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
|
||||
<name>QEmu-fedora-i686</name>
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Remote management driver</h1>
|
||||
</body>
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Test "mock" driver</h1>
|
||||
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>User Mode Linux driver</h1>
|
||||
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>VirtualBox hypervisor driver</h1>
|
||||
<p>
|
||||
@@ -31,18 +29,6 @@ vbox+tcp://user@example.com/session (remote access, SASl/Kerberos)
|
||||
vbox+ssh://user@example.com/session (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
<strong>NOTE: as of libvirt 1.0.6, the VirtualBox driver will always
|
||||
run inside the libvirtd daemon, instead of being built-in to the
|
||||
libvirt.so library directly. This change was required due to the
|
||||
fact that VirtualBox code is LGPLv2-only licensed, which is not
|
||||
compatible with the libvirt.so license of LGPLv2-or-later. The
|
||||
daemon will be auto-started when the first connection to VirtualBox
|
||||
is requested. This change also means that it will not be possible
|
||||
to use VirtualBox URIs on the Windows platform, until additional
|
||||
work is completed to get the libvirtd daemon working there.</strong>
|
||||
</p>
|
||||
|
||||
<h2><a name="xmlconfig">Example domain XML config</a></h2>
|
||||
|
||||
<pre>
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>VMware Workstation / Player hypervisors driver</h1>
|
||||
<p>
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Xen hypervisor driver</h1>
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1 >Handling of errors</h1>
|
||||
<p>The main goals of libvirt when it comes to error handling are:</p>
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1 >Firewall and network filtering in libvirt</h1>
|
||||
<p>There are three pieces of libvirt functionality which do network
|
||||
|
@@ -1,5 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<?xml version="1.0"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<body>
|
||||
<h1 >XML Format</h1>
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Driver capabilities XML format</h1>
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Network XML format</h1>
|
||||
|
||||
@@ -138,39 +136,6 @@
|
||||
network, and to/from the host to the guests, are
|
||||
unrestricted and not NATed.<span class="since">Since
|
||||
0.4.2</span>
|
||||
|
||||
<p><span class="since">Since 1.0.3</span> it is possible to
|
||||
specify a public IPv4 address and port range to be used for
|
||||
the NAT by using the <code><nat></code> subelement.
|
||||
The address range is set with the <code><address></code>
|
||||
subelements and <code>start</code> and <code>stop</code>
|
||||
attributes:
|
||||
</p>
|
||||
<pre>
|
||||
...
|
||||
<forward mode='nat'>
|
||||
<nat>
|
||||
<address start='1.2.3.4' end='1.2.3.10'/>
|
||||
</nat>
|
||||
</forward>
|
||||
...</pre>
|
||||
<p>
|
||||
An singe IPv4 address can be set by setting
|
||||
<code>start</code> and <code>end</code> attributes to
|
||||
the same value.
|
||||
</p>
|
||||
<p>
|
||||
The port range to be used for the <code><nat></code> can
|
||||
be set via the subelement <code><port></code>:
|
||||
</p>
|
||||
<pre>
|
||||
...
|
||||
<forward mode='nat'>
|
||||
<nat>
|
||||
<port start='500' end='1000'/>
|
||||
</nat>
|
||||
</forward>
|
||||
...</pre>
|
||||
</dd>
|
||||
|
||||
<dt><code>route</code></dt>
|
||||
@@ -281,20 +246,6 @@
|
||||
use the traditional <code>< hostdev></code> device
|
||||
definition. <span class="since"> Since 0.10.0</span>
|
||||
|
||||
<p>
|
||||
To use VFIO device assignment rather than
|
||||
traditional/legacy KVM device assignment (VFIO is a new
|
||||
method of device assignment that is compatible with UEFI
|
||||
Secure Boot), a <forward type='hostdev'> interface
|
||||
can have an optional <code>driver</code> sub-element
|
||||
with a <code>name</code> attribute set to "vfio". To use
|
||||
legacy KVM device assignment you can
|
||||
set <code>name</code> to "kvm" (or simply omit the
|
||||
<driver> element, since "kvm" is currently the
|
||||
default).
|
||||
<span class="since">Since 1.0.5 (QEMU and KVM only, requires kernel 3.6 or newer)</span>
|
||||
</p>
|
||||
|
||||
<p>Note that this "intelligent passthrough" of network
|
||||
devices is very similar to the functionality of a
|
||||
standard <code>< hostdev></code> device, the
|
||||
@@ -376,7 +327,6 @@
|
||||
<pre>
|
||||
...
|
||||
<forward mode='hostdev' managed='yes'>
|
||||
<driver name='vfio'/>
|
||||
<address type='pci' domain='0' bus='4' slot='0' function='1'/>
|
||||
<address type='pci' domain='0' bus='4' slot='0' function='2'/>
|
||||
<address type='pci' domain='0' bus='4' slot='0' function='3'/>
|
||||
@@ -546,62 +496,6 @@
|
||||
starting.
|
||||
</p>
|
||||
|
||||
<h5><a name="elementsStaticroute">Static Routes</a></h5>
|
||||
<p>
|
||||
Static route definitions are used to provide routing information
|
||||
to the virtualization host for networks which are not directly
|
||||
reachable from the virtualization host, but *are* reachable from
|
||||
a guest domain that is itself reachable from the
|
||||
host <span class="since">since 1.0.6</span>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
As shown in <a href="formatnetwork.html#examplesNoGateway">this
|
||||
example</a>, it is possible to define a virtual network
|
||||
interface with no IPv4 or IPv6 addresses. Such networks are
|
||||
useful to provide host connectivity to networks which are only
|
||||
reachable via a guest. A guest with connectivity both to the
|
||||
guest-only network and to another network that is directly
|
||||
reachable from the host can act as a gateway between the
|
||||
networks. A static route added to the "host-visible" network
|
||||
definition provides the routing information so that IP packets
|
||||
can be sent from the virtualization host to guests on the hidden
|
||||
network.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Here is a fragment of a definition which shows the static
|
||||
route specification as well as the IPv4 and IPv6 definitions
|
||||
for network addresses which are referred to in the
|
||||
<code>gateway</code> gateway address specifications. Note
|
||||
that the third static route specification includes the
|
||||
<code>metric</code> attribute specification with a value of 2.
|
||||
This particular route would *not* be preferred if there was
|
||||
another existing rout on the system with the same address and
|
||||
prefix but with a lower value for the metric. If there is a
|
||||
route in the host system configuration that should be overriden
|
||||
by a route in a virtual network whenever the virtual network is
|
||||
running, the configuration for the system-defined route should
|
||||
be modified to have a higher metric, and the route on the
|
||||
virtual network given a lower metric (for example, the default
|
||||
metric of "1").
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<ip address="192.168.122.1" netmask="255.255.255.0">
|
||||
<dhcp>
|
||||
<range start="192.168.122.128" end="192.168.122.254" />
|
||||
</dhcp>
|
||||
</ip>
|
||||
<route address="192.168.222.0" prefix="24" gateway="192.168.122.2" />
|
||||
<ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64" />
|
||||
<route family="ipv6" address="2001:db8:ca2:3::" prefix="64" gateway="2001:db8:ca2:2::2"/>
|
||||
<route family="ipv6" address="2001:db9:4:1::" prefix="64" gateway="2001:db8:ca2:2::3" metric='2'>
|
||||
</route>
|
||||
...
|
||||
</pre>
|
||||
|
||||
<h3><a name="elementsAddress">Addressing</a></h3>
|
||||
|
||||
<p>
|
||||
@@ -633,7 +527,6 @@
|
||||
</dhcp>
|
||||
</ip>
|
||||
<ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64" />
|
||||
<route family="ipv6" address="2001:db9:ca1:1::" prefix="64" gateway="2001:db8:ca2:2::2" />
|
||||
</network></pre>
|
||||
|
||||
<dl>
|
||||
@@ -854,13 +747,8 @@
|
||||
</network></pre>
|
||||
|
||||
<p>
|
||||
Below is another IPv6 variation. Instead of a dhcp range being
|
||||
Below is another IPv6 varition. Instead of a dhcp range being
|
||||
specified, this example has a couple of IPv6 host definitions.
|
||||
Note that most of the dhcp host definitions use an "id" (client
|
||||
id or DUID) since this has proven to be a more reliable way
|
||||
of specifying the interface and its association with an IPv6
|
||||
address. The first is a DUID-LLT, the second a DUID-LL, and
|
||||
the third a DUID-UUID. <span class="since">Since 1.0.3</span>
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
@@ -876,40 +764,11 @@
|
||||
<ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64" >
|
||||
<dhcp>
|
||||
<host name="paul" ip="2001:db8:ca2:2:3::1" />
|
||||
<host id="0:1:0:1:18:aa:62:fe:0:16:3e:44:55:66" ip="2001:db8:ca2:2:3::2" />
|
||||
<host id="0:3:0:1:0:16:3e:11:22:33" name="ralph" ip="2001:db8:ca2:2:3::3" />
|
||||
<host id="0:4:7e:7d:f0:7d:a8:bc:c5:d2:13:32:11:ed:16:ea:84:63" name="badbob" ip="2001:db8:ca2:2:3::4" />
|
||||
<host name="bob" ip="2001:db8:ca2:2:3::2" />
|
||||
</dhcp>
|
||||
</ip>
|
||||
</network></pre>
|
||||
|
||||
<p>
|
||||
Below is yet another IPv6 variation. This variation has only
|
||||
IPv6 defined with DHCPv6 on the primary IPv6 network. A static
|
||||
link if defined for a second IPv6 network which will not be
|
||||
directly visible on the bridge interface but there will be a
|
||||
static route defined for this network via the specified
|
||||
gateway. Note that the gateway address must be directly
|
||||
reachable via (on the same subnet as) one of the <ip>
|
||||
addresses defined for this <network>.
|
||||
<span class="since">Since 1.0.6</span>
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<network>
|
||||
<name>net7</name>
|
||||
<bridge name="virbr7" />
|
||||
<forward mode="route"/>
|
||||
<ip family="ipv6" address="2001:db8:ca2:7::1" prefix="64" >
|
||||
<dhcp>
|
||||
<range start="2001:db8:ca2:7::100" end="2001:db8:ca2::1ff" />
|
||||
<host id="0:4:7e:7d:f0:7d:a8:bc:c5:d2:13:32:11:ed:16:ea:84:63" name="lucas" ip="2001:db8:ca2:2:3::4" />
|
||||
</dhcp>
|
||||
</ip>
|
||||
<route family="ipv6" address="2001:db8:ca2:8::" prefix="64" gateway="2001:db8:ca2:7::4" >
|
||||
</route>
|
||||
</network></pre>
|
||||
|
||||
<h3><a name="examplesPrivate">Isolated network config</a></h3>
|
||||
|
||||
<p>
|
||||
@@ -936,11 +795,6 @@
|
||||
|
||||
<p>
|
||||
This variation of an isolated network defines only IPv6.
|
||||
Note that most of the dhcp host definitions use an "id" (client
|
||||
id or DUID) since this has proven to be a more reliable way
|
||||
of specifying the interface and its association with an IPv6
|
||||
address. The first is a DUID-LLT, the second a DUID-LL, and
|
||||
the third a DUID-UUID. <span class="since">Since 1.0.3</span>
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
@@ -950,9 +804,7 @@
|
||||
<ip family="ipv6" address="2001:db8:ca2:6::1" prefix="64" >
|
||||
<dhcp>
|
||||
<host name="peter" ip="2001:db8:ca2:6:6::1" />
|
||||
<host id="0:1:0:1:18:aa:62:fe:0:16:3e:44:55:66" ip="2001:db8:ca2:6:6::2" />
|
||||
<host id="0:3:0:1:0:16:3e:11:22:33" name="dariusz" ip="2001:db8:ca2:6:6::3" />
|
||||
<host id="0:4:7e:7d:f0:7d:a8:bc:c5:d2:13:32:11:ed:16:ea:84:63" name="anita" ip="2001:db8:ca2:6:6::4" />
|
||||
<host name="dariusz" ip="2001:db8:ca2:6:6::2" />
|
||||
</dhcp>
|
||||
</ip>
|
||||
</network></pre>
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Node devices XML format</h1>
|
||||
|
||||
@@ -138,13 +136,9 @@
|
||||
<dd>The SCSI host number.</dd>
|
||||
<dt><code>capability</code></dt>
|
||||
<dd>Current capabilities include "vports_ops" (indicates
|
||||
vport operations are supported) and "fc_host". "vport_ops"
|
||||
could contain two optional sub-elements: <code>vports</code>,
|
||||
and <code>max_vports</code>. <code>vports</code> shows the
|
||||
number of vport in use. <code>max_vports</code> shows the
|
||||
maximum vports the HBA supports. "fc_host" implies following
|
||||
sub-elements: <code>wwnn</code>, <code>wwpn</code>, and
|
||||
<code>fabric_wwn</code>.
|
||||
vport operations are supported) and "fc_host", the later
|
||||
implies following sub-elements: <code>wwnn</code>,
|
||||
<code>wwpn</code>, <code>fabric_wwn</code>.
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Network Filters</h1>
|
||||
|
||||
@@ -115,7 +113,7 @@
|
||||
<p>
|
||||
Filtering rules are organized in filter chains. These chains can be
|
||||
thought of as having a tree structure with packet
|
||||
filtering rules as entries in individual chains (branches). <br/>
|
||||
filtering rules as entries in individual chains (branches). <br>
|
||||
Packets start their filter evaluation in the <code>root</code> chain
|
||||
and can then continue their evaluation in other chains, return from
|
||||
those chains back into the <code>root</code> chain or be
|
||||
@@ -229,7 +227,7 @@
|
||||
<p>
|
||||
A chain with a lower priority value is accessed before one with a
|
||||
higher value.
|
||||
<br/>
|
||||
<br><br>
|
||||
<span class="since">Since 0.9.8</span> the above listed chains
|
||||
can be assigned custom priorities by writing a value in the
|
||||
range [-1000, 1000] into the priority (XML) attribute in the filter
|
||||
@@ -372,7 +370,7 @@
|
||||
<p>
|
||||
Further, the notation of $VARIABLE is short-hand for $VARIABLE[@0]. The
|
||||
former notation always assumes the iterator with Id '0'.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
<h3><a name="nwfelemsRulesAdvIPAddrDetection">Automatic IP address detection</a></h3>
|
||||
<p>
|
||||
@@ -396,7 +394,7 @@
|
||||
When a VM is migrated to another host or resumed after a suspend operation,
|
||||
the first packet sent by the VM will again determine the IP address it can
|
||||
use on a particular interface.
|
||||
<br/>
|
||||
<br/><br>
|
||||
A value of <code>dhcp</code> specifies that libvirt should only honor DHCP
|
||||
server-assigned addresses with valid leases. This method supports the detection
|
||||
and usage of multiple IP address per interface.
|
||||
@@ -569,7 +567,7 @@
|
||||
(matching the rule passes this filter, but returns control to
|
||||
the calling filter for further
|
||||
analysis) <span class="since">(since 0.9.7)</span>,
|
||||
or <code>continue</code> (matching the rule goes on to the next
|
||||
or <code>continue<code> (matching the rule goes on to the next
|
||||
rule for further analysis) <span class="since">(since
|
||||
0.9.7)</span>.
|
||||
</li>
|
||||
@@ -587,7 +585,7 @@
|
||||
<span class="since">Since 0.9.8</span> this has been extended to cover
|
||||
the range of -1000 to 1000. If this attribute is not
|
||||
provided, priority 500 will automatically be assigned.
|
||||
<br/>
|
||||
<br>
|
||||
Note that filtering rules in the <code>root</code> chain are sorted
|
||||
with filters connected to the <code>root</code> chain following
|
||||
their priorities. This allows to interleave filtering rules with
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Secret XML format</h1>
|
||||
|
||||
@@ -41,8 +39,8 @@
|
||||
<dd>
|
||||
Specifies what this secret is used for. A mandatory
|
||||
<code>type</code> attribute specifies the usage category, currently
|
||||
only <code>volume</code>, <code>ceph</code> and <code>iscsi</code>
|
||||
are defined. Specific usage categories are described below.
|
||||
only <code>volume</code> and <code>ceph</code> are defined.
|
||||
Specific usage categories are described below.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@@ -64,22 +62,10 @@
|
||||
a single <code>name</code> element that specifies a usage name
|
||||
for the secret. The Ceph secret can then be used by UUID or by
|
||||
this usage name via the <code><auth></code> element of
|
||||
a <a href="formatdomain.html#elementsDisks">disk
|
||||
a <a href="domain.html#elementsDisks">disk
|
||||
device</a>. <span class="since">Since 0.9.7</span>.
|
||||
</p>
|
||||
|
||||
<h3>Usage type "iscsi"</h3>
|
||||
|
||||
<p>
|
||||
This secret is associated with an iSCSI target for CHAP authentication.
|
||||
The <code><usage type='iscsi'></code> element must contain
|
||||
a single <code>target</code> element that specifies a usage name
|
||||
for the secret. The iSCSI secret can then be used by UUID or by
|
||||
this usage name via the <code><auth></code> element of
|
||||
a <a href="formatdomain.html#elementsDisks">disk
|
||||
device</a>. <span class="since">Since 1.0.4</span>.
|
||||
</p>
|
||||
|
||||
<h2><a name="example">Example</a></h2>
|
||||
|
||||
<pre>
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Snapshot XML format</h1>
|
||||
|
||||
@@ -148,9 +146,8 @@
|
||||
the <a href="formatdomain.html#elementsDisks">disk
|
||||
devices</a> specified for the domain at the time of the
|
||||
snapshot. The attribute <code>snapshot</code> is
|
||||
optional, and the possible values are the same as the
|
||||
<code>snapshot</code> attribute for
|
||||
<a href="formatdomain.html#elementsDisks">disk devices</a>
|
||||
optional, and has the same values of the disk device
|
||||
element for a domain
|
||||
(<code>no</code>, <code>internal</code>,
|
||||
or <code>external</code>). Some hypervisors like ESX
|
||||
require that if specified, the snapshot mode must not
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Storage pool and volume XML format</h1>
|
||||
|
||||
@@ -77,14 +75,6 @@
|
||||
</source>
|
||||
...</pre>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<source>
|
||||
<source>
|
||||
<adapter type='fc_host' parent='scsi_host5' wwnn='20000000c9831b4b' wwpn='10000000c9831b4b'/>
|
||||
</source>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>device</code></dt>
|
||||
<dd>Provides the source for pools backed by physical devices.
|
||||
@@ -94,27 +84,12 @@
|
||||
<dt><code>directory</code></dt>
|
||||
<dd>Provides the source for pools backed by directories. May
|
||||
only occur once. Contains a single attribute <code>path</code>
|
||||
which is the fully qualified path to the backing directory.
|
||||
which is the fully qualified path to the block device node.
|
||||
<span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>adapter</code></dt>
|
||||
<dd>Provides the source for pools backed by SCSI adapters. May
|
||||
only occur once. Attribute <code>name</code> is the SCSI adapter
|
||||
name (ex. "scsi_host1". NB, although a name such as "host1" is
|
||||
still supported for backwards compatibility, it is not recommended).
|
||||
Attribute <code>type</code> (<span class="since">1.0.5</span>)
|
||||
specifies the adapter type. Valid values are "fc_host" and "scsi_host".
|
||||
If omitted and the <code>name</code> attribute is specified, then it
|
||||
defaults to "scsi_host". To keep backwards compatibility, the attribute
|
||||
<code>type</code> is optional for the "scsi_host" adapter, but
|
||||
mandatory for the "fc_host" adapter. Attributes <code>wwnn</code>
|
||||
(Word Wide Node Name) and <code>wwpn</code> (Word Wide Port Name)
|
||||
(<span class="since">1.0.4</span>) are used by the "fc_host" adapter
|
||||
to uniquely identify the device in the Fibre Channel storage fabric
|
||||
(the device can be either a HBA or vHBA). Both wwnn and wwpn should
|
||||
be specified (See command 'virsh nodedev-dumpxml' to known how to get
|
||||
wwnn/wwpn of a (v)HBA). The optional attribute <code>parent</code>
|
||||
(<span class="since">1.0.4</span>) specifies the parent device for
|
||||
the "fc_host" adapter.
|
||||
only occur once. Contains a single attribute <code>name</code>
|
||||
which is the SCSI adapter name (ex. "host1").
|
||||
<span class="since">Since 0.6.2</span></dd>
|
||||
<dt><code>host</code></dt>
|
||||
<dd>Provides the source for pools backed by storage from a
|
||||
@@ -126,7 +101,7 @@
|
||||
<dt><code>name</code></dt>
|
||||
<dd>Provides the source for pools backed by storage from a
|
||||
named element (e.g., a logical volume group name).
|
||||
Contains a string identifier.
|
||||
remote server. Contains a string identifier.
|
||||
<span class="since">Since 0.4.5</span></dd>
|
||||
<dt><code>format</code></dt>
|
||||
<dd>Provides information about the format of the pool. This
|
||||
@@ -275,11 +250,7 @@
|
||||
allocated at time of creation. If set to a value smaller than the
|
||||
capacity, the pool has the <strong>option</strong> of deciding
|
||||
to sparsely allocate a volume. It does not have to honour requests
|
||||
for sparse allocation though. Different types of pools may treat
|
||||
sparse volumes differently. For example, the <code>logical</code>
|
||||
pool will not automatically expand volume's allocation when it
|
||||
gets full; the user is responsible for doing that or configuring
|
||||
dmeventd to do so automatically.<br/>
|
||||
for sparse allocation though.<br/>
|
||||
<br/>
|
||||
By default this is specified in bytes, but an optional attribute
|
||||
<code>unit</code> can be specified to adjust the passed value.
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Storage volume encryption XML format</h1>
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1>Terminology and goals</h1>
|
||||
<p>To avoid ambiguity about the terms used, here are the definitions
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Contributor guidelines</h1>
|
||||
|
||||
@@ -111,9 +109,8 @@
|
||||
make syntax-check
|
||||
make -C tests valgrind
|
||||
</pre>
|
||||
<p><a href="http://valgrind.org/">Valgrind</a> is a test that checks
|
||||
for memory management issues, such as leaks or use of uninitialized
|
||||
variables.
|
||||
<p>
|
||||
The latter test checks for memory leaks.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -137,96 +134,7 @@
|
||||
<p>There is also a <code>./run</code> script at the top level,
|
||||
to make it easier to run programs that have not yet been
|
||||
installed, as well as to wrap invocations of various tests
|
||||
under gdb or Valgrind.
|
||||
</p>
|
||||
|
||||
</li>
|
||||
<li><p>The Valgrind test should produce similar output to
|
||||
<code>make check</code>. If the output has traces within libvirt
|
||||
API's, then investigation is required in order to determine the
|
||||
cause of the issue. Output such as the following indicates some
|
||||
sort of leak:
|
||||
</p>
|
||||
<pre>
|
||||
==5414== 4 bytes in 1 blocks are definitely lost in loss record 3 of 89
|
||||
==5414== at 0x4A0881C: malloc (vg_replace_malloc.c:270)
|
||||
==5414== by 0x34DE0AAB85: xmlStrndup (in /usr/lib64/libxml2.so.2.7.8)
|
||||
==5414== by 0x4CC97A6: virDomainVideoDefParseXML (domain_conf.c:7410)
|
||||
==5414== by 0x4CD581D: virDomainDefParseXML (domain_conf.c:10188)
|
||||
==5414== by 0x4CD8C73: virDomainDefParseNode (domain_conf.c:10640)
|
||||
==5414== by 0x4CD8DDB: virDomainDefParse (domain_conf.c:10590)
|
||||
==5414== by 0x41CB1D: testCompareXMLToArgvHelper (qemuxml2argvtest.c:100)
|
||||
==5414== by 0x41E20F: virtTestRun (testutils.c:161)
|
||||
==5414== by 0x41C7CB: mymain (qemuxml2argvtest.c:866)
|
||||
==5414== by 0x41E84A: virtTestMain (testutils.c:723)
|
||||
==5414== by 0x34D9021734: (below main) (in /usr/lib64/libc-2.15.so)
|
||||
</pre>
|
||||
<p>In this example, the <code>virDomainDefParseXML()</code> had
|
||||
an error path where the <code>virDomainVideoDefPtr video</code>
|
||||
pointer was not properly disposed. By simply adding a
|
||||
<code>virDomainVideoDefFree(video);</code> in the error path,
|
||||
the issue was resolved.
|
||||
</p>
|
||||
|
||||
<p>Another common mistake is calling a printing function, such as
|
||||
<code>VIR_DEBUG()</code> without initializing a variable to be
|
||||
printed. The following example involved a call which could return
|
||||
an error, but not set variables passed by reference to the call.
|
||||
The solution was to initialize the variables prior to the call.
|
||||
</p>
|
||||
<pre>
|
||||
==4749== Use of uninitialised value of size 8
|
||||
==4749== at 0x34D904650B: _itoa_word (in /usr/lib64/libc-2.15.so)
|
||||
==4749== by 0x34D9049118: vfprintf (in /usr/lib64/libc-2.15.so)
|
||||
==4749== by 0x34D9108F60: __vasprintf_chk (in /usr/lib64/libc-2.15.so)
|
||||
==4749== by 0x4CAEEF7: virVasprintf (stdio2.h:199)
|
||||
==4749== by 0x4C8A55E: virLogVMessage (virlog.c:814)
|
||||
==4749== by 0x4C8AA96: virLogMessage (virlog.c:751)
|
||||
==4749== by 0x4DA0056: virNetTLSContextCheckCertKeyUsage (virnettlscontext.c:225)
|
||||
==4749== by 0x4DA06DB: virNetTLSContextCheckCert (virnettlscontext.c:439)
|
||||
==4749== by 0x4DA1620: virNetTLSContextNew (virnettlscontext.c:562)
|
||||
==4749== by 0x4DA26FC: virNetTLSContextNewServer (virnettlscontext.c:927)
|
||||
==4749== by 0x409C39: testTLSContextInit (virnettlscontexttest.c:467)
|
||||
==4749== by 0x40AB8F: virtTestRun (testutils.c:161)
|
||||
</pre>
|
||||
<p>Valgrind will also find some false positives or code paths
|
||||
which cannot be resolved by making changes to the libvirt code.
|
||||
For these paths, it is possible to add a filter to avoid the
|
||||
errors. For example:
|
||||
</p>
|
||||
<pre>
|
||||
==4643== 7 bytes in 1 blocks are possibly lost in loss record 4 of 20
|
||||
==4643== at 0x4A0881C: malloc (vg_replace_malloc.c:270)
|
||||
==4643== by 0x34D90853F1: strdup (in /usr/lib64/libc-2.15.so)
|
||||
==4643== by 0x34EEC2C08A: ??? (in /usr/lib64/libnl.so.1.1)
|
||||
==4643== by 0x34EEC15B81: ??? (in /usr/lib64/libnl.so.1.1)
|
||||
==4643== by 0x34D8C0EE15: call_init.part.0 (in /usr/lib64/ld-2.15.so)
|
||||
==4643== by 0x34D8C0EECF: _dl_init (in /usr/lib64/ld-2.15.so)
|
||||
==4643== by 0x34D8C01569: ??? (in /usr/lib64/ld-2.15.so)
|
||||
|
||||
</pre>
|
||||
<p>In this instance, it is acceptible to modify the
|
||||
<code>tests/.valgrind.supp</code> file in order to add a
|
||||
suppression filter. The filter should be unique enough to
|
||||
not suppress real leaks, but it should be generic enough to
|
||||
cover multiple code paths. The format of the entry can be
|
||||
found in the documentation found at the
|
||||
<a href="http://valgrind.org/">Valgrind home page.</a>
|
||||
The following trace was added to <code>tests/.valgrind.supp</code>
|
||||
in order to suppress the warning:
|
||||
</p>
|
||||
<pre>
|
||||
{
|
||||
dlInitMemoryLeak1
|
||||
Memcheck:Leak
|
||||
fun:?alloc
|
||||
...
|
||||
fun:call_init.part.0
|
||||
fun:_dl_init
|
||||
...
|
||||
obj:*/lib*/ld-2.*so*
|
||||
}
|
||||
</pre>
|
||||
under gdb or valgrind.</p>
|
||||
</li>
|
||||
<li>Update tests and/or documentation, particularly if you are adding
|
||||
a new feature or changing the output of a program.</li>
|
||||
@@ -333,7 +241,7 @@
|
||||
<p>
|
||||
The keywords <code>if</code>, <code>for</code>, <code>while</code>,
|
||||
and <code>switch</code> must have a single space following them
|
||||
before the opening bracket. E.g.
|
||||
before the opening bracket. e.g.
|
||||
</p>
|
||||
<pre>
|
||||
if(foo) // Bad
|
||||
@@ -342,7 +250,7 @@
|
||||
|
||||
<p>
|
||||
Function implementations must <strong>not</strong> have any whitespace
|
||||
between the function name and the opening bracket. E.g.
|
||||
between the function name and the opening bracket. e.g.
|
||||
</p>
|
||||
<pre>
|
||||
int foo (int wizz) // Bad
|
||||
@@ -351,7 +259,7 @@
|
||||
|
||||
<p>
|
||||
Function calls must <strong>not</strong> have any whitespace
|
||||
between the function name and the opening bracket. E.g.
|
||||
between the function name and the opening bracket. e.g.
|
||||
</p>
|
||||
<pre>
|
||||
bar = foo (wizz); // Bad
|
||||
@@ -361,7 +269,7 @@
|
||||
<p>
|
||||
Function typedefs must <strong>not</strong> have any whitespace
|
||||
between the closing bracket of the function name and opening
|
||||
bracket of the arg list. E.g.
|
||||
bracket of the arg list. e.g.
|
||||
</p>
|
||||
<pre>
|
||||
typedef int (*foo) (int wizz); // Bad
|
||||
@@ -370,42 +278,13 @@
|
||||
|
||||
<p>
|
||||
There must not be any whitespace immediately following any
|
||||
opening bracket, or immediately prior to any closing bracket. E.g.
|
||||
opening bracket, or immediately prior to any closing bracket. e.g.
|
||||
</p>
|
||||
<pre>
|
||||
int foo( int wizz ); // Bad
|
||||
int foo(int wizz); // Good
|
||||
</pre>
|
||||
|
||||
<h2><a name="semicolon">Semicolons</a></h2>
|
||||
|
||||
<p>
|
||||
Semicolons should never have a space beforehand. Inside the
|
||||
condition of a <code>for</code> loop, there should always be a
|
||||
space or line break after each semicolon, except for the special
|
||||
case of an infinite loop (although more infinite loops
|
||||
use <code>while</code>). While not enforced, loop counters
|
||||
generally use post-increment.
|
||||
</p>
|
||||
<pre>
|
||||
for (i = 0 ;i < limit ; ++i) { // Bad
|
||||
for (i = 0; i < limit; i++) { // Good
|
||||
for (;;) { // ok
|
||||
while (1) { // Better
|
||||
</pre>
|
||||
<p>
|
||||
Empty loop bodies are better represented with curly braces and a
|
||||
comment, although use of a semicolon is not currently rejected.
|
||||
</p>
|
||||
<pre>
|
||||
while ((rc = waitpid(pid, &st, 0) == -1) &&
|
||||
errno == EINTR); // ok
|
||||
while ((rc = waitpid(pid, &st, 0) == -1) &&
|
||||
errno == EINTR) { // Better
|
||||
/* nothing */
|
||||
}
|
||||
</pre>
|
||||
|
||||
<h2><a name="curly_braces">Curly braces</a></h2>
|
||||
|
||||
<p>
|
||||
@@ -425,7 +304,7 @@
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
However, the moment your loop/if/else body extends on to a second
|
||||
However, the moment your loop/if/else body extends onto a second
|
||||
line, for whatever reason (even if it's just an added comment), then
|
||||
you should add braces. Otherwise, it would be too easy to insert a
|
||||
statement just before that comment (without adding braces), thinking
|
||||
@@ -548,13 +427,6 @@
|
||||
|
||||
<h2><a name="preprocessor">Preprocessor</a></h2>
|
||||
|
||||
<p>Macros defined with an ALL_CAPS name should generally be
|
||||
assumed to be unsafe with regards to arguments with side-effects
|
||||
(that is, MAX(a++, b--) might increment a or decrement b too
|
||||
many or too few times). Exceptions to this rule are explicitly
|
||||
documented for macros in viralloc.h and virstring.h.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For variadic macros, stick with C99 syntax:
|
||||
</p>
|
||||
@@ -652,7 +524,7 @@
|
||||
Use of the malloc/free/realloc/calloc APIs is deprecated in the libvirt
|
||||
codebase, because they encourage a number of serious coding bugs and do
|
||||
not enable compile time verification of checks for NULL. Instead of these
|
||||
routines, use the macros from viralloc.h.
|
||||
routines, use the macros from memory.h.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
@@ -891,21 +763,6 @@
|
||||
virStrncpy(dest, src, strlen(src), sizeof(dest)).
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
VIR_STRDUP(char *dst, const char *src);
|
||||
VIR_STRNDUP(char *dst, const char *src, size_t n);
|
||||
</pre>
|
||||
<p>
|
||||
You should avoid using strdup or strndup directly as they do not report
|
||||
out-of-memory error, and do not allow a NULL source. Use
|
||||
VIR_STRDUP or VIR_STRNDUP macros instead, which return 0 for
|
||||
NULL source, 1 for successful copy, and -1 for allocation
|
||||
failure with the error already reported. In very
|
||||
specific cases, when you don't want to report the out-of-memory error, you
|
||||
can use VIR_STRDUP_QUIET or VIR_STRNDUP_QUIET, but such usage is very rare
|
||||
and usually considered a flaw.
|
||||
</p>
|
||||
|
||||
<h2><a name="strbuf">Variable length string buffer</a></h2>
|
||||
|
||||
<p>
|
||||
@@ -982,12 +839,10 @@
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Of particular note: <b>Do not</b> include libvirt/libvirt.h,
|
||||
libvirt/virterror.h, libvirt/libvirt-qemu.h, or libvirt/libvirt-lxc.h.
|
||||
They are included by "internal.h" already and there are some special reasons
|
||||
why you cannot include these files explicitly. One of the special cases,
|
||||
"libvirt/libvirt.h" is included prior to "internal.h" in "remote_protocol.x",
|
||||
to avoid exposing *_LAST enum elements.
|
||||
Of particular note: <b>Do not</b> include libvirt/libvirt.h or
|
||||
libvirt/virterror.h. It is included by "internal.h" already and there
|
||||
are some special reasons why you cannot include these files
|
||||
explicitly.
|
||||
</p>
|
||||
|
||||
|
||||
|
@@ -1,7 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
|
||||
|
||||
@@ -23,8 +21,8 @@
|
||||
|
||||
<!-- resolve b/i/code tags in a first pass, because they interfere with line
|
||||
wrapping in the second pass -->
|
||||
<xsl:template match="html:b">*<xsl:apply-templates/>*</xsl:template>
|
||||
<xsl:template match="html:i">'<xsl:apply-templates/>'</xsl:template>
|
||||
<xsl:template match="html:code">"<xsl:apply-templates/>"</xsl:template>
|
||||
<xsl:template match="b">*<xsl:apply-templates/>*</xsl:template>
|
||||
<xsl:template match="i">'<xsl:apply-templates/>'</xsl:template>
|
||||
<xsl:template match="code">"<xsl:apply-templates/>"</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
@@ -1,7 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:import href="wrapstring.xsl"/>
|
||||
|
||||
@@ -32,7 +30,7 @@ from docs/hacking.html.in!
|
||||
|
||||
|
||||
<!-- title -->
|
||||
<xsl:template match="html:h1">
|
||||
<xsl:template match="h1">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="normalize-space(.)"/>
|
||||
<xsl:text>
|
||||
@@ -67,14 +65,14 @@ from docs/hacking.html.in!
|
||||
|
||||
|
||||
|
||||
<xsl:template match="html:h2">
|
||||
<xsl:template match="h2">
|
||||
<xsl:value-of select="$newline"/>
|
||||
<xsl:call-template name="underline"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
<xsl:template match="html:h3">
|
||||
<xsl:template match="h3">
|
||||
<xsl:call-template name="underline">
|
||||
<xsl:with-param name="char" select="'-'"/>
|
||||
</xsl:call-template>
|
||||
@@ -93,13 +91,13 @@ from docs/hacking.html.in!
|
||||
|
||||
|
||||
|
||||
<xsl:template match="html:ol|html:ul|html:p">
|
||||
<xsl:template match="ol|ul|p">
|
||||
<xsl:apply-templates/><xsl:value-of select="$newline"/><xsl:value-of select="$newline"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
<xsl:template match="html:ol/html:li">
|
||||
<xsl:template match="ol/li">
|
||||
<xsl:choose>
|
||||
<xsl:when test=".//node()[position()=last()]/self::pre">(<xsl:value-of select="position()"/>) <xsl:apply-templates/>
|
||||
</xsl:when>
|
||||
@@ -111,23 +109,23 @@ from docs/hacking.html.in!
|
||||
|
||||
|
||||
|
||||
<xsl:template match="html:ul/html:li">- <xsl:apply-templates/><xsl:value-of select="$newline"/><xsl:value-of select="$newline"/>
|
||||
<xsl:template match="ul/li">- <xsl:apply-templates/><xsl:value-of select="$newline"/><xsl:value-of select="$newline"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
<xsl:template match="html:li/html:ul/html:li">-- <xsl:apply-templates/><xsl:value-of select="$newline"/><xsl:value-of select="$newline"/>
|
||||
<xsl:template match="li/ul/li">-- <xsl:apply-templates/><xsl:value-of select="$newline"/><xsl:value-of select="$newline"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
<!-- add newline before nested <ul> -->
|
||||
<xsl:template match="html:li/html:ul"><xsl:value-of select="$newline"/><xsl:value-of select="$newline"/><xsl:apply-templates/>
|
||||
<xsl:template match="li/ul"><xsl:value-of select="$newline"/><xsl:value-of select="$newline"/><xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
<xsl:template match="html:pre">
|
||||
<xsl:template match="pre">
|
||||
<xsl:choose>
|
||||
<xsl:when test="starts-with(.,'
')"><xsl:value-of select="substring(.,2)"/><xsl:value-of select="$newline"/>
|
||||
</xsl:when>
|
||||
@@ -139,7 +137,7 @@ from docs/hacking.html.in!
|
||||
|
||||
|
||||
|
||||
<xsl:template match="html:a">
|
||||
<xsl:template match="a">
|
||||
<xsl:value-of select="$newline"/><xsl:value-of select="$newline"/>
|
||||
<xsl:text> </xsl:text><xsl:apply-templates/>
|
||||
<xsl:value-of select="$newline"/>
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1>Hooks for specific system management</h1>
|
||||
|
||||
@@ -240,14 +239,13 @@
|
||||
<p>If a hook script returns with an exit code of 0, the libvirt daemon
|
||||
regards this as successful and performs no logging of it.</p>
|
||||
<p>However, if a hook script returns with a non zero exit code, the libvirt
|
||||
daemon regards this as a failure, logs its return code, and
|
||||
daemon regards this as a failure, logs it with return code 256, and
|
||||
additionally logs anything on stderr the hook script returns.</p>
|
||||
<p>For example, a hook script might use this code to indicate failure,
|
||||
and send a text string to stderr:</p>
|
||||
<pre>echo "Could not find required XYZZY" >&2
|
||||
exit 1</pre>
|
||||
<p>The resulting entry in the libvirt log will appear as:</p>
|
||||
<pre>20:02:40.297: error : virHookCall:285 : Hook script execution failed: internal error Child process (LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
HOME=/root USER=root LOGNAME=root /etc/libvirt/hooks/qemu qemu prepare begin -) unexpected exit status 1: Could not find required XYZZY</pre>
|
||||
<pre>20:02:40.297: error : virHookCall:416 : Hook script execution failed: Hook script /etc/libvirt/hooks/qemu qemu failed with error code 256:Could not find required XYZZY</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -18,7 +18,7 @@ my %groupheaders = (
|
||||
"virDriver" => "Hypervisor APIs",
|
||||
"virNetworkDriver" => "Virtual Network APIs",
|
||||
"virInterfaceDriver" => "Host Interface APIs",
|
||||
"virNodeDeviceDriver" => "Host Device APIs",
|
||||
"virDeviceMonitor" => "Host Device APIs",
|
||||
"virStorageDriver" => "Storage Pool APIs",
|
||||
"virSecretDriver" => "Secret APIs",
|
||||
"virNWFilterDriver" => "Network Filter APIs",
|
||||
@@ -154,7 +154,7 @@ close FILE;
|
||||
|
||||
# Some special things which aren't public APIs,
|
||||
# but we want to report
|
||||
$apis{virConnectSupportsFeature} = "0.3.2";
|
||||
$apis{virConnectDrvSupportsFeature} = "0.3.2";
|
||||
$apis{virDomainMigratePrepare} = "0.3.2";
|
||||
$apis{virDomainMigratePerform} = "0.3.2";
|
||||
$apis{virDomainMigrateFinish} = "0.3.2";
|
||||
@@ -182,7 +182,7 @@ open FILE, "<$drivertable"
|
||||
my %groups;
|
||||
my $ingrp;
|
||||
while (defined($line = <FILE>)) {
|
||||
if ($line =~ /struct _(vir\w*Driver)/) {
|
||||
if ($line =~ /struct _(vir\w*(?:Driver|Monitor))/) {
|
||||
my $grp = $1;
|
||||
if ($grp ne "virStateDriver" &&
|
||||
$grp ne "virStreamDriver") {
|
||||
@@ -190,15 +190,17 @@ while (defined($line = <FILE>)) {
|
||||
$groups{$ingrp} = { apis => {}, drivers => {} };
|
||||
}
|
||||
} elsif ($ingrp) {
|
||||
if ($line =~ /^\s*vir(?:Drv)(\w+)\s+(\w+);\s*$/) {
|
||||
if ($line =~ /^\s*vir(?:Drv|DevMon)(\w+)\s+(\w+);\s*$/) {
|
||||
my $field = $2;
|
||||
my $name = $1;
|
||||
|
||||
my $api;
|
||||
if (exists $apis{"vir$name"}) {
|
||||
$api = "vir$name";
|
||||
} elsif ($name =~ /\w+(Open|Close)/) {
|
||||
next;
|
||||
} elsif (exists $apis{"virConnect$name"}) {
|
||||
$api = "virConnect$name";
|
||||
} elsif (exists $apis{"virNode$name"}) {
|
||||
$api = "virNode$name";
|
||||
} else {
|
||||
die "driver $name does not have a public API";
|
||||
}
|
||||
@@ -256,8 +258,6 @@ foreach my $src (@srcs) {
|
||||
die "Driver method for $api is NULL in $src" if $meth eq "NULL";
|
||||
|
||||
if (!exists($groups{$ingrp}->{apis}->{$api})) {
|
||||
next if $api =~ /\w(Open|Close)/;
|
||||
|
||||
die "Found unexpected method $api in $ingrp\n";
|
||||
}
|
||||
|
||||
@@ -290,24 +290,24 @@ $groups{virDriver}->{apis}->{"domainMigrate"} = "virDomainMigrate";
|
||||
my $openAuthVers = (0 * 1000 * 1000) + (4 * 1000) + 0;
|
||||
|
||||
foreach my $drv (keys %{$groups{"virDriver"}->{drivers}}) {
|
||||
my $openVersStr = $groups{"virDriver"}->{drivers}->{$drv}->{"connectOpen"};
|
||||
my $openVersStr = $groups{"virDriver"}->{drivers}->{$drv}->{"open"};
|
||||
my $openVers;
|
||||
if ($openVersStr =~ /(\d+)\.(\d+)\.(\d+)/) {
|
||||
$openVers = ($1 * 1000 * 1000) + ($2 * 1000) + $3;
|
||||
}
|
||||
|
||||
# virConnectOpenReadOnly always matches virConnectOpen version
|
||||
$groups{"virDriver"}->{drivers}->{$drv}->{"connectOpenReadOnly"} =
|
||||
$groups{"virDriver"}->{drivers}->{$drv}->{"connectOpen"};
|
||||
$groups{"virDriver"}->{drivers}->{$drv}->{"openReadOnly"} =
|
||||
$groups{"virDriver"}->{drivers}->{$drv}->{"open"};
|
||||
|
||||
# virConnectOpenAuth is always 0.4.0 if the driver existed
|
||||
# before this time, otherwise it matches the version of
|
||||
# the driver's virConnectOpen entry
|
||||
if ($openVersStr eq "Y" ||
|
||||
$openVers >= $openAuthVers) {
|
||||
$groups{"virDriver"}->{drivers}->{$drv}->{"connectOpenAuth"} = $openVersStr;
|
||||
$groups{"virDriver"}->{drivers}->{$drv}->{"openAuth"} = $openVersStr;
|
||||
} else {
|
||||
$groups{"virDriver"}->{drivers}->{$drv}->{"connectOpenAuth"} = "0.4.0";
|
||||
$groups{"virDriver"}->{drivers}->{$drv}->{"openAuth"} = "0.4.0";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -341,9 +341,7 @@ foreach my $drv (keys %{$groups{"virDriver"}->{drivers}}) {
|
||||
# Finally we generate the HTML file with the tables
|
||||
|
||||
print <<EOF;
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<head>
|
||||
<title>libvirt API support matrix</title>
|
||||
</head>
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1>The virtualization API</h1>
|
||||
|
||||
@@ -63,12 +62,6 @@
|
||||
<li>
|
||||
The <a href="http://libvirt.org/drvhyperv.html">Microsoft Hyper-V</a> hypervisor
|
||||
</li>
|
||||
<li>
|
||||
The <a href="http://libvirt.org/drvphyp.html">IBM PowerVM</a> hypervisor
|
||||
</li>
|
||||
<li>
|
||||
The <a href="http://libvirt.org/drvparallels.html">Parallels</a> hypervisor
|
||||
</li>
|
||||
<li>
|
||||
Virtual networks using bridging, NAT, VEPA and VN-LINK.
|
||||
</li>
|
||||
|
@@ -166,15 +166,15 @@ def checkTables(db, verbose = 1):
|
||||
print "table %s missing" % (table)
|
||||
createTable(db, table)
|
||||
try:
|
||||
ret = c.execute("SELECT count(*) from %s" % table)
|
||||
ret = c.execute("SELECT count(*) from %s" % table);
|
||||
row = c.fetchone()
|
||||
if verbose:
|
||||
print "Table %s contains %d records" % (table, row[0])
|
||||
except:
|
||||
print "Troubles with table %s : repairing" % (table)
|
||||
ret = c.execute("repair table %s" % table)
|
||||
ret = c.execute("repair table %s" % table);
|
||||
print "repairing returned %d" % (ret)
|
||||
ret = c.execute("SELECT count(*) from %s" % table)
|
||||
ret = c.execute("SELECT count(*) from %s" % table);
|
||||
row = c.fetchone()
|
||||
print "Table %s contains %d records" % (table, row[0])
|
||||
if verbose:
|
||||
@@ -600,7 +600,7 @@ def addWordHTML(word, resource, id, section, relevance):
|
||||
pass
|
||||
else:
|
||||
wordsDictHTML[word] = {}
|
||||
d = wordsDictHTML[word]
|
||||
d = wordsDictHTML[word];
|
||||
d[resource] = (relevance, id, section)
|
||||
return relevance
|
||||
|
||||
@@ -647,7 +647,7 @@ def addWordArchive(word, id, relevance):
|
||||
pass
|
||||
else:
|
||||
wordsDictArchive[word] = {}
|
||||
d = wordsDictArchive[word]
|
||||
d = wordsDictArchive[word];
|
||||
d[id] = relevance
|
||||
return relevance
|
||||
|
||||
@@ -989,7 +989,7 @@ def analyzeHTML(doc, resource, p, section, id):
|
||||
return words
|
||||
|
||||
def analyzeHTML(doc, resource):
|
||||
para = 0
|
||||
para = 0;
|
||||
ctxt = doc.xpathNewContext()
|
||||
try:
|
||||
res = ctxt.xpathEval("//head/title")
|
||||
@@ -1079,7 +1079,7 @@ def scanXMLMsgArchive(url, title, force = 0):
|
||||
|
||||
try:
|
||||
print "Loading %s" % (url)
|
||||
doc = libxml2.htmlParseFile(url, None)
|
||||
doc = libxml2.htmlParseFile(url, None);
|
||||
except:
|
||||
doc = None
|
||||
if doc == None:
|
||||
@@ -1102,7 +1102,7 @@ def scanXMLDateArchive(t = None, force = 0):
|
||||
url = getXMLDateArchive(t)
|
||||
print "loading %s" % (url)
|
||||
try:
|
||||
doc = libxml2.htmlParseFile(url, None)
|
||||
doc = libxml2.htmlParseFile(url, None);
|
||||
except:
|
||||
doc = None
|
||||
if doc == None:
|
||||
@@ -1150,7 +1150,7 @@ def analyzeArchives(t = None, force = 0):
|
||||
refs = wordsDictArchive[word]
|
||||
if refs == None:
|
||||
skipped = skipped + 1
|
||||
continue
|
||||
continue;
|
||||
for id in refs.keys():
|
||||
relevance = refs[id]
|
||||
updateWordArchive(word, id, relevance)
|
||||
@@ -1170,7 +1170,7 @@ def analyzeHTMLTop():
|
||||
refs = wordsDictHTML[word]
|
||||
if refs == None:
|
||||
skipped = skipped + 1
|
||||
continue
|
||||
continue;
|
||||
for resource in refs.keys():
|
||||
(relevance, id, section) = refs[resource]
|
||||
updateWordHTML(word, resource, section, id, relevance)
|
||||
@@ -1199,7 +1199,7 @@ def analyzeAPITop():
|
||||
refs = wordsDict[word]
|
||||
if refs == None:
|
||||
skipped = skipped + 1
|
||||
continue
|
||||
continue;
|
||||
for (module, symbol) in refs.keys():
|
||||
updateWord(word, symbol, refs[(module, symbol)])
|
||||
i = i + 1
|
||||
@@ -1228,26 +1228,26 @@ def main():
|
||||
elif args[i] == '--archive':
|
||||
analyzeArchives(None, force)
|
||||
elif args[i] == '--archive-year':
|
||||
i = i + 1
|
||||
i = i + 1;
|
||||
year = args[i]
|
||||
months = ["January" , "February", "March", "April", "May",
|
||||
"June", "July", "August", "September", "October",
|
||||
"November", "December"]
|
||||
"November", "December"];
|
||||
for month in months:
|
||||
try:
|
||||
str = "%s-%s" % (year, month)
|
||||
T = time.strptime(str, "%Y-%B")
|
||||
t = time.mktime(T) + 3600 * 24 * 10
|
||||
t = time.mktime(T) + 3600 * 24 * 10;
|
||||
analyzeArchives(t, force)
|
||||
except:
|
||||
print "Failed to index month archive:"
|
||||
print sys.exc_type, sys.exc_value
|
||||
elif args[i] == '--archive-month':
|
||||
i = i + 1
|
||||
i = i + 1;
|
||||
month = args[i]
|
||||
try:
|
||||
T = time.strptime(month, "%Y-%B")
|
||||
t = time.mktime(T) + 3600 * 24 * 10
|
||||
t = time.mktime(T) + 3600 * 24 * 10;
|
||||
analyzeArchives(t, force)
|
||||
except:
|
||||
print "Failed to index month archive:"
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>libvirt internals</h1>
|
||||
|
||||
@@ -11,106 +9,12 @@
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>Introduction to basic rules and guidelines for
|
||||
<a href="hacking.html">hacking</a> on libvirt code</li>
|
||||
<li>Introduction to basic rules and guidelines for <a href="hacking.html">hacking</a>
|
||||
on libvirt code</li>
|
||||
<li>Guide to adding <a href="api_extension.html">public APIs</a></li>
|
||||
<li>Approach for <a href="internals/command.html">spawning commands</a>
|
||||
from libvirt driver code</li>
|
||||
<li>The libvirt <a href="internals/rpc.html">RPC infrastructure</a></li>
|
||||
<li>The <a href="internals/locking.html">Resource Lock Manager</a></li>
|
||||
<li>Approach for <a href="internals/command.html">spawning commands</a> from
|
||||
libvirt driver code</li>
|
||||
</ul>
|
||||
|
||||
<p>Before adding new code it will be important to get a basic understanding
|
||||
of the many elements involved with making any call or change to the libvirt
|
||||
code. The architecture <a href="goals.html">goals</a> must be adhered to
|
||||
when submitting new code. Understanding the many places that need to be
|
||||
touched and the interactions between various subsystems within libvirt
|
||||
will directly correlate to the ability to be successful in getting new
|
||||
code accepted.</p>
|
||||
<p>The following diagram depicts code flow from a client application, in
|
||||
this case the libvirt provided <code>virsh</code> command through the
|
||||
various layers to elicit a response from some chosen hypervisor.
|
||||
</p>
|
||||
|
||||
<p class="image">
|
||||
<img alt="virConnectOpen calling sequence"
|
||||
src="libvirt-virConnect-example.png"/>
|
||||
</p>
|
||||
<ul>
|
||||
<li>"virsh -c qemu:///system list --all"
|
||||
<p>After the virsh code processes the input arguments, it eventually
|
||||
will make a call to open the connection using a default set of
|
||||
authentication credentials (virConnectAuthDefault). </p></li>
|
||||
<li>virConnectOpenAuth()
|
||||
<p>Each of the virConnectOpen APIs will first call virInitialize() and
|
||||
then revector through the local "do_open():" call.</p>
|
||||
<ul>
|
||||
<li>virInitialize()
|
||||
<p>Calls the registration API for each of the drivers with
|
||||
client-side only capabilities and then call the remoteRegister()
|
||||
API last. This ensures the virDriverTab[] tries local drivers
|
||||
first before using the remote driver.</p></li>
|
||||
<li>Loop through virDriverTab[] entries trying to call their
|
||||
respective "open" entry point (in our case remoteOpen())</li>
|
||||
<li>After successful return from the virDriverTab[] open()
|
||||
API, attempt to find and open other drivers (network, interface,
|
||||
storage, etc.)</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>remoteOpen()
|
||||
<p>After a couple of URI checks, a call to doRemoteOpen() is made</p>
|
||||
<ul>
|
||||
<li>Determine network transport and host/port to use from URI
|
||||
<p>The transport will be either tls, unix, ssh, libssh2, ext,
|
||||
or tcp with the default of tls. Decode the host/port if provided
|
||||
or default to "localhost".</p></li>
|
||||
<li>virNetClientRegisterAsyncIO()
|
||||
<p>Register an I/O callback mechanism to get returned data via
|
||||
virNetClientIncomingEvent()</p></li>
|
||||
<li>"call(...REMOTE_PROC_OPEN...)"
|
||||
<p>Eventually routes into virNetClientProgramCall() which will
|
||||
call virNetClientSendWithReply() and eventually uses
|
||||
virNetClientIO()to send the message to libvirtd and
|
||||
then waits for a response using virNetClientIOEventLoop()</p></li>
|
||||
<li>virNetClientIncomingEvent()
|
||||
<p>Receives the returned packet and processes through
|
||||
virNetClientIOUpdateCallback()</p></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>libvirtd Daemon
|
||||
<p></p>
|
||||
<ul>
|
||||
<li>Daemon Startup
|
||||
<p>The daemon initialization processing will declare itself
|
||||
as a server via a virNetServerNew() call, then use
|
||||
virDriverLoadModule() to find/load all known drivers,
|
||||
set up an RPC server program using the <code>remoteProcs[]</code>
|
||||
table via a virNetServerProgramNew() call. The table is the
|
||||
corollary to the <code>remote_procedure</code> enum list in
|
||||
the client. It lists all the functions to be called in
|
||||
the same order. Once RPC is set up, networking server sockets
|
||||
are opened, the various driver state initialization routines
|
||||
are run from the <code>virStateDriverTab[]</code>, the network
|
||||
links are enabled, and the daemon waits for work.</p></li>
|
||||
<li>RPC
|
||||
<p>When a message is received, the <code>remoteProcs[]</code>
|
||||
table is referenced for the 'REMOTE_PROC_OPEN' call entry.
|
||||
This results in remoteDispatchOpen() being called via the
|
||||
virNetServerProgramDispatchCall().</p></li>
|
||||
<li>remoteDispatchOpen()
|
||||
<p>The API will read the argument passed picking out the
|
||||
<code>name</code> of the driver to be opened. The code
|
||||
will then call virConnectOpen() or virConnectOpenReadOnly()
|
||||
depending on the argument <code>flags</code>.</p></li>
|
||||
<li>virConnectOpen() or virConnectOpenReadOnly()
|
||||
<p>Just like the client except that upon entry the URI
|
||||
is what was passed from the client and will be found
|
||||
and opened to process the data.</p>
|
||||
<p>The returned structure data is returned via the
|
||||
virNetServer interfaces to the remote driver which then
|
||||
returns it to the client application.</p></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Spawning processes / commands from libvirt drivers</h1>
|
||||
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Resource Lock Manager</h1>
|
||||
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>libvirt RPC infrastructure</h1>
|
||||
|
||||
@@ -154,7 +152,6 @@
|
||||
<li>continue: for streams this indicates that further data packets
|
||||
will be following</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h3><a href="protocolpayload">Packet payload</a></h3>
|
||||
@@ -421,7 +418,7 @@
|
||||
After a complete packet has been read, the header must be decoded
|
||||
and all 6 fields fully validated, before attempting to dispatch
|
||||
the payload. Once dispatched, the payload can be decoded and passed
|
||||
on to the appropriate API for execution. The RPC code must not take
|
||||
onto the appropriate API for execution. The RPC code must not take
|
||||
any action based on the payload, since it has no way to validate
|
||||
the semantics of the payload data. It must delegate this to the
|
||||
execution API (e.g. corresponding libvirt public API).
|
||||
@@ -788,7 +785,7 @@
|
||||
return value and output parameters, or error object and encode
|
||||
them into a reply packet. Again it does not attempt to do any
|
||||
semantic validation of output data, aside from variable length
|
||||
field limit checks. The worker thread puts the reply packet on
|
||||
field limit checks. The worker thread puts the reply packet onto
|
||||
the transmission queue for the client. The worker is now finished
|
||||
and goes back to wait for another incoming method call.
|
||||
</p>
|
||||
@@ -814,10 +811,10 @@
|
||||
for the worker threads, it is sidetracked into a per-stream
|
||||
processing queue. When the stream becomes writable, queued
|
||||
incoming stream packets will be processed, passing their data
|
||||
payload on the stream. Conversely when the stream becomes
|
||||
payload onto the stream. Conversely when the stream becomes
|
||||
readable, chunks of data will be read from it, encoded into
|
||||
new outgoing packets, and placed on the client's transmit
|
||||
queue.
|
||||
queue
|
||||
</p>
|
||||
|
||||
<h4><a name="apiserverdispatchex1">Example with overlapping methods</a></h4>
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1>Architecture</h1>
|
||||
<p>Libvirt is a C toolkit manage the virtualization capabilities
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1>Java API bindings</h1>
|
||||
|
||||
|
@@ -1,58 +0,0 @@
|
||||
#FIG 3.2 Produced by xfig version 3.2.5b
|
||||
Landscape
|
||||
Center
|
||||
Inches
|
||||
Letter
|
||||
100.00
|
||||
Single
|
||||
-2
|
||||
1200 2
|
||||
2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
450 375 4575 375 4575 1725 450 1725 450 375
|
||||
2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
1125 2475 4950 2475 4950 3600 1125 3600 1125 2475
|
||||
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
|
||||
1 0 1.00 60.00 120.00
|
||||
1725 1725 2175 2475
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
3150 5700 6525 5700 6525 6900 3150 6900 3150 5700
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
7875 6825 10125 6825 10125 7725 7875 7725 7875 6825
|
||||
2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
2550 4725 10350 4725 10350 7800 2550 7800 2550 4725
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5
|
||||
8850 1950 11550 1950 11550 3360 8850 3360 8850 1950
|
||||
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
|
||||
1 0 1.00 60.00 120.00
|
||||
3975 3600 5025 4425
|
||||
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
|
||||
1 0 1.00 60.00 120.00
|
||||
8925 3225 5400 4425
|
||||
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
|
||||
1 0 1.00 60.00 120.00
|
||||
5625 6900 7875 7425
|
||||
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 3
|
||||
1 0 1.00 60.00 120.00
|
||||
11400 3375 11400 7575 10125 7575
|
||||
2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
8400 975 12450 975 12450 4125 8400 4125 8400 975
|
||||
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 6
|
||||
1 0 1.00 60.00 120.00
|
||||
10125 7125 10725 7125 10725 4425 7725 4425 7725 2700 8850 2700
|
||||
4 0 0 50 -1 16 12 0.0000 4 180 2430 1350 2895 virConnectOpenReadOnly(uri)\001
|
||||
4 0 0 50 -1 16 12 0.0000 4 180 3240 1350 3090 virConnectOpenAuth(uri, auth, flags)\001
|
||||
4 0 0 50 -1 0 12 0.0000 4 165 1350 3300 5850 virConnectOpen:\001
|
||||
4 0 0 50 -1 0 12 0.0000 4 165 2070 3300 6045 virConnectOpenReadOnly:\001
|
||||
4 0 0 50 -1 0 12 0.0000 4 165 1710 3300 6240 virConnectOpenAuth:\001
|
||||
4 0 0 50 -1 0 12 0.0000 4 180 900 3975 6600 do_open():\001
|
||||
4 0 0 50 -1 0 14 0.0000 4 135 1260 8025 7125 Rremote driver\001
|
||||
4 0 0 50 -1 16 24 0.0000 4 135 630 5025 4650 libvirt\001
|
||||
4 0 0 50 -1 0 14 0.0000 4 180 1890 9000 2175 remoteDispatchOpen():\001
|
||||
4 0 0 50 -1 0 12 0.0000 4 45 270 9300 2475 ...\001
|
||||
4 0 0 50 -1 0 12 0.0000 4 180 1440 9300 2670 virConnectOpen()\001
|
||||
4 0 0 50 -1 0 12 0.0000 4 180 2160 9300 2865 virConnectOpenReadOnly()\001
|
||||
4 0 0 50 -1 0 12 0.0000 4 45 270 9300 3060 ...\001
|
||||
4 0 0 50 -1 0 12 0.0000 4 180 1080 8250 7350 remoteOpen()\001
|
||||
4 0 0 50 -1 16 16 0.0000 4 165 3240 600 1050 "virsh -c qemu:///system list --all"\001
|
||||
4 0 0 50 -1 16 12 0.0000 4 180 1710 1350 2700 virConnectOpen(uri)\001
|
||||
4 0 0 50 -1 16 24 0.0000 4 135 720 9750 825 libvirtd\001
|
Binary file not shown.
Before Width: | Height: | Size: 10 KiB |
@@ -447,7 +447,6 @@ table.data tbody td.n {
|
||||
letter-spacing: .3ex;
|
||||
font-weight: bolder;
|
||||
text-transform: uppercase;
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
.api .directive {
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1>Virtual machine disk locking</h1>
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1 >Logging in the library and the daemon</h1>
|
||||
<p>Libvirt includes logging facilities starting from version 0.6.0,
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Guest migration</h1>
|
||||
|
||||
@@ -32,7 +30,7 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<img class="diagram" src="migration-native.png" alt="Migration native path"/>
|
||||
<img class="diagram" src="migration-native.png" alt="Migration native path">
|
||||
</p>
|
||||
|
||||
<h3><a name="transporttunnel">libvirt tunnelled transport</a></h3>
|
||||
@@ -50,7 +48,7 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<img class="diagram" src="migration-tunnel.png" alt="Migration tunnel path"/>
|
||||
<img class="diagram" src="migration-tunnel.png" alt="Migration tunnel path">
|
||||
</p>
|
||||
|
||||
<h2><a name="flow">Communication control paths/flows</a></h2>
|
||||
@@ -77,7 +75,7 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<img class="diagram" src="migration-managed-direct.png" alt="Migration direct, managed"/>
|
||||
<img class="diagram" src="migration-managed-direct.png" alt="Migration direct, managed">
|
||||
</p>
|
||||
|
||||
|
||||
@@ -99,7 +97,7 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<img class="diagram" src="migration-managed-p2p.png" alt="Migration peer-to-peer"/>
|
||||
<img class="diagram" src="migration-managed-p2p.png" alt="Migration peer-to-peer">
|
||||
</p>
|
||||
|
||||
|
||||
@@ -115,7 +113,7 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<img class="diagram" src="migration-unmanaged-direct.png" alt="Migration direct, unmanaged"/>
|
||||
<img class="diagram" src="migration-unmanaged-direct.png" alt="Migration direct, unmanaged">
|
||||
</p>
|
||||
|
||||
|
||||
@@ -194,12 +192,12 @@
|
||||
should specify the hypervisor specific URI, using an IP address
|
||||
associated with the network to be used.</li>
|
||||
<li>The firewall restricts what ports are available. When libvirt
|
||||
generates a migration URI it will pick a port number using hypervisor
|
||||
generates a migration URI will pick a port number using hypervisor
|
||||
specific rules. Some hypervisors only require a single port to be
|
||||
open in the firewalls, while others require a whole range of port
|
||||
numbers. In the latter case the management application may wish
|
||||
to choose a specific port number outside the default range in order
|
||||
to comply with local firewall policies.</li>
|
||||
to comply with local firewall policies</li>
|
||||
</ol>
|
||||
|
||||
<h2><a name="config">Configuration file handling</a></h2>
|
||||
|
112
docs/newapi.xsl
112
docs/newapi.xsl
@@ -6,8 +6,6 @@
|
||||
Daniel Veillard
|
||||
-->
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:exsl="http://exslt.org/common"
|
||||
xmlns:str="http://exslt.org/strings"
|
||||
@@ -215,51 +213,14 @@
|
||||
<xsl:text> {
|
||||
</xsl:text>
|
||||
</pre>
|
||||
<xsl:if test="field">
|
||||
<table>
|
||||
<xsl:for-each select="field">
|
||||
<xsl:choose>
|
||||
<xsl:when test='@type = "union"'>
|
||||
<tr><td><span class="keyword">union</span> {</td></tr>
|
||||
<tr>
|
||||
<td><table>
|
||||
<xsl:for-each select="union/field">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
</td>
|
||||
<td><xsl:value-of select="@name"/></td>
|
||||
<xsl:if test="@info != ''">
|
||||
<td>
|
||||
<div class="comment">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</td>
|
||||
</xsl:if>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table></td>
|
||||
<td></td></tr>
|
||||
<tr><td>}</td>
|
||||
<td><xsl:value-of select="@name"/></td>
|
||||
<xsl:if test="@info != ''">
|
||||
<td>
|
||||
<div class="comment">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</td>
|
||||
</xsl:if>
|
||||
<td></td></tr>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<table>
|
||||
<xsl:for-each select="field">
|
||||
<xsl:choose>
|
||||
<xsl:when test='@type = "union"'>
|
||||
<tr><td><span class="keyword">union</span> {</td></tr>
|
||||
<tr>
|
||||
<td><table>
|
||||
<xsl:for-each select="union/field">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="type">
|
||||
@@ -273,20 +234,59 @@
|
||||
<td>
|
||||
<div class="comment">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</td>
|
||||
</xsl:if>
|
||||
</tr>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(field)">
|
||||
<div class="undisclosed">The content of this structure is not made public by the API</div>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</table></td>
|
||||
<td></td></tr>
|
||||
<tr><td>}</td>
|
||||
<td><xsl:value-of select="@name"/></td>
|
||||
<xsl:if test="@info != ''">
|
||||
<td>
|
||||
<div class="comment">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</td>
|
||||
</xsl:if>
|
||||
<td></td></tr>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
</td>
|
||||
<td><xsl:value-of select="@name"/></td>
|
||||
<xsl:if test="@info != ''">
|
||||
<td>
|
||||
<div class="comment">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</td>
|
||||
</xsl:if>
|
||||
</tr>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="not(field)">
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<span class="undisclosed">The content of this structure is not made public by the API</span>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
</table>
|
||||
<pre>
|
||||
<xsl:text>
|
||||
}
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
</head>
|
||||
@@ -9,932 +8,7 @@
|
||||
<p>Here is the list of official releases, it is also possible to just use the <a href="downloads.html">GIT version or snapshot</a>, contact the mailing list
|
||||
and check the <a href="http://libvirt.org/git/?p=libvirt.git;a=log">GIT log</a> to gauge progress.</p>
|
||||
|
||||
<h3>1.0.5: May 2 2013</h3>
|
||||
<ul>
|
||||
<li>Features:<br/>
|
||||
Add NVRAM device (Li Zhang),<br/>
|
||||
Add XML config for resource partitions (Daniel P. Berrange),<br/>
|
||||
Add support for TPM (Stefan Berger),<br/>
|
||||
NPIV storage migration support (Osier Yang)<br/>
|
||||
</li>
|
||||
|
||||
<li>Documentation:<br/>
|
||||
Fix closing tag in snapshot documentation (Christophe Fergeau),<br/>
|
||||
Fix typo in augeas comment (Martin Kletzander),<br/>
|
||||
Fix VIR_DOMAIN_EVENT_ID_PMSUSPEND capitalization in API doc (Christophe Fergeau),<br/>
|
||||
Improve /domainsnapshot/disks/disk@snapshot doc (Christophe Fergeau),<br/>
|
||||
fix memballoon examples (Ján Tomko),<br/>
|
||||
Clarify usage of SELinux baselabel (Peter Krempa),<br/>
|
||||
fix usage of 'onto' (Eric Blake),<br/>
|
||||
Update HACKING (Osier Yang),<br/>
|
||||
conf: fix comment about parsing graphics listen address (Ján Tomko),<br/>
|
||||
lib: Fix docs about return value of virDomainGetVcpusFlags() (Peter Krempa),<br/>
|
||||
virsh: Document that using incomplete XML files may have unexpected results (Peter Krempa),<br/>
|
||||
fix typo when using Kerberos principals (Eric Blake),<br/>
|
||||
use MiB/s instead of Mbps for migration speed (Ján Tomko),<br/>
|
||||
Add the missed <pre> tag (Osier Yang),<br/>
|
||||
virsh: Fix typo in docs (Peter Krempa),<br/>
|
||||
manual: Fix copy-paste errors (Martin Kletzander),<br/>
|
||||
manual: Add info about migrateuri in virsh manual (Martin Kletzander)<br/>
|
||||
</li>
|
||||
|
||||
<li>Portability:<br/>
|
||||
S390: Do not generate a default USB controller (Viktor Mihajlovski),<br/>
|
||||
S390: Mention changed USB behavior (Viktor Mihajlovski),<br/>
|
||||
build: fix cygwin build in virnetdev (Eric Blake),<br/>
|
||||
portability: handle ifreq differences in virnetdev (Roman Bogorodskiy),<br/>
|
||||
qemu: fix build error with older platforms (Eric Blake),<br/>
|
||||
Fix compilation error in util/vircgroup.c (Stefan Berger),<br/>
|
||||
Conditionally compile storagevolxml2argvtest (Daniel P. Berrange),<br/>
|
||||
Fix signature of dummy virNetlinkCommand stub (Daniel P. Berrange),<br/>
|
||||
Add empty stub for virThreadCancel on Win32 (Daniel P. Berrange),<br/>
|
||||
Don't enable -fPIE on Win32 platforms (Daniel P. Berrange),<br/>
|
||||
spec: Require pod2man when running autoreconf (Jiri Denemark),<br/>
|
||||
Avoid cast alignment warnings in port allocator test (Daniel P. Berrange)<br/>
|
||||
</li>
|
||||
|
||||
<li>Bug Fixes:<br/>
|
||||
pci: autolearn name of stub driver, remove from arglist (Laine Stump),<br/>
|
||||
ESX: Fix DISPATCH_FREE generation code to free all extended objects (Ata E Husain Bohra),<br/>
|
||||
qemu: fix failure to start with spice graphics and no tls (Laine Stump),<br/>
|
||||
Need to call virFreeError after virSaveLastError (John Ferlan),<br/>
|
||||
libvirt-guests: status: return non-zero when stopped (Ján Tomko),<br/>
|
||||
security driver: eliminate memory leaks in failure paths (Laine Stump),<br/>
|
||||
libxl: Fix double-dispose of libxl domain config (Jim Fehlig),<br/>
|
||||
virsh: fix incorrect argument errors for long options (Ján Tomko),<br/>
|
||||
network: Don't remove transient network if creating of config file fails (Peter Krempa),<br/>
|
||||
qemu: prevent invalid reads in qemuAssignDevicePCISlots (Ján Tomko),<br/>
|
||||
qemu: don't assign a PCI address to 'none' USB controller (Ján Tomko),<br/>
|
||||
fix segfault during virsh save in pv guest (Bamvor Jian Zhang),<br/>
|
||||
conf: reject controllers with duplicate indexes (Ján Tomko),<br/>
|
||||
fix typo introduced by 90430791 (Bamvor Jian Zhang),<br/>
|
||||
Fix usb master startport parsing (Martin Kletzander),<br/>
|
||||
qemu_conf: Don't discard strdup OOM error (Michal Privoznik),<br/>
|
||||
util: Error out if the numa nodeset is out of range (Osier Yang),<br/>
|
||||
selinux: Don't mask errors of virSecuritySELinuxGenNewContext (Peter Krempa),<br/>
|
||||
qemu: Fix the wrong expression (Osier Yang),<br/>
|
||||
audit: properly encode device path in cgroup audit (Eric Blake),<br/>
|
||||
network: bridge_driver: don't lose transient networks on daemon restart (Peter Krempa),<br/>
|
||||
qemu: fix default spice password setting (Ján Tomko),<br/>
|
||||
Fix build breaker with ATTRIBUTE_NONNULL defs (John Ferlan),<br/>
|
||||
Resolve valgrind error (John Ferlan),<br/>
|
||||
Do more complete initialization of libgcrypt (Daniel P. Berrange),<br/>
|
||||
qemu: Set correct migrate host in client_migrate_info (Michal Privoznik),<br/>
|
||||
qemu: fix crash in qemuOpen (Ján Tomko),<br/>
|
||||
conf: fix error for parallel port mismatch (Ján Tomko),<br/>
|
||||
conf: fix a memory leak when parsing nat port XML nodes (Guannan Ren),<br/>
|
||||
conf: Fix race between looking up a domain object and freeing it (Peter Krempa),<br/>
|
||||
Fix crash in virNetDevGetVirtualFunctions (Laine Stump),<br/>
|
||||
schemas: Move PortNumber and sourceinfoadapter to basictypes.rng (Han Cheng),<br/>
|
||||
virsh: Unregister the connection close notifier upon termination (Viktor Mihajlovski),<br/>
|
||||
libvirt: Increase connection reference count for callbacks (Viktor Mihajlovski),<br/>
|
||||
storage: Fix volume cloning for logical volume. (Atsushi Kumagai),<br/>
|
||||
security_manager: fix comparison (Guido Günther),<br/>
|
||||
qemu: fix memory leak on -machine usage error (Eric Blake),<br/>
|
||||
qemu-blockjob: Fix limit of bandwidth for block jobs to supported value (Peter Krempa),<br/>
|
||||
sec_manager: Refuse to start domain with unsupported seclabel (Michal Privoznik),<br/>
|
||||
qemu: Fix crash when updating media with shared device (Peter Krempa),<br/>
|
||||
virsh: Call virDomainFree in cmdDomFSTrim (Michal Privoznik),<br/>
|
||||
smartcard: spell ccid-card-emulated qemu property correctly (Eric Blake),<br/>
|
||||
Resolve valgrind failure (John Ferlan)<br/>
|
||||
</li>
|
||||
|
||||
<li>Improvements:<br/>
|
||||
spec: collect all BuildRequires into one area (Eric Blake),<br/>
|
||||
Resolve valgrind error (John Ferlan),<br/>
|
||||
esx: Support virtualHW version 9 (Martin Kletzander),<br/>
|
||||
build: mark conditionally unused variables (Eric Blake),<br/>
|
||||
virsh: clarify vol-{down,up}load description (Ján Tomko),<br/>
|
||||
qemu: report an error if memballoon has wrong address type (Ján Tomko),<br/>
|
||||
qemu: assign addresses when converting xml to native (Ján Tomko),<br/>
|
||||
qemu: Error out if spice port autoallocation is requested, but disabled (Peter Krempa),<br/>
|
||||
qemu: put usb cgroup setup in common function (Laine Stump),<br/>
|
||||
qemu: add vfio devices to cgroup ACL when appropriate (Laine Stump),<br/>
|
||||
qemu: honor allowDiskFormatProbing when parsing command line (Ján Tomko),<br/>
|
||||
conf: add missing error on OOM (Ján Tomko),<br/>
|
||||
qemu: don't always reserve PCI addresses for implicit controllers (Ján Tomko),<br/>
|
||||
conf: remove extraneous _TYPE from driver backend enums (Laine Stump),<br/>
|
||||
network: support <driver name='vfio'/> in network definitions (Laine Stump),<br/>
|
||||
qemu: launch bridge helper from libvirtd (Paolo Bonzini),<br/>
|
||||
virnetdevtap: add virNetDevTapGetName (Paolo Bonzini),<br/>
|
||||
qemu: set qemu process' RLIMIT_MEMLOCK when VFIO is used (Laine Stump),<br/>
|
||||
qemu: use new virCommandSetMax(Processes|Files) (Laine Stump),<br/>
|
||||
util: new virCommandSetMax(MemLock|Processes|Files) (Laine Stump),<br/>
|
||||
Do proper escaping of cgroup resource partitions (Daniel P. Berrange),<br/>
|
||||
Ensure all cgroup partitions have a suffix of ".partition" (Daniel P. Berrange),<br/>
|
||||
Change VM cgroup suffix from '{lxc,qemu}.libvirt' to 'libvirt-{lxc,qemu}' (Daniel P. Berrange),<br/>
|
||||
test: Add JSON test for query-tpm-types (Stefan Berger),<br/>
|
||||
virsh: suppress aliases in group help (Eric Blake),<br/>
|
||||
security: update hostdev labelling functions for VFIO (Laine Stump),<br/>
|
||||
util: new function virPCIDeviceGetVFIOGroupDev (Laine Stump),<br/>
|
||||
virsh: use new virNodeDeviceDetachFlags (Laine Stump),<br/>
|
||||
xen: implement virNodeDeviceDetachFlags backend (Laine Stump),<br/>
|
||||
qemu: implement virNodeDeviceDetachFlags backend (Laine Stump),<br/>
|
||||
hypervisor api: implement RPC calls for virNodeDeviceDetachFlags (Laine Stump),<br/>
|
||||
hypervisor api: new virNodeDeviceDetachFlags (Laine Stump),<br/>
|
||||
qemu: bind/unbind stub driver according to config <driver name='x'/> (Laine Stump),<br/>
|
||||
pci: keep a stubDriver in each virPCIDevice (Laine Stump),<br/>
|
||||
qemu: use vfio-pci on commandline when appropriate (Laine Stump),<br/>
|
||||
conf: formatter/parser/RNG/docs for hostdev <driver name='kvm|vfio'/> (Laine Stump),<br/>
|
||||
conf: put hostdev pci address in a struct (Laine Stump),<br/>
|
||||
qemu: detect vfio-pci device and its bootindex parameter (Laine Stump),<br/>
|
||||
build: avoid unsafe functions in libgen.h (Eric Blake),<br/>
|
||||
qemu: auto-add pci-root to 'pc-i440*' machines too (Ján Tomko),<br/>
|
||||
qemu: auto-add bridges and allow using them (Ján Tomko),<br/>
|
||||
qemu: auto-add pci-root controller for pc machine types (Ján Tomko),<br/>
|
||||
qemu: build command line for pci-bridge device (liguang),<br/>
|
||||
conf: add PCI controllers (Ján Tomko),<br/>
|
||||
qemu: call post-parse callbacks when parsing command line too (Ján Tomko),<br/>
|
||||
qemu: Add command line builder and parser for NVRAM. (Li Zhang),<br/>
|
||||
qemuBuildCommandLine: Don't overwrite errors with NWFilter's one (Michal Privoznik),<br/>
|
||||
Introduce a sub-element <driver> for controller (Osier Yang),<br/>
|
||||
qemu: Don't require a block or file when looking for an alias (Wido den Hollander),<br/>
|
||||
Change the tag name "num_queues" into "queues" (Osier Yang),<br/>
|
||||
qemu: Improve handling of channels when generating SPICE command line (Peter Krempa),<br/>
|
||||
qemu: Do sensible auto allocation of SPICE port numbers (Peter Krempa),<br/>
|
||||
Make driver method names consistent with public APIs (Daniel P. Berrange),<br/>
|
||||
Dedicated name for sub-driver open/close methods (Daniel P. Berrange),<br/>
|
||||
Rename 'DeviceMonitor' to 'NodeDeviceDriver' (Daniel P. Berrange),<br/>
|
||||
Extend previous check to validate driver struct field names (Daniel P. Berrange),<br/>
|
||||
Ensure driver method names match public API names (Daniel P. Berrange),<br/>
|
||||
Make naming of remote procedures match API names exactly (Daniel P. Berrange),<br/>
|
||||
Cleanup command line options in gendispatch.pl (Daniel P. Berrange),<br/>
|
||||
qemu: Split out SPICE port allocation into a separate function (Peter Krempa),<br/>
|
||||
qemu: Use switch instead of ifs in qemuBuildGraphicsCommandLine (Peter Krempa),<br/>
|
||||
qemu: Split out code to generate VNC command line (Peter Krempa),<br/>
|
||||
qemu: Split out code to generate SPICE command line (Peter Krempa),<br/>
|
||||
qemu: Use -machine accel=tcg|kvm when available (Jiri Denemark),<br/>
|
||||
qemu: Move -enable-kvm and friends earlier in the command line (Jiri Denemark),<br/>
|
||||
Switch to a more extensible annotation system for RPC protocols (Daniel P. Berrange),<br/>
|
||||
qemu: Fix setting of memory tunables (Peter Krempa),<br/>
|
||||
logging: Make log regexp more compact (and readable) (Jiri Denemark),<br/>
|
||||
qemu: Ignore libvirt logs when reading QEMU error output (Jiri Denemark),<br/>
|
||||
qemu: Move QEMU log reading into a separate function (Jiri Denemark),<br/>
|
||||
update input ip processing (Gene Czarcinski),<br/>
|
||||
create virSocketAddrGetIpPrefix utility function (Gene Czarcinski),<br/>
|
||||
Replace more cases of /system with /machine (Daniel P. Berrange),<br/>
|
||||
Change default resource partition to /machine (Daniel P. Berrange),<br/>
|
||||
qemu: rename CheckSlot to SlotInUse (Ján Tomko),<br/>
|
||||
qemu: switch PCI address set from hash table to an array (Ján Tomko),<br/>
|
||||
conf: add model attribute to virDomainDefMaybeAddController (Ján Tomko),<br/>
|
||||
qemu: move PCI address check out of qemuPCIAddressAsString (Ján Tomko),<br/>
|
||||
qemu: QEMU_PCI constant consistency (Ján Tomko),<br/>
|
||||
qemu: print PCI address hexadecimally in errors (Ján Tomko),<br/>
|
||||
qemu: make qemuComparePCIDevice aware of multiple buses (Ján Tomko),<br/>
|
||||
conf: Reword error message to be more universal (Peter Krempa),<br/>
|
||||
cpu: Rename PowerPCUpdate and PowerPCDataFree functions (Jiri Denemark),<br/>
|
||||
cpu: Remove hardcoded list of PowerPC models (Jiri Denemark),<br/>
|
||||
cpu: Reimplement PowerPCDecode (Jiri Denemark),<br/>
|
||||
cpu: Reimplement PowerPCBaseline (Jiri Denemark),<br/>
|
||||
cpu: Fix loading PowerPC vendor from cpu_map.xml (Jiri Denemark),<br/>
|
||||
cpu: Fix PowerPCNodeData (Jiri Denemark),<br/>
|
||||
cpu: Make comparing PowerPC CPUs easier to read (Jiri Denemark),<br/>
|
||||
cpu: Introduce cpuModelIsAllowed internal API (Jiri Denemark),<br/>
|
||||
virsh-domain: Refactor cmdVcpucount and fix output on inactive domains (Peter Krempa),<br/>
|
||||
Set legacy USB option with default for ppc64. (Li Zhang),<br/>
|
||||
qemu_conf: add new configuration key bridge_helper (Paolo Bonzini),<br/>
|
||||
util: allow using virCommandAllowCap with setuid helpers (Paolo Bonzini),<br/>
|
||||
util: simplify virSetUIDGIDWithCaps (Paolo Bonzini),<br/>
|
||||
virsh-domain: Report errors on invalid --holdtime value for cmdSendKey (Peter Krempa),<br/>
|
||||
virsh-domain: Clean up cmdSendKey (Peter Krempa),<br/>
|
||||
qemu: simplify use of virArchFromHost (Tal Kain),<br/>
|
||||
rng: tighten up domain <controller> schema (Laine Stump),<br/>
|
||||
network: remove autostart flag from network when undefining it (Peter Krempa),<br/>
|
||||
syntax-check: Only allows to include public headers in external tools (Osier Yang),<br/>
|
||||
syntax-check: Don't include public headers in internal source (Osier Yang),<br/>
|
||||
syntax-check: Don't include duplicate header (Osier Yang),<br/>
|
||||
qemu: Allow the disk wwn to have "0x" prefix (Osier Yang),<br/>
|
||||
cleanup: Don't include libvirt/virterror.h (Osier Yang),<br/>
|
||||
cleanup: Don't include libvirt/libvirt.h (Osier Yang),<br/>
|
||||
cleanup: Remove the duplicate header (Osier Yang),<br/>
|
||||
cleanup: Only include testutils.h once (Osier Yang),<br/>
|
||||
Check for unsupported QMP command (Stefan Berger),<br/>
|
||||
qemu_agent: Add support for appending arrays to commands (Peter Krempa),<br/>
|
||||
Add support for perf_event and net_cls cgroup controllers (Daniel P. Berrange),<br/>
|
||||
Replace LXC cgroup mount code with call to virCgroupIsolateMount (Daniel P. Berrange),<br/>
|
||||
Add an API for re-mounting cgroups, to isolate the process location (Daniel P. Berrange),<br/>
|
||||
Track symlinks for co-mounted cgroup controllers (Daniel P. Berrange),<br/>
|
||||
Remove non-functional code for setting up non-root cgroups (Daniel P. Berrange),<br/>
|
||||
Change default cgroup layout for QEMU/LXC and honour XML config (Daniel P. Berrange),<br/>
|
||||
Add a new virCgroupNewPartition for setting up resource partitions (Daniel P. Berrange),<br/>
|
||||
Cleanup if creating cgroup directories fails (Daniel P. Berrange),<br/>
|
||||
Add misc extra debugging into cgroups code (Daniel P. Berrange),<br/>
|
||||
Refactor cgroups internal data structures (Daniel P. Berrange),<br/>
|
||||
Add a test suite for cgroups functionality (Daniel P. Berrange),<br/>
|
||||
Rename virCgroupForXXX to virCgroupNewXXX (Daniel P. Berrange),<br/>
|
||||
Pull definition of structs out of vircgroup.c to vircgrouppriv.h (Daniel P. Berrange),<br/>
|
||||
Store a virCgroupPtr instance in virLXCDomainObjPrivatePtr (Daniel P. Berrange),<br/>
|
||||
Store a virCgroupPtr instance in qemuDomainObjPrivatePtr (Daniel P. Berrange),<br/>
|
||||
Add missing param to virCgroupForDriver stub (Daniel P. Berrange),<br/>
|
||||
Introduce a virFileDeleteTree method (Daniel P. Berrange),<br/>
|
||||
Conditionalize use of symlink() function in test suite (Daniel P. Berrange),<br/>
|
||||
maint: update to latest gnulib (Eric Blake),<br/>
|
||||
Use unsigned int instead of unsigned (Osier Yang),<br/>
|
||||
qemu: Report also domain name in error message when domain object wasn't found (Peter Krempa),<br/>
|
||||
qemu: Refactor lookup of domain object (Peter Krempa),<br/>
|
||||
cleanup: Change datatype of net->stp to boolean (Osier Yang),<br/>
|
||||
cleanup: Change datatype of usbdev->allow to boolean (Osier Yang),<br/>
|
||||
cleanup: Change datatype of graphic's members to boolean (Osier Yang),<br/>
|
||||
cleanup: Change datatype of accel's members to boolean (Osier Yang),<br/>
|
||||
Add test case for TPM passthrough (Stefan Berger),<br/>
|
||||
TPM support for QEMU command line (Stefan Berger),<br/>
|
||||
QEMU Cgroup support for TPM passthrough (Stefan Berger),<br/>
|
||||
Audit the starting of a guest using TPM passthrough (Stefan Berger),<br/>
|
||||
Add SELinux and DAC labeling support for TPM passthrough (Stefan Berger),<br/>
|
||||
Convert QMP strings into QEMU capability bits (Stefan Berger),<br/>
|
||||
Parse TPM passthrough XML in the domain XML (Stefan Berger),<br/>
|
||||
Helper functions for host TPM support (Stefan Berger),<br/>
|
||||
Add documentation and schema for TPM passthrough (Stefan Berger),<br/>
|
||||
Add function to find a needle in a string array (Stefan Berger),<br/>
|
||||
Add QMP probing for TPM (Stefan Berger),<br/>
|
||||
conf: Allow for non-contiguous device boot orders (Peter Krempa),<br/>
|
||||
Tweak EOF handling of streams (Daniel P. Berrange),<br/>
|
||||
Add USB option capability (Li Zhang),<br/>
|
||||
Add error handling to optional arguments in cmdCPUStats (John Ferlan),<br/>
|
||||
qemu: Do not report unsafe migration for local files (Jiri Denemark),<br/>
|
||||
qemu: Try to use QMP for send-key if supported (Peter Krempa),<br/>
|
||||
virsh: Update list of shutdown/reboot modes (Michal Privoznik),<br/>
|
||||
cleanup: Change datatype of secret->private to boolean (Osier Yang),<br/>
|
||||
cleanup: Change datatype of secret->ephemeral to boolean (Osier Yang),<br/>
|
||||
cleanup: Change datatype of fs->readonly to boolean (Osier Yang),<br/>
|
||||
cleanup: Change datatype of disk->readonly to boolean (Osier Yang),<br/>
|
||||
cleanup: Change datatype of disk->transient to boolean (Osier Yang),<br/>
|
||||
cleanup: Change datatype of disk->shared to boolean (Osier Yang),<br/>
|
||||
cleanup: Change datatype of auth->expires to boolean (Osier Yang),<br/>
|
||||
cleanup: Change datatype of hostdev->missing to boolean (Osier Yang),<br/>
|
||||
Cleanup: Change datatype of origstate's members to boolean (Osier Yang),<br/>
|
||||
Cleanup: Change datatype of hostdev->managed to boolean (Osier Yang),<br/>
|
||||
conf: Change help function (Han Cheng),<br/>
|
||||
qemu: Remove now obsolete assignment of default network card model for s390 hosts (Peter Krempa),<br/>
|
||||
qemu: Clean up network device CLI generator (Peter Krempa),<br/>
|
||||
qemu: Use correct default model on s390 (Viktor Mihajlovski),<br/>
|
||||
sanlock: add missing test command in virt-sanlock-cleanup.in (Alex Jia),<br/>
|
||||
Generate RFC4122 compliant UUIDs (Milos Vyletel),<br/>
|
||||
Unmount existing filesystems under user specified mounts in LXC (Daniel P. Berrange),<br/>
|
||||
Move lxcContainerUnmountSubtree further up in file (Daniel P. Berrange),<br/>
|
||||
Implement support for <hostdev caps=net> (Bogdan Purcareata),<br/>
|
||||
Update structure & XML definitions to support <hostdev caps=net> (Bogdan Purcareata),<br/>
|
||||
Rename virCgroupMounted to virCgroupHasController & make it more robust (Daniel P. Berrange),<br/>
|
||||
qemu: Allow volume type disk for device 'lun' (Osier Yang),<br/>
|
||||
qemu: Support sgio setting for volume type disk (Osier Yang),<br/>
|
||||
qemu: Support shareable volume type disk (Osier Yang),<br/>
|
||||
qemu: Translate the pool disk source earlier (Osier Yang),<br/>
|
||||
Support seclabels for volume type disk (Osier Yang),<br/>
|
||||
Support startupPolicy for 'volume' disk (Osier Yang),<br/>
|
||||
qemu: Translate the pool disk source when building drive string (Osier Yang),<br/>
|
||||
Introduce new XMLs to specify disk source using libvirt storage (Osier Yang),<br/>
|
||||
conf: New helper virDomainDiskSourceDefFormat to format the disk source (Osier Yang),<br/>
|
||||
storage: Guess the parent if it's not specified for vHBA (Osier Yang),<br/>
|
||||
storage: Add startPool and stopPool for scsi backend (Osier Yang),<br/>
|
||||
util: Add helper to get the scsi host name by iterating over sysfs (Osier Yang),<br/>
|
||||
phyp: Prohibit fc_host adapter for phyp driver (Osier Yang),<br/>
|
||||
storage: Move virStorageBackendSCSIGetHostNumber into iscsi backend (Osier Yang),<br/>
|
||||
storage: Make the adapter name be consistent with node device driver (Osier Yang),<br/>
|
||||
New XML attributes for storage pool source adapter (Osier Yang),<br/>
|
||||
Disable cast-align warnings in various places (Daniel P. Berrange),<br/>
|
||||
Copy struct inotify_event entries to avoid alignment problems (Daniel P. Berrange),<br/>
|
||||
Use VIR_ALLOC_VAR instead of VIR_ALLOC_N for creating virObject (Daniel P. Berrange),<br/>
|
||||
Avoid casts between unsigned char * and struct nlmsghdr (Daniel P. Berrange),<br/>
|
||||
Rewrite keycode map to avoid a struct (Daniel P. Berrange),<br/>
|
||||
Add a test suite for keycode mapping functions (Daniel P. Berrange),<br/>
|
||||
qemu: Error out if the bitmap for pinning is all clear (Osier Yang),<br/>
|
||||
util: Add a helper to check if all bits of a bitmap are clear (Osier Yang),<br/>
|
||||
qemu: Support multiple queue virtio-scsi (Osier Yang),<br/>
|
||||
build: check correct protocol.o file (Eric Blake),<br/>
|
||||
build: use proper pod for nested bulleted VIRSH_DEBUG list (Eric Blake),<br/>
|
||||
qemu: Remove maximum cpu limit when setting processor count using the API (Peter Krempa),<br/>
|
||||
Don't create dirs in cgroup controllers we don't want to use (Daniel P. Berrange),<br/>
|
||||
Rename virCgroupGetAppRoot to virCgroupForSelf (Daniel P. Berrange),<br/>
|
||||
Ensure LD_PRELOAD exists before running test case (Daniel P. Berrange),<br/>
|
||||
Refactor RNG schema for resource tuning (Daniel P. Berrange),<br/>
|
||||
rpc: Fix connection close callback race condition and memory corruption/crash (Peter Krempa),<br/>
|
||||
virsh: Register and unregister the close callback also in cmdConnect (Peter Krempa),<br/>
|
||||
virsh: Move cmdConnect from virsh-host.c to virsh.c (Peter Krempa),<br/>
|
||||
virCaps: get rid of defaultConsoleTargetType callback (Peter Krempa),<br/>
|
||||
virCaps: get rid of macPrefix field (Peter Krempa),<br/>
|
||||
virCaps: get rid of hasWideScsiBus (Peter Krempa),<br/>
|
||||
virCaps: get rid of defaultDiskDriverType (Peter Krempa),<br/>
|
||||
virCaps: get rid of emulatorRequired (Peter Krempa),<br/>
|
||||
virCaps: get rid of defaultDiskDriverName (Peter Krempa),<br/>
|
||||
virCaps: get rid of "defaultInitPath" value in the virCaps struct (Peter Krempa),<br/>
|
||||
qemu: Record the default NIC model in the domain XML (Peter Krempa),<br/>
|
||||
conf callback: Rearrange function parameters (Peter Krempa),<br/>
|
||||
conf: Add post XML parse callbacks and prepare for cleaning of virCaps (Peter Krempa),<br/>
|
||||
maint: Rename xmlconf to xmlopt and virDomainXMLConfig to virDomainXMLOption (Peter Krempa),<br/>
|
||||
Create fake NUMA info if libnuma isn't available (Daniel P. Berrange),<br/>
|
||||
Cope with missing /sys/devices/system/cpu/cpu0/topology files (Daniel P. Berrange),<br/>
|
||||
Add armv6l architecture to list of valid arches (Daniel P. Berrange),<br/>
|
||||
Implement minimal sysinfo for ARM platforms (Daniel P. Berrange),<br/>
|
||||
Disable of unused sysinfotest functions (Daniel P. Berrange),<br/>
|
||||
Wire up sysinfo for LXC driver (Daniel P. Berrange),<br/>
|
||||
Add support for SD cards in nodedev driver (Daniel P. Berrange),<br/>
|
||||
Auto-add a root <filesystem> element to LXC containers on startup (Daniel P. Berrange),<br/>
|
||||
Remove support for old kernels lacking private devpts (Daniel P. Berrange),<br/>
|
||||
Enable full RELRO mode (Daniel P. Berrange),<br/>
|
||||
Build all binaries with PIE (Daniel P. Berrange),<br/>
|
||||
rng: Add definition for network disk source (Osier Yang),<br/>
|
||||
Disable static libraries by default (Daniel P. Berrange),<br/>
|
||||
Allow multiple parameters for schedinfo (Martin Kletzander),<br/>
|
||||
virsh-domain: Add --live, --config, --current logic to cmdDetachDisk (Peter Krempa),<br/>
|
||||
virsh-domain: Add --live, --config, --current logic to cmdDetachDevice (Peter Krempa),<br/>
|
||||
virsh-domain: Add --live, --config, --current logic to cmdDetachInterface (Peter Krempa),<br/>
|
||||
virsh: Fix semantics of --config for "update-device" command (Peter Krempa),<br/>
|
||||
virsh-domain: Fix declarations of flag variables in cmdChangeMedia (Peter Krempa),<br/>
|
||||
virsh-domain: Simplify usage of --current, --live and --config flags (Peter Krempa),<br/>
|
||||
virsh-domain-monitor: Refactor cmdDomIfGetLink (Peter Krempa),<br/>
|
||||
Use virMacAddrFormat instead of manual mac address formatting (Peter Krempa),<br/>
|
||||
util: Change virMacAddrFormat to lowercase hex characters (Peter Krempa),<br/>
|
||||
Optimize machine option to set more options with it (Li Zhang),<br/>
|
||||
conf: Enforce ranges on cputune variables (Peter Krempa),<br/>
|
||||
test: Return Libvirt logo as domain screenshot (Michal Privoznik),<br/>
|
||||
qemu: Allow migration over IPv6 (Ján Tomko),<br/>
|
||||
virsh: Add a helper to parse cpulist (Osier Yang)<br/>
|
||||
</li>
|
||||
|
||||
<li>Cleanups:<br/>
|
||||
qemu_command.c: Fix whitespacing within for() (Michal Privoznik),<br/>
|
||||
qemu: Fix the indention (Osier Yang),<br/>
|
||||
Sanitize whitespace in driver.h (Daniel P. Berrange),<br/>
|
||||
sheepdog: Omit braces with a single-line body (Harry Wei),<br/>
|
||||
storage: Fix the indention (Osier Yang),<br/>
|
||||
Remove extraneous comma in info_cpu_stats and opts_cpu_stats (John Ferlan)<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>1.0.4: Apr 1 2013</h3>
|
||||
<ul>
|
||||
<li>Features:<br/>
|
||||
qemu: support passthrough for iscsi disks (Paolo Bonzini),<br/>
|
||||
various S390 improvements (Viktor Mihajlovski),<br/>
|
||||
various LXC bugs fixes and improvements (Daniel P. Berrange, Gao feng),<br/>
|
||||
Add API for thread cancellation (Daniel P. Berrange)<br/>
|
||||
</li>
|
||||
|
||||
<li>Documentation:<br/>
|
||||
Fix truncated sentence in RDP 'multiUser' attribute (Christophe Fergeau),<br/>
|
||||
Remove the redundant parentheses in migrate help (Yanbing Du),<br/>
|
||||
virsh: Fix docs for "virsh setmaxmem" (Peter Krempa),<br/>
|
||||
util: fix virAllocVar's comment (Ján Tomko),<br/>
|
||||
clarify virsh net commands (Gene Czarcinski),<br/>
|
||||
storage: Fix grammar (Philipp Hahn),<br/>
|
||||
Fix /pool/storage/name documentation (Christophe Fergeau),<br/>
|
||||
Fix /pool/storage/directory@path documentation (Christophe Fergeau),<br/>
|
||||
Fix snapshot-create-as syntax in help output (Martin Kletzander),<br/>
|
||||
Update to COPYING.LIB to latest LGPLv2.1 copy (Christophe Fergeau),<br/>
|
||||
Fix a copy & paste error for virsh dump help (Yanbing Du),<br/>
|
||||
Clarify semantics of sparse storage volumes (Jiri Denemark)<br/>
|
||||
</li>
|
||||
|
||||
<li>Portability:<br/>
|
||||
virutil: Fix compilation on non-linux platforms (Michal Privoznik),<br/>
|
||||
Fix linkage of virt-aa-helper with numa library (Daniel P. Berrange),<br/>
|
||||
Don't fail if SELinux is diabled (Guido Günther),<br/>
|
||||
Fix --without-libvirtd builds (Doug Goldstein),<br/>
|
||||
lxc: include sys/stat.h (Guido Günther),<br/>
|
||||
Ensure GET_VLAN_VID_CMD is always defined (Daniel P. Berrange),<br/>
|
||||
Don't import loop.h unless HAVE_DECL_LO_FLAGS_AUTOCLEAR is defined (Daniel P. Berrange)<br/>
|
||||
</li>
|
||||
|
||||
<li>Bug Fixes:<br/>
|
||||
virsh: don't call virSecretFree on NULL (Ján Tomko),<br/>
|
||||
storage: Avoid double virCommandFree in virStorageBackendLogicalDeletePool (Martin Kletzander),<br/>
|
||||
nodedev: invert virIsCapableFCHost return value (Ján Tomko),<br/>
|
||||
security_manager.c: Append seclabel iff generated (Michal Privoznik),<br/>
|
||||
security: Don't add seclabel of type none if there's already a seclabel (Michal Privoznik),<br/>
|
||||
security_manager: Don't manipulate domain XML in virDomainDefGetSecurityLabelDef (Michal Privoznik),<br/>
|
||||
conf: fix memory leak of class_id bitmap (Guannan Ren),<br/>
|
||||
uml:release config object when uml driver shutdown (Guannan Ren),<br/>
|
||||
qemu:release qemu config object when qemu driver shutdown (Guannan Ren),<br/>
|
||||
net: use newer iptables syntax (Stefan Seyfried),<br/>
|
||||
remote: Don't call NULL closeFreeCallback (Viktor Mihajlovski),<br/>
|
||||
rpc: Fix client crash when server drops connection (Jiri Denemark),<br/>
|
||||
conf: fix a failure when detaching a usb device (Guannan Ren),<br/>
|
||||
qemu: Don't set address type too early during virtio disk hotplug (Guido Günther),<br/>
|
||||
virsh: error out on non-numeric timeout values (Ján Tomko),<br/>
|
||||
qemu: Set migration FD blocking (Michal Privoznik),<br/>
|
||||
util: Fix bug of managing vport (Osier Yang),<br/>
|
||||
nodedev: Fix the improper logic when enumerating SRIOV VF (Osier Yang),<br/>
|
||||
lxc: Prevent shutting down the host (Martin Kletzander),<br/>
|
||||
Ensure root filesystem is mounted if a file/block mount. (Daniel P. Berrange),<br/>
|
||||
Fix thread safety in LXC callback handling (Daniel P. Berrange),<br/>
|
||||
Remove bogus filtering from virDomainGetRootFilesystem (Daniel P. Berrange),<br/>
|
||||
Fix parsing of bond interface XML (Jim Fehlig),<br/>
|
||||
virsh: don't print --(null) in vol-name and vol-pool (Ján Tomko),<br/>
|
||||
Fix free of uninitialized value in LXC numad setup (Daniel P. Berrange),<br/>
|
||||
Correct invalid RNG schemas (Martin Kletzander),<br/>
|
||||
python: Fix emulatorpin API bindings (Peter Krempa),<br/>
|
||||
qemu: Un-mark volume as mirrored/copied if blockjob copy fails (Peter Krempa),<br/>
|
||||
Fix initialization of virIdentityPtr thread locals (Daniel P. Berrange),<br/>
|
||||
qemu: Add the new disk src into shared disk table when updating disk (Osier Yang),<br/>
|
||||
python: fix bindings that don't raise an exception (Guannan Ren),<br/>
|
||||
Fix typos s/HAVE_SELINUX/WITH_SELINUX/ (Daniel P. Berrange),<br/>
|
||||
fix TLS error with virNetServerClientCreateIdentity (Olivia Yin),<br/>
|
||||
storage: fix unlikely memory leak in rbd backend (Laine Stump),<br/>
|
||||
Do not prematurely close loop devices in LXC controller (Daniel P. Berrange),<br/>
|
||||
qemu: Fix startupPolicy regression (Jiri Denemark),<br/>
|
||||
qemu: do not support non-network disks without -drive (Paolo Bonzini),<br/>
|
||||
Fix size probing for VDI images (Ján Tomko),<br/>
|
||||
Fix memory leak on OOM in virSecuritySELinuxMCSFind (Daniel P. Berrange),<br/>
|
||||
Avoid closing uninitialized FDs when LXC startup fails (Daniel P. Berrange),<br/>
|
||||
Prevent streams from becoming libvirtd controlling TTY (Daniel P. Berrange),<br/>
|
||||
util: escapes special characters in VIR_LOG_REGEX (Guannan Ren),<br/>
|
||||
Daemonize fuse thread in libvirt_lxc (Daniel P. Berrange),<br/>
|
||||
Fix missing error dispatch in virDomainLxcEnterNamespace (Daniel P. Berrange),<br/>
|
||||
Fix query of LXC security label (Daniel P. Berrange),<br/>
|
||||
qemu_driver: Try KVM_CAP_MAX_VCPUS only if defined (Michal Privoznik),<br/>
|
||||
Add missing break in LXC loop device setup (Daniel P. Berrange),<br/>
|
||||
qemu: Avoid NULL dereference in qemuSharedDiskEntryFree (Jiri Denemark),<br/>
|
||||
qemu: Fix retrieval of maximum number of vCPUs on KVM hosts (Peter Krempa),<br/>
|
||||
virsh: fix snapshot-create with no xmlfile (Ján Tomko),<br/>
|
||||
lxc: Init activeUsbHostdevs (Guido Günther),<br/>
|
||||
bandwidth: Require network QoS if interface uses 'floor' (Michal Privoznik),<br/>
|
||||
qemuDomainBlockStatsFlags: Guard disk lookup with a domain job (Michal Privoznik),<br/>
|
||||
Fix crash parsing RNG device specification (Daniel P. Berrange),<br/>
|
||||
Resolve valgrind error (John Ferlan),<br/>
|
||||
storage: Cleanup logical volume creation code (Jiri Denemark),<br/>
|
||||
qemu: update domain live xml for virsh memtune with --live flag (Guannan Ren),<br/>
|
||||
util: fix a integer boundary error (Guannan Ren)<br/>
|
||||
</li>
|
||||
|
||||
<li>Improvements:<br/>
|
||||
util: Fix the conflict type for virIsCapableFCHost (Osier Yang),<br/>
|
||||
libvirt_private.syms: Correctly export seclabel APIs (Michal Privoznik),<br/>
|
||||
log: Separate thread ID from timestemp in ring buffer (Jiri Denemark),<br/>
|
||||
virsh: Correct DESCRIPTION for virsh help blockcopy (Yanbing Du),<br/>
|
||||
Fix virConnectOpen.*() name requirements (Martin Kletzander),<br/>
|
||||
virsh: Let the compiler check usage of all fields in vshCmdOptType enum (Peter Krempa),<br/>
|
||||
python: set default value to optional arguments (Guannan Ren),<br/>
|
||||
libvirt-guests: newline between output sentences (Eric Blake),<br/>
|
||||
nodedev: Abstract nodeDeviceVportCreateDelete as util function (Osier Yang),<br/>
|
||||
nodedev: Dump max vports and vports in use for HBA's XML (Osier Yang),<br/>
|
||||
nodedev: Refactor the helpers (Osier Yang),<br/>
|
||||
nodedev: Use access instead of stat (Osier Yang),<br/>
|
||||
util: Add one helper virReadFCHost to read the value of fc_host entry (Osier Yang),<br/>
|
||||
nodedev: Introduce two new flags for listAll API (Osier Yang),<br/>
|
||||
nodedev: Remove the unused enum (Osier Yang),<br/>
|
||||
Mount temporary devpts on /var/lib/libvirt/lxc/$NAME.devpts (Daniel P. Berrange),<br/>
|
||||
Move FUSE mount to /var/lib/libvirt/lxc/$NAME.fuse (Daniel P. Berrange),<br/>
|
||||
viralloc: Export virAllocTest* (Michal Privoznik),<br/>
|
||||
qemu: add support for LSI MegaRAID SAS1078 (aka megasas) SCSI controller (Paolo Bonzini),<br/>
|
||||
qemu: pass iscsi authorization credentials (Paolo Bonzini),<br/>
|
||||
domain: parse XML for iscsi authorization credentials (Paolo Bonzini),<br/>
|
||||
secret: add iscsi to possible usage types (Paolo Bonzini),<br/>
|
||||
domain: make port optional for network disks (Paolo Bonzini),<br/>
|
||||
qemu: add support for libiscsi (Paolo Bonzini),<br/>
|
||||
make: regenerate bindings when <classname>.py changes (Guannan Ren),<br/>
|
||||
python: treat flags as default argument with value 0 (Guannan Ren),<br/>
|
||||
virsh-snapshot: Simplify cleanup path in cmdSnapshotEdit (Peter Krempa),<br/>
|
||||
virsh-snapshot: Use the mutually exclusive params macro in cmdSnapshotEdit (Peter Krempa),<br/>
|
||||
virsh-snapshot: Refactor cmdSnapshotCurrent (Peter Krempa),<br/>
|
||||
virsh-domain: Fix flag name in error message to match the check (Peter Krempa),<br/>
|
||||
virsh-host: Refactor cmdFreecell (Peter Krempa),<br/>
|
||||
virsh-snapshot: Refactor virsh snapshot-list (Peter Krempa),<br/>
|
||||
virsh: Introduce macros to reject mutually exclusive arguments (Peter Krempa),<br/>
|
||||
qemu: s/VIR_ERR_NO_SUPPORT/VIR_ERR_OPERATION_UNSUPPORTED (Michal Privoznik),<br/>
|
||||
domain: add support for iscsi network disks (Paolo Bonzini),<br/>
|
||||
cgroup: export virCgroupRemoveRecursively (Gao feng),<br/>
|
||||
doc/schema: disk storage volume formats (Philipp Hahn),<br/>
|
||||
doc/schema: Support iqn for storage pools (Philipp Hahn),<br/>
|
||||
doc/schema: add ocfs2 for disk vol (Philipp Hahn),<br/>
|
||||
LXC: add cpuset cgroup support for lxc (Gao feng),<br/>
|
||||
NUMA: cleanup for numa related codes (Gao feng),<br/>
|
||||
LXC: allow uses advisory nodeset from querying numad (Gao feng),<br/>
|
||||
rename qemuGetNumadAdvice to virNumaGetAutoPlacementAdvice (Gao feng),<br/>
|
||||
selinux: deal with dtb file (Olivia Yin),<br/>
|
||||
qemu: add dtb option support (Olivia Yin),<br/>
|
||||
conf: support <dtb> tag in XML domain file (Olivia Yin),<br/>
|
||||
rename tests/conftest.c (Gene Czarcinski),<br/>
|
||||
Setup LXC cgroups in two phases (Daniel P. Berrange),<br/>
|
||||
Set the current client identity during API call dispatch (Daniel P. Berrange),<br/>
|
||||
Add ability to get a virIdentity from a virNetServerClientPtr (Daniel P. Berrange),<br/>
|
||||
internal APIs for managing identities (Daniel P. Berrange),<br/>
|
||||
Add API to get the system identity (Daniel P. Berrange),<br/>
|
||||
Add APIs for associating a virIdentityPtr with the current thread (Daniel P. Berrange),<br/>
|
||||
Define internal APIs for managing identities (Daniel P. Berrange),<br/>
|
||||
Add APIs to get at more client security data (Daniel P. Berrange),<br/>
|
||||
qemu: support URI syntax for NBD (Paolo Bonzini),<br/>
|
||||
qemu: support NBD with Unix sockets (Paolo Bonzini),<br/>
|
||||
qemu: support named nbd exports (Paolo Bonzini),<br/>
|
||||
qemu: rewrite NBD command-line builder and parser (Paolo Bonzini),<br/>
|
||||
qemu: test NBD command-line builder and parser (Paolo Bonzini),<br/>
|
||||
util: portably check for unchanged uid (Eric Blake),<br/>
|
||||
Make vshDebug work when parsing parameters (Martin Kletzander),<br/>
|
||||
Remove contiguous CPU indexes assumption (Li Zhang),<br/>
|
||||
audit: Audit resources used by VirtIO RNG (Peter Krempa),<br/>
|
||||
S390: Testcases for virtio-scsi and virtio-rng (Viktor Mihajlovski),<br/>
|
||||
S390: Enable virtio-scsi and virtio-rng (Viktor Mihajlovski),<br/>
|
||||
qemu: Rename virtio-scsi capability (Viktor Mihajlovski),<br/>
|
||||
util: fix clear_emulator_capabilities=0 (Laine Stump),<br/>
|
||||
Fix deps for generating RPC dispatch code (Daniel P. Berrange),<br/>
|
||||
Fix generation of systemtap probes for RPC protocols (Daniel P. Berrange),<br/>
|
||||
Re-add DTrace probes on 'dispose' functions (Daniel P. Berrange),<br/>
|
||||
Fix parsing of SELinux ranges without a category (Daniel P. Berrange),<br/>
|
||||
Separate MCS range parsing from MCS range checking (Daniel P. Berrange),<br/>
|
||||
virtio-rng: Add rate limiting options for virtio-RNG (Peter Krempa),<br/>
|
||||
S390: Testcases for virtio-ccw machines (Viktor Mihajlovski),<br/>
|
||||
S390: Add hotplug support for s390 virtio devices (J.B. Joret),<br/>
|
||||
S390: QEMU driver support for CCW addresses (Viktor Mihajlovski),<br/>
|
||||
S390: domain_conf support for CCW (Viktor Mihajlovski),<br/>
|
||||
S390: Documentation for CCW address type (Viktor Mihajlovski),<br/>
|
||||
Use separate symbol file for GNUTLS symbols (Daniel P. Berrange),<br/>
|
||||
Apply security label when entering LXC namespaces (Daniel P. Berrange),<br/>
|
||||
virCaps: conf: start splitting out irrelevat data (Peter Krempa),<br/>
|
||||
Remove hack using existance of an 'identity' string to disable auth (Daniel P. Berrange),<br/>
|
||||
Convert HAVE_SELINUX to WITH_SELINUX (Guido Günther),<br/>
|
||||
capabilities: add NUMA memory information (Dusty Mabe),<br/>
|
||||
apparmor: use AppArmorSetFDLabel for both imageFD and tapFD (Guannan Ren),<br/>
|
||||
Include pid namespace inode in LXC audit messages (Daniel P. Berrange),<br/>
|
||||
Add support for disks backed by plain files in LXC (Daniel P. Berrange),<br/>
|
||||
Refactor loop device setup code in LXC (Daniel P. Berrange),<br/>
|
||||
Convert QEMU driver to use virLogProbablyLogMessage (Daniel P. Berrange),<br/>
|
||||
Improve LXC startup error reporting (Daniel P. Berrange),<br/>
|
||||
Add method for checking if a string is (probably) a log message (Daniel P. Berrange),<br/>
|
||||
Use VIR_MASS_CLOSE in LXC container startup (Daniel P. Berrange),<br/>
|
||||
Fix conditional build of virNetDevSetupControlFull (Daniel P. Berrange),<br/>
|
||||
Rename 'daemon' param to 'binary' in virNetClientNewUNIX (Daniel P. Berrange),<br/>
|
||||
Rename 'clone' to 'clonevol' to avoid name clash with clone() syscall (Daniel P. Berrange),<br/>
|
||||
viralloc: use consistent naming (Eric Blake),<br/>
|
||||
rng: allow default device in RNG grammar (Eric Blake),<br/>
|
||||
build: avoid shadowing a function name (Eric Blake),<br/>
|
||||
conf: Report errors on cputune parameter parsing (Peter Krempa),<br/>
|
||||
conf: Make virDomainDeviceInfoIterate usable without os type (Peter Krempa),<br/>
|
||||
virsh-snapshot: Add ability to print only snapshot names (Peter Krempa)<br/>
|
||||
</li>
|
||||
|
||||
<li>Cleanups:<br/>
|
||||
python:remove semicolon in python code (Guannan Ren),<br/>
|
||||
Clean redundant code about VCPU string checking (Li Zhang),<br/>
|
||||
Cleanup useless flags specifications (Martin Kletzander),<br/>
|
||||
nodeinfo: don't define nodeGetCellMemory if it isn't ever used (Hu Tao),<br/>
|
||||
virsh-domain: Remove unused vshCompleteXMLFromDomain (Peter Krempa),<br/>
|
||||
sheepdog: Adjust logic to break while loop to avoid Coverity error (John Ferlan),<br/>
|
||||
libxl_driver: Resolve Coverity errors (John Ferlan),<br/>
|
||||
libxl_conf: Resolve Coverity issue with call to regcomp() (John Ferlan),<br/>
|
||||
conf: whitespace cleanups and refactors with no semantic impact (Peter Krempa)<br/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.0.3: Mar 5 2013</h3>
|
||||
<ul>
|
||||
<li>Features:<br/>
|
||||
Introduce virDomainMigrate*CompressionCache APIs (Jiri Denemark),<br/>
|
||||
Introduce virDomainGetJobStats API (Jiri Denemark),<br/>
|
||||
Add basic support for VDI images (Martin Kletzander),<br/>
|
||||
Introduce API virNodeDeviceLookupSCSIHostByWWN (Osier Yang),<br/>
|
||||
Various locking improvements (Daniel P. Berrange)<br/>
|
||||
</li>
|
||||
|
||||
<li>Documentation:<br/>
|
||||
internals: Update to include RPC and Lock links and add new data (John Ferlan),<br/>
|
||||
Add references for phyp and parallels (John Ferlan),<br/>
|
||||
api: Add text and references for daemon (John Ferlan),<br/>
|
||||
api: Add text and references for drivers section (John Ferlan),<br/>
|
||||
api: Complete list of function and naming conventions (John Ferlan),<br/>
|
||||
api: Reword and clean lists for object description (John Ferlan),<br/>
|
||||
api: Reword objects exposed section (John Ferlan),<br/>
|
||||
hellolibvirt: Adjust code to use new APIs (John Ferlan),<br/>
|
||||
libvirt: Update headers for doc (John Ferlan),<br/>
|
||||
hook: log the exit status of the hook not 256 (Guido Günther),<br/>
|
||||
maint: fix typo in network docs (Eric Blake),<br/>
|
||||
util: Add docs for virXMLProp string (Peter Krempa),<br/>
|
||||
Fix attribute name for virtio-rng backend (Peter Krempa),<br/>
|
||||
document new storage volume/pool types (Philipp Hahn),<br/>
|
||||
schema: Add basic documentation for the virtual RNG device support (Peter Krempa),<br/>
|
||||
util: fix typo in comment (Laine Stump),<br/>
|
||||
Add missing 'vram' in QXL video device doc (Christophe Fergeau),<br/>
|
||||
Fix HTML errors (Jiri Denemark),<br/>
|
||||
fix 1.0.2 release date (Eric Blake),<br/>
|
||||
HACKING: Sync with docs/hacking.html.in (John Ferlan),<br/>
|
||||
hacking: Add some details to handle Valgrind output (John Ferlan),<br/>
|
||||
don't ignore virEvent API (Eric Blake),<br/>
|
||||
use div, not table, for notices on opaque types (Claudio Bley),<br/>
|
||||
abort when missing return or argument documentation (Claudio Bley),<br/>
|
||||
libvirt.h.in: document virConnectDomainEventCallback's return value (Claudio Bley),<br/>
|
||||
libvirt.h.in: add missing return doc for virEventRemoveHandleFunc (Claudio Bley),<br/>
|
||||
libvirt.h.in: fix documentation for virConnectDomainEventBlockJobCallback (Claudio Bley),<br/>
|
||||
libvirt.h.in: add missing documentation for virConnectCloseFunc (Claudio Bley),<br/>
|
||||
Sync HACKING and hacking.html.in (Martin Kletzander)<br/>
|
||||
</li>
|
||||
|
||||
<li>Portability:<br/>
|
||||
build: don't use gcrypt.h without gnutls support (Eric Blake),<br/>
|
||||
tests: skip virstoragetest on RHEL 5 (Eric Blake),<br/>
|
||||
Remove some C99 variable decls in parallels driver (Daniel P. Berrange),<br/>
|
||||
tests: old automake lacks abs_builddir (Eric Blake),<br/>
|
||||
tests: consistent skip messages (Eric Blake),<br/>
|
||||
tests: don't test json when not compiled in (Eric Blake),<br/>
|
||||
tests: avoid segfault if json monitor not present (Eric Blake),<br/>
|
||||
run: use portable shell (Eric Blake),<br/>
|
||||
s/arm/armv7l/ in caps-qemu-kvm.xml (Daniel P. Berrange),<br/>
|
||||
build: force correct gcc syntax for attribute_nonnull (Eric Blake),<br/>
|
||||
build: more mingw fixes (Eric Blake),<br/>
|
||||
build: fix mingw build (Eric Blake),<br/>
|
||||
build: fix vircommand build on mingw (Eric Blake),<br/>
|
||||
regex: gnulib guarantees that we have regex support (Eric Blake),<br/>
|
||||
build: fix compilation of selinux on RHEL 5 (Eric Blake),<br/>
|
||||
build: fix VPATH testsuite (Eric Blake),<br/>
|
||||
build: fix build of HAL node backend (Eric Blake),<br/>
|
||||
sanitytest.py: Do not rely on system libvirt (Jiri Denemark),<br/>
|
||||
tests: reserve more fds for commandtest (Eric Blake),<br/>
|
||||
build: Add libcurl dependency to libvirt_driver.la (Jiri Denemark),<br/>
|
||||
tests: Don't build securityselinuxlabeltest without qemu (Jiri Denemark)<br/>
|
||||
</li>
|
||||
|
||||
<li>Bug Fixes:<br/>
|
||||
Fix TLS tests with gnutls 3 (Daniel P. Berrange),<br/>
|
||||
qemu: fix wrong evaluation in qemuDomainSetMemoryParameters (Satoru Moriya),<br/>
|
||||
libvirt does not logout of iscsi targets, causing system hang on shutdown (Fritz Elfert),<br/>
|
||||
qemu: Remove managed save flag from VM when starting with --force-boot (Peter Krempa),<br/>
|
||||
qemu: Use -1 as unpriviledged uid/gid (Christophe Fergeau),<br/>
|
||||
virnetdevmacvlan.c: Introduce mutex for macvlan creation (Michal Privoznik),<br/>
|
||||
Fix deadlock in QEMU close callback APIs (Daniel P. Berrange),<br/>
|
||||
Fix crash in QEMU auto-destroy with transient guests (Daniel P. Berrange),<br/>
|
||||
python: fix fd leak in generator.py (Guannan Ren),<br/>
|
||||
qemu: Make sure qemuProcessStart is run within a job (Jiri Denemark),<br/>
|
||||
Fix starting qemu instances when apparmor driver is enabled (Jim Fehlig),<br/>
|
||||
qemu: Don't fail to shutdown domains with unresponsive agent (Michal Privoznik),<br/>
|
||||
qemu: virConnectGetVersion returns bogus value (Viktor Mihajlovski),<br/>
|
||||
qemu: fix use-after-free when parsing NBD disk (Paolo Bonzini),<br/>
|
||||
Don't try to add non-existant devices to ACL (Daniel P. Berrange),<br/>
|
||||
Fix typo in internal VIR_QEMU_PROCESS_START_AUTODESROY constant (Daniel P. Berrange),<br/>
|
||||
Fix autodestroy of QEMU guests (Daniel P. Berrange),<br/>
|
||||
qemu: -numa doesn't (yet) support disjoint range (Eric Blake),<br/>
|
||||
interface: udev backend coverity NULL deref (Doug Goldstein),<br/>
|
||||
Fix crash changing CDROM media (Daniel P. Berrange),<br/>
|
||||
qemu: do not set unpriv_sgio if neither supported nor requested (Paolo Bonzini),<br/>
|
||||
conf: Avoid leaking of RNG device definition (Peter Krempa),<br/>
|
||||
interface: Fix udev backend bridge device display (Doug Goldstein),<br/>
|
||||
storage: use f_frsize, not f_bsize, for calculating available space (Sage Weil),<br/>
|
||||
conf: Don't leak 'ram' video property on error (Christophe Fergeau),<br/>
|
||||
conf: Don't leak 'primary' video property on error (Christophe Fergeau),<br/>
|
||||
qemu: check backing chains even when cgroup is omitted (Eric Blake),<br/>
|
||||
qemu: Avoid deadlock in autodestroy (Jiri Denemark),<br/>
|
||||
qemu: fix an off-by-one error in qemuDomainGetPercpuStats (Guannan Ren),<br/>
|
||||
qemu: Fix the memory leak (Osier Yang),<br/>
|
||||
keepalive: Guard against integer overflow (John Ferlan),<br/>
|
||||
libxl: Fix setting of disk backend (Jim Fehlig),<br/>
|
||||
Remove a couple of misplaced VIR_FREE (John Ferlan),<br/>
|
||||
Fix memory leak in virNetClientIOWriteMessage (Sergey Fionov),<br/>
|
||||
qemu: Do not ignore mandatory features in migration cookie (Jiri Denemark),<br/>
|
||||
rpc: Avoid deadlock when closing client connection (Jiri Denemark),<br/>
|
||||
Avoid resetting errors in virTypedParamsFree (Jiri Denemark),<br/>
|
||||
interface: fix udev backend use after free (Doug Goldstein),<br/>
|
||||
virsh: Resolve possible NULL dereference (John Ferlan),<br/>
|
||||
commandtest: Resolve some coverity resource leaks (John Ferlan),<br/>
|
||||
Fix libvirt upgrade path when nwfilter is used (Stefan Berger),<br/>
|
||||
util: maintain caps when running command with uid != 0 (Laine Stump),<br/>
|
||||
virCommand: Don't misuse the eventloop for async IO (Michal Privoznik),<br/>
|
||||
Release VM lock before acquiring virDomainObjListPtr lock (Daniel P. Berrange),<br/>
|
||||
Fix potential deadlock across fork() in QEMU driver (Daniel P. Berrange),<br/>
|
||||
hypervisor: Restore pm initialization (John Ferlan),<br/>
|
||||
Remove re-entrant API call in SELinux/AppArmor security managers (Daniel P. Berrange),<br/>
|
||||
xend: Fix a memory leak found by Coverity (John Ferlan),<br/>
|
||||
network_conf.c: Free xmlDoc after use (Michal Privoznik),<br/>
|
||||
virsh-snapshot: Fix XPath query to determine snapshot state (Peter Krempa),<br/>
|
||||
virnetttlcontext: Resolve issues found by Valgrind (John Ferlan),<br/>
|
||||
qemumonitortestutils: Resolve resource leaks found by Valgrind (John Ferlan),<br/>
|
||||
qemumonitorjsontest: Resolve resource leaks found by Valgrind (John Ferlan),<br/>
|
||||
qemu_command: Resolve resource leaks found by Valgrind (John Ferlan),<br/>
|
||||
domain_conf: Resolve resource leaks found by Valgrind (John Ferlan),<br/>
|
||||
vport_profile_conf: Resolve memory leak found by Valgrind (John Ferlan),<br/>
|
||||
netdev_vlan_conf: Resolve memory leak found by Valgrind. (John Ferlan),<br/>
|
||||
qemuxml2argvtest: Resolve resource leaks found by Valgrind (John Ferlan),<br/>
|
||||
virnettlscontexttest: Resolve memory leak found by Valgrind (John Ferlan),<br/>
|
||||
qemu_hotplug: Need to call virUSBDeviceFree() (John Ferlan),<br/>
|
||||
rpc: Need to virCommandFree on error path (John Ferlan),<br/>
|
||||
uml: Resolve leak if need to requery in umlIdentifyOneChrPTY() (John Ferlan),<br/>
|
||||
openvz: Need to error check openvzDomainSetVcpusFlagsInternal() (John Ferlan),<br/>
|
||||
parallels: Need to free memory on error path (John Ferlan),<br/>
|
||||
network: Remove conditional settings to resolve resource leak (John Ferlan),<br/>
|
||||
storage: Resolve resource leaks with cmd processing (John Ferlan),<br/>
|
||||
keepalive: Resolve Coverity complaint (John Ferlan),<br/>
|
||||
tlscontext: Make sure to get proper pointer to 'dname' (John Ferlan),<br/>
|
||||
Fix leak of usbDevice struct when initializing cgroups (Daniel P. Berrange),<br/>
|
||||
Fix typo in configure.ac causing $LIBS to gain a copy of $CFLAGS (Daniel P. Berrange),<br/>
|
||||
util: Fix mask for 172.16.0.0 private address range (Jiri Denemark)<br/>
|
||||
</li>
|
||||
|
||||
<li>Improvements:<br/>
|
||||
rng: restrict passthrough names to known-good files (Eric Blake),<br/>
|
||||
util: use string libvirt to prefix error message instead of libvir (Guannan Ren),<br/>
|
||||
python: fix typoes and repeated global vars references (Guannan Ren),<br/>
|
||||
Fix a message typo (Serge Hallyn),<br/>
|
||||
Avoid spamming logs with cgroups warnings (Daniel P. Berrange),<br/>
|
||||
tests: Test XML entities in source path for RNG device (Peter Krempa),<br/>
|
||||
tests: fix leaks in storagevolxml2argvtest (Ján Tomko),<br/>
|
||||
libvirt.c: Make VIR_MIGRATE_NON_SHARED_{INC,DISK} mutually exclusive (Michal Privoznik),<br/>
|
||||
schema: Restrict mode to octal (Philipp Hahn),<br/>
|
||||
libvirt: fix error message when connection can't be opened (Ján Tomko),<br/>
|
||||
tests: uniformly report test failures (Eric Blake),<br/>
|
||||
qemu: minor monitor lock cleanups (Eric Blake),<br/>
|
||||
qemu: don't override earlier json error (Eric Blake),<br/>
|
||||
qemu: Refactor qemuDomainSetMemoryParameters (Peter Krempa),<br/>
|
||||
storage: cast -1 for uid_t|gid_t (Philipp Hahn),<br/>
|
||||
storage: Cast uid_t|gid_t to unsigned int (Philipp Hahn),<br/>
|
||||
util: Fix printf format for uid_t|gid_t (Philipp Hahn),<br/>
|
||||
tests: Add tests for virtio-rng device handling (Peter Krempa),<br/>
|
||||
qemu: Implement support for EGD backend for virtio-rng (Peter Krempa),<br/>
|
||||
qemu: Implement support for default 'random' backend for virtio-rng (Peter Krempa),<br/>
|
||||
conf: Add RNG device ABI compatibility check (Peter Krempa),<br/>
|
||||
conf: Add support for RNG device configuration in XML (Peter Krempa),<br/>
|
||||
conf: Add fake switch statement to warn for new device types (Peter Krempa),<br/>
|
||||
use client id for IPv6 DHCP host definition (Gene Czarcinski),<br/>
|
||||
Trivial fix: in dhcp-host the name is optional (Gene Czarcinski),<br/>
|
||||
storage: qemu-img: change INFO to DEBUG (Ján Tomko),<br/>
|
||||
storage: move qemu-img options before positional arguments (Ján Tomko),<br/>
|
||||
storage: add test for qemu-img command line generation (Ján Tomko),<br/>
|
||||
storage: separate qemu-img command generation and execution (Ján Tomko),<br/>
|
||||
storage: move flag setting after declarations (Ján Tomko),<br/>
|
||||
run: license as LGPL (Eric Blake),<br/>
|
||||
qemu_migration: Cancel running jobs on failed migration (Michal Privoznik),<br/>
|
||||
qemu_migration: Stop NBD server at Finish phase (Michal Privoznik),<br/>
|
||||
qemu_migration: Introduce qemuMigrationDriveMirror (Michal Privoznik),<br/>
|
||||
qemu_migration: Introduce qemuMigrationStartNBDServer() (Michal Privoznik),<br/>
|
||||
qemu: Introduce nbd-server-stop command (Michal Privoznik),<br/>
|
||||
qemu: Introduce nbd-server-add command (Michal Privoznik),<br/>
|
||||
qemu: Introduce nbd-server-start command (Michal Privoznik),<br/>
|
||||
Introduce NBD migration cookie (Michal Privoznik),<br/>
|
||||
qemu: Introduce NBD_SERVER capability (Michal Privoznik),<br/>
|
||||
Add support for <option> tag in network config (Pieter Hollants),<br/>
|
||||
maint: check all symfiles for sorting (Eric Blake),<br/>
|
||||
qemu: Implement virDomainMigrate*CompressionCache (Jiri Denemark),<br/>
|
||||
virsh: Add migrate-compcache command (Jiri Denemark),<br/>
|
||||
remote: Implement virDomainMigrate*CompressionCache (Jiri Denemark),<br/>
|
||||
python: Implement virDomainMigrateGetCompressionCache wrapper (Jiri Denemark),<br/>
|
||||
qemu: Implement virDomainGetJobStats (Jiri Denemark),<br/>
|
||||
qemu: Parse more fields from query-migrate QMP command (Jiri Denemark),<br/>
|
||||
virsh: Use virDomainGetJobStats in domjobinfo if available (Jiri Denemark),<br/>
|
||||
remote: Implement virDomainGetJobStats (Jiri Denemark),<br/>
|
||||
remote: Auto-allocate params in remoteDeserializeTypedParameters (Jiri Denemark),<br/>
|
||||
python: Implement virDomainGetJobStats wrapper (Jiri Denemark),<br/>
|
||||
qemu: Add support for compressed migration (Jiri Denemark),<br/>
|
||||
Introduce VIR_MIGRATE_COMPRESSED flag (Jiri Denemark),<br/>
|
||||
Update arch names in RNG schema to match virarch.c (Daniel P. Berrange),<br/>
|
||||
interface: dev type support for bond interfaces (Doug Goldstein),<br/>
|
||||
interface: add bond support to udev backend (Doug Goldstein),<br/>
|
||||
interface: Improve udev backend device type id (Doug Goldstein),<br/>
|
||||
interface: Refactor interface vlan to helper func (Doug Goldstein),<br/>
|
||||
interface: udev bridge code error handling updates (Doug Goldstein),<br/>
|
||||
interface: Refactor udev bridge to helper func (Doug Goldstein),<br/>
|
||||
conf: Refactor ABI stability checking and break long lines (Peter Krempa),<br/>
|
||||
conf: Refactor cpumask handling (Peter Krempa),<br/>
|
||||
conf: Reformat many function headers in domain_conf.c (Peter Krempa),<br/>
|
||||
conf: Fix label naming in virDomainDefFormatInternal (Peter Krempa),<br/>
|
||||
conf: Ensure that new devices are added to conf copy function (Peter Krempa),<br/>
|
||||
qemu: Refactor error paths in virQEMUDriverCreateCapabilities (Peter Krempa),<br/>
|
||||
conf: Improve core dump config error message (Peter Krempa),<br/>
|
||||
qemu: Turn closeCallbacks into virObjectLockable (Jiri Denemark),<br/>
|
||||
qemu: Run lzop with '--ignore-warn' (Michal Privoznik),<br/>
|
||||
qemu: Remove the shared disk entry if the operation is ejecting or updating (Osier Yang),<br/>
|
||||
qemu: Move the shared disk adding and sgio setting prior to attaching (Osier Yang),<br/>
|
||||
qemu: Update shared disk table when reconnecting qemu process (Osier Yang),<br/>
|
||||
qemu: Record names of domain which uses the shared disk in hash table (Osier Yang),<br/>
|
||||
qemu: Merge qemuCheckSharedDisk into qemuAddSharedDisk (Osier Yang),<br/>
|
||||
qemu: Add checking in helpers for sgio setting (Osier Yang),<br/>
|
||||
maint: enforce private symbol section sorting (Eric Blake),<br/>
|
||||
qemu: switch PCI address alocation to use virDevicePCIAddress (Ján Tomko),<br/>
|
||||
virsh: distinguish errors between missing argument and wrong option (Guannan Ren),<br/>
|
||||
maint: sort private syms to reflect recent header renames (Eric Blake),<br/>
|
||||
maint: fix header file owners of private symbols (Eric Blake),<br/>
|
||||
net: use structs for address and port ranges (Natanael Copa),<br/>
|
||||
net: add support for specifying port range for forward mode nat (Natanael Copa),<br/>
|
||||
net: support set public ip range for forward mode nat (Natanael Copa),<br/>
|
||||
qemu: Use atomic ops for driver->nactive (Jiri Denemark),<br/>
|
||||
virsh: Always print capacity unit (Jiri Denemark),<br/>
|
||||
qemu: pass "-1" as uid/gid for unprivileged qemu (Guido Günther),<br/>
|
||||
Add capabilities bit for -no-kvm-pit-reinjection (Doug Goldstein),<br/>
|
||||
Add autogenerated lxc_protocol.[ch] to gitignore (Doug Goldstein),<br/>
|
||||
drivermodule: Ignore coverity warning about leaked_storage (John Ferlan),<br/>
|
||||
storage: test backing chain traversal (Eric Blake),<br/>
|
||||
storage: don't follow backing chain symlinks too eagerly (Eric Blake),<br/>
|
||||
storage: refactor metadata lookup (Eric Blake),<br/>
|
||||
storage: prepare for refactoring (Eric Blake),<br/>
|
||||
storage: rearrange functions (Eric Blake),<br/>
|
||||
vbox: Don't overwrite errors returned by virDomainDeviceDefParse (Jiri Denemark),<br/>
|
||||
util: virSetUIDGIDWithCaps - change uid while keeping caps (Laine Stump),<br/>
|
||||
util: drop capabilities immediately after changing uid/gid of child (Laine Stump),<br/>
|
||||
qemu: let virCommand set child process security labels/uid/gid (Laine Stump),<br/>
|
||||
security: add new virSecurityManagerSetChildProcessLabel API (Laine Stump),<br/>
|
||||
util: add security label setting to virCommand (Laine Stump),<br/>
|
||||
build: define SECDRIVER_LIBS in Makefile.am (Laine Stump),<br/>
|
||||
qemu: replace exec hook with virCommandSetUID/GID in storage_backend (Laine Stump),<br/>
|
||||
qemu: replace exec hook with virCommandSetUID/GID in qemuCaps* (Laine Stump),<br/>
|
||||
util: make virSetUIDGID a NOP only when uid or gid is -1 (Laine Stump),<br/>
|
||||
util: add virCommandSetUID and virCommandSetGID (Laine Stump),<br/>
|
||||
util: refactor virCommandHook into virExec and virCommandHandshakeChild (Laine Stump),<br/>
|
||||
util: eliminate extra args from virExec (Laine Stump),<br/>
|
||||
util: eliminate generic hook from virExecWithHook (Laine Stump),<br/>
|
||||
Remove qemuDriverLock from almost everywhere (Daniel P. Berrange),<br/>
|
||||
virsh-volume.c: Switch to c99 initialization of vshCmdInfo (Michal Privoznik),<br/>
|
||||
virsh-snapshot.c: Switch to c99 initialization of vshCmdInfo (Michal Privoznik),<br/>
|
||||
virsh-secret.c: Switch to c99 initialization of vshCmdInfo (Michal Privoznik),<br/>
|
||||
virsh-pool.c: Switch to c99 initialization of vshCmdInfo (Michal Privoznik),<br/>
|
||||
virsh-nwfilter.c: Switch to c99 initialization of vshCmdInfo (Michal Privoznik),<br/>
|
||||
virsh-nodedev.c: Switch to c99 initialization of vshCmdInfo (Michal Privoznik),<br/>
|
||||
virsh-network.c: Switch to c99 initialization of vshCmdInfo (Michal Privoznik),<br/>
|
||||
virsh-interface.c: Switch to c99 initialization of vshCmdInfo (Michal Privoznik),<br/>
|
||||
virsh-host.c: Switch to c99 initialization of vshCmdInfo (Michal Privoznik),<br/>
|
||||
virsh-domain.c: Switch to c99 initialization of vshCmdInfo (Michal Privoznik),<br/>
|
||||
virsh-domain-monitor.c: Switch to c99 initialization of vshCmdInfo (Michal Privoznik),<br/>
|
||||
virsh.c: Switch to c99 initialization of vshCmdInfo (Michal Privoznik),<br/>
|
||||
virsh: Switch to c99 initialization of vshCmdDef (Michal Privoznik),<br/>
|
||||
xen: clean up the mess with cpumap (Eric Blake),<br/>
|
||||
util: use new virendian.h macros (Eric Blake),<br/>
|
||||
util: add virendian.h macros (Eric Blake),<br/>
|
||||
Check if classes are derived from object (Guido Günther),<br/>
|
||||
virsh: Use virNodeDeviceLookupSCSIHostByWWN (Osier Yang),<br/>
|
||||
nodedev: Implement virNodeDeviceLookupSCSIHostByWWN (Osier Yang),<br/>
|
||||
remote: Wire up the remote protocol (Osier Yang),<br/>
|
||||
hypervisor: Revisit Coverity issues regarding cpumap (John Ferlan),<br/>
|
||||
hypervisor: Remove redundant validity checks, clean up function headers (John Ferlan),<br/>
|
||||
xend: Remove redundant validity checks, clean up function headers (John Ferlan),<br/>
|
||||
xm: Remove redundant validity checks, clean up function headers (John Ferlan),<br/>
|
||||
inotify: Clean up some function headers (John Ferlan),<br/>
|
||||
xs: Remove redundant validity checks, clean up function headers (John Ferlan),<br/>
|
||||
virsh-snapshot: Reject --no-metadata together with --print-xml (Peter Krempa),<br/>
|
||||
virsh-snapshot: Refactor some details in virsh snapshot-create-as (Peter Krempa),<br/>
|
||||
Pass virQEMUDriverPtr into APIs managed shared disk list (Daniel P. Berrange),<br/>
|
||||
Serialize execution of security manager APIs (Daniel P. Berrange),<br/>
|
||||
Turn virSecurityManager into a virObjectLockable (Daniel P. Berrange),<br/>
|
||||
sheepdog: skip refresh on creation failure (Harry Wei),<br/>
|
||||
util: refactor iptables command construction into multiple steps (Natanael Copa),<br/>
|
||||
qemu: support vhost-net for generic ethernet devices (Laine Stump),<br/>
|
||||
Stop accessing driver->caps directly in QEMU driver (Daniel P. Berrange),<br/>
|
||||
Rename 'qemuCapsXXX' to 'virQEMUCapsXXX' (Daniel P. Berrange),<br/>
|
||||
Turn virCapabilities into a virObject (Daniel P. Berrange),<br/>
|
||||
Fix comment about virCgroupPtr locking rules in QEMU driver (Daniel P. Berrange),<br/>
|
||||
Fix PKI directory used for QEMU test suite (Daniel P. Berrange),<br/>
|
||||
virCondDestroy: Lose attribute RETURN_CHECK (Michal Privoznik),<br/>
|
||||
Drop useless virFileWrapperFdCatchError (Michal Privoznik),<br/>
|
||||
valgrind: Adjust the suppression file (John Ferlan),<br/>
|
||||
Add syntax-check to make sure Python files don't contain trailing semicolon (Guido Günther),<br/>
|
||||
Remove more trailing semicolons in Python files (Guido Günther),<br/>
|
||||
syntax-check: Don't check non-reentrant functions in docs (Peter Krempa),<br/>
|
||||
Cosmetics: Remove semicolons (Guido Günther),<br/>
|
||||
bitmap: add way to find next clear bit (Eric Blake),<br/>
|
||||
Initialize qemuImageBinary path at startup (Daniel P. Berrange),<br/>
|
||||
Introduce annotations for virQEMUDriverPtr fields (Daniel P. Berrange),<br/>
|
||||
Protect USB/PCI device list access in QEMU with dedicated locks (Daniel P. Berrange),<br/>
|
||||
Convert virPCIDeviceList and virUSBDeviceList into virObjectLockable (Daniel P. Berrange),<br/>
|
||||
Rename all USB device functions to have a standard name prefix (Daniel P. Berrange),<br/>
|
||||
Rename all PCI device functions to have a standard name prefix (Daniel P. Berrange),<br/>
|
||||
Remove pointless 'qemuVersion' field from virQEMUDriverPtr (Daniel P. Berrange),<br/>
|
||||
Use atomic ops to increment nextvmid (Daniel P. Berrange),<br/>
|
||||
Make virDomainObjList self-locking via virObjectLockable (Daniel P. Berrange),<br/>
|
||||
Merge virDomainObjListIsDuplicate into virDomainObjListAdd (Daniel P. Berrange),<br/>
|
||||
qemu: don't log failure during QMP add-fd probe (Eric Blake),<br/>
|
||||
Turn virDomainObjList into an opaque virObject (Daniel P. Berrange),<br/>
|
||||
Rename all domain list APIs to have virDomainObjList prefix (Daniel P. Berrange),<br/>
|
||||
Introduce a virQEMUDriverConfigPtr object (Daniel P. Berrange),<br/>
|
||||
Fix missing error constants in libvirt python module (Daniel P. Berrange),<br/>
|
||||
qemu: Catch stderr of image compression binary (Michal Privoznik),<br/>
|
||||
qemu: Catch stderr of image decompression binary (Michal Privoznik),<br/>
|
||||
virFileWrapperFd: Switch to new virCommandDoAsyncIO (Michal Privoznik),<br/>
|
||||
tests: Create test for virCommandDoAsyncIO (Michal Privoznik),<br/>
|
||||
Introduce event loop to commandtest (Michal Privoznik),<br/>
|
||||
virCommand: Introduce virCommandDoAsyncIO (Michal Privoznik),<br/>
|
||||
conf: Use correct type for device type enum in virDomainDeviceDefFree (Peter Krempa),<br/>
|
||||
Support shifted magic in storage files (Martin Kletzander),<br/>
|
||||
virsh-secret: Refactor error paths (Peter Krempa),<br/>
|
||||
virsh-nwfilter: Update nwfilter commands to use vshCommandOptStringReq (Peter Krempa),<br/>
|
||||
virsh-snapshot: Update snapshot commands to use vshCommandOptStringReq (Peter Krempa),<br/>
|
||||
virsh-snapshot: Refactor cmdSnapshotDumpXML (Peter Krempa),<br/>
|
||||
virsh-nodedev: Refactor error paths, error messages and whitespace (Peter Krempa),<br/>
|
||||
virsh-nodedev: Update node device commands to use vshCommandOptStringReq (Peter Krempa),<br/>
|
||||
virsh-interface: Update interface commands to use vshCommandOptStringReq (Peter Krempa),<br/>
|
||||
virsh-network: Update network commands to use vshCommandOptStringReq (Peter Krempa),<br/>
|
||||
virsh-host: Update host commands to use vshCommandOptStringReq (Peter Krempa),<br/>
|
||||
virsh-domain: Update domain commands to use vshCommandOptStringReq (Peter Krempa),<br/>
|
||||
virsh-domain-monitor: Update domain commands to use vshCommandOptStringReq (Peter Krempa),<br/>
|
||||
virsh-volume: Update volume commands to use vshCommandOptStringReq (Peter Krempa),<br/>
|
||||
virsh-pool: Update pool commands to use vshCommandOptStringReq (Peter Krempa),<br/>
|
||||
virsh: Add helper to request string arguments with error reporting (Peter Krempa),<br/>
|
||||
virsh-pool: Rename helper function buildPoolXML to vshBuildPoolXML (Peter Krempa),<br/>
|
||||
virsh-volume: Rename helper function makeCloneXML to vshMakeCloneXML (Peter Krempa),<br/>
|
||||
virsh-snapshot: Fix coding style and remove dead code (Peter Krempa),<br/>
|
||||
hyperv: Simplify hypervPrivate pointer handling in hypervOpen (Matthias Bolte),<br/>
|
||||
esx: Simplify esxPrivate pointer handling in esxOpen (Matthias Bolte),<br/>
|
||||
maint: update to latest gnulib (Eric Blake),<br/>
|
||||
Add support for QEMU -add-fd support detection (Stefan Berger),<br/>
|
||||
qemu: expose qemu 1.3 add-fd monitor command (Eric Blake),<br/>
|
||||
tests: add a comment about our fake qmp (Eric Blake),<br/>
|
||||
spec: Avoid using makeinstall relic (Jiri Denemark),<br/>
|
||||
complete virterror->virerror name change (Serge Hallyn),<br/>
|
||||
apibuild.py: fix TypeError raised in except clause (Claudio Bley),<br/>
|
||||
Enforce return check on virAsprintf() calls (John Ferlan),<br/>
|
||||
snapshot: Mention disk-only snapshots in error message (Peter Krempa)<br/>
|
||||
</li>
|
||||
|
||||
<li>Cleanups:<br/>
|
||||
Revert hack for autodestroy in qemuProcessStop (Daniel P. Berrange),<br/>
|
||||
Revert "Add support for <option> tag in network config" (Laine Stump),<br/>
|
||||
security: Remove unnecessary checks for mgr == NULL (John Ferlan),<br/>
|
||||
vircommand: Remove unnecessary sa_assert (John Ferlan),<br/>
|
||||
build: fix make check of remote_protocol-structs (Laine Stump),<br/>
|
||||
spec: Fix minor changelog issues (Jiri Denemark)<br/>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<h3>1.0.2: Jan 30 2013</h3>
|
||||
<h3>1.0.2: Jan 30 2012</h3>
|
||||
<ul>
|
||||
<li> Features:<br/>
|
||||
LXC improvements (Daniel P. Berrange),<br/>
|
||||
|
@@ -1,16 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:exsl="http://exslt.org/common"
|
||||
exclude-result-prefixes="xsl exsl html"
|
||||
exclude-result-prefixes="xsl exsl"
|
||||
version="1.0">
|
||||
|
||||
<!-- The sitemap.html.in page contains the master navigation structure -->
|
||||
<xsl:variable name="sitemap" select="document('sitemap.html.in')/html:html/html:body/html:div[@id='sitemap']"/>
|
||||
<xsl:variable name="sitemap" select="document('sitemap.html.in')/html/body/div[@id='sitemap']"/>
|
||||
|
||||
<xsl:template match="html:code[@class='docref']" mode="content">
|
||||
<xsl:template match="code[@class='docref']" mode="content">
|
||||
<xsl:variable name="name"><xsl:value-of select="."/></xsl:variable>
|
||||
<a href="html/libvirt-libvirt.html#{$name}"><code><xsl:value-of select="$name"/></code></a>
|
||||
</xsl:template>
|
||||
@@ -22,17 +20,17 @@
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="html:ul[@id='toc']" mode="content">
|
||||
<xsl:template match="ul[@id='toc']" mode="content">
|
||||
<xsl:call-template name="toc"/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- This processes the sitemap to form a context sensitive
|
||||
navigation menu for the current page -->
|
||||
<xsl:template match="html:ul" mode="menu">
|
||||
<xsl:template match="ul" mode="menu">
|
||||
<xsl:param name="pagename"/>
|
||||
<xsl:param name="level"/>
|
||||
<ul class="{concat('l', $level)}">
|
||||
<xsl:for-each select="html:li">
|
||||
<xsl:for-each select="li">
|
||||
<!-- The extra div tag here works around an IE6 whitespace collapsing problem -->
|
||||
<li><div>
|
||||
<!-- A menu is active if there is an 'a' tag with
|
||||
@@ -40,7 +38,7 @@
|
||||
or a child menu -->
|
||||
<xsl:variable name="class">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(.//html:a[@href = $pagename]) > 0">
|
||||
<xsl:when test="count(.//a[@href = $pagename]) > 0">
|
||||
<xsl:text>active</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
@@ -53,21 +51,21 @@
|
||||
the immediate 'a' tag has href matching the
|
||||
current pagename -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="$pagename = html:a/@href">
|
||||
<span class="{$class}"><xsl:value-of select="html:a"/></span>
|
||||
<xsl:when test="$pagename = a/@href">
|
||||
<span class="{$class}"><xsl:value-of select="a"/></span>
|
||||
</xsl:when>
|
||||
<xsl:when test="starts-with(html:a/@href, 'http://wiki.libvirt.org')">
|
||||
<a title="{./html:span}" class="{$class}" href="{html:a/@href}"><xsl:value-of select="html:a"/></a>
|
||||
<xsl:when test="starts-with(a/@href, 'http://wiki.libvirt.org')">
|
||||
<a title="{./span}" class="{$class}" href="{a/@href}"><xsl:value-of select="a"/></a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<a title="{./html:span}" class="{$class}" href="{concat($href_base, html:a/@href)}"><xsl:value-of select="html:a"/></a>
|
||||
<a title="{./span}" class="{$class}" href="{concat($href_base, a/@href)}"><xsl:value-of select="a"/></a>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!-- A sub-menu should only be expanded it contains
|
||||
an 'a' tag with href matching this pagename -->
|
||||
<xsl:if test="count(.//html:a[@href = $pagename]) > 0">
|
||||
<xsl:apply-templates select="html:ul" mode="menu">
|
||||
<xsl:if test="count(.//a[@href = $pagename]) > 0">
|
||||
<xsl:apply-templates select="ul" mode="menu">
|
||||
<xsl:with-param name="pagename" select="$pagename"/>
|
||||
<xsl:with-param name="level" select="$level + 1"/>
|
||||
</xsl:apply-templates>
|
||||
@@ -79,33 +77,33 @@
|
||||
|
||||
<xsl:template name="toc">
|
||||
<ul>
|
||||
<xsl:for-each select="/html:html/html:body/html:h2[count(html:a) = 1]">
|
||||
<xsl:for-each select="/html/body/h2[count(a) = 1]">
|
||||
<xsl:variable name="thish2" select="."/>
|
||||
<li>
|
||||
<a href="#{html:a/@name}"><xsl:value-of select="html:a/text()"/></a>
|
||||
<xsl:if test="count(./following-sibling::html:h3[preceding-sibling::html:h2[1] = $thish2 and count(html:a) = 1]) > 0">
|
||||
<a href="#{a/@name}"><xsl:value-of select="a/text()"/></a>
|
||||
<xsl:if test="count(./following-sibling::h3[preceding-sibling::h2[1] = $thish2 and count(a) = 1]) > 0">
|
||||
<ul>
|
||||
<xsl:for-each select="./following-sibling::html:h3[preceding-sibling::html:h2[1] = $thish2 and count(html:a) = 1]">
|
||||
<xsl:for-each select="./following-sibling::h3[preceding-sibling::h2[1] = $thish2 and count(a) = 1]">
|
||||
<xsl:variable name="thish3" select="."/>
|
||||
<li>
|
||||
<a href="#{html:a/@name}"><xsl:value-of select="html:a/text()"/></a>
|
||||
<xsl:if test="count(./following-sibling::html:h4[preceding-sibling::html:h3[1] = $thish3 and count(html:a) = 1]) > 0">
|
||||
<a href="#{a/@name}"><xsl:value-of select="a/text()"/></a>
|
||||
<xsl:if test="count(./following-sibling::h4[preceding-sibling::h3[1] = $thish3 and count(a) = 1]) > 0">
|
||||
<ul>
|
||||
<xsl:for-each select="./following-sibling::html:h4[preceding-sibling::html:h3[1] = $thish3 and count(html:a) = 1]">
|
||||
<xsl:for-each select="./following-sibling::h4[preceding-sibling::h3[1] = $thish3 and count(a) = 1]">
|
||||
<xsl:variable name="thish4" select="."/>
|
||||
<li>
|
||||
<a href="#{html:a/@name}"><xsl:value-of select="html:a/text()"/></a>
|
||||
<xsl:if test="count(./following-sibling::html:h5[preceding-sibling::html:h4[1] = $thish4 and count(html:a) = 1]) > 0">
|
||||
<a href="#{a/@name}"><xsl:value-of select="a/text()"/></a>
|
||||
<xsl:if test="count(./following-sibling::h5[preceding-sibling::h4[1] = $thish4 and count(a) = 1]) > 0">
|
||||
<ul>
|
||||
<xsl:for-each select="./following-sibling::html:h5[preceding-sibling::html:h4[1] = $thish4 and count(html:a) = 1]">
|
||||
<xsl:for-each select="./following-sibling::h5[preceding-sibling::h4[1] = $thish4 and count(a) = 1]">
|
||||
<xsl:variable name="thish5" select="."/>
|
||||
<li>
|
||||
<a href="#{html:a/@name}"><xsl:value-of select="html:a/text()"/></a>
|
||||
<xsl:if test="count(./following-sibling::html:h6[preceding-sibling::html:h5[1] = $thish5 and count(html:a) = 1]) > 0">
|
||||
<a href="#{a/@name}"><xsl:value-of select="a/text()"/></a>
|
||||
<xsl:if test="count(./following-sibling::h6[preceding-sibling::h5[1] = $thish5 and count(a) = 1]) > 0">
|
||||
<ul>
|
||||
<xsl:for-each select="./following-sibling::html:h6[preceding-sibling::html:h5[1] = $thish5 and count(html:a) = 1]">
|
||||
<xsl:for-each select="./following-sibling::h6[preceding-sibling::h5[1] = $thish5 and count(a) = 1]">
|
||||
<li>
|
||||
<a href="#{html:a/@name}"><xsl:value-of select="html:a/text()"/></a>
|
||||
<a href="#{a/@name}"><xsl:value-of select="a/text()"/></a>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
@@ -138,7 +136,7 @@
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="{$href_base}main.css"/>
|
||||
<link rel="SHORTCUT ICON" href="{$href_base}32favicon.png"/>
|
||||
<title>libvirt: <xsl:value-of select="html:html/html:body/html:h1"/></title>
|
||||
<title>libvirt: <xsl:value-of select="html/body/h1"/></title>
|
||||
<meta name="description" content="libvirt, virtualization, virtualization API"/>
|
||||
</head>
|
||||
<body>
|
||||
@@ -155,13 +153,13 @@
|
||||
</div>
|
||||
<div id="body">
|
||||
<div id="menu">
|
||||
<xsl:apply-templates select="exsl:node-set($sitemap)/html:ul" mode="menu">
|
||||
<xsl:apply-templates select="exsl:node-set($sitemap)/ul" mode="menu">
|
||||
<xsl:with-param name="pagename" select="$pagename"/>
|
||||
<xsl:with-param name="level" select="0"/>
|
||||
</xsl:apply-templates>
|
||||
</div>
|
||||
<div id="content">
|
||||
<xsl:apply-templates select="/html:html/html:body/*" mode="content"/>
|
||||
<xsl:apply-templates select="/html/body/*" mode="content"/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Pending patches needing review</h1>
|
||||
<p> A list of pending patches needing review upstream is available
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1>PHP API bindings</h1>
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1>Python API bindings</h1>
|
||||
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<body>
|
||||
<h1>Related links</h1>
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1 >Remote support</h1>
|
||||
<p>
|
||||
|
@@ -1,18 +1,5 @@
|
||||
## Copyright (C) 2005-2011, 2013 Red Hat, Inc.
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
## modify it under the terms of the GNU Lesser General Public
|
||||
## License as published by the Free Software Foundation; either
|
||||
## version 2.1 of the License, or (at your option) any later version.
|
||||
##
|
||||
## This library is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
## Lesser General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU Lesser General Public
|
||||
## License along with this library. If not, see
|
||||
## <http://www.gnu.org/licenses/>.
|
||||
## Copyright (C) 2005-2011 Red Hat, Inc.
|
||||
## See COPYING.LIB for the License of this software
|
||||
|
||||
schemadir = $(pkgdatadir)/schemas
|
||||
schema_DATA = \
|
||||
|
@@ -20,12 +20,6 @@
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='octalMode'>
|
||||
<data type="unsignedInt">
|
||||
<param name='pattern'>[0-7]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="uint8range">
|
||||
<choice>
|
||||
<data type="string">
|
||||
@@ -107,65 +101,6 @@
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<!--====================================================================-->
|
||||
<!--The duid is a unique identifier used in DHCPv6 to identity an -->
|
||||
<!--interface on a device (system). The duid is often used by servers -->
|
||||
<!--such as dnsmasq to assign a specific IP address (and optionally a -->
|
||||
<!--name to an interface. The applicable standards are RFC3315 and -->
|
||||
<!--RFC6355. These standards actualy require the duid to be fixed for -->
|
||||
<!--the hardward device and applicable to all network interfaces on -->
|
||||
<!--that device. It is not clear that any software currently enforces -->
|
||||
<!--this requirement although it could be implemented manually. -->
|
||||
<!--====================================================================-->
|
||||
<!--There are currently four types of duids defined: -->
|
||||
<!-- type 1, duid-LLT, link-layer (MAC) plus 32 bit time when the -->
|
||||
<!-- duid-LLT was created in seconds from January 1, 2000 -->
|
||||
<!-- type 2, duid-EN, 32 bit "enterprise number" followed by a -->
|
||||
<!-- variable length unique identifier. -->
|
||||
<!-- type 3, duid-LL, link-layer (MAC) -->
|
||||
<!-- type 4, duid-UUID, a 128 bit UUID (16 bytes) -->
|
||||
<!--RFC3315 states that the maximum length of a duid is 128 bytes plus -->
|
||||
<!--the 16 bit type field. Often, the machine type is "1" which is the -->
|
||||
<!--number assigned to ethernet. -->
|
||||
|
||||
<define name="duidLLT">
|
||||
<data type="string">
|
||||
<!-- 0======| type======| 0======| machine type======| time================| link-layer============| -->
|
||||
<param name="pattern">[0]{1,2}:[0]{0,1}[1]:[0]{1,2}:[0]{0,1}[a-fA-F1-9](:[a-fA-F0-9]{1,2}){4}(:[a-fA-F0-9]{1,2}){6,8}</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="duidEN">
|
||||
<data type="string">
|
||||
<!-- 0======| type======| Enterprise number===| unique id ==============| -->
|
||||
<param name="pattern">[0]{1,2}:[0]{0,1}[2](:[a-fA-F0-9]{1,2}){4}(:[a-fA-F0-9]{1,2}){1,124}</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="duidLL">
|
||||
<data type="string">
|
||||
<!-- 0======| type======| 0======| machine type======| link-layer============| -->
|
||||
<param name="pattern">[0]{1,2}:[0]{0,1}[3]:[0]{1,2}:[0]{0,1}[a-fA-F1-9](:[a-fA-F0-9]{1,2}){6,8}</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="duidUUID">
|
||||
<data type="string">
|
||||
<!-- 0======| type======| UUID=================| -->
|
||||
<param name="pattern">[0]{1,2}:[0]{0,1}[4](:[a-fA-F0-9]{1,2}){16}</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="DUID">
|
||||
<choice>
|
||||
<ref name="duidLLT"/>
|
||||
<ref name="duidEN"/>
|
||||
<ref name="duidLL"/>
|
||||
<ref name="duidUUID"/>
|
||||
</choice>
|
||||
</define>
|
||||
<!--======================================================================-->
|
||||
|
||||
<!-- An ipv4 "dotted quad" address -->
|
||||
<define name="ipv4Addr">
|
||||
<data type="string">
|
||||
@@ -280,7 +215,7 @@
|
||||
|
||||
<define name='wwn'>
|
||||
<data type='string'>
|
||||
<param name='pattern'>(0x)?[0-9a-fA-F]{16}</param>
|
||||
<param name='pattern'>[0-9a-fA-F]{16}</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
@@ -296,80 +231,4 @@
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='archnames'>
|
||||
<choice>
|
||||
<value>alpha</value>
|
||||
<value>armv7l</value>
|
||||
<value>cris</value>
|
||||
<value>i686</value>
|
||||
<value>ia64</value>
|
||||
<value>lm32</value>
|
||||
<value>m68k</value>
|
||||
<value>microblaze</value>
|
||||
<value>microblazeel</value>
|
||||
<value>mips</value>
|
||||
<value>mipsel</value>
|
||||
<value>mips64</value>
|
||||
<value>mips64el</value>
|
||||
<value>openrisc</value>
|
||||
<value>parisc</value>
|
||||
<value>parisc64</value>
|
||||
<value>ppc</value>
|
||||
<value>ppc64</value>
|
||||
<value>ppcemb</value>
|
||||
<value>s390</value>
|
||||
<value>s390x</value>
|
||||
<value>sh4</value>
|
||||
<value>sh4eb</value>
|
||||
<value>sparc</value>
|
||||
<value>sparc64</value>
|
||||
<value>unicore32</value>
|
||||
<value>x86_64</value>
|
||||
<value>xtensa</value>
|
||||
<value>xtensaeb</value>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name="PortNumber">
|
||||
<data type="short">
|
||||
<param name="minInclusive">-1</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='sourceinfoadapter'>
|
||||
<element name='adapter'>
|
||||
<choice>
|
||||
<group>
|
||||
<!-- To keep back-compat, 'type' is not mandatory for
|
||||
scsi_host adapter -->
|
||||
<optional>
|
||||
<attribute name='type'>
|
||||
<value>scsi_host</value>
|
||||
</attribute>
|
||||
</optional>
|
||||
<attribute name='name'>
|
||||
<text/>
|
||||
</attribute>
|
||||
</group>
|
||||
<group>
|
||||
<attribute name='type'>
|
||||
<value>fc_host</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name='parent'>
|
||||
<text/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<attribute name='wwnn'>
|
||||
<ref name='wwn'/>
|
||||
</attribute>
|
||||
<attribute name='wwpn'>
|
||||
<ref name='wwn'/>
|
||||
</attribute>
|
||||
</group>
|
||||
</choice>
|
||||
<empty/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
</grammar>
|
||||
|
@@ -176,10 +176,6 @@
|
||||
<ref name='unsignedInt'/>
|
||||
</attribute>
|
||||
|
||||
<optional>
|
||||
<ref name='memory'/>
|
||||
</optional>
|
||||
|
||||
<optional>
|
||||
<element name='cpus'>
|
||||
<attribute name='num'>
|
||||
@@ -193,12 +189,6 @@
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='memory'>
|
||||
<element name='memory'>
|
||||
<ref name='scaledInteger'/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='cpu'>
|
||||
<element name='cpu'>
|
||||
<attribute name='id'>
|
||||
@@ -377,6 +367,23 @@
|
||||
</attribute>
|
||||
</define>
|
||||
|
||||
<define name='archnames'>
|
||||
<choice>
|
||||
<value>arm</value>
|
||||
<value>i686</value>
|
||||
<value>ia64</value>
|
||||
<value>microblaze</value>
|
||||
<value>microblazeel</value>
|
||||
<value>mips</value>
|
||||
<value>mipsel</value>
|
||||
<value>ppc64</value>
|
||||
<value>ppc</value>
|
||||
<value>s390</value>
|
||||
<value>sparc</value>
|
||||
<value>x86_64</value>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name='featureName'>
|
||||
<data type='string'>
|
||||
<param name='pattern'>[a-zA-Z0-9\-_]+</param>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user