Re: [libvirt] Exposing some unique features?

2008-08-27 Thread Atsushi SAKAI
Hi, Quynh Thank you for your comment. I am clearified your question. But I have no good idea to solve. Someone may have a good idea. Thanks Atsushi SAKAI "Nguyen Anh Quynh" <[EMAIL PROTECTED]> wrote: > On Thu, Aug 28, 2008 at 2:52 PM, Atsushi SAKAI <[EMAIL PROTECTED]> wrote: > > Hi, Quynh > >

Re: [libvirt] Exposing some unique features?

2008-08-27 Thread Nguyen Anh Quynh
On Thu, Aug 28, 2008 at 2:52 PM, Atsushi SAKAI <[EMAIL PROTECTED]> wrote: > Hi, Quynh > > Did you see the libvirt access control feature? > http://libvirt.org/auth.html > You mean current access control feature is not enough for your use. But that access control is about authenticating/authorizing

Re: [libvirt] Exposing some unique features?

2008-08-27 Thread Atsushi SAKAI
Hi, Quynh Did you see the libvirt access control feature? http://libvirt.org/auth.html You mean current access control feature is not enough for your use. Thanks Atsushi SAKAI "Nguyen Anh Quynh" <[EMAIL PROTECTED]> wrote: > Hi, > > Though libvirt tries very hard to hide the difference bet

[libvirt] Exposing some unique features?

2008-08-27 Thread Nguyen Anh Quynh
Hi, Though libvirt tries very hard to hide the difference between hypervisors behind an abstraction layer, there are still differences that we might want to expose to the users. For example, QEMU has the monitor interface, which provides some unique functions. Users might want to have access to th

Re: [libvirt] [PATCH] Use gcc style for structure fields declaration

2008-08-27 Thread Atsushi SAKAI
Hi, Quynh Good catch! +1 Thanks Atsushi SAKAI "Nguyen Anh Quynh" <[EMAIL PROTECTED]> wrote: > Hi, > > This patch uses gcc style to declare fields in virDriver structures. > This also makes it easier to spot bugs. > > $ diffstat fix3.patch > lxc_driver.c| 118 ++

[libvirt] [PATCH] Use gcc style for structure fields declaration

2008-08-27 Thread Nguyen Anh Quynh
Hi, This patch uses gcc style to declare fields in virDriver structures. This also makes it easier to spot bugs. $ diffstat fix3.patch lxc_driver.c| 118 ++-- openvz_driver.c | 118 ++-- qemu_dr

[libvirt] [PATCH] xen: fix domain lookup after define

2008-08-27 Thread Cole Robinson
Defining a xen domain will succeed, but report error because we weren't properly passing the domain's name to the post-define lookup. Attached patch fixes this, and also adds a debug statement to show the sexpr we create from the passed xml. Thanks, Cole diff --git a/src/xend_internal.c b/src/xen

[libvirt] Re: [augeas-devel] PATCH: Add a augeas lens for libvirtd.conf

2008-08-27 Thread David Lutterkort
On Wed, 2008-08-27 at 12:31 +0100, Daniel P. Berrange wrote: > On Tue, Aug 26, 2008 at 09:40:41PM +, David Lutterkort wrote: > > On Tue, 2008-08-26 at 21:05 +0100, Daniel P. Berrange wrote: > > > > > + let empty = [ label "empty" . del /[ \t]*\n/ "" ] > > > > Do you really care that empty e

Re: [libvirt] [PATCH] Fix ejecting cdroms with latest qemu syntax

