[libvirt] Update to libvirt-lxc driver doc page

Here is a new drvlxc.html.in file to make the first example work. I'll play with the second example next. thanks, -serge

On 06/07/2010 08:55 AM, Serge Hallyn wrote:
Here is a new drvlxc.html.in file to make the first example work. I'll play with the second example next.
Thanks for the sample text; it looked good to me on a first read. Are you willing to finish out this patch by also including the patch to Makefile.am to generate drvlxc.html and distribute the new file? However, when I tried the example, I got: $ virsh --connect lxc:/// start vm1 error: Failed to start domain vm1 error: internal error Container 'LIBVIR_LXC_CMD' unexpectedly shutdown during startup when using the virsh in Fedora 13 (libvirt-0.7.7-4.fc13.x86_64). What setup did you test with, to help me in updating my system to have a similar setup? -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

Quoting Eric Blake (eblake@redhat.com):
On 06/07/2010 08:55 AM, Serge Hallyn wrote:
Here is a new drvlxc.html.in file to make the first example work. I'll play with the second example next.
Thanks for the sample text; it looked good to me on a first read. Are you willing to finish out this patch by also including the patch to Makefile.am to generate drvlxc.html and distribute the new file?
Uh, sure. As I got yelled at last time for not sending the .in file I was sure it was in there. But I see it, will send an update.
However, when I tried the example, I got:
$ virsh --connect lxc:/// start vm1 error: Failed to start domain vm1 error: internal error Container 'LIBVIR_LXC_CMD' unexpectedly shutdown during startup
when using the virsh in Fedora 13 (libvirt-0.7.7-4.fc13.x86_64). What setup did you test with, to help me in updating my system to have a similar setup?
I used ubuntu lucid. I'll try to reproduce in an uptodate fedora 13. However LIBVIR_LXC_CMD shouldn't be in the xml at all, rather the result of find /usr -name libvirt_lxc should take its place. (I haven't yet attacked the second example, so if you prefer to wait for a single complete update, I'll try to get to that soon-ish) thanks, -serge

On 06/15/2010 04:11 PM, Serge E. Hallyn wrote:
Thanks for the sample text; it looked good to me on a first read. Are you willing to finish out this patch by also including the patch to Makefile.am to generate drvlxc.html and distribute the new file?
Uh, sure. As I got yelled at last time for not sending the .in file I was sure it was in there. But I see it, will send an update.
Hmm, we're probably confusing each other. Sorry about that ;) Your previous email attached drvlxc.html.in, and I thought it was a new file; but looking at git, it is already an existing file. So the question now is generating the diff between your version and what is already in git.
I used ubuntu lucid. I'll try to reproduce in an uptodate fedora 13. However LIBVIR_LXC_CMD shouldn't be in the xml at all, rather the result of
find /usr -name libvirt_lxc
should take its place.
Doh! Yep, that would explain it. I'll try again ;)
(I haven't yet attacked the second example, so if you prefer to wait for a single complete update, I'll try to get to that soon-ish)
At this point, since you are improving an existing file, rather than writing a new one, it's a lot easier to maintain your changes in git and post just the changeset that describes the differences. The README-hacking file has some hints for first-time git users, and both the list and IRC can serve as additional resources if you have more questions. http://libvirt.org/git/?p=libvirt.git;a=blob;f=README-hacking -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On 06/15/2010 04:18 PM, Eric Blake wrote:
find /usr -name libvirt_lxc
should take its place.
Doh! Yep, that would explain it. I'll try again ;)
Yes, it worked just fine with /usr/libexec/libvirt_lxc - I was able to attach to a limited lxc console. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

Quoting Eric Blake (eblake@redhat.com):
http://libvirt.org/git/?p=libvirt.git;a=blob;f=README-hacking
Doh - I had no idea the web pages were just sitting in libvirt.git/docs! Now it all makes sense. Thanks. -serge

Quoting Eric Blake (eblake@redhat.com):
On 06/07/2010 08:55 AM, Serge Hallyn wrote:
Here is a new drvlxc.html.in file to make the first example work. I'll play with the second example next.
Thanks for the sample text; it looked good to me on a first read. Are you willing to finish out this patch by also including the patch to Makefile.am to generate drvlxc.html and distribute the new file?
Hi Eric, docs/Makefile has dot_html_in = $(wildcard *.html.in) and 'make distdir' does compile drvlxc.html So when I get the second part of drvlxc.html.in updated, I'll send a git diff for the whole thing. thanks, -serge

From: Serge Hallyn <serge.hallyn@canonical.com> * docs/drvlxc.html.in: Use correct VM name, and mention that libvirt_lxc might be in an alternate location. --- [Reviving an old thread] On 06/16/2010 12:02 PM, Serge E. Hallyn wrote:
Quoting Eric Blake (eblake@redhat.com):
On 06/07/2010 08:55 AM, Serge Hallyn wrote:
Here is a new drvlxc.html.in file to make the first example work. I'll play with the second example next.
Thanks for the sample text; it looked good to me on a first read.
So when I get the second part of drvlxc.html.in updated, I'll send a git diff for the whole thing.
I never saw a followup to this, but see no reason why it should not stop applying the fixes we do have. ACK to your original patch, and I'm pushing this: AUTHORS | 1 + docs/drvlxc.html.in | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index 8b037a1..0521b3d 100644 --- a/AUTHORS +++ b/AUTHORS diff --git a/docs/drvlxc.html.in b/docs/drvlxc.html.in index cfcfdab..35058c4 100644 --- a/docs/drvlxc.html.in +++ b/docs/drvlxc.html.in @@ -35,6 +35,11 @@ start it using </pre> <p> +In the <emulator> element, be sure you specify the correct path +to libvirt_lxc, if it does not live in /usr/libexec on your system. +</p> + +<p> The next example assumes there is a private root filesystem (perhaps hand-crafted using busybox, or installed from media, debootstrap, whatever) under /opt/vm-1-root: @@ -71,14 +76,17 @@ debootstrap, whatever) under /opt/vm-1-root: In both cases, you can define and start a container using:</p> <pre> virsh --connect lxc:/// define v1.xml -virsh --connect lxc:/// start v1.xml +virsh --connect lxc:/// start vm1 </pre> and then get a console using: <pre> -virsh --connect lxc:/// console v1 +virsh --connect lxc:/// console vm1 </pre> <p>Now doing 'ps -ef' will only show processes in the container, for -instance. +instance. You can undefine it using </p> +<pre> +virsh --connect lxc:/// undefine vm1 +</pre> </body> </html> -- 1.7.2.1
participants (3)
-
Eric Blake
-
Serge E. Hallyn
-
Serge Hallyn