[Libvir] Request for additional entry points
by Jim Fehlig
As discussed on the xen-cim call on 3/31, the Xen CIM provider needs
some additional entry points in libvirt. I would like to open a
discussion about adding the following entry points to libvirt.
virDomainSetConfig(virConnectPtr conn, const char *xmlDesc)
Stores the domU config data in xenstore. The domU is not running yet
but enumerating domains would return the config for the domain as well
as any running domains. This would support the notion of a defined but
inactive virtual machine. Daniel noted that the config could be cached
in libvirt, preventing (to some degree) modifying the config out-of-band
prior to activating the domain. Note that the current
virConnectListDomains() implies enumerating only running domains since a
list of domain IDs is returned. Perhaps virConnectListDomains() will
have to be expanded to include defined domains or another entry point to
enumerate defined domains.
Related would be activating a defined domain. Would clients get the
domain config (via virDomainGetXMLDesc()) and subsequently pass it to
virDomainCreateLinux() or another entry point to create a defined domain?
virDomainDeleteConfig(virConnectPtr conn, const char *name)
Removed domU config from xenstore (or cache). DomU no longer "exists".
What if domain is active upon invocation?
virDomainSetCurrentMemory(virDomainPtr domain, unsigned long memory)
Adjust the current memory usage for a domain.
virDomainReboot(virDomainPtr domain)
Reboot the domain.
virDomainMigrate(virDomainPtr domain, const char *host)
?? Not sure what can of worms might be opened by this one :-).
Thoughts?
BTW, I can certainly help with the effort if an agreement is reached on
adding this functionality.
Regards,
Jim
18 years, 8 months
[Libvir] man page for virsh
by andrew puch
Enclosed is the man and the html page that were generated from POD Plain
Old Doc from perl.
pod2man virsh.pod.1 > virsh.1
pod2html virsh.pod.1 > virsh.html
Behold the power of perl :)
18 years, 8 months
[Libvir] autogen.sh error
by Ronald Aigner
Hi all,
I downloaded libvirt from CVS and tried to run autogen.sh which stops
with the following error message:
configure: error: Xen store library not found
What else do I need?
How do I implement support for another hypervisor? Where do I have to
turn which screws?
Thanks, Ron.
18 years, 8 months
[Libvir] Release of libvirt-0.1.0
by Daniel Veillard
I mostly finished the big internal code revamp over the week-end,
this with the addition of the latest contributions makes it a good time
for a new release, I also bumped up the medium release numbers, with
the cleanup in the code internals I feel better now having people
relying on libvirt, and while we are still far away from an 1.0.0
release, it's important to indicate the change :-)
Available at the usual place i.e.
ftp://libvirt.org/libvirt/
* building fixes:
- --with-xen-distdir option (Ronald Aigner)
- out of tree build and pkginfo cflag fix (Daniel Berrange)
* enhancement and fixes of the XML description format (David Lutterkort
and Jim Fehlig)
* new APIs:
- for Node information
- Reboot
* internal code cleanup:
- refactoring internals into a driver model
- more error handling
- structure sharing
- thread safety and ref counting
* bug fixes:
- error message (Jim Meyering)
- error allocation in virsh (Jim Meyering)
- virDomainLookupByID (Jim Fehlig)
* documentation:
- updates on architecture, and formatr
- typo fix (Jim Meyering)
* bindings:
- exception handling in examples (Jim Meyering)
- perl ones out of tree (Daniel Berrange)
* virsh:
- more options, create, nodeinfo (Karel Zak)
- renaming of some options (Karel Zak)
- use stderr only for errors (Karel Zak)
- man page (Andrew Puch)
Thanks to everybody who contributed to this release !
Daniel
--
Daniel Veillard | Red Hat http://redhat.com/
veillard(a)redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
18 years, 8 months
[Libvir] Re: virsh outputs to stderr(?!) why not stdout
by Karel Zak
On Thu, Apr 06, 2006 at 08:40:17AM -0400, Daniel Veillard wrote:
> On Thu, Apr 06, 2006 at 02:37:37PM +0200, Karel Zak wrote:
> > On Thu, Apr 06, 2006 at 11:46:57AM +0200, Jim Meyering wrote:
> > > So, now I can use something like this to get a list of domain names:
> > >
> > > virsh list | tail -n +4 | awk '{print $2}'
> > >
> > > Is there some easier way?
> >
> > I think we can add some options to the list command:
> >
> > --noheader
> > --nodom0
> > --cols=name,id,state,maxmem,usemem,....
> >
> > without these options it will use default (current) format. I've
> > already thought about this solution for the others commands (e.g.
> > dominfo). I think this is a way how make it useful in scripts.
>
> Hum, why not discussing this on the libvir list ? Others may have
> soem ideas too and this may promote virsh usage a bit ;-)
Fixed :-)
--
Karel Zak <kzak(a)redhat.com>
18 years, 8 months
Re: [Libvir] BUG: virDomainLookupByID fails after XenStore path discovery
by Jim Fehlig
>>> "Bryan D. Payne" <bryan(a)thepaynes.cc> 04/04/06 6:23 PM >>>
>> I'm just not seeing it included in path returned by
>> xs_get_domain_path(), only see /local/domain/<num>
> For what it's worth, I was trying to put a patch together for this,
>but I kept getting memory corruption errors. I was trying to access
>the name through the xenstore as shown below...
>
> /* lookup is easier with the Xen store so try it first */
> if (conn->xshandle != NULL) {
> char *namepath = NULL;
> path = xs_get_domain_path(conn->xshandle, (unsigned int) id);
> namepath = strdup(path);
> strcat(namepath, "/name");
> name = xs_read(conn->xshandle, NULL, namepath, NULL);
> if (namepath) free(namepath);
> }
My brain is not working today :-). Don't know why I didn't consider
xs_read(). I'll fix up your patch and test/submit it tomorrow. I think
the only problem is concatenating "/name" on the end of namepath, which
has only been allocated enough memory to hold path via strdup().
Thanks,
Jim
18 years, 8 months
[Libvir] BUG: virDomainLookupByID fails after XenStore path discovery
by Bryan D. Payne
I just updated to the latest CVS version of libvir. It looks like
there's a bug in virDomainLookupByID. The behavior that I'm seeing
is that the path variable is set and so the code never enters the
block to find the value for name. Therefore, at the end of the
function, the condition (ret->name == NULL) is true and it jumps into
the error code and returns NULL.
If I comment out the code that sets the path variable, things seem to
work normally. Although, I presume that the idea was to extract the
name from the path information...
-bryan
-
Bryan D. Payne
Graduate Student, Computer Science
Georgia Tech Information Security Center
http://www.bryanpayne.org
18 years, 8 months
[Libvir] Change of server
by Daniel Veillard
So far libvirt.org was hosted on my home server (IP 82.67.66.12),
but I really needed to fix this as my home ADSL connectivity isn't
that great. I moved all services to a new server (colocated on the
same box as xmlsoft.org in a public research institute here in France),
hopefully the transition to this new server (IP 194.199.20.115) will
be transparent as DNS changes propagates, but some of you mays still
access the old services for a little while.
Tell me if you experience troubles with the new server, and if
you don't see updates from libvirt.org CVS that may be related still
using the old server. Hopefully bandwidth and relibaility should
be quite higher now,
thanks,
Daniel
--
Daniel Veillard | Red Hat http://redhat.com/
veillard(a)redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
18 years, 8 months