2008-08-27 Thread Cole Robinson
Daniel P. Berrange wrote: > On Mon, Aug 25, 2008 at 01:41:24PM -0400, Cole Robinson wrote: >> + >> +int idx = virDiskNameToIndex(newdisk->dst); >> +switch (newdisk->bus) { >> +/* Assume that if we are here, device targets don't exceed >> hypervisor >> + * limits, and we are

Re: [libvirt] Re: [augeas-devel] PATCH: Add a augeas lens for libvirtd.conf

2008-08-27 Thread David Lutterkort
On Wed, 2008-08-27 at 12:15 +0100, Richard W.M. Jones wrote: > Dan pointed out that you have your own DFA implementation. Actually, libf does everything but matching - it does all the regexp calculations needed for the typechecker; for matching, I use GNU regex. David -- Libvir-list mailing lis

Re: [libvirt] Re: [augeas-devel] PATCH: Add a augeas lens for libvirtd.conf

2008-08-27 Thread David Lutterkort
On Wed, 2008-08-27 at 12:03 +0100, Richard W.M. Jones wrote: > Out of interest, do you ever hit the 16 bit limit in the size of > compiled regexps? The "bytecode" used to represent compiled GNU > regexps has (or perhaps had) a 16 bit limit in the jump offsets, which > I hit a few years back. Had

Re: [libvirt] Writing a new driver for libvirt

2008-08-27 Thread Daniel P. Berrange
On Wed, Aug 27, 2008 at 10:38:23AM -0700, Orr, David-P64407 wrote: > Thanks for the response. I will look that the functions that you have > pointed out for the other drivers here and see how they would be > implemented for ours. Based on your description I think we would use a > stateless driver

Re: [libvirt] PATCH: 4/4: Add pivot_root support to container

2008-08-27 Thread Daniel P. Berrange
On Wed, Aug 27, 2008 at 01:32:13PM -0700, Dan Smith wrote: > DB> +static int lxcContainerMountNewFS(virDomainDefPtr vmDef) > DB> +{ > DB> +virDomainFSDefPtr tmp; > DB> + > DB> +/* Pull in rest of container's mounts */ > DB> +for (tmp = vmDef->fss; tmp; tmp = tmp->next) { > DB> +

Re: [libvirt] Need Info on virNodeGetCellsFreeMemory

2008-08-27 Thread Daniel P. Berrange
On Thu, Aug 28, 2008 at 02:02:19AM +0530, ajishrao wrote: > Hi, > how to find the memory utilization of the whole which is running > with some guest? By libvirt I can only see virNodeGetCellsFreeMemory > relevant API, But didn't understand how to use it. The answer varies depending on just w

Re: [libvirt] PATCH: 4/4: Add pivot_root support to container

2008-08-27 Thread Dan Smith
DB> +static int lxcContainerMountNewFS(virDomainDefPtr vmDef) DB> +{ DB> +virDomainFSDefPtr tmp; DB> + DB> +/* Pull in rest of container's mounts */ DB> +for (tmp = vmDef->fss; tmp; tmp = tmp->next) { DB> +char *src; DB> +if (STREQ(tmp->dst, "/")) DB> +contin

[libvirt] Need Info on virNodeGetCellsFreeMemory

2008-08-27 Thread ajishrao
Hi, how to find the memory utilization of the whole which is running with some guest? By libvirt I can only see virNodeGetCellsFreeMemory relevant API, But didn't understand how to use it. Thanks & Regards --Ajish -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mail

Re: [libvirt] [PATCH] storage pool discovery

2008-08-27 Thread Daniel P. Berrange
On Wed, Aug 27, 2008 at 03:34:14PM -0400, David Lively wrote: > On Wed, 2008-08-27 at 17:51 +0100, Daniel P. Berrange wrote: > > On Mon, Aug 25, 2008 at 10:33:45AM -0400, David Lively wrote: > > > After making the change I suggested above, it now feels a little strange > > > because "Pool" is gone

Re: [libvirt] [PATCH] storage pool discovery

2008-08-27 Thread David Lively
On Wed, 2008-08-27 at 17:51 +0100, Daniel P. Berrange wrote: > On Mon, Aug 25, 2008 at 10:33:45AM -0400, David Lively wrote: > > After making the change I suggested above, it now feels a little strange > > because "Pool" is gone from the name. I'm starting to think > > "*Discover[Storage]PoolSourc

RE: [libvirt] Writing a new driver for libvirt

2008-08-27 Thread Orr, David-P64407
Thanks for the response. I will look that the functions that you have pointed out for the other drivers here and see how they would be implemented for ours. Based on your description I think we would use a stateless driver, since there are external tools and configurations available. To answer y

Re: [libvirt] libvir: Xen error

2008-08-27 Thread Richard W.M. Jones
On Wed, Aug 27, 2008 at 11:28:17AM -0500, mantra UNIX wrote: > Once the guest was shutdown, i ran the following command to check the stuats > of the guest(s) [...] > # xm list > Error: Device 0 not connected > Usage: xm list [options] [Domain, ...] [...] > # virsh list > Id Name St

[libvirt] ANNOUNCE: virt-what 1.0 - a shell script to detect if you are running in a virtual machine

2008-08-27 Thread Richard W.M. Jones
I'm pleased to announce the first release of 'virt-what', which is a simple shell script that detects if you are running inside a virtual machine, and prints some "facts" about that virtual machine. This is a frequently requested feature. Home page:http://et.redhat.com/~rjones/virt-what

Re: [libvirt] Writing a new driver for libvirt

2008-08-27 Thread Daniel P. Berrange
On Wed, Aug 27, 2008 at 09:47:40AM -0700, Orr, David-P64407 wrote: > Hey all, > > I am new to libvirt and have been asked to look at the possibility of > writing a libvirt driver for a hypervisor we are using. I am wondering > if someone can give me the basics on what is involved in accomplishing

Re: [libvirt] [PATCH] storage pool discovery

2008-08-27 Thread Daniel P. Berrange
On Mon, Aug 25, 2008 at 10:33:45AM -0400, David Lively wrote: > On Fri, 2008-08-22 at 16:15 +0100, Daniel P. Berrange wrote: > > On Fri, Aug 22, 2008 at 10:58:54AM -0400, David Lively wrote: > > > As long as we're on the subject of naming (and before it's too late), > > > it's been bothering me tha

[libvirt] Writing a new driver for libvirt

2008-08-27 Thread Orr, David-P64407
Hey all, I am new to libvirt and have been asked to look at the possibility of writing a libvirt driver for a hypervisor we are using. I am wondering if someone can give me the basics on what is involved in accomplishing this task, what are the basics of writing a new driver? I have looked at th

[libvirt] PATCH: Switch openvz driver to domain APIs

2008-08-27 Thread Daniel P. Berrange
This patch is the minimum effort port of the OpenVZ driver over to the new generic domain XML routines. It basically removes all the existing config format stuff from openvz_conf, defines a set of openvz capabilities and implements the DumpXML method too. This is enough to get all the core libvirt

Re: [libvirt] libvir: Xen error

2008-08-27 Thread mantra UNIX
Richard, 1.0 Using "virt-manager" console to login into the guest-os and issues the "init 0" 2.0 Once the guest was shutdown, i ran the following command to check the stuats of the guest(s) 2.1 # xm list Error: Device 0 not connected Usage: xm list [options] [Domain, ...] List information ab

Re: [libvirt] PATCH: 4/4: Add pivot_root support to container

2008-08-27 Thread Daniel P. Berrange
On Wed, Aug 13, 2008 at 10:57:11AM -0700, Dan Smith wrote: [snip huge pile of code] > I'd really like to see this mondo if block broken out into at least an > lxcPivotRoot() function, if not further. This is pretty long and > hairy, IMHO. That is very true. I've re-factored it into a whole bunc

Re: [libvirt] PATCH: 5/5: Make all code use virExec

2008-08-27 Thread Daniel P. Berrange
On Wed, Aug 20, 2008 at 06:40:37PM +0200, Jim Meyering wrote: > "Daniel P. Berrange" <[EMAIL PROTECTED]> wrote: > > This final patch switches over all places which do fork()/exec() to use the > > new enhanced virExec() code. A fair amount of code is deleted, but that's > > not the whole story - the

Re: [libvirt] Error compiling libvirt 0.4.4

2008-08-27 Thread Richard W.M. Jones
On Wed, Aug 27, 2008 at 10:42:38AM -0300, Everton P. Alexandre wrote: > > "Richard W.M. Jones" <[EMAIL PROTECTED]> escreveu: On Thu, Aug 21, 2008 at > > 06:57:40PM -0300, Everton P. Alexandre wrote: > > > In file included from /usr/include/xen/dom0_ops.h:31, > > > from xen_unified

Re: [libvirt] PATCH: Handle case of no domains in openvz driver

2008-08-27 Thread Daniel P. Berrange
On Tue, Aug 19, 2008 at 03:56:35PM +0200, Daniel Veillard wrote: > On Tue, Aug 19, 2008 at 02:14:04PM +0100, Daniel P. Berrange wrote: > > If running the openvz driver on a machine with no containers currently > > defined, it throws an error > > > > # ./src/virsh --connect openvz:///system list

Re: [libvirt] PATCH: REmove bogus call to virStateInit in openvz driver

2008-08-27 Thread Daniel P. Berrange
On Tue, Aug 19, 2008 at 03:55:54PM +0200, Daniel Veillard wrote: > On Tue, Aug 19, 2008 at 02:12:39PM +0100, Daniel P. Berrange wrote: > > For some unknown reason there is a call to virStateInitialize() in the > > openvz driver's open method. This is absolutely forbidden - this API is > > only int

Re: [libvirt] PATCH: Allow specific FDs to be kept open in virExec()

2008-08-27 Thread Daniel P. Berrange
On Wed, Aug 27, 2008 at 10:21:44AM +0100, Richard W.M. Jones wrote: > On Tue, Aug 26, 2008 at 10:41:18AM +0100, Daniel P. Berrange wrote: > > On Thu, Aug 21, 2008 at 02:58:30PM +0100, Daniel P. Berrange wrote: > > > With my recent patches to virExec(), all FDs except stdin/out/err are > > > closed

[libvirt] Re: [augeas-devel] PATCH: Add a augeas lens for libvirtd.conf

2008-08-27 Thread Daniel P. Berrange
On Tue, Aug 26, 2008 at 09:40:41PM +, David Lutterkort wrote: > On Tue, 2008-08-26 at 21:05 +0100, Daniel P. Berrange wrote: > > diff -u -p -r1.51 Makefile.am > > --- qemud/Makefile.am 20 Aug 2008 20:48:35 - 1.51 > > +++ qemud/Makefile.am 26 Aug 2008 20:03:48 - > > @@ -

Re: [libvirt] Re: [augeas-devel] PATCH: Add a augeas lens for libvirtd.conf

2008-08-27 Thread Richard W.M. Jones
Dan pointed out that you have your own DFA implementation. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.re

Re: [libvirt] PATCH: Add a augeas lens for libvirtd.conf

2008-08-27 Thread Richard W.M. Jones
On Tue, Aug 26, 2008 at 09:05:37PM +0100, Daniel P. Berrange wrote: > Augeas is a awesome config file manipulation tool. libvirtd has a config > file. libvirtd meet augeas; augeas meet libvirt. > > Now instead of telling people > > 'edit /etc/libvirt/libvirtd.conf and change listen_tls to 1, >

Re: [libvirt] Proposed functionality: API to extract host description from saved state, restore with modified XML

2008-08-27 Thread Daniel P. Berrange
On Sun, Aug 24, 2008 at 11:17:50PM -0500, Charles Duffy wrote: > I'm looking for the ability to restore a snapshot saved with > domain.save(), with disk images pointing at a different location (in my > particular use case, pointing at a an empty copy-and-write image > backending into a snapshot

Re: [libvirt] Re: [augeas-devel] PATCH: Add a augeas lens for libvirtd.conf

2008-08-27 Thread Richard W.M. Jones
On Tue, Aug 26, 2008 at 09:46:22PM +, David Lutterkort wrote: > On Tue, 2008-08-26 at 22:01 +0100, Daniel P. Berrange wrote: > > > While I can see why it is useful to gather these entries logically, it's > > > not > > > very optimised for the parser. Eventually, all this will be compiled into

Re: [libvirt] virConnectOpenReadOnly?

2008-08-27 Thread Richard W.M. Jones
On Tue, Aug 26, 2008 at 03:45:06PM +0900, Jun Koi wrote: > According to the comment of virConnectOpenReadOnly, this function has > some restrictions on available methods to control domains. Could you > be more specific? What kind of restrictions we are having (compare to > virConnectOpen())? > > A

Re: [libvirt] [PATCH] Fix ejecting cdroms with latest qemu syntax

2008-08-27 Thread Daniel P. Berrange
On Mon, Aug 25, 2008 at 01:41:24PM -0400, Cole Robinson wrote: > + > +int idx = virDiskNameToIndex(newdisk->dst); > +switch (newdisk->bus) { > +/* Assume that if we are here, device targets don't exceed hypervisor > + * limits, and we are already an appropriate device type *

Re: [libvirt] [PATCH] Fix ejecting cdroms with latest qemu syntax

2008-08-27 Thread Daniel P. Berrange
On Wed, Aug 27, 2008 at 11:48:27AM +0100, Richard W.M. Jones wrote: > On Mon, Aug 25, 2008 at 01:41:24PM -0400, Cole Robinson wrote: > > Originally, ejecting a cdrom from a qemu guest entailed > > passing 'eject cdrom' to the monitor. But since qemu > > added the -drive option, more than one cdrom

Re: [libvirt] libvir: Xen error

2008-08-27 Thread Richard W.M. Jones
On Mon, Aug 25, 2008 at 02:30:37PM -0500, mantra UNIX wrote: > Hello everyone, > > I get the following error when i try to redtart a domain; > > # virsh list > libvir: Xen error : Domain not found: xenUnifiedDomainLookupByID > > I am using RHEL5.2 on i386, I have searched fo

Re: [libvirt] [PATCH] Fix ejecting cdroms with latest qemu syntax

2008-08-27 Thread Richard W.M. Jones
On Mon, Aug 25, 2008 at 01:41:24PM -0400, Cole Robinson wrote: > Originally, ejecting a cdrom from a qemu guest entailed > passing 'eject cdrom' to the monitor. But since qemu > added the -drive option, more than one cdrom can be > specified, so just using 'cdrom' isn't explicit enough. > > The at

Re: [libvirt] [PATCH] Attempt to detect cdrom change failures

2008-08-27 Thread Richard W.M. Jones
On Mon, Aug 25, 2008 at 01:05:03PM -0400, Cole Robinson wrote: > Cole Robinson wrote: > > If a 'change' or 'eject' qemu monitor command fails, > > an error message is printed to the monitor of the > > form "device {not found, is locked, is not > > removable"}. This is really the only indication we

Re: [libvirt] Proposed functionality: API to extract host description from saved state, restore with modified XML

2008-08-27 Thread Richard W.M. Jones
On Sun, Aug 24, 2008 at 11:17:50PM -0500, Charles Duffy wrote: > Would a patch adding API calls to > - return the XML description of a saved host, given the name > - restore a saved host with a different description > be considered welcome? As I understand it, yes & yes. > I presume that to mai

Re: [libvirt] "Choose alarm timer" feature for kvm

2008-08-27 Thread Richard W.M. Jones
On Sun, Aug 24, 2008 at 08:20:05PM +0100, Daniel P. Berrange wrote: > On Sun, Aug 24, 2008 at 08:40:46PM +0200, Tiziano M?ller wrote: > > Hi everyone > > > > In KVM it is possible to select the alarm timer being used (dynticks, > > hpet, rtc, unix). > > What exactly do these options do ? Is there

Re: [libvirt] Error compiling libvirt 0.4.4

2008-08-27 Thread Richard W.M. Jones
On Thu, Aug 21, 2008 at 06:57:40PM -0300, Everton P. Alexandre wrote: > In file included from /usr/include/xen/dom0_ops.h:31, > from xen_unified.c:29: > /usr/include/xen/xen.h:578: error: expected '=', ',', ';', 'asm' or > '__attribute__' before 'char' Did you find out what was c

Re: [libvirt] PATCH: Allow specific FDs to be kept open in virExec()

2008-08-27 Thread Richard W.M. Jones
On Tue, Aug 26, 2008 at 10:41:18AM +0100, Daniel P. Berrange wrote: > On Thu, Aug 21, 2008 at 02:58:30PM +0100, Daniel P. Berrange wrote: > > With my recent patches to virExec(), all FDs except stdin/out/err are closed > > before the child is exec'd to prevent accidental leaks. Of course I forgot >

[libvirt] libvir: Xen error

2008-08-27 Thread mantra UNIX
Hello everyone, I get the following error when i try to redtart a domain; # virsh list libvir: Xen error : Domain not found: xenUnifiedDomainLookupByID I am using RHEL5.2 on i386, I have searched for the error on web and on RedHat but could not find any. -- Regards, m

Re: [libvirt] LIBVIR_VERSION_NUMBER ?

2008-08-27 Thread Jun Koi
On Wed, Aug 27, 2008 at 5:04 PM, Atsushi SAKAI <[EMAIL PROTECTED]> wrote: > Hi, Jun > > Current libvirt version is 0.4.4 > So version(0) * 1,000,000 + minor(4) * 1,000 + micro(4) = 4004 > Ah, you are right. My mistake! Thanks, J > > "Jun Koi" <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> According

Re: [libvirt] LIBVIR_VERSION_NUMBER ?

2008-08-27 Thread Atsushi SAKAI
Hi, Jun Current libvirt version is 0.4.4 So version(0) * 1,000,000 + minor(4) * 1,000 + micro(4) = 4004 Thanks Atsushi SAKAI "Jun Koi" <[EMAIL PROTECTED]> wrote: > Hi, > > According to libvirt.h: > > /** > * LIBVIR_VERSION_NUMBER: > * > * Macro providing the version of the library as >

[libvirt] LIBVIR_VERSION_NUMBER ?

2008-08-27 Thread Jun Koi
Hi, According to libvirt.h: /** * LIBVIR_VERSION_NUMBER: * * Macro providing the version of the library as * version * 1,000,000 + minor * 1000 + micro */ #define LIBVIR_VERSION_NUMBER 4004 The comment is incorrect, as 4004 is not how it is supposed to be. So we should fix either the comme