From: Daniel Veillard <veillard@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] Re: [Libvir] virDomainDump() API (equivalent to xm dump) in libvirt?
Date: Wed, 22 Nov 2006 12:01:40 -0500 [thread overview]
Message-ID: <20061122170140.GN26540@redhat.com> (raw)
In-Reply-To: <20061116153629.GB17318@redhat.com>
On Thu, Nov 16, 2006 at 10:36:29AM -0500, Daniel Veillard wrote:
> On Fri, Nov 03, 2006 at 11:56:55AM -0500, Daniel Veillard wrote:
> > On Fri, Nov 03, 2006 at 11:36:32AM -0500, Lon Hohberger wrote:
> > > On Fri, 2006-11-03 at 10:53 -0500, Daniel Veillard wrote:
> > > > - can we implement it with current xen, again yes, we should be able
> > > > if we have a full connection (root) to do the same as 'xm dump-core'
> > >
> > > Yes, given that xm dump-core can do it ;)
> > >
> > > > - is the API clean enough, I guess the semantic is relatively clear
> > > > instead of stating 'If you set the lowest-bit in flags' I would rather
> > > > define a DumpFlags enum and state that flags is an or'ing of any of them
> > > > I would probably name the function virDomainDumpCore though to not
> > > > confuse with virDomainSave
> > >
> > > Totally correct here, it should be an enum of flags (with only one
> > > defined initially; I don't know what other flags there might be.
> > >
> > > > So yes, why not, you want to work on it ? Or should I (or any candidate).
> > >
> > > Give me a few; I'll check on this. I don't have problems trying it, but
> > > I will have a learning curve of course.
> >
> > Let's see if I was to do it I would:
> > 0/ check out a CVS tree http://libvirt.org/downloads.html
> > 1/ look how xm communicate with xend on that command
>
> Bad news, I looked at this and it seems xm can only use the XML-RPC interface
> to xend to request the dump command, while libvirt uses the HTTP POST interface.
> Adding the support would either require to hack xend or add support for the
> intermediary xml-rpc access which was added in 3.0.2 and likely to disapear soon
> when the new Xen API is used by xm.
Good news: the fix at the xend level is fairly small and has been accepted
upstream:
http://lists.xensource.com/archives/html/xen-devel/2006-11/msg01120.html
http://lists.xensource.com/archives/html/xen-devel/2006-11/msg01121.html
So adding dump support was a matter of introducing the new API and calling
the usual xend back-end code. I added it and commited it, it's a new entry
point in the driver interface, I still kept the extra flags argument, even if
upon inspection xend doesn't use any of the 'live' or 'crash' argument it
exposes at this API, I just didn't defined any constant for it at this point.
So the new entry is just:
int virDomainCoreDump (virDomainPtr domain, const char *to, int flags);
I commited it to CVS, I also added the 'dump' command to virsh taking the
filename as the only argument (after the domain name or id).
Daniel
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard at redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
prev parent reply other threads:[~2006-11-22 17:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-03 15:38 [Cluster-devel] virDomainDump() API (equivalent to xm dump) in libvirt? Lon Hohberger
2006-11-03 15:53 ` [Cluster-devel] Re: [Libvir] " Daniel Veillard
2006-11-03 16:36 ` Lon Hohberger
2006-11-03 16:40 ` Lon Hohberger
2006-11-03 16:56 ` Daniel Veillard
2006-11-16 15:36 ` Daniel Veillard
2006-11-22 17:01 ` Daniel Veillard [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061122170140.GN26540@redhat.com \
--to=veillard@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.