[Libvir] [RFC] The idea of 'policy manager'

2007-03-05 Thread ASANO Yuzuru
Hello, I summarized the idea about 'policy manager'. The purpose of 'policy manager' is to manage and to operate 'runtime policy' such as cpu pin/weight/cap. Please refer to the following thread about earlier argument about 'policy manager'. https://www.redhat.com/archives/libvir-list/2007-Febru

[Libvir] [RFC] Check host's minimum memory.

2007-03-05 Thread Masayuki Sunou
Hi The minimum value of the memory guarded with virsh setmem is 4096KB(4MB). In general, when host's memory is set to 4MB, the host stops. Therefore, I propose the patch to which host's minimum value of the memory is guarded by 256MB. Signed-off-by: Masayuki Sunou <[EMAIL PROTECTED]> Thanks, M

Re: [Libvir] [PATCH]Reprt error for a existing file

2007-03-05 Thread Daniel P. Berrange
On Tue, Mar 06, 2007 at 01:55:19PM +0900, Kazuki Mizushima wrote: > > >My other problem is the use of stat(2) (or access) to determine if a > >file exists, since we up on slippy ground if this is relied upon in a > >security-related context. It's better to make the atomic open(2) call > >fail ins

Re: [Libvir] Remote patch, 2007-02-28

2007-03-05 Thread Daniel P. Berrange
On Mon, Mar 05, 2007 at 09:49:42AM +, Mark McLoughlin wrote: > On Thu, 2007-03-01 at 13:56 +, Richard W.M. Jones wrote: > > Do you have some actual concrete problems with SunRPC? For me it solves > > the problem of marshalling complicated data structures, including all > > the error infr

Re: [Libvir] [PATCH]Reprt error for a existing file

2007-03-05 Thread Kazuki Mizushima
Hi, Rich Thank you for reply and I understand you. I am lacking of REMOTE point of view, so this patch is not work for a remote hypervisor. And I also understand that this issue is not to be able to deal with libvirt. My other problem is the use of stat(2) (or access) to determine if a file

Re: [Libvir] [PATCH] check the maximum of virtual CPU

2007-03-05 Thread Daniel P. Berrange
On Mon, Mar 05, 2007 at 03:42:35PM +0900, Masayuki Sunou wrote: > I removed a needless part from the former patch. > > Add check the maxmum of virtual CPU. I was thinking about how to make use of this new API in virt-manager when I came up with a further complication :-) There are three scenario

Re: [Libvir] [PATCH]Reprt error for a existing file

2007-03-05 Thread Kazuki Mizushima
Hi Dan, Thank you for replay. I forgot REMOTE access!!! Certainty, this patch is not be able to work for a remote hypervisor, and I understand that this issue and these kind of policy checks is for under layer, XenD or so. I'II try to put this into XenD. Thanks, Kazuki Mizushima - Orig

Re: [Libvir] Error when paravirtualization domain starts with virsh.

2007-03-05 Thread Atsushi SAKAI
Hi, Michel From Dan's suggestion, This issue seems related to DomU memory=256M case. http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=207241 To avoid this problem, you should set memory=512MB at first. Anyway, we are not checking virsh command on PV-domain/IA64 for RHEL5. I guess you are the

[Libvir] [PATCH] add global --readonly flag to virsh

2007-03-05 Thread Richard W.M. Jones
The current vshInit function in virsh tries some dodgy heuristics to see if it should connect readonly or read/write to the hypervisor. Unfortunately these heuristics fail, eg. when you have a root-owned system-wide qemud, and a user trying to run virsh as non-root. This patch removes the heur

Re: [Libvir] [PATCH] qemuOpenConnection readonly parameter is not unused

2007-03-05 Thread Daniel P. Berrange
Applied - thanks Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA

[Libvir] [PATCH] qemuOpenConnection readonly parameter is not unused

