mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-08-22 01:50:06 +03:00
Compare commits
42 Commits
Author | SHA1 | Date | |
---|---|---|---|
419605b3a0 | |||
feb2d3375c | |||
12b0af5905 | |||
69de4ce80d | |||
9b3455cb78 | |||
bdb5808173 | |||
dc0efacb6f | |||
0e6aa8fcd2 | |||
12f18158c7 | |||
ab7e3039e0 | |||
dc200aa851 | |||
2f2ed992c0 | |||
894f784948 | |||
0ecc5ad70d | |||
3accd7eb25 | |||
b4541a2f3d | |||
6bf4e0e0d0 | |||
6a7ae990e7 | |||
3efa02e3ed | |||
71e7f1392b | |||
a36dbe6475 | |||
ce902dcaf0 | |||
a4f45888ce | |||
c12dc47c27 | |||
9fc6618e74 | |||
a3f71eb908 | |||
6597cc25a1 | |||
3b8f6e5fd6 | |||
4a4d2300ff | |||
14ba72b640 | |||
fc8a231018 | |||
832049ca29 | |||
6381c1c130 | |||
3b9243e018 | |||
fa8692cd2e | |||
c0431c10ee | |||
343ab629cf | |||
97633c8682 | |||
3e7adcf682 | |||
2b9bf71b6c | |||
c2de882f32 | |||
d2686140e1 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -28,6 +28,7 @@
|
||||
.sc-start-sc_*
|
||||
/ABOUT-NLS
|
||||
/AUTHORS
|
||||
/COPYING
|
||||
/ChangeLog
|
||||
/GNUmakefile
|
||||
/INSTALL
|
||||
@ -143,8 +144,6 @@
|
||||
/tests/domainsnapshotxml2xmltest
|
||||
/tests/esxutilstest
|
||||
/tests/eventtest
|
||||
/tests/fchosttest
|
||||
/tests/fdstreamtest
|
||||
/tests/hashtest
|
||||
/tests/jsontest
|
||||
/tests/libvirtdconftest
|
||||
|
2
.gnulib
2
.gnulib
Submodule .gnulib updated: a363f4ed4a...92f3a4c8e5
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.
|
41
HACKING
41
HACKING
@ -318,29 +318,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
|
||||
@ -441,11 +418,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 +501,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 +719,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
|
||||
=============================
|
||||
|
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:
|
||||
|
@ -69,7 +69,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 +88,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 \
|
||||
|
19
bootstrap
19
bootstrap
@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Print a version string.
|
||||
scriptversion=2013-05-08.20; # UTC
|
||||
scriptversion=2013-03-08.16; # 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
|
||||
}
|
||||
'
|
||||
|
@ -71,7 +71,6 @@ listen
|
||||
localeconv
|
||||
maintainer-makefile
|
||||
manywarnings
|
||||
mkdtemp
|
||||
mkostemp
|
||||
mkostemps
|
||||
mktempd
|
||||
|
@ -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;
|
||||
}
|
||||
|
52
cfg.mk
52
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:
|
||||
@ -449,11 +440,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 +486,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:
|
||||
@ -687,22 +668,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.
|
||||
@ -779,7 +749,7 @@ sc_prohibit_duplicate_header:
|
||||
}' $$i || fail=1; \
|
||||
done; \
|
||||
if test $$fail -eq 1; then \
|
||||
{ echo '$(ME): avoid duplicate headers' 1>&2; exit 1; } \
|
||||
{ echo "$(ME)": avoid duplicate headers >&2; exit 1; } \
|
||||
fi;
|
||||
|
||||
# Don't include "libvirt/*.h" in "" form.
|
||||
@ -845,8 +815,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,15 +832,15 @@ $(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
|
||||
_src1=libvirt|fdstream|qemu/qemu_monitor|util/(vircommand|virutil)|xen/xend_internal|rpc/virnetsocket|lxc/lxc_controller|locking/lock_daemon
|
||||
_test1=shunloadtest|virnettlscontexttest|vircgroupmock
|
||||
exclude_file_name_regexp--sc_avoid_write = \
|
||||
^(src/($(_src1))|daemon/libvirtd|tools/console|tests/($(_test1)))\.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$$)
|
||||
|
||||
@ -889,10 +858,7 @@ 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$$|tests/vircgroupmock\.c$$)
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_close = \
|
||||
(\.p[yl]$$|^docs/|^(src/util/virfile\.c|src/libvirt\.c|tests/vircgroupmock\.c)$$)
|
||||
@ -926,7 +892,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$$
|
||||
|
44
configure.ac
44
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.6], [libvir-list@redhat.com], [], [http://libvirt.org])
|
||||
AC_INIT([libvirt], [1.0.5.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])
|
||||
@ -1103,15 +1090,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
|
||||
|
||||
@ -2176,7 +2154,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 +2162,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])
|
||||
|
||||
|
||||
@ -2393,13 +2371,13 @@ AC_CHECK_MEMBERS([struct ifreq.ifr_newname,
|
||||
[#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 \
|
||||
@ -124,6 +111,7 @@ libvirtd_CFLAGS = \
|
||||
-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\""
|
||||
|
||||
libvirtd_LDFLAGS = \
|
||||
$(WARN_LDFLAGS) \
|
||||
$(PIE_LDFLAGS) \
|
||||
$(RELRO_LDFLAGS) \
|
||||
$(COVERAGE_LDFLAGS)
|
||||
@ -168,10 +156,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
|
||||
|
@ -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"
|
||||
@ -53,7 +54,6 @@
|
||||
#include "virhook.h"
|
||||
#include "viraudit.h"
|
||||
#include "locking/lock_manager.h"
|
||||
#include "virstring.h"
|
||||
|
||||
#ifdef WITH_DRIVER_MODULES
|
||||
# include "driver.h"
|
||||
@ -73,9 +73,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 +241,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 +287,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 +401,6 @@ static void daemonInitialize(void)
|
||||
# ifdef WITH_UML
|
||||
virDriverLoadModule("uml");
|
||||
# endif
|
||||
# ifdef WITH_VBOX
|
||||
virDriverLoadModule("vbox");
|
||||
# endif
|
||||
#else
|
||||
# ifdef WITH_NETWORK
|
||||
networkRegister();
|
||||
@ -440,9 +435,6 @@ static void daemonInitialize(void)
|
||||
# ifdef WITH_UML
|
||||
umlRegister();
|
||||
# endif
|
||||
# ifdef WITH_VBOX
|
||||
vboxRegister();
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -969,8 +961,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 +1172,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 +1180,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 +1287,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 +1296,11 @@ int main(int argc, char **argv) {
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
if (!run_dir) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (privileged)
|
||||
old_umask = umask(022);
|
||||
else
|
||||
|
273
daemon/remote.c
273
daemon/remote.c
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* remote.c: handlers for RPC method calls
|
||||
*
|
||||
* Copyright (C) 2007-2013 Red Hat, Inc.
|
||||
* Copyright (C) 2007-2012 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
|
||||
@ -35,6 +35,7 @@
|
||||
#include "datatypes.h"
|
||||
#include "viralloc.h"
|
||||
#include "virlog.h"
|
||||
#include "virutil.h"
|
||||
#include "stream.h"
|
||||
#include "viruuid.h"
|
||||
#include "vircommand.h"
|
||||
@ -48,7 +49,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 +235,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 +249,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 +276,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 +295,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 +326,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 +335,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 +373,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 +408,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 +420,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 +474,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 +497,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 +521,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 +668,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 +709,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);
|
||||
@ -823,8 +851,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 +877,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 +967,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 +1001,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 +1011,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 +1109,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 +1119,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;
|
||||
@ -1248,7 +1284,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 +1299,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 +1913,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 +1926,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 +1977,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 +1990,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 +2041,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 +2054,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 +2106,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 +2119,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 +2146,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 +2184,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 +2197,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 +2224,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 +2303,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 +2312,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;
|
||||
@ -2339,7 +2370,6 @@ remoteDispatchAuthList(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
uid_t callerUid;
|
||||
gid_t callerGid;
|
||||
pid_t callerPid;
|
||||
unsigned long long timestamp;
|
||||
|
||||
/* If the client is root then we want to bypass the
|
||||
* policykit auth to avoid root being denied if
|
||||
@ -2347,14 +2377,14 @@ remoteDispatchAuthList(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
*/
|
||||
if (auth == VIR_NET_SERVER_SERVICE_AUTH_POLKIT) {
|
||||
if (virNetServerClientGetUNIXIdentity(client, &callerUid, &callerGid,
|
||||
&callerPid, ×tamp) < 0) {
|
||||
&callerPid) < 0) {
|
||||
/* Don't do anything on error - it'll be validated at next
|
||||
* phase of auth anyway */
|
||||
virResetLastError();
|
||||
} else if (callerUid == 0) {
|
||||
char *ident;
|
||||
if (virAsprintf(&ident, "pid:%lld,uid:%d",
|
||||
(long long) callerPid, (int) callerUid) < 0) {
|
||||
(long long) callerPid, callerUid) < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
@ -2773,7 +2803,6 @@ remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
pid_t callerPid = -1;
|
||||
gid_t callerGid = -1;
|
||||
uid_t callerUid = -1;
|
||||
unsigned long long timestamp;
|
||||
const char *action;
|
||||
int status = -1;
|
||||
char *ident = NULL;
|
||||
@ -2799,7 +2828,7 @@ remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
if (virNetServerClientGetUNIXIdentity(client, &callerUid, &callerGid,
|
||||
&callerPid, ×tamp) < 0) {
|
||||
&callerPid) < 0) {
|
||||
goto authfail;
|
||||
}
|
||||
|
||||
@ -2807,11 +2836,7 @@ remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
(long long) callerPid, callerUid);
|
||||
|
||||
virCommandAddArg(cmd, "--process");
|
||||
if (timestamp != 0) {
|
||||
virCommandAddArgFormat(cmd, "%lld,%llu", (long long) callerPid, timestamp);
|
||||
} else {
|
||||
virCommandAddArgFormat(cmd, "%lld", (long long) callerPid);
|
||||
}
|
||||
virCommandAddArgFormat(cmd, "%lld", (long long) callerPid);
|
||||
virCommandAddArg(cmd, "--allow-user-interaction");
|
||||
|
||||
if (virAsprintf(&ident, "pid:%lld,uid:%d",
|
||||
@ -2899,7 +2924,6 @@ remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
struct daemonClientPrivate *priv =
|
||||
virNetServerClientGetPrivateData(client);
|
||||
DBusConnection *sysbus;
|
||||
unsigned long long timestamp;
|
||||
|
||||
virMutexLock(&priv->lock);
|
||||
|
||||
@ -2914,7 +2938,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;
|
||||
}
|
||||
@ -3077,8 +3101,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;
|
||||
@ -3775,7 +3800,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 +3813,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 +4510,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 +4523,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 +4640,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;
|
||||
@ -4748,14 +4772,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 +4787,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 +4817,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 +4843,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 +4857,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;
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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 XML format</h1>
|
||||
|
||||
@ -184,7 +182,6 @@
|
||||
again in case the boot fails (according to BIOS). The value is
|
||||
in milliseconds with maximum of <code>65535</code> and special
|
||||
value <code>-1</code> disables the reboot.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h4><a name="elementsOSBootloader">Host bootloader</a></h4>
|
||||
@ -308,8 +305,7 @@
|
||||
</bios>
|
||||
<system>
|
||||
<entry name='manufacturer'>Fedora</entry>
|
||||
<entry name='product'>Virt-Manager</entry>
|
||||
<entry name='version'>0.9.4</entry>
|
||||
<entry name='vendor'>Virt-Manager</entry>
|
||||
</system>
|
||||
</sysinfo>
|
||||
...</pre>
|
||||
@ -333,49 +329,17 @@
|
||||
<dl>
|
||||
<dt><code>bios</code></dt>
|
||||
<dd>
|
||||
This is block 0 of SMBIOS, with entry names drawn from:
|
||||
<dl>
|
||||
<dt><code>vendor</code></dt>
|
||||
<dd>BIOS Vendor's Name</dd>
|
||||
<dt><code>version</code></dt>
|
||||
<dd>BIOS Version</dd>
|
||||
<dt><code>date</code></dt>
|
||||
<dd>BIOS release date. If supplied, is in either mm/dd/yy or
|
||||
mm/dd/yyyy format. If the year portion of the string is
|
||||
two digits, the year is assumed to be 19yy.</dd>
|
||||
<dt><code>release</code></dt>
|
||||
<dd>System BIOS Major and Minor release number values
|
||||
concatenated together as one string separated by
|
||||
a period, for example, 10.22.</dd>
|
||||
</dl>
|
||||
This is block 0 of SMBIOS, with entry names drawn from
|
||||
"vendor", "version", "date", and "release".
|
||||
</dd>
|
||||
<dt><code>system</code></dt>
|
||||
<dd>
|
||||
This is block 1 of SMBIOS, with entry names drawn from:
|
||||
<dl>
|
||||
<dt><code>manufacturer</code></dt>
|
||||
<dd>Manufacturer of BIOS</dd>
|
||||
<dt><code>product</code></dt>
|
||||
<dd>Product Name</dd>
|
||||
<dt><code>version</code></dt>
|
||||
<dd>Version of the product</dd>
|
||||
<dt><code>serial</code></dt>
|
||||
<dd>Serial number</dd>
|
||||
<dt><code>uuid</code></dt>
|
||||
<dd>Universal Unique ID number. If this entry is provided
|
||||
alongside a top-level
|
||||
<a href="#elementsMetadata"><code>uuid</code></a> element,
|
||||
then the two values must match.</dd>
|
||||
<dt><code>sku</code></dt>
|
||||
<dd>SKU number to identify a particular configuration.</dd>
|
||||
<dt><code>family</code></dt>
|
||||
<dd>Identify the family a particular computer belongs to.</dd>
|
||||
</dl>
|
||||
NB: Incorrectly supplied entries in either the <code>bios</code>
|
||||
or <code>system</code> blocks will be ignored without error.
|
||||
Other than <code>uuid</code> validation and <code>date</code>
|
||||
format checking, all values are passed as strings to the
|
||||
hypervisor driver.
|
||||
This is block 1 of SMBIOS, with entry names drawn from
|
||||
"manufacturer", "product", "version", "serial", "uuid",
|
||||
"sku", and "family". If a "uuid" entry is provided
|
||||
alongside a
|
||||
top-level <a href="#elementsMetadata"><code>uuid</code>
|
||||
element</a>, the two values must match.
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
@ -594,29 +558,17 @@
|
||||
...
|
||||
<memoryBacking>
|
||||
<hugepages/>
|
||||
<nosharepages/>
|
||||
<locked/>
|
||||
</memoryBacking>
|
||||
...
|
||||
</domain>
|
||||
</pre>
|
||||
|
||||
<p>The optional <code>memoryBacking</code> element may contain several
|
||||
elements that influence how virtual memory pages are backed by host
|
||||
pages.</p>
|
||||
|
||||
<dl>
|
||||
<dt><code>hugepages</code></dt>
|
||||
<dd>This tells the hypervisor that the guest should have its memory
|
||||
allocated using hugepages instead of the normal native page size.</dd>
|
||||
<dt><code>nosharepages</code></dt>
|
||||
<dd>Instructs hypervisor to disable shared pages (memory merge, KSM) for
|
||||
this domain. <span class="since">Since 1.0.6</span></dd>
|
||||
<dt><code>locked</code></dt>
|
||||
<dd>When set and supported by the hypervisor, memory pages belonging
|
||||
to the domain will be locked in host's memory and the host will not
|
||||
be allowed to swap them out.
|
||||
<span class="since">Since 1.0.6</span></dd>
|
||||
<dt><code>memoryBacking</code></dt>
|
||||
<dd>The optional <code>memoryBacking</code> element, may have an
|
||||
<code>hugepages</code> element set within it. This tells the
|
||||
hypervisor that the guest should have its memory allocated using
|
||||
hugepages instead of the normal native page size.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
@ -689,7 +641,6 @@
|
||||
how to tune the performance of a NUMA host via controlling NUMA policy
|
||||
for domain process. NB, only supported by QEMU driver.
|
||||
<span class='since'>Since 0.9.3</span>
|
||||
</dd>
|
||||
<dt><code>memory</code></dt>
|
||||
<dd>
|
||||
The optional <code>memory</code> element specifies how to allocate memory
|
||||
@ -1006,13 +957,7 @@
|
||||
|
||||
<p>
|
||||
It is sometimes necessary to override the default actions taken
|
||||
on various events. Not all hypervisors support all events and actions.
|
||||
The actions may be taken as a result of calls to libvirt APIs
|
||||
<code class='docref'>virDomainReboot</code>,
|
||||
<code class='docref'>virDomainShutdown</code>, or
|
||||
<code class='docref'>virDomainShutdownFlags</code>.
|
||||
Using <code>virsh reboot</code> or <code>virsh shutdown</code> would
|
||||
also trigger the event.
|
||||
on various events.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
@ -1049,29 +994,20 @@
|
||||
<dl>
|
||||
<dt><code>destroy</code></dt>
|
||||
<dd>The domain will be terminated completely and all resources
|
||||
released.</dd>
|
||||
released</dd>
|
||||
<dt><code>restart</code></dt>
|
||||
<dd>The domain will be terminated and then restarted with
|
||||
the same configuration.</dd>
|
||||
<dd>The domain will be terminated, and then restarted with
|
||||
the same configuration</dd>
|
||||
<dt><code>preserve</code></dt>
|
||||
<dd>The domain will be terminated and its resource preserved
|
||||
<dd>The domain will be terminated, and its resource preserved
|
||||
to allow analysis.</dd>
|
||||
<dt><code>rename-restart</code></dt>
|
||||
<dd>The domain will be terminated and then restarted with
|
||||
a new name.</dd>
|
||||
<dd>The domain will be terminated, and then restarted with
|
||||
a new name</dd>
|
||||
</dl>
|
||||
|
||||
<p>
|
||||
QEMU/KVM supports the <code>on_poweroff</code> and <code>on_reboot</code>
|
||||
events handling the <code>destroy</code> and <code>restart</code> actions.
|
||||
The <code>preserve</code> action for an <code>on_reboot</code> event
|
||||
is treated as a <code>destroy</code> and the <code>rename-restart</code>
|
||||
action for an <code>on_poweroff</code> event is treated as a
|
||||
<code>restart</code> event.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The <code>on_crash</code> event supports these additional
|
||||
on_crash supports these additional
|
||||
actions <span class="since">since 0.8.4</span>.
|
||||
</p>
|
||||
|
||||
@ -1652,7 +1588,6 @@
|
||||
<dd>The optional <code>write_iops_sec</code> element is the
|
||||
write I/O operations per second.</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt><code>driver</code></dt>
|
||||
<dd>
|
||||
The optional driver element allows specifying further details
|
||||
@ -1741,14 +1676,6 @@
|
||||
network. By default copy-on-read is off.
|
||||
<span class='since'>Since 0.9.10 (QEMU and KVM only)</span>
|
||||
</li>
|
||||
<li>
|
||||
The optional <code>discard</code> attribute controls whether
|
||||
to discard (also known as "trim" or "unmap") requests are
|
||||
ignored or passed to the filesystem. The value can be either
|
||||
"unmap" (allow the discard request to be passed) or "ignore"
|
||||
(ignore the discard request).
|
||||
<span class='since'>Since 1.0.6 (QEMU and KVM only)</span>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt><code>boot</code></dt>
|
||||
@ -1920,13 +1847,11 @@
|
||||
OS. For Linux this would be the value returned by the
|
||||
BLKSSZGET ioctl and describes the smallest units for disk
|
||||
I/O.
|
||||
</dd>
|
||||
<dt><code>physical_block_size</code></dt>
|
||||
<dd>The physical block size the disk will report to the guest
|
||||
OS. For Linux this would be the value returned by the
|
||||
BLKPBSZGET ioctl and describes the disk's hardware sector
|
||||
size which can be relevant for the alignment of disk data.
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
@ -1951,13 +1876,6 @@
|
||||
<target dir='/import/from/host'/>
|
||||
<readonly/>
|
||||
</filesystem>
|
||||
<filesystem type='file' accessmode='passthrough'>
|
||||
<driver name='loop' type='raw'/>
|
||||
<driver type='path' wrpolicy='immediate'/>
|
||||
<source file='/export/to/guest.img'/>
|
||||
<target dir='/import/from/host'/>
|
||||
<readonly/>
|
||||
</filesystem>
|
||||
...
|
||||
</devices>
|
||||
...</pre>
|
||||
@ -2049,24 +1967,6 @@
|
||||
|
||||
</dd>
|
||||
|
||||
<dt><code>driver</code></dt>
|
||||
<dd>
|
||||
The optional driver element allows specifying further details
|
||||
related to the hypervisor driver used to provide the filesystem.
|
||||
<span class="since">Since 1.0.6</span>
|
||||
<ul>
|
||||
<li>
|
||||
If the hypervisor supports multiple backend drivers, then
|
||||
the <code>type</code> attribute selects the primary
|
||||
backend driver name, while the <code>format</code>
|
||||
attribute provides the format type. For example, LXC
|
||||
supports a type of "loop", with a format of "raw" or
|
||||
"nbd" with any format. QEMU supports a type of "path"
|
||||
or "handle", but no formats.
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dt><code>source</code></dt>
|
||||
<dd>
|
||||
The resource on the host that is being accessed in the guest. The
|
||||
@ -2167,7 +2067,6 @@
|
||||
additional attributes: <code>bus</code> (a 2-digit bus
|
||||
number), and <code>slot</code> attribute (a 2-digit slot
|
||||
within the bus). <span class="since">Since 0.8.8.</span>
|
||||
</dd>
|
||||
<dt><code>type='usb'</code></dt>
|
||||
<dd>USB addresses have the following additional
|
||||
attributes: <code>bus</code> (a hex value between 0 and 0xfff,
|
||||
@ -2350,13 +2249,13 @@
|
||||
|
||||
<h4><a name="elementsHostDev">Host device assignment</a></h4>
|
||||
|
||||
<h5><a name="elementsHostDevSubsys">USB / PCI / SCSI devices</a></h5>
|
||||
<h5><a href="elementsHostDevSubsys">USB / PCI devices</a></h5>
|
||||
|
||||
<p>
|
||||
USB, PCI and SCSI devices attached to the host can be passed through
|
||||
USB and PCI devices attached to the host can be passed through
|
||||
to the guest using the <code>hostdev</code> element.
|
||||
<span class="since">since after 0.4.4 for USB, 0.6.0 for PCI(KVM only)
|
||||
and 1.0.6 for SCSI(KVM only)</span>:
|
||||
<span class="since">since after 0.4.4 for USB and 0.6.0 for PCI
|
||||
(KVM only)</span>:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
@ -2385,31 +2284,14 @@
|
||||
<rom bar='on' file='/etc/fake/boot.bin'/>
|
||||
</hostdev>
|
||||
</devices>
|
||||
...</pre>
|
||||
|
||||
<p>or:</p>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<devices>
|
||||
<hostdev mode='subsystem' type='scsi'>
|
||||
<source>
|
||||
<adapter name='scsi_host0'/>
|
||||
<address type='scsi' bus='0' target='0' unit='0'/>
|
||||
</source>
|
||||
<readonly/>
|
||||
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
|
||||
</hostdev>
|
||||
</devices>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>hostdev</code></dt>
|
||||
<dd>The <code>hostdev</code> element is the main container for describing
|
||||
host devices. For usb device passthrough <code>mode</code> is always
|
||||
"subsystem" and <code>type</code> is "usb" for a USB device, "pci"
|
||||
for a PCI device and "scsi" for a SCSI device. When
|
||||
<code>managed</code> is "yes" for a PCI
|
||||
"subsystem" and <code>type</code> is "usb" for a USB device and "pci"
|
||||
for a PCI device. When <code>managed</code> is "yes" for a PCI
|
||||
device, it is detached from the host before being passed on to
|
||||
the guest, and reattached to the host after the guest exits.
|
||||
If <code>managed</code> is omitted or "no", and for USB
|
||||
@ -2419,21 +2301,13 @@
|
||||
hot-plugging the device,
|
||||
and <code>virNodeDeviceReAttach</code> (or <code>virsh
|
||||
nodedev-reattach</code>) after hot-unplug or stopping the
|
||||
guest. For SCSI device, user is responsible to make sure the device
|
||||
is not used by host.
|
||||
The optional <code>sgio</code> (<span class="since">since 1.0.6</span>)
|
||||
attribute indicates whether the kernel will filter unprivileged
|
||||
SG_IO commands for the disk, valid settings are "filtered" or
|
||||
"unfiltered". Defaults to "filtered".
|
||||
</dd>
|
||||
guest.</dd>
|
||||
<dt><code>source</code></dt>
|
||||
<dd>The source element describes the device as seen from the host.
|
||||
The USB device can either be addressed by vendor / product id using the
|
||||
<code>vendor</code> and <code>product</code> elements or by the device's
|
||||
address on the hosts using the <code>address</code> element. PCI devices
|
||||
on the other hand can only be described by their <code>address</code>.
|
||||
SCSI devices are described by both the <code>adapter</code> and
|
||||
<code>address</code> elements.
|
||||
|
||||
<span class="since">Since 1.0.0</span>, the <code>source</code> element
|
||||
of USB devices may contain <code>startupPolicy</code> attribute which can
|
||||
@ -2468,7 +2342,6 @@
|
||||
<a href="#elementsOSBIOS">BIOS bootloader</a> section.
|
||||
<span class="since">Since 0.8.8</span> for PCI devices,
|
||||
<span class="since">Since 1.0.1</span> for USB devices.
|
||||
</dd>
|
||||
<dt><code>rom</code></dt>
|
||||
<dd>The <code>rom</code> element is used to change how a PCI
|
||||
device's ROM is presented to the guest. The optional <code>bar</code>
|
||||
@ -2513,20 +2386,10 @@
|
||||
could be changed in the future with no impact to domains that
|
||||
don't specify anything.
|
||||
</dd>
|
||||
<dt><code>readonly</code></dt>
|
||||
<dd>Indicates that the device is readonly, only supported by SCSI host
|
||||
device now. <span class="since">Since 1.0.6 (QEMU and KVM only)</span>
|
||||
</dd>
|
||||
<dt><code>shareable</code></dt>
|
||||
<dd>If present, this indicates the device is expected to be shared
|
||||
between domains (assuming the hypervisor and OS support this).
|
||||
Only supported by SCSI host device.
|
||||
<span class="since">Since 1.0.6</span>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h5><a name="elementsHostDevCaps">Block / character devices</a></h5>
|
||||
<h5><a href="elementsHostDevCaps">Block / character devices</a></h5>
|
||||
|
||||
<p>
|
||||
Block / character devices from the host can be passed through
|
||||
@ -3265,7 +3128,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
<source network='default'/>
|
||||
<target dev='vnet1'/>
|
||||
<model type='virtio'/>
|
||||
<b><driver name='vhost' txmode='iothread' ioeventfd='on' event_idx='off' queues='5'/></b>
|
||||
<b><driver name='vhost' txmode='iothread' ioeventfd='on' event_idx='off'/></b>
|
||||
</interface>
|
||||
</devices>
|
||||
...</pre>
|
||||
@ -3359,16 +3222,6 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
<b>In general you should leave this option alone, unless you
|
||||
are very certain you know what you are doing.</b>
|
||||
</dd>
|
||||
<dt><code>queues</code></dt>
|
||||
<dd>
|
||||
The optional <code>queues</code> attribute controls the number of
|
||||
queues to be used for the<a href="http://www.linux-kvm.org/page/Multiqueue">
|
||||
Multiqueue virtio-net</a> feature. If the interface has <code><model
|
||||
type='virtio'/></code>, multiple packet processing queues can be
|
||||
created; each queue will potentially be handled by a different
|
||||
processor, resulting in much higher throughput.
|
||||
<span class="since">Since 1.0.6 (QEMU and KVM only)</span>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h5><a name="elementsNICSTargetOverride">Overriding the target element</a></h5>
|
||||
@ -3631,7 +3484,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
...
|
||||
<devices>
|
||||
<graphics type='sdl' display=':0.0'/>
|
||||
<graphics type='vnc' port='5904' sharePolicy='allow-exclusive'>
|
||||
<graphics type='vnc' port='5904'>
|
||||
<listen type='address' address='1.2.3.4'/>
|
||||
</graphics>
|
||||
<graphics type='rdp' autoport='yes' multiUser='yes' />
|
||||
@ -3674,25 +3527,10 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
allows control of connected client during password changes.
|
||||
VNC accepts <code>keep</code> value only.
|
||||
<span class="since">since 0.9.3</span>
|
||||
NB, this may not be supported by all hypervisors.<br/>
|
||||
The optional <code>sharePolicy</code> attribute specifies vnc server
|
||||
display sharing policy. "allow-exclusive" allows clients to ask
|
||||
for exclusive access by dropping other connections. Connecting
|
||||
multiple clients in parallel requires all clients asking for a
|
||||
shared session (vncviewer: -Shared switch). This is the default
|
||||
value. "force-shared" disables exclusive client access, every
|
||||
connection has to specify -Shared switch for vncviewer. "ignore"
|
||||
welcomes every connection unconditionally
|
||||
<span class="since">since 1.0.6</span>. <br/> <br/>
|
||||
NB, this may not be supported by all hypervisors.<br/> <br/>
|
||||
Rather than using listen/port, QEMU supports a
|
||||
<code>socket</code> attribute for listening on a unix
|
||||
domain socket path.<span class="since">Since 0.8.8</span>
|
||||
|
||||
For VNC WebSocket functionality, <code>websocket</code>
|
||||
attribute may be used to specify port to listen on (with
|
||||
-1 meaning auto-allocation and <code>autoport</code>
|
||||
having no effect due to security reasons).
|
||||
<span class="since">Since 1.0.6</span>
|
||||
</dd>
|
||||
<dt><code>"spice"</code></dt>
|
||||
<dd>
|
||||
@ -4161,13 +3999,8 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
then libvirt can interact with a guest agent installed in the
|
||||
guest, for actions such as guest shutdown or file system quiescing.
|
||||
<span class="since">Since 0.7.7, guest agent interaction
|
||||
since 0.9.10</span> Moreover, <span class="since">since 1.0.6</span>
|
||||
it is possible to have source path auto generated for virtio unix channels.
|
||||
This is very useful in case of a qemu guest agent, where users don't
|
||||
usually care about the source path since it's libvirt who talks to
|
||||
the guest agent. In case users want to utilize this feature, they should
|
||||
leave <code><source></code> element out.
|
||||
</dd>
|
||||
since 0.9.10</span></dd>
|
||||
|
||||
<dt><code>spicevmc</code></dt>
|
||||
<dd>Paravirtualized SPICE channel. The domain must also have a
|
||||
SPICE server as a <a href="#elementsGraphics">graphics
|
||||
@ -4666,7 +4499,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
<dd>
|
||||
<p>
|
||||
This backend type expects a non-blocking character device as input.
|
||||
The only accepted paths are /dev/random and /dev/hwrng. The file
|
||||
Examples of such devices are /dev/random and /dev/urandom. The file
|
||||
name is specified as contents of the <code>backend</code> element.
|
||||
When no file name is specified the hypervisor default is used.
|
||||
</p>
|
||||
@ -4726,7 +4559,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
TPM device. The following types are supported:
|
||||
</p>
|
||||
<ul>
|
||||
<li>'passthrough' — use the host's TPM device.</li>
|
||||
<li>'passthrough' — use the host's TPM device.
|
||||
</ul>
|
||||
</dd>
|
||||
<dt><code>backend type='passthrough'</code></dt>
|
||||
|
@ -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>
|
||||
|
||||
@ -546,62 +544,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 +575,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>
|
||||
@ -883,33 +824,6 @@
|
||||
</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>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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,7 +62,7 @@
|
||||
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>
|
||||
|
||||
@ -76,7 +74,7 @@
|
||||
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
|
||||
a <a href="domain.html#elementsDisks">disk
|
||||
device</a>. <span class="since">Since 1.0.4</span>.
|
||||
</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>Snapshot 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>Storage pool and volume 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>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>
|
||||
|
||||
@ -377,35 +375,6 @@
|
||||
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>
|
||||
@ -548,13 +517,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 +614,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 +853,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>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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,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>
|
||||
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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,451 +8,6 @@
|
||||
<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.6: June 3 2013</h3>
|
||||
<ul>
|
||||
<li>Features:<br/>
|
||||
Move VirtualBox driver into libvirtd (Daniel P. Berrange),<br/>
|
||||
Support for static routes on a virtual bridge (Gene Czarcinski),<br/>
|
||||
Various improvement for hostdev SCSI support (Osier Yang and Han Cheng),<br/>
|
||||
Switch to VIR_STRDUP and VIR_STRNDUP (Michal Privoznik),<br/>
|
||||
Various cleanups and improvement in Xen and LXC drivers (Daniel P. Berrange)<br/>
|
||||
</li>
|
||||
|
||||
<li>Documentation:<br/>
|
||||
Document that runtime changes may be lost after S4 suspend (Jiri Denemark),<br/>
|
||||
domain: /dev/urandom isn't a valid rng patch (Cole Robinson),<br/>
|
||||
formatdomain: fix links in the table of contents (Ján Tomko),<br/>
|
||||
add another user (Eric Blake),<br/>
|
||||
datatypes: fix virGetStoragePool's comment (Ján Tomko),<br/>
|
||||
Expand documentation for LXC driver (Daniel P. Berrange),<br/>
|
||||
Fix/update syntax in Sysinfo/SMBIOS description (John Ferlan),<br/>
|
||||
Update formatdomain for lifecycle events (John Ferlan),<br/>
|
||||
Fix the wrong links in secret documentation (Osier Yang),<br/>
|
||||
Add the missed usage type 'iscsi' (Osier Yang),<br/>
|
||||
Add docs about cgroups layout and usage (Daniel P. Berrange),<br/>
|
||||
Point users to Virt-Viewer MSI installers for Windows builds (Daniel P. Berrange),<br/>
|
||||
Fix namespace bugs in API docs, todo page & hv support page (Daniel P. Berrange),<br/>
|
||||
Fix a few more docs XSL bugs related to the TOC (Daniel P. Berrange),<br/>
|
||||
Fix docs generator regression in previous commit (Daniel P. Berrange),<br/>
|
||||
Fix multiple formatting problems in HTML docs (Daniel P. Berrange),<br/>
|
||||
fix 'since' for socket path generation (Ján Tomko)<br/>
|
||||
</li>
|
||||
|
||||
<li>Portability:<br/>
|
||||
vbox: define DYNLIB_NAME for kFreeBSD (Guido Günther),<br/>
|
||||
build: skip qemu in tests when !WITH_QEMU (Eric Blake),<br/>
|
||||
build: use correct rpc.h for virtlockd (Eric Blake),<br/>
|
||||
build: work around cygwin header bug (Eric Blake),<br/>
|
||||
build: cast [ug]id_t when printing (Eric Blake),<br/>
|
||||
build: port qemu to cygwin (Eric Blake),<br/>
|
||||
build: use correct rpc.h for lockd (Eric Blake),<br/>
|
||||
build: work around broken sasl header (Eric Blake),<br/>
|
||||
build: fix build without libvirtd (Eric Blake),<br/>
|
||||
build: fix build with newer gnutls (Eric Blake),<br/>
|
||||
build: fix build with older gcc (Eric Blake),<br/>
|
||||
qemu: Fix build without gnutls (Jiri Denemark),<br/>
|
||||
spec: Build vbox packages only for x86 architectures (Viktor Mihajlovski),<br/>
|
||||
Add missing c-ctype.h to virfile.c (Daniel P. Berrange),<br/>
|
||||
test: fix VPATH fchosttest failure (Viktor Mihajlovski),<br/>
|
||||
libxl: fix build with Xen4.3 (Jim Fehlig),<br/>
|
||||
build: Fix check-driverimpls in VPATH (Jiri Denemark),<br/>
|
||||
util: Fix build without devmapper (Jiri Denemark),<br/>
|
||||
FreeBSD: disable buggy -fstack-protector-all (Roman Bogorodskiy),<br/>
|
||||
build: avoid gcrypt deprecation warnings (Roman Bogorodskiy),<br/>
|
||||
build: avoid shadowed variable in fdstreamtest (Eric Blake),<br/>
|
||||
fix virNetDevSetMAC and virNetDevExists on BSD (Roman Bogorodskiy),<br/>
|
||||
Disable some URI tests on older libxml2 (Daniel P. Berrange),<br/>
|
||||
Fix build of python bindings on Python 2.4 (Daniel P. Berrange),<br/>
|
||||
build: fix build with old polkit0 (Jim Fehlig),<br/>
|
||||
Fixup rpcgen code on kFreeBSD too (Guido Günther),<br/>
|
||||
build: avoid non-portable cast of pthread_t (Eric Blake),<br/>
|
||||
build: Fix build when WITH_HAL is defined (Jim Fehlig),<br/>
|
||||
build: fix mingw build of vbox (Eric Blake),<br/>
|
||||
build: fix mingw build of virprocess.c (Eric Blake)<br/>
|
||||
</li>
|
||||
|
||||
<li>Bug Fixes:<br/>
|
||||
conf: Generate address for scsi host device automatically (Osier Yang),<br/>
|
||||
qemu: prevent termination of guests w/hostdev on driver reconnect (Laine Stump),<br/>
|
||||
qemu: escape literal IPv6 address in NBD migration (Ján Tomko),<br/>
|
||||
Check for existence of interface prior to setting terminate flag (John Ferlan),<br/>
|
||||
Resolve memory leak found by valgrind (John Ferlan),<br/>
|
||||
qemu: snapshot: Don't kill access to disk if snapshot creation fails (Peter Krempa),<br/>
|
||||
virsh: migrate: Don't disallow --p2p and --migrateuri (Cole Robinson),<br/>
|
||||
qemu: Don't report error on successful media eject (Cole Robinson),<br/>
|
||||
qemu: save domain state to XML after reboot (Sergey Fionov),<br/>
|
||||
esx: Fix dynamic VI object type detection (Matthias Bolte),<br/>
|
||||
storage_conf: Don't leak "uuid" in virStoragePoolDefParseAuthCephx (Osier Yang),<br/>
|
||||
storage_conf: Fix the wrong error message (Osier Yang),<br/>
|
||||
Fix blkdeviotune for shutoff domain (Martin Kletzander),<br/>
|
||||
virsh: Fix regression of vol-resize (Osier Yang),<br/>
|
||||
xen: Resolve Coverity FORWARD_NULL issue (John Ferlan),<br/>
|
||||
qemu: fix NBD migration to hosts with IPv6 enabled (Ján Tomko),<br/>
|
||||
conf: fix use after free in virChrdevOpen (Ján Tomko),<br/>
|
||||
virNetMessageSaveError: Fix copy and paste error (Michal Privoznik),<br/>
|
||||
virNWFilterHashTablePut: Free the correct variable (Michal Privoznik),<br/>
|
||||
umlConnectTapDevice: initialize tapfd variable (Michal Privoznik),<br/>
|
||||
remote: fix dom->id after virDomainCreateWithFlags (Marek Marczykowski),<br/>
|
||||
virsh: Fix virDomainFree for NULL domain in blkdeviotune (Martin Kletzander),<br/>
|
||||
virNetDevTapCreate: Fail on systems not supporting IFF_MULTI_QUEUE (Michal Privoznik),<br/>
|
||||
cgroup: be robust against cgroup movement races (Eric Blake),<br/>
|
||||
shunloadtest: Resolve Coverity CHECKED_RETURN error (John Ferlan),<br/>
|
||||
xencapstest: Resolve Coverity CHECKED_RETURN error (John Ferlan),<br/>
|
||||
qemu: fix a typo in qemuAddSharedDevice (Guannan Ren),<br/>
|
||||
qemuDomainChangeEjectableMedia: Unlock domain while waiting for event (Michal Privoznik),<br/>
|
||||
LXC: fix memory leak in virLXCControllerSetupDevPTS (Gao feng),<br/>
|
||||
LXC: remove unnecessary check on root filesystem (Gao feng),<br/>
|
||||
esx: Fix error reporting in esxVI_LookupManagedObjectHelper (Matthias Bolte),<br/>
|
||||
Fix failure to detect missing cgroup partitions (Daniel P. Berrange),<br/>
|
||||
libxl: fix leaking libxl events (Jim Fehlig),<br/>
|
||||
qemu: Fix cgroup handling when setting VCPU BW (Martin Kletzander),<br/>
|
||||
Don't mount selinux fs in LXC if selinux is disabled (Daniel P. Berrange),<br/>
|
||||
Fix LXC startup when /var/run is an absolute symlink (Daniel P. Berrange),<br/>
|
||||
conf: Fix the bug of disk->copy_on_read formating (Osier Yang),<br/>
|
||||
daemon: fix leak after listing all volumes (Ján Tomko),<br/>
|
||||
qemu: Fix crash in migration of graphics-less guests. (Viktor Mihajlovski),<br/>
|
||||
Adjust improperly formatted <sysinfo> uuid (John Ferlan),<br/>
|
||||
storage: Ensure 'qemu-img resize' size arg is a 512 multiple (Christophe Fergeau),<br/>
|
||||
spec: fix outdated comment (Eric Blake),<br/>
|
||||
Forbid use of ':' in RBD pool names (Daniel P. Berrange),<br/>
|
||||
qemu: fix bad free (Eric Blake),<br/>
|
||||
Fix starting domains when kernel has no cgroups support (Jim Fehlig),<br/>
|
||||
Fix error handling of readdir() in virFileLoopDeviceOpen (Daniel P. Berrange),<br/>
|
||||
util: Fix regression introduced by commit 4360a098441 (Osier Yang),<br/>
|
||||
util: Fix regression of wwn reading (Osier Yang),<br/>
|
||||
build: fix use of mmap (Eric Blake),<br/>
|
||||
conf: don't crash on a tpm device with no backends (Ján Tomko),<br/>
|
||||
don't mention disk controllers in generic controller errors (Ján Tomko),<br/>
|
||||
iscsi: don't leak portal string when starting a pool (Ján Tomko),<br/>
|
||||
virsh: Resolve Coverity 'MISSING_BREAK' (John Ferlan),<br/>
|
||||
lxc: Coverity false positive USE_AFTER_FREE (John Ferlan),<br/>
|
||||
Don't allow renaming of domains by the backdoor (Daniel P. Berrange),<br/>
|
||||
qemu: fix stupid typos in VFIO cgroup setup/teardown (Laine Stump),<br/>
|
||||
Ignore 'uri' parameter in lockd driver (Daniel P. Berrange),<br/>
|
||||
network: fix network driver startup for qemu:///session (Laine Stump),<br/>
|
||||
Fix warning about unsupported cookie flags in QEMU driver (Daniel P. Berrange),<br/>
|
||||
Fix release of resources with lockd plugin (Daniel P. Berrange),<br/>
|
||||
Fix F_DUPFD_CLOEXEC operation args (Daniel P. Berrange),<br/>
|
||||
build: fix make rpm failure (Laine Stump),<br/>
|
||||
Fix potential use of undefined variable in remote dispatch code (Daniel P. Berrange),<br/>
|
||||
virInitctlRequest: unbreak make syntax check (Guido Günther),<br/>
|
||||
virInitctlRequest: unbreak make syntax check (Guido Günther)<br/>
|
||||
</li>
|
||||
|
||||
<li>Improvements:<br/>
|
||||
nodedev_hal: Modernize the function's style (Osier Yang),<br/>
|
||||
Introduce virFilePrintf() as a portable fprintf() (Daniel P. Berrange),<br/>
|
||||
qemu: migration: error if tunnelled + storage specified (Cole Robinson),<br/>
|
||||
qemu: migration: Improve p2p error if we can't open conn (Cole Robinson),<br/>
|
||||
storage_conf: Use uid_t/gid_t instead of int to cast the value (Osier Yang),<br/>
|
||||
storage_conf: Improve error messages (Osier Yang),<br/>
|
||||
storage_conf: Use NULLSTR instead (Osier Yang),<br/>
|
||||
storage_conf: Improve the memory deallocation of virStorageVolDefParseXML (Osier Yang),<br/>
|
||||
storage_conf: Improve the memory deallocation of pool def parsing (Osier Yang),<br/>
|
||||
syntax: fix broken error message in previous patch (Eric Blake),<br/>
|
||||
util: fix the VIR_STRDUP when src is NULL (yangdongsheng),<br/>
|
||||
Adapt to new VIR_STRNDUP behavior (Michal Privoznik),<br/>
|
||||
virStrndup: Accept negative values as string length (Michal Privoznik),<br/>
|
||||
storage_conf: Fix the error type (Osier Yang),<br/>
|
||||
storage_conf: Put "%s" at the same line with error type (Osier Yang),<br/>
|
||||
storage_conf: Use xmlStrEqual instead of STREQ (Osier Yang),<br/>
|
||||
storage_conf: Remove the useless casting (Osier Yang),<br/>
|
||||
syntax-check: ignore all quoted strings in bracket-spacing (Ján Tomko),<br/>
|
||||
nwfilter: Remove error report in virNWFilterDHCPSnoopEnd (Stefan Berger),<br/>
|
||||
cgroups: Do not enforce nonexistent controllers (Viktor Mihajlovski),<br/>
|
||||
Introduce syntax-check rule to prefer VIR_STRDUP over strdup (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in tools/virsh.c (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/util/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/util/vircgroup.c (Michal Privoznik),<br/>
|
||||
virCgroupAddTaskStrController: s/-1/-ENOMEM/ (Michal Privoznik),<br/>
|
||||
conf: add missing OOM errors (Ján Tomko),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/xenxs/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/xenapi/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/xen/* (Michal Privoznik),<br/>
|
||||
Fix the build failure (Osier Yang),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/security/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/rpc/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/remote/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/qemu/* (Michal Privoznik),<br/>
|
||||
virsh: omit OPTION section in 'virsh help' if no option exists (Zhang Xiaohe),<br/>
|
||||
Change virConnectDomainEventGraphicsCallback signature (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/openvz/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/conf/* (Michal Privoznik),<br/>
|
||||
qemu: Enable multiqueue network (Michal Privoznik),<br/>
|
||||
qemu: Adapt qemuBuildInterfaceCommandLine to to multiqueue net (Michal Privoznik),<br/>
|
||||
qemu: Move interface cmd line construction into a separate function (Michal Privoznik),<br/>
|
||||
Introduce /domain/devices/interface/driver/@queues attribute (Michal Privoznik),<br/>
|
||||
qemu: add ', share=<policy>' to qemu commandline (Guannan Ren),<br/>
|
||||
conf: add 'sharePolicy' attribute to graphics element for vnc (Guannan Ren),<br/>
|
||||
qemu: new vnc display sharing policy caps flag (Guannan Ren),<br/>
|
||||
vbox: fix VIR_STRDUP value check (Ján Tomko),<br/>
|
||||
syntax-check: Add the rule to forbid whitespace before ";" (Osier Yang),<br/>
|
||||
Fix the syntax-check failure (Osier Yang),<br/>
|
||||
interface: list all interfaces with flags == 0 (Guannan Ren),<br/>
|
||||
Convert Xen domain core dump driver methods to use virDomainDefPtr (Daniel P. Berrange),<br/>
|
||||
Convert Xen domain stats/peek driver methods to use virDomainDefPtr (Daniel P. Berrange),<br/>
|
||||
Convert Xen domain scheduler driver methods to use virDomainDefPtr (Daniel P. Berrange),<br/>
|
||||
Convert Xen domain autostart driver methods to use virDomainDefPtr (Daniel P. Berrange),<br/>
|
||||
Convert Xen domain device hotplug driver methods to use virDomainDefPtr (Daniel P. Berrange),<br/>
|
||||
Convert Xen domain VCPU driver methods to use virDomainDefPtr (Daniel P. Berrange),<br/>
|
||||
Convert Xen domain create/define/getxml/migration APIs to use virDomainDefPtr (Daniel P. Berrange),<br/>
|
||||
Convert Xen domain managed save driver methods to use virDomainDefPtr (Daniel P. Berrange),<br/>
|
||||
Convert Xen domain property driver methods to use virDomainDefPtr (Daniel P. Berrange),<br/>
|
||||
Convert Xen domain lifecycle driver methods to use virDomainDefPtr (Daniel P. Berrange),<br/>
|
||||
Convert Xen domain lookup driver methods to use virDomainDefPtr (Daniel P. Berrange),<br/>
|
||||
qemu: Don't remove the "return 0" (Osier Yang),<br/>
|
||||
esx: Replace almost all esxVI_String_DeepCopyValue vith VIR_STRDUP (Matthias Bolte),<br/>
|
||||
vmware: Restore OOM error reporting in vmwareCopyVMXFileName (Matthias Bolte),<br/>
|
||||
maint: enforce correct copyright usage (Eric Blake),<br/>
|
||||
maint: refer to correct license file (Eric Blake),<br/>
|
||||
maint: follow recommended practice for using LGPL (Eric Blake),<br/>
|
||||
maint: use LGPL correctly (Eric Blake),<br/>
|
||||
openvzDomainSetNetwork: use virCommand (Michal Privoznik),<br/>
|
||||
qemu: Add callback struct for qemuBuildCommandLine (Osier Yang),<br/>
|
||||
storage_conf: Improve the coding style in storage_conf.h (Osier Yang),<br/>
|
||||
storage_conf: Fix indentions in storage_conf.c (Osier Yang),<br/>
|
||||
storage_conf: Fix the coding stype in storage_conf.c (Osier Yang),<br/>
|
||||
qemu: Abstract code for cpuset controller setting into a helper (Osier Yang),<br/>
|
||||
qemu: Abstract code for devices controller setting into a helper (Osier Yang),<br/>
|
||||
qemu: Abstract code for memory controller setting into a helper (Osier Yang),<br/>
|
||||
qemu: Abstract the code for blkio controller setting into a helper (Osier Yang),<br/>
|
||||
Add libvirt-daemon-vbox & libvirt-daemon-driver-vbox RPMs (Daniel P. Berrange),<br/>
|
||||
Include GNULIB mkdtemp module (Daniel P. Berrange),<br/>
|
||||
Set PKG_CONFIG_LIBDIR in autobuild.sh (Daniel P. Berrange),<br/>
|
||||
qemu: report useful error failling to destroy domain gracefully (Guannan Ren),<br/>
|
||||
qemu: Check conflicts for shared scsi host device (Osier Yang),<br/>
|
||||
Re-add selinux/selinux.h to lxc_container.c (Daniel P. Berrange),<br/>
|
||||
schema: make source optional in volume XML (Ján Tomko),<br/>
|
||||
schema: require target path in storage pool xml (Ján Tomko),<br/>
|
||||
qemu: Change values of disk discard (Osier Yang),<br/>
|
||||
qemu: Implement support for locking domain's memory pages (Jiri Denemark),<br/>
|
||||
Add support for locking domain's memory pages (Jiri Denemark),<br/>
|
||||
Fix build with VirtualBox (Jiri Denemark),<br/>
|
||||
qemu: Set unpriv_sgio for scsi host device (Osier Yang),<br/>
|
||||
qemu: Refactor qemuSetUnprivSGIO to support scsi host device (Osier Yang),<br/>
|
||||
qemu: Move qemuSetUnprivSGIO into qemu_conf.c (Osier Yang),<br/>
|
||||
conf: Introduce sgio for hostdev (Osier Yang),<br/>
|
||||
Rename virDomainDiskSGIO to virDomainDeviceSGIO (Osier Yang),<br/>
|
||||
qemu: Manage shared device entry for scsi host device (Osier Yang),<br/>
|
||||
qemu: Refactor the helpers to track shared scsi host device (Osier Yang),<br/>
|
||||
utils: Add a helper to get the device name that sg device mapped to (Osier Yang),<br/>
|
||||
qemu: Rename qemu_driver->sharedDisks to qemu_driver->sharedDevices (Osier Yang),<br/>
|
||||
conf: Introduce <shareable> for hostdev (Osier Yang),<br/>
|
||||
string: test VIR_STRDUP (Eric Blake),<br/>
|
||||
virsh: lookup interface by name or mac other than one by one (Guannan Ren),<br/>
|
||||
nwfilter: check for inverted ctdir (Stefan Berger),<br/>
|
||||
Validate the bios_date format for <sysinfo> (John Ferlan),<br/>
|
||||
Remove obsolete skipRoot flag in LXC driver (Daniel P. Berrange),<br/>
|
||||
Stop passing around old root directory prefix (Daniel P. Berrange),<br/>
|
||||
Remove obsolete pivotRoot flag in LXC driver (Daniel P. Berrange),<br/>
|
||||
qemu: Support discard for disk (Osier Yang),<br/>
|
||||
Handle the domain event 'on_reboot' and 'on_poweroff' settings (John Ferlan),<br/>
|
||||
Adjust comments to describe on_poweroff and on_reboot action (John Ferlan),<br/>
|
||||
Adjust usage of qemu -no-reboot and -no-shutdown options (John Ferlan),<br/>
|
||||
qemu: Add VNC WebSocket support (Martin Kletzander),<br/>
|
||||
Add VNC WebSocket support (Martin Kletzander),<br/>
|
||||
qemu: New XML to disable memory merge at guest startup (Osier Yang),<br/>
|
||||
qemu: detect -machine mem-merge capability (Eric Blake),<br/>
|
||||
Rename rbd-invalid.xml to rbd-no-colon.xml (Daniel P. Berrange),<br/>
|
||||
tests: Add fchostdata in EXTRA_DIST (Osier Yang),<br/>
|
||||
virsh: Pretty the output of qemu-agent-command (Osier Yang),<br/>
|
||||
virsh: Use vshPrint instead of printf (Osier Yang),<br/>
|
||||
Fix invalid argument reference in virnetdev.h (Martin Kletzander),<br/>
|
||||
Don't duplicate compiler warning flags when linking (Daniel P. Berrange),<br/>
|
||||
Only pass -export-dynamic to linker, not compiler (Daniel P. Berrange),<br/>
|
||||
Correctly detect warning flags with clang (Daniel P. Berrange),<br/>
|
||||
Ignore cast alignment warnings in inotify code for Xen. (Daniel P. Berrange),<br/>
|
||||
Workaround issue with clang and inline functions with static vars (Daniel P. Berrange),<br/>
|
||||
Ensure consistent enablement of gcc 'diagnostic' pragma (Daniel P. Berrange),<br/>
|
||||
qemu: query command line options in QMP (Eric Blake),<br/>
|
||||
qemu: simplify string cleanup (Eric Blake),<br/>
|
||||
qemu: use bool in monitor struct (Eric Blake),<br/>
|
||||
json: support removing a value from an object (Eric Blake),<br/>
|
||||
Don't overwrite useful message when creating macvlan fails (Daniel P. Berrange),<br/>
|
||||
Remove & ban use of select() for waiting for I/O (Daniel P. Berrange),<br/>
|
||||
qemu: Add hotplug support for scsi host device (Han Cheng),<br/>
|
||||
.gitignore: add fchosttest (Ján Tomko),<br/>
|
||||
qemu: Refactor helpers for USB device attachment (Osier Yang),<br/>
|
||||
Escaping leading '.' in cgroup names (Daniel P. Berrange),<br/>
|
||||
qemu: Introduce activeScsiHostdevs list for scsi host devices (Han Cheng),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/vbox/* (Michal Privoznik),<br/>
|
||||
Support NBD backed disks/filesystems in LXC driver (Daniel P. Berrange),<br/>
|
||||
Add 'nbd' as a valid filesystem driver type (Daniel P. Berrange),<br/>
|
||||
Add a helper API for setting up a NBD device with qemu-nbd (Daniel P. Berrange),<br/>
|
||||
Re-arrange code setting up ifs/disk loop devices for LXC (Daniel P. Berrange),<br/>
|
||||
Add support for storage format in FS <driver> (Daniel P. Berrange),<br/>
|
||||
security_apparmor.c: Include virscsi.h (Michal Privoznik),<br/>
|
||||
security: Manage the security label for scsi host device (Osier Yang),<br/>
|
||||
qemu: Allow the scsi-generic device in cgroup (Han Cheng),<br/>
|
||||
qemu: Support bootindex for scsi host device (Osier Yang),<br/>
|
||||
Introduce <readonly> for hostdev (Osier Yang),<br/>
|
||||
rng: Interleave hostdev elements (Osier Yang),<br/>
|
||||
qemu: Build qemu command line for scsi host device (Han Cheng),<br/>
|
||||
utils: util functions for scsi hostdev (Han Cheng),<br/>
|
||||
qemu: New cap flags for scsi-generic (Han Cheng),<br/>
|
||||
node_device: Clean up unused macros (Osier Yang),<br/>
|
||||
conf: Generic XMLs for scsi hostdev (Han Cheng),<br/>
|
||||
tests: Add tests for fc_host (Osier Yang),<br/>
|
||||
util: Honor the passed sysfs_prefix (Osier Yang),<br/>
|
||||
util: Update the comment for virGetFCHostNameByWWN (Osier Yang),<br/>
|
||||
util: Change virIsCapable* to return bool (Osier Yang),<br/>
|
||||
util: Don't miss the slash in constructed path (Osier Yang),<br/>
|
||||
build: update to latest gnulib, for syntax-check (Eric Blake),<br/>
|
||||
Update hellolibvirt to demo virGetLastErrorMessage() (Daniel P. Berrange),<br/>
|
||||
Add a test case for the fdstream file read/write code (Daniel P. Berrange),<br/>
|
||||
Allow the iohelper path to be customized by test programs (Daniel P. Berrange),<br/>
|
||||
Add a virGetLastErrorMessage() function (Daniel P. Berrange),<br/>
|
||||
Fix iohelper usage with streams opened for read (Daniel P. Berrange),<br/>
|
||||
Cope with missing swap cgroup controls (Daniel P. Berrange),<br/>
|
||||
util: move virFile* functions from virutil.c to virfile.c (Laine Stump),<br/>
|
||||
util: fix virFileOpenAs return value and resulting error logs (Laine Stump),<br/>
|
||||
Build breaker - requires VIR_FROM_THIS (John Ferlan),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/test/* (Michal Privoznik),<br/>
|
||||
virGetStorageVol: Don't ignore NULL pool name (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in tests/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/storage/* (Michal Privoznik),<br/>
|
||||
dom event example: Add error check to impl call (Jesse J. Cook),<br/>
|
||||
dom event example: init before register event impl (Jesse J. Cook),<br/>
|
||||
conf: Fix typo in error message in ABI stability check (Peter Krempa),<br/>
|
||||
tests: use portable shell code (Eric Blake),<br/>
|
||||
Replace 'goto clean' with 'goto cleanup' in apparmor code (Daniel P. Berrange),<br/>
|
||||
Replace list of driver source files with variables (Daniel P. Berrange),<br/>
|
||||
Fix naming of methods in ESX storage backends to follow public APIs (Daniel P. Berrange),<br/>
|
||||
Skip virNWFilterTechDriver when validating API naming (Daniel P. Berrange),<br/>
|
||||
Replace 'goto cleanup' with 'goto error' in udev interface driver (Daniel P. Berrange),<br/>
|
||||
Replace 'goto err' with 'goto cleanup' in udev interface driver (Daniel P. Berrange),<br/>
|
||||
tests: files named '.*-invalid.xml' should fail validation (Ján Tomko),<br/>
|
||||
Simplify the Xen domain stats/peek / node memory driver methods (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen domain autostart driver method (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen domain scheduler parameter driver methods (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen domain attach/dettach driver methods (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen domain define/undefine driver methods (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen domain start driver method (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen driver define domain driver methods (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen domain migration driver methods (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen domain get XML driver method (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen domain VCPU driver methods (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen domain save/restore driver methods (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen domain get info/state driver methods (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen domain get/set (max) memory driver methods (Daniel P. Berrange),<br/>
|
||||
Remove Xen get hostname driver method (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen domain get OS type driver method (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen domain destroy driver method (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen domain shutdown/reboot driver methods (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen domain suspend/resume driver methods (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen domain is persistent driver method (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen domain lookup driver methods (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen domain create driver method (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen count/list domains driver methods (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen get max vcpus / node get info driver methods (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen get version driver method (Daniel P. Berrange),<br/>
|
||||
Simplify the Xen get type driver method (Daniel P. Berrange),<br/>
|
||||
Simplify opening of Xen drivers (Daniel P. Berrange),<br/>
|
||||
Remove pointless GET_PRIVATE macro from Xen driver (Daniel P. Berrange),<br/>
|
||||
Remove VIR_CONNECT_RO checks from xen drivers (Daniel P. Berrange),<br/>
|
||||
Remove xen driver checks for priv->handle < 0 (Daniel P. Berrange),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/vmx/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/vmware/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/uml/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/secret/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/phyp/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/parallels/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/nwfilter/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/interface/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/node_device/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/network/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/lxc/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/locking/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/libxl/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/hyperv/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/esx/* (Michal Privoznik),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in src/cpu/* (Michal Privoznik),<br/>
|
||||
Delete udevFreeIfaceDef function in udev interface driver (Daniel P. Berrange),<br/>
|
||||
maint: update to latest gnulib (Eric Blake),<br/>
|
||||
Unmerge attach/update/modify device APIs in drivers (Daniel P. Berrange),<br/>
|
||||
Pull parsing of migration xml up into QEMU driver APIs (Daniel P. Berrange),<br/>
|
||||
Fix naming of some node device APIs (Daniel P. Berrange),<br/>
|
||||
Separate internal node suspend APIs from public API (Daniel P. Berrange),<br/>
|
||||
Separate internal node device APIs from public API (Daniel P. Berrange),<br/>
|
||||
Separate virGetHostname() API contract from driver APIs (Daniel P. Berrange),<br/>
|
||||
Include process start time when doing polkit checks (Daniel P. Berrange),<br/>
|
||||
Rename "security context" to "selinux context" (Daniel P. Berrange),<br/>
|
||||
Fix possible undefined value in check-symsorting.pl (Daniel P. Berrange),<br/>
|
||||
storage: Skip inactive lv volumes (Osier Yang),<br/>
|
||||
string: make VIR_STRDUP easier to use (Eric Blake),<br/>
|
||||
alloc: make VIR_APPEND_ELEMENT safer (Eric Blake),<br/>
|
||||
syntax-check: forbid virBufferAsprintf with string literals (Ján Tomko),<br/>
|
||||
get rid of virBufferAsprintf where possible (Ján Tomko),<br/>
|
||||
qemu: allocate network connections sooner during domain startup (Laine Stump),<br/>
|
||||
Ensure stub todo.html.in file is HTML5 (Daniel P. Berrange),<br/>
|
||||
qemu: Enable the capability bit for -no-kvm-pit-reinjection on x86 only (Boris Fiuczynski),<br/>
|
||||
rpc: message related sizes enlarged (Daniel Hansel),<br/>
|
||||
qemu: Do fake auto-allocation of ports when generating native command (Peter Krempa),<br/>
|
||||
spec: proper soft static allocation of qemu uid (Eric Blake),<br/>
|
||||
build: always include libvirt_lxc.syms in tarball (Eric Blake),<br/>
|
||||
Adapt to VIR_STRDUP and VIR_STRNDUP in daemon/* (Michal Privoznik),<br/>
|
||||
virstring: Introduce VIR_STRDUP and VIR_STRNDUP (Michal Privoznik),<br/>
|
||||
Make detect_scsi_host_caps a function on all architectures (Guido Günther),<br/>
|
||||
More paranoid initialization of 'nparams' variable in dispatch code (Daniel P. Berrange),<br/>
|
||||
Fix format string handling in network driver (Daniel P. Berrange),<br/>
|
||||
esx: Reduce code duplication in generator (Matthias Bolte),<br/>
|
||||
build: avoid useless virAsprintf (Eric Blake),<br/>
|
||||
build: always include sanitytest in tarball (Eric Blake),<br/>
|
||||
util: fix compile errors caused by moving string functions (Laine Stump),<br/>
|
||||
virutil: Move string related functions to virstring.c (Michal Privoznik),<br/>
|
||||
qemu: Generate agent socket path if missing (Michal Privoznik),<br/>
|
||||
build: fix FreeBSD build (Eric Blake)<br/>
|
||||
</li>
|
||||
|
||||
<li>Cleanups:<br/>
|
||||
Storage: Fix the indention of rbd test file (Osier Yang),<br/>
|
||||
qemu: Fix damaged whitespace (Peter Krempa),<br/>
|
||||
Properly indent function's opening bracket (Martin Kletzander),<br/>
|
||||
build: fix typo in earlier commit (Eric Blake),<br/>
|
||||
build: drop unused variable (Eric Blake),<br/>
|
||||
syntax-check: mandate space after mid-line semicolon (Eric Blake),<br/>
|
||||
syntax: prefer space after semicolon in for loop (Eric Blake),<br/>
|
||||
security_dac: Fix the coding style (Osier Yang),<br/>
|
||||
nwfilter: Change the comment style (Osier Yang),<br/>
|
||||
src/*.[ch]: Remove the whitespace before ";" (Osier Yang),<br/>
|
||||
src/locking: Remove the whitespace before ";" (Osier Yang),<br/>
|
||||
python: Remove the whitespace before ";" (Osier Yang),<br/>
|
||||
examples: Remove the whitespace before ';' (Osier Yang),<br/>
|
||||
src/lxc: Remove the whitespace before ";" (Osier Yang),<br/>
|
||||
src/remote: Remove the whitespace before ";" (Osier Yang),<br/>
|
||||
src/rpc: Remove the whitespace before ";" (Osier Yang),<br/>
|
||||
src/utils: Remove the whitespace before ";" (Osier Yang),<br/>
|
||||
tests/: Remove the whitespace before ";" (Osier Yang),<br/>
|
||||
daemon: Remove the whitespace before ";" (Osier Yang),<br/>
|
||||
tools: Remove the whitespace before ";" (Osier Yang),<br/>
|
||||
src/storage: Remove the whitespace before ';' (Osier Yang),<br/>
|
||||
src/security: Remove the whitespace before ';' (Osier Yang),<br/>
|
||||
src/xen: Remove the whitespace before ';' (Osier Yang),<br/>
|
||||
src/vmware: Remove the whitespace before ';' (Osier Yang),<br/>
|
||||
src/qemu: Remove the whitespace before ';' (Osier Yang),<br/>
|
||||
src/interface: Remove the whitespace before ';' (Osier Yang),<br/>
|
||||
src/parallels: Remove the whitespace before ';' (Osier Yang),<br/>
|
||||
src/uml: Remove the whitespace before ';' (Osier Yang),<br/>
|
||||
src/openvz: Remove the whitespace before ';' (Osier Yang),<br/>
|
||||
src/node_device: Remove the whitespace before ';' (Osier Yang),<br/>
|
||||
src/phyp: Remove the whitespace before ';' (Osier Yang),<br/>
|
||||
src/nwfilter: Remove the whitespace before ';' (Osier Yang),<br/>
|
||||
src/xenxs: Remove the whitespace before ';' (Osier Yang),<br/>
|
||||
src/vbox: Remove the whitespace before ';' (Osier Yang),<br/>
|
||||
src/test: Remove the whitespace before ';' (Osier Yang),<br/>
|
||||
src/conf: Remove the whitespace before ';' (Osier Yang),<br/>
|
||||
src/libxl: Remove the whitespace before ';' (Osier Yang),<br/>
|
||||
src/network: Remove the whitespace before ';' (Osier Yang),<br/>
|
||||
LXC: move the comments to the proper place (Gao feng),<br/>
|
||||
conf: Improve the coding style (Osier Yang),<br/>
|
||||
tests: Sort the EXTRA_DIST list (Osier Yang),<br/>
|
||||
libvirt.c: Fix the indention (Osier Yang),<br/>
|
||||
conf: Remove the unrelated comment (Osier Yang),<br/>
|
||||
build: clean up stray files found by 'make distcheck' (Eric Blake),<br/>
|
||||
Remove redundant () in expression (Daniel P. Berrange)<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>1.0.5: May 2 2013</h3>
|
||||
<ul>
|
||||
<li>Features:<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 = \
|
||||
|
@ -490,23 +490,11 @@
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="memoryBacking">
|
||||
<interleave>
|
||||
<optional>
|
||||
<element name="hugepages">
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="nosharepages">
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="locked">
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
<optional>
|
||||
<element name="hugepages">
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
|
||||
@ -900,7 +888,7 @@
|
||||
<define name="diskspec">
|
||||
<interleave>
|
||||
<optional>
|
||||
<ref name="diskDriver"/>
|
||||
<ref name="driver"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name='diskMirror'/>
|
||||
@ -1282,7 +1270,7 @@
|
||||
<!--
|
||||
Disk may use a special driver for access.
|
||||
-->
|
||||
<define name="diskDriver">
|
||||
<define name="driver">
|
||||
<element name="driver">
|
||||
<choice>
|
||||
<group>
|
||||
@ -1316,9 +1304,6 @@
|
||||
<optional>
|
||||
<ref name="copy_on_read"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="discard"/>
|
||||
</optional>
|
||||
<empty/>
|
||||
</element>
|
||||
</define>
|
||||
@ -1329,13 +1314,13 @@
|
||||
<optional>
|
||||
<attribute name='type'>
|
||||
<choice>
|
||||
<ref name='storageFormat'/>
|
||||
<ref name='diskFormat'/>
|
||||
<value>aio</value> <!-- back-compat for 'raw' -->
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</define>
|
||||
<define name='storageFormat'>
|
||||
<define name='diskFormat'>
|
||||
<choice>
|
||||
<value>raw</value>
|
||||
<value>dir</value>
|
||||
@ -1414,14 +1399,6 @@
|
||||
<value>off</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</define>
|
||||
<define name="discard">
|
||||
<attribute name='discard'>
|
||||
<choice>
|
||||
<value>unmap</value>
|
||||
<value>ignore</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</define>
|
||||
<define name="controller">
|
||||
<element name="controller">
|
||||
@ -1541,9 +1518,6 @@
|
||||
<attribute name="type">
|
||||
<value>file</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<ref name="fsDriver"/>
|
||||
</optional>
|
||||
<interleave>
|
||||
<element name="source">
|
||||
<attribute name="file">
|
||||
@ -1557,9 +1531,6 @@
|
||||
<attribute name="type">
|
||||
<value>block</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<ref name="fsDriver"/>
|
||||
</optional>
|
||||
<interleave>
|
||||
<element name="source">
|
||||
<attribute name="dev">
|
||||
@ -1576,9 +1547,6 @@
|
||||
<value>mount</value>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="fsDriver"/>
|
||||
</optional>
|
||||
<interleave>
|
||||
<element name="source">
|
||||
<attribute name="dir">
|
||||
@ -1586,6 +1554,22 @@
|
||||
</attribute>
|
||||
<empty/>
|
||||
</element>
|
||||
<optional>
|
||||
<element name="driver">
|
||||
<attribute name="type">
|
||||
<choice>
|
||||
<value>path</value>
|
||||
<value>handle</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="wrpolicy">
|
||||
<value>immediate</value>
|
||||
</attribute>
|
||||
</optional>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
</group>
|
||||
<group>
|
||||
@ -1594,9 +1578,6 @@
|
||||
<value>bind</value>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="fsDriver"/>
|
||||
</optional>
|
||||
<interleave>
|
||||
<element name="source">
|
||||
<attribute name="dir">
|
||||
@ -1610,9 +1591,6 @@
|
||||
<attribute name="type">
|
||||
<value>template</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<ref name="fsDriver"/>
|
||||
</optional>
|
||||
<interleave>
|
||||
<element name="source">
|
||||
<attribute name="name">
|
||||
@ -1626,9 +1604,6 @@
|
||||
<attribute name="type">
|
||||
<value>ram</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<ref name="fsDriver"/>
|
||||
</optional>
|
||||
<interleave>
|
||||
<element name="source">
|
||||
<attribute name="usage">
|
||||
@ -1686,36 +1661,6 @@
|
||||
</interleave>
|
||||
</element>
|
||||
</define>
|
||||
<define name="fsDriver">
|
||||
<element name="driver">
|
||||
<!-- Annoying inconsistency. 'disk' uses 'name'
|
||||
for this kind of info, and 'type' for the
|
||||
storage format. We need the latter too, so
|
||||
had to invent a new attribute name -->
|
||||
<optional>
|
||||
<attribute name="type">
|
||||
<choice>
|
||||
<value>path</value>
|
||||
<value>handle</value>
|
||||
<value>loop</value>
|
||||
<value>nbd</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="format">
|
||||
<ref name="storageFormat"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="wrpolicy">
|
||||
<value>immediate</value>
|
||||
</attribute>
|
||||
</optional>
|
||||
<empty/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<!--
|
||||
An interface description can either be of type bridge in which case
|
||||
it will use a bridging source, or of type ethernet which uses a device
|
||||
@ -2012,11 +1957,6 @@
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name='queues'>
|
||||
<ref name="positiveInteger"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="txmode">
|
||||
<choice>
|
||||
@ -2130,25 +2070,11 @@
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="websocket">
|
||||
<ref name="PortNumber"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="listen">
|
||||
<ref name="addrIPorName"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name='sharePolicy'>
|
||||
<choice>
|
||||
<value>allow-exclusive</value>
|
||||
<value>force-shared</value>
|
||||
<value>ignore</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</group>
|
||||
<group>
|
||||
<optional>
|
||||
@ -3128,38 +3054,26 @@
|
||||
|
||||
<define name="hostdev">
|
||||
<element name="hostdev">
|
||||
<interleave>
|
||||
<choice>
|
||||
<group>
|
||||
<ref name="hostdevsubsys"/>
|
||||
</group>
|
||||
<group>
|
||||
<ref name="hostdevcaps"/>
|
||||
</group>
|
||||
</choice>
|
||||
<optional>
|
||||
<ref name="alias"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="deviceBoot"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="rom"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="readonly">
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="shareable">
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
<choice>
|
||||
<group>
|
||||
<ref name="hostdevsubsys"/>
|
||||
</group>
|
||||
<group>
|
||||
<ref name="hostdevcaps"/>
|
||||
</group>
|
||||
</choice>
|
||||
<optional>
|
||||
<ref name="alias"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="deviceBoot"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="rom"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
@ -3180,7 +3094,6 @@
|
||||
<choice>
|
||||
<ref name="hostdevsubsyspci"/>
|
||||
<ref name="hostdevsubsysusb"/>
|
||||
<ref name="hostdevsubsysscsi"/>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
@ -3249,28 +3162,6 @@
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="hostdevsubsysscsi">
|
||||
<attribute name="type">
|
||||
<value>scsi</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="sgio">
|
||||
<choice>
|
||||
<value>filtered</value>
|
||||
<value>unfiltered</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<element name="source">
|
||||
<interleave>
|
||||
<ref name="sourceinfoadapter"/>
|
||||
<element name="address">
|
||||
<ref name="scsiaddress"/>
|
||||
</element>
|
||||
</interleave>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="hostdevcapsstorage">
|
||||
<attribute name="type">
|
||||
<value>storage</value>
|
||||
@ -3326,17 +3217,6 @@
|
||||
</attribute>
|
||||
</element>
|
||||
</define>
|
||||
<define name="scsiaddress">
|
||||
<attribute name="bus">
|
||||
<ref name="driveBus"/>
|
||||
</attribute>
|
||||
<attribute name="target">
|
||||
<ref name="driveTarget"/>
|
||||
</attribute>
|
||||
<attribute name="unit">
|
||||
<ref name="driveUnit"/>
|
||||
</attribute>
|
||||
</define>
|
||||
<define name="usbportaddress">
|
||||
<attribute name="bus">
|
||||
<ref name="usbAddr"/>
|
||||
@ -3925,7 +3805,7 @@
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name='format'>
|
||||
<ref name='storageFormat'/>
|
||||
<ref name='diskFormat'/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
|
@ -128,7 +128,7 @@
|
||||
<element name='driver'>
|
||||
<optional>
|
||||
<attribute name='type'>
|
||||
<ref name='storageFormat'/>
|
||||
<ref name='diskFormat'/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<empty/>
|
||||
|
@ -316,28 +316,6 @@
|
||||
</optional>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
<!-- <route> element -->
|
||||
<zeroOrMore>
|
||||
<!-- The (static) route element specifies a network address and gateway
|
||||
address to access that network. Both the network address and
|
||||
the gateway address must be specified. -->
|
||||
<element name="route">
|
||||
<optional>
|
||||
<attribute name="family"><ref name="addr-family"/></attribute>
|
||||
</optional>
|
||||
<attribute name="address"><ref name="ipAddr"/></attribute>
|
||||
<optional>
|
||||
<choice>
|
||||
<attribute name="netmask"><ref name="ipv4Addr"/></attribute>
|
||||
<attribute name="prefix"><ref name="ipPrefix"/></attribute>
|
||||
</choice>
|
||||
</optional>
|
||||
<attribute name="gateway"><ref name="ipAddr"/></attribute>
|
||||
<optional>
|
||||
<attribute name="metric"><ref name="unsignedInt"/></attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</interleave>
|
||||
</element>
|
||||
</define>
|
||||
|
@ -200,9 +200,11 @@
|
||||
|
||||
<define name='target'>
|
||||
<element name='target'>
|
||||
<element name='path'>
|
||||
<ref name='absFilePath'/>
|
||||
</element>
|
||||
<optional>
|
||||
<element name='path'>
|
||||
<ref name='absFilePath'/>
|
||||
</element>
|
||||
</optional>
|
||||
<ref name='permissions'/>
|
||||
</element>
|
||||
</define>
|
||||
|
@ -20,9 +20,7 @@
|
||||
<text/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name='source'/>
|
||||
</optional>
|
||||
<ref name='source'/>
|
||||
<ref name='sizing'/>
|
||||
<ref name='target'/>
|
||||
<optional>
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet
|
||||
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"
|
||||
|
@ -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>Sitemap</h1>
|
||||
|
||||
@ -88,10 +86,6 @@
|
||||
<a href="locking.html">Disk locking</a>
|
||||
<span>Ensuring exclusive guest access to disks</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cgroups.html">CGroups</a>
|
||||
<span>Control groups integration</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="hooks.html">Hooks</a>
|
||||
<span>Hooks for system specific management</span>
|
||||
|
@ -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 >Storage Management</h1>
|
||||
<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>libvirt-test-API: Python based test suite </h1>
|
||||
<p>Libvirt-test-API is a powerful test tool designed to complement
|
||||
@ -25,7 +24,7 @@
|
||||
<ul>
|
||||
<li> A <a href="http://libvirt.org/sources/libvirt-test-API/Libvirt-test-API.pdf">documentation PDF</a>
|
||||
file describing the test suite and how to write test cases
|
||||
and test scenarios.</li>
|
||||
and test scenarios.
|
||||
</ul>
|
||||
<p> Libvirt-test-API is maintained using
|
||||
<a href="http://libvirt.org/git/?p=libvirt-test-API.git">a GIT
|
||||
|
@ -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>Test suites</h1>
|
||||
<p>There is a few test suites available to developers for testing
|
||||
@ -25,7 +24,6 @@
|
||||
in Fedora distributions, but best is probably to get
|
||||
the <a href="http://libvirt.org/git/?p=libvirt-tck.git">version
|
||||
from GIT</a>.
|
||||
</li>
|
||||
<li>the <a href="testapi.html">libvirt-test-API</a> is also a functional
|
||||
test suite, but implemented using the
|
||||
<a href="python.html">Python bindings</a>
|
||||
@ -34,7 +32,6 @@
|
||||
or directly get
|
||||
the <a href="http://libvirt.org/git/?p=libvirt-test-API.git">version
|
||||
from GIT</a>.
|
||||
</li>
|
||||
</ul>
|
||||
</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>libvirt TCK : Technology Compatibility Kit</h1>
|
||||
<p>The libvirt TCK provides a framework for performing testing
|
||||
@ -27,7 +26,7 @@
|
||||
<ul>
|
||||
<li> The initial
|
||||
<a href="http://www.redhat.com/archives/libvir-list/2009-April/msg00176.html">mail
|
||||
from Daniel Berrange</a> presenting the project.</li>
|
||||
from Daniel Berrange</a> presenting the project.
|
||||
<li> The <a href="http://fedoraproject.org/wiki/Features/VirtTCK">page
|
||||
describing VirtTCK</a> the inclusion of libvirt-TCK as a
|
||||
Fedora Feature.</li>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user