Re: [libvirt] [PATCH] fix creating of openvz bridge device
by Evgeniy V. Sokolov
>
> This behaviour contradicts with description found in docs (in which
> <source> tag specify interface in host, not in container). I think,
> the previous bridge must be specified as
> <interface type='bridge'>
> <mac address='00:16:3e:34:21:9e'/>
> - <source bridge='eth10'/>
> + <target dev='eth10'/>
> </interface>
>
> You are right. It is bug.
>
> Well, here is the patch, that fixes that behaviour.
Your patch is half of fix. It require to fix openvzReadNetworkConf() in
openvz_conf.c.
>
> P.S. Are someone going to implement
> <interface type='bridge'>
> ...
> <source bridge="...">
> ...
> </interface>
> part of openvz driver? :)
I plan to implement it in a month.
It will be fine if you are ready to develop the feature.
16 years, 1 month
[libvirt] Release of libvirt-0.4.6
by Daniel Veillard
As promised after we discovered a couple of serious bugs in 0.4.5,
a new release was in order, so I pushed 0.4.6 yesterday evening,
it's available as usual at
ftp://libvirt.org/libvirt/
There is no major change in this release, just the bug fixes a few
improvements and some cleanup:
* Documentation:
- fix some comments in API (Anton Protopopov)
- cleanup and extension of bindings and windows pages (Richard Jones)
* Portability:
- missing include file (Richard Jones)
* Bug fixes:
- avoid a segfault if missing qemu emulator (Cole Robinson)
- reading vncdisplay from xend domain (Cole Robinson)
- segfault in OpenVZ (Evgeniy Sokolov)
- fix parsing of pool without a source (Chris Lalancette and Daniel
Berrange)
* Improvements:
- add storage disk volume delete (Cole Robinson)
- KVM dynamic max CPU detection (Guido Günther)
- spec file improvement for minimal builds (Ben Guthro)
- improved error message in XM configuration module (Richard Jones)
- network config in OpenVZ support (Evgeniy Sokolov)
- enable stopping a pool in logical storage backend and cleanup
deletion of pool (Chris Lalancette)
* Cleanups:
- deadcode removal (Nguyen Anh Quynh)
- fix one test case (Daniel Berrange)
- various strings and space cleanups (Daniel Berrange)
- structure initialization cleanup (Chris Lalancette)
Thanks everybody for the patches and feedback !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
16 years, 1 month
[libvirt] [PATCH] fix creating of openvz bridge device
by Anton Protopopov
>
>
> This behaviour contradicts with description found in docs (in which
>> <source> tag specify interface in host, not in container). I think,
>> the previous bridge must be specified as
>> <interface type='bridge'>
>> <mac address='00:16:3e:34:21:9e'/>
>> - <source bridge='eth10'/>
>> + <target dev='eth10'/>
>> </interface>
>>
> You are right. It is bug.
Well, here is the patch, that fixes that behaviour.
P.S. Are someone going to implement
<interface type='bridge'>
...
<source bridge="...">
...
</interface>
part of openvz driver? :)
16 years, 2 months
[libvirt] [PATCH] Some virsh(1) man page fixes
by Mark McLoughlin
Hi,
Just looking at virsh(1), I noticed a reference to xm that should have
referred to virsh.
Found some other things as I fixed:
- Explanation of run states was after the bit about the freecell
command
- State codes like 'r' for running aren't displayed with virsh
- Reference to "xm pause" instead of "virsh suspend"
- "virsh create" explanation confusing and references "xm create";
fixed it up to what I think was the original intention
- Some of the command sections were over-indented
- References to xmdomain.cfg
- Make "see also" reference virt-install, virt-top, virt-mem and
virt-df manpages rather than xmdomain.cfg and xentop
Cheers,
Mark.
Index: docs/virsh.pod
===================================================================
RCS file: /data/cvs/libvirt/docs/virsh.pod,v
retrieving revision 1.17
diff -u -p -r1.17 docs/virsh.pod
--- docs/virsh.pod 1 Aug 2008 14:30:41 -0000 1.17
+++ docs/virsh.pod 25 Sep 2008 10:12:48 -0000
@@ -148,65 +148,62 @@ B<virsh> list
Name is the name of the domain. ID the domain numeric id.
- State is the run state (see below).
-
-=item B<freecell> optional I<cellno>
-
-Prints the available amount of memory on the machine or within a
-NUMA cell if I<cellno> is provided.
+State is the run state (see below).
=over 4
B<STATES>
+The State field lists 6 states for a domain, and which ones the
+current domain is in.
-The State field lists 6 states for a Xen Domain, and which ones the
-current Domain is in.
-
-=item B<r - running>
+=item B<running>
The domain is currently running on a CPU
-=item B<b - blocked>
+=item B<blocked>
The domain is blocked, and not running or runnable. This can be caused
because the domain is waiting on IO (a traditional wait state) or has
gone to sleep because there was nothing else for it to do.
-=item B<p - paused>
+=item B<paused>
The domain has been paused, usually occurring through the administrator
-running B<xm pause>. When in a paused state the domain will still
+running B<virsh suspend>. When in a paused state the domain will still
consume allocated resources like memory, but will not be eligible for
-scheduling by the Xen hypervisor.
+scheduling by the hypervisor.
-=item B<s - shutdown>
+=item B<shutdown>
The domain is in the process of shutting down, i.e. the guest operating system
has been notified and should be in the process of stopping its operations
gracefully.
-=item B<c - crashed>
+=item B<crashed>
The domain has crashed, which is always a violent ending. Usually
this state can only occur if the domain has been configured not to
-restart on crash. See L<xmdomain.cfg> for more info.
+restart on crash.
-=item B<d - dying>
+=item B<dying>
The domain is in process of dying, but hasn't completely shutdown or
crashed.
=back
+=item B<freecell> optional I<cellno>
+
+Prints the available amount of memory on the machine or within a
+NUMA cell if I<cellno> is provided.
+
=head1 DOMAIN COMMANDS
The following commands manipulate domains directly, as stated
previously most commands take domain-id as the first parameter. The
I<domain-id> can be specified as an short integer, a name or a full UUID.
-=over 4
-
=item B<autostart> optional I<--disable> I<domain-id>
Configure a domain to be automatically started at boot.
@@ -219,7 +216,7 @@ Connect the virtual serial console for t
=item B<create> I<FILE>
-Create a domain from an XML <file> an easy way to create one if you have a pre-existing xen guest created via B<xm> create <XMLFILE>.
+Create a domain from an XML <file>. An easy way to create the XML <file> is to use the B<dumpxml> command to obtain the definition of a pre-existing guest.
B<Example>
@@ -303,9 +300,8 @@ command run from the console. The comma
executed the reboot action, which may be significantly before the
domain actually reboots.
-For xen vm the behavior of what happens to a domain when it reboots is set by the
-I<on_reboot> parameter of the xmdomain.cfg file when the domain was
-created.
+The exact behavior of a domain when it reboots is set by the
+I<on_reboot> parameter in the domain's XML definition.
=item B<restore> I<state-file>
@@ -360,9 +356,8 @@ to perform graceful shutdown, so there i
succeed, and may take a variable length of time depending on what
services must be shutdown in the domain.
-For a xen guest vm the behavior of what happens to a domain when it reboots is set by the
-I<on_shutdown> parameter of the xmdomain.cfg file when the domain was
-created.
+The exact behavior of a domain when it shuts down is set by the
+I<on_shutdown> parameter in the domain's XML definition.
=item B<start> I<domain-name>
@@ -404,8 +399,6 @@ and I<cpulist> is a comma separated list
Output the IP address and port number for the VNC display. If the information
is not available the processes will provide an exit code of 1.
-=back
-
=head1 DEVICES COMMANDS
The following commands manipulate devices associated to domains.
@@ -414,8 +407,6 @@ To better understand the values allowed
reading the documentation at L<http://libvirt.org/format.html> on the
format of the device sections to get the most accurate set of accepted values.
-=over 4
-
=item B<attach-device> I<domain-id> I<FILE>
Attach a device to the domain, using a device definition in an XML file.
@@ -456,8 +447,6 @@ I<type> can be either I<network> to indi
It is recommended to use the I<mac> option to distinguish between the interfaces
if more than one are present on the domain.
-=back
-
=head1 VIRTUAL NETWORKS COMMANDS
The following commands manipulate networks. Libvirt has the capability to
@@ -467,8 +456,6 @@ see the documentation at L<http://libvir
of the command for virtual networks are similar to the one used for domains,
but the way to name a virtual network is either by its name or UUID.
-=over 4
-
=item B<net-autostart> I<network> optional I<--disable>
Configure a virtual network to be automatically started at boot.
@@ -528,29 +515,23 @@ Undefine the configuration for an inacti
Convert a network name to network UUID.
-=back
-
=head1 ENVIRONMENT
-=over 4
-
=item VIRSH_DEFAULT_CONNECT_URI
The hypervisor to connect to by default. Set this to a URI, in the same
format as accepted by the B<connect> option.
-=back
-
=head1 SEE ALSO
-L<xm(1)>, L<xmdomain.cfg(5)>, L<xentop(1)> , L<http://www.libvirt.org/>
+L<virt-install(1)>, L<xm(1)>, L<virt-top(1)>, L<virt-mem(1)>, L<virt-df(1)>, L<http://www.libvirt.org/>
=head1 AUTHOR
Andrew Puch <apuch @ redhat.com>
Daniel Veillard <veillard @ redhat.com>
- Based on the xm man paged by
+ Based on the xm man page by:
Sean Dague <sean at dague dot net>
Daniel Stekloff <dsteklof at us dot ibm dot com>
16 years, 2 months
[libvirt] [PATCH] Sanitize qemu monitor reads
by Cole Robinson
Reading from the qemu monitor pulls in a whole bunch of
useless control characters. For example, sending the
command 'somecomm' to the monitor returns:
somecomm
unknown command: 'somecomm'
(qemu)
Which is 36 characters, however we end up reading over 200.
The amount we read actually grows quadratically as a function
of the command length. This prevents us from reporting monitor
output to the user (incase some command fails) and seriously
diminishes the value of the domain logfiles.
The attached patch tries to sanitize this a bit. After reading
all the output, we search for the first occurrence of the full
command string. If found, we search from there for the first
newline (which marks the beginning of the monitor response).
If these are found, we only return the command, and everything
after the newline. If only the command is found, we just drop
everything before it.
I've tested this on f9 and f8, there didn't seem to be any
problems. I think this should be pretty future proof as
well, so we hopefully won't be throwing out anything
valuable.
Thanks,
Cole
16 years, 2 months
[libvirt] [PATCH] Log virRun command output, return with error
by Cole Robinson
The attached patch adds some extra logging to the
virRun command. The full argv is now logged with
DEBUG, as well as the commands stdout and stderr
(if anything is found).
Also, if the command returns an error, we raise
the stderr content with the reported error msg.
This will significantly help with debugging certain
issues, particularly with the storage driver which
makes heavy use of virRun.
Thanks,
Cole
16 years, 2 months
[libvirt] [PATCH] fix spec file when building without qemu
by Daniel Veillard
While trying to build libvirt 0.4.6 for Fedora, I got an error
when building on ppc64 which is the only architecture where qemu
support is disabled. Files which were conditional to qemu were
installed nonetheless in the build root:
Checking for unpackaged file(s): /usr/lib/rpm/check-files
/builddir/build/BUILDROOT/libvirt-0.4.6-1.fc10.ppc64
error: Installed (but unpackaged) file(s) found:
/etc/libvirt/qemu/networks/autostart/default.xml
/etc/libvirt/qemu/networks/default.xml
/usr/share/augeas/lenses/libvirtd_qemu.aug
/usr/share/augeas/lenses/tests/test_libvirtd_qemu.aug
The following patch doesn't look ideal but allows to fix the problem.
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
16 years, 2 months