2007-03-05 Thread Richard W.M. Jones
diff --git a/src/qemu_internal.c b/src/qemu_internal.c index 90b7aa5..217a296 100644 --- a/src/qemu_internal.c +++ b/src/qemu_internal.c @@ -327,7 +327,8 @@ static int qemuProcessRequest(virConnectPtr conn, /* * Open a connection to the libvirt QEMU daemon */ -static int qemuOpenConnection(vi

Re: [Libvir] Error when paravirtualization domain starts with virsh.

2007-03-05 Thread Daniel P. Berrange
On Mon, Mar 05, 2007 at 11:19:03AM +0100, Michel Gauthier wrote: > With the RHEL5 RC distribution on our IA64 platform (4 CPUs), when we use > virsh to start a paravirtuailzation domain, we've got the following: > > virsh # list > Id Name State > -

Re: [Libvir] [PATCH]Reprt error for a existing file

2007-03-05 Thread Daniel P. Berrange
On Mon, Mar 05, 2007 at 06:04:49PM +0900, Kazuki Mizushima wrote: > Hi, > > I make a patch which reports error for a existing file to prevent > overwriting before the file. > diff -u -p -r1.58 virsh.c > --- src/virsh.c 2 Mar 2007 14:22:33 - 1.58 > +++ src/virsh.c 5 Mar 2007 06:49:28 -

Re: [Libvir] PATCH: Process QEMU monitor at startup

2007-03-05 Thread Daniel P. Berrange
On Mon, Mar 05, 2007 at 02:18:20PM +, Mark McLoughlin wrote: > Hi Dan, > On the topic of error reporting, I just noticed that without QEMU > installed you just get: > > libvirt.libvirtError: virDomainCreateLinux() failed > > (Haven't looked into it myself) There is an 'XXX' in

Re: [Libvir] PATCH: Process QEMU monitor at startup

2007-03-05 Thread Mark McLoughlin
Hi Dan, On the topic of error reporting, I just noticed that without QEMU installed you just get: libvirt.libvirtError: virDomainCreateLinux() failed (Haven't looked into it myself) Cheers, Mark. -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman

Re: [Libvir] PATCH: Process QEMU monitor at startup

2007-03-05 Thread Mark McLoughlin
On Fri, 2007-03-02 at 16:47 +, Daniel P. Berrange wrote: > @@ -432,7 +441,7 @@ int qemudDomainDumpXML(struct qemud_serv > strncpy(xml, vmxml, xmllen); > xml[xmllen-1] = '\0'; > > -free(xml); > +free(vmxml); I hit this myself, so I committed the fix along with the sa

Re: [Libvir] [PATCH]Reprt error for a existing file

2007-03-05 Thread Richard W.M. Jones
Kazuki Mizushima wrote: > Hi, > I make a patch which reports error for a existing file to prevent > overwriting before the file. > > # ./virsh dump 1 a.dump > error: file a.dump exists already > @@ -871,6 +873,11 @@ cmdSave(vshControl * ctl, vshCmd * cmd) > if (!(dom = vshCommandOptDomain(ct

Re: [Libvir] Remote patch, 2007-02-28

2007-03-05 Thread Richard W.M. Jones
Mark McLoughlin wrote: - I'm not sure the libvirt API is really well designed for remote use, so I'm not sure that mapping the API calls to RPC calls is the best approach. The level that is right for abstraction is definitely troubling to me. For example at the moment it'll work pro

[Libvir] Error when paravirtualization domain starts with virsh.

2007-03-05 Thread Michel Gauthier
With the RHEL5 RC distribution on our IA64 platform (4 CPUs), when we use virsh to start a paravirtuailzation domain, we've got the following: virsh # list Id Name State -- 0 Domain-0 running virsh # create hndom2 Failed to get devic

Re: [Libvir] Remote patch, 2007-02-28

2007-03-05 Thread Mark McLoughlin
Hi Rich, I guess I never gave a real answer to this ... On Thu, 2007-03-01 at 13:56 +, Richard W.M. Jones wrote: > Mark McLoughlin wrote: > > Hey, > > Btw, I'm really becoming quite convinced we'll evenutally regret using > > SunRPC if we stick with it. > > Morning Mark, thanks fo

Re: [Libvir] [PATCH] lots of warnings removed - libvirt can now compile with -Werror

2007-03-05 Thread Mark McLoughlin
Hi Rich, Good stuff, looks fine to commit to me. Just a nitpick: On Fri, 2007-03-02 at 15:00 +, Richard W.M. Jones wrote: > -activeNames = vshMalloc(ctl, sizeof(int) * maxactive); > +activeNames = vshMalloc(ctl, sizeof (char *) * maxactive);

Re: [Libvir] PATCH: Process QEMU monitor at startup

2007-03-05 Thread Mark McLoughlin
Hi Dan, Looks fine to commit, but how about re-factoring out the read/poll/check loop? Suggested, but untested, patch attached. Cheers, Mark. Index: libvirt/qemud/qemud.c === --- libvirt.orig/qemud/qemud.c 2007-03-05 08:38:13.

[Libvir] [PATCH]Reprt error for a existing file

2007-03-05 Thread Kazuki Mizushima
Hi, I make a patch which reports error for a existing file to prevent overwriting before the file. # ./virsh dump 1 a.dump error: file a.dump exists already # echo $? 1 # ./virsh save 1 a.save error: file a.save exists already # echo $? 1 As you know, we need to add this message item to libvi