Re: [libvirt] [PATCH 1/9] eliminate strerror qemu_driver.c: use virReportSystemError instead

2009-02-03 Thread Daniel P. Berrange
On Tue, Feb 03, 2009 at 09:13:04PM +0100, Jim Meyering wrote: > "Daniel P. Berrange" wrote: > ... > >> @@ -877,8 +865,7 @@ static int qemudWaitForMonitor(virConnectPtr conn, > >> qemudFindCharDevicePTYs, > >> "console", 3000); > >

Re: [libvirt] [PATCH 1/9] eliminate strerror qemu_driver.c: use virReportSystemError instead

2009-02-03 Thread Jim Meyering
"Daniel P. Berrange" wrote: ... >> -qemudLog(QEMUD_ERR, >> - "%s", _("Failed to set non-blocking file descriptor flag\n")); >> -return -1; >> +return ((flags = fcntl(fd, F_GETFL)) < 0 >> + || fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0 >> +? -1 >> +

Re: [libvirt] [PATCH 1/9] eliminate strerror qemu_driver.c: use virReportSystemError instead

2009-02-03 Thread Jim Meyering
"Daniel P. Berrange" wrote: ... >> @@ -877,8 +865,7 @@ static int qemudWaitForMonitor(virConnectPtr conn, >> qemudFindCharDevicePTYs, >> "console", 3000); >> if (close(logfd) < 0) >> -qemudLog(QEMUD_WARN, _("Unable to

Re: [libvirt] [PATCH 1/9] eliminate strerror qemu_driver.c: use virReportSystemError instead

2009-02-03 Thread Jim Meyering
"Daniel P. Berrange" wrote: ... > These two chunks can be left out, since those functions are completely > removed by the next patch. Sure. No net change. >> @@ -877,8 +865,7 @@ static int qemudWaitForMonitor(virConnectPtr conn, >> qemudFindCharDevicePTYs, >>

Re: [libvirt] virGetLastError() disagrees with virConnGetLastError()

2009-02-03 Thread John Levon
On Tue, Feb 03, 2009 at 04:20:25PM +, Daniel P. Berrange wrote: > > 11 POST operation failed: xend_post: error from xen daemon: (xend.err > > 'Cannot dump core for privileged domain 0') > > virsh: error: POST operation failed: xend_post: error from xen daemon: > > (xend.err 'Cannot dump core

Re: [libvirt] virGetLastError() disagrees with virConnGetLastError()

2009-02-03 Thread Daniel P. Berrange
On Tue, Feb 03, 2009 at 11:16:20AM -0500, John Levon wrote: > On Tue, Feb 03, 2009 at 11:14:24AM +, Daniel P. Berrange wrote: > > > I can't reproduce this problem with current CVS. > > > > I made the following change to the 'dump' method in virsh.c > > The difference is I have it /after/ the

Re: [libvirt] virGetLastError() disagrees with virConnGetLastError()

2009-02-03 Thread John Levon
On Tue, Feb 03, 2009 at 11:14:24AM +, Daniel P. Berrange wrote: > I can't reproduce this problem with current CVS. > > I made the following change to the 'dump' method in virsh.c The difference is I have it /after/ the virDomainFree (actually in virCommandRun). I hadn't noticed this before.

Re: [libvirt] [PATCH 2/9] remove duplicate *SetCloseExec and *SetNonBlock functions

2009-02-03 Thread Jim Meyering
"Daniel P. Berrange" wrote: > On Mon, Feb 02, 2009 at 06:08:15PM +0100, Jim Meyering wrote: >> From: Jim Meyering >> >> * src/qemu_driver.c: Use virSetCloseExec and virSetNonBlock, >> rather than qemuSet* functions. Suggested by Daniel P. Berrange. >> * src/util.c (virSetCloseExec): Compile unco

Re: [libvirt] strange bug

2009-02-03 Thread Farkas Levente
Daniel P. Berrange wrote: > On Tue, Feb 03, 2009 at 10:49:38AM +0100, Farkas Levente wrote: >> if i restart libvirt i can start as the first guest the >> guest-4/mandrake-10 but if i start any of the other guest i no longer >> able to start guest-4. > > It sounds like you have a resource conflict

Re: [libvirt] [PATCH] Allow no for bridge interfaces

2009-02-03 Thread Daniel P. Berrange
On Tue, Feb 03, 2009 at 03:44:03PM +, John Levon wrote: > On Tue, Feb 03, 2009 at 02:27:31PM +, Daniel P. Berrange wrote: > > > > Allow no for bridge interfaces > > > > > > Historically, it was allowed to specify a bridge interface without a > > > specific bridge source, in which case xe

Re: [libvirt] [PATCH] Allow no for bridge interfaces

2009-02-03 Thread John Levon
On Tue, Feb 03, 2009 at 02:27:31PM +, Daniel P. Berrange wrote: > > Allow no for bridge interfaces > > > > Historically, it was allowed to specify a bridge interface without a > > specific bridge source, in which case xend would choose one. Keep > > compatible with this behaviour. > > ACK i

Re: [libvirt] [PATCH 7/9] remove remainder of offending strerror uses

2009-02-03 Thread Daniel P. Berrange
On Tue, Feb 03, 2009 at 04:06:18PM +0100, Jim Meyering wrote: > >> - err_delbr1: > >> + err_delbr1:; > >> +char ebuf[1024]; > > > > A stray ';' crept in there. > > Actually, it's required by C. > The ";" adds an empty statement before the new declaration, > to serve as a target for the label.

[libvirt] Change of CDROM source via virsh

2009-02-03 Thread Radek Hladik
Hi, I would like to ask what is the simplest way, how to change ISO mounted in VM's drive. I am using libvirt+kvm+qemu and only way I found is via virt-manager, but there are some problems with it - it is not working properly on some Fedora testing guests and it disables the VNC password for

Re: [libvirt] [PATCH 7/9] remove remainder of offending strerror uses

2009-02-03 Thread Jim Meyering
"Daniel P. Berrange" wrote: > On Mon, Feb 02, 2009 at 06:08:20PM +0100, Jim Meyering wrote: >> From: Jim Meyering Thanks for the review. >> - err_delbr1: >> + err_delbr1:; >> +char ebuf[1024]; > > A stray ';' crept in there. Actually, it's required by C. The ";" adds an empty statement be

Re: [libvirt] strange bug

2009-02-03 Thread Daniel P. Berrange
On Tue, Feb 03, 2009 at 10:49:38AM +0100, Farkas Levente wrote: > if i restart libvirt i can start as the first guest the > guest-4/mandrake-10 but if i start any of the other guest i no longer > able to start guest-4. It sounds like you have a resource conflict between the guests. Probably someth

Re: [libvirt] Sendkey after shutdown

2009-02-03 Thread Daniel P. Berrange
On Tue, Feb 03, 2009 at 11:09:01AM +0100, Mario Wolff wrote: > Hello all, > first post, first contact! I hope my english is at least understandable. > I'm using libvirt to manage some kvm hosts with virtual > Windows-Systems. If i call 'shutdown ' in virsh, i get "Domain > is being shutdown" but o

Re: [libvirt] bridge-to-lan interfaces with network type

2009-02-03 Thread Daniel P. Berrange
On Tue, Feb 03, 2009 at 03:58:38PM +0800, Zhengang Li wrote: > Hi All, > > The documentation on the libvirt website explains the way to define a > bridge to LAN network interfaces with a 'bridge' type. E.g.: > > > > > > I'm working in a limited environment. Only 'network'

Re: [libvirt] [PATCH] Allow no for bridge interfaces

2009-02-03 Thread Daniel P. Berrange
On Mon, Feb 02, 2009 at 07:01:50AM -0800, john.le...@sun.com wrote: > # HG changeset patch > # User john.le...@sun.com > # Date 1233586907 28800 > # Node ID 68087e3caf39c74797720bde71a8df524ec036c8 > # Parent aa50ca252e1419f30eb0e16204b48db42d92c785 > Allow no for bridge interfaces > > Historica

Re: [libvirt] [PATCH] Fix more printf("%s", NULL) usage

2009-02-03 Thread Daniel P. Berrange
On Mon, Feb 02, 2009 at 05:43:37AM -0800, john.le...@sun.com wrote: > # HG changeset patch > # User john.le...@sun.com > # Date 1233580871 28800 > # Node ID e61a2e486a59394ea422d90e1104f805ceabd0be > # Parent 430096efc257a704fdd6294829686d05f38da68e > Fix more printf("%s", NULL) usage > > Signed-

Re: [libvirt] [PATCH 1/9] eliminate strerror qemu_driver.c: use virReportSystemError instead

2009-02-03 Thread Daniel P. Berrange
On Mon, Feb 02, 2009 at 06:08:14PM +0100, Jim Meyering wrote: > diff --git a/src/qemu_driver.c b/src/qemu_driver.c > index 09f69bf..596d940 100644 > --- a/src/qemu_driver.c > +++ b/src/qemu_driver.c > @@ -93,31 +93,19 @@ static void qemuDriverUnlock(struct qemud_driver *driver) > > static int qem

Re: [libvirt] [PATCH 9/9] syntax-check: avoid spurious false-positive

2009-02-03 Thread Daniel P. Berrange
On Mon, Feb 02, 2009 at 06:08:22PM +0100, Jim Meyering wrote: > From: Jim Meyering > > * src/iptables.c (notifyRulesUpdated): Use %s rather than > string-concatenation that made sc_unmarked_diagnostics report > a false-positive. ACK Daniel -- |: Red Hat, Engineering, London -o- http://peop

Re: [libvirt] [PATCH 8/9] syntax-check: enable prohibit_nonreentrant

2009-02-03 Thread Daniel P. Berrange
On Mon, Feb 02, 2009 at 06:08:21PM +0100, Jim Meyering wrote: > From: Jim Meyering > > * .x-sc_prohibit_nonreentrant: Add src/console.c and virterror.c. > * Makefile.cfg (local-checks-to-skip): Don't exempt > sc_prohibit_nonreentrant. > --- > .x-sc_prohibit_nonreentrant |4 +++- > Makefile.c

Re: [libvirt] [PATCH 7/9] remove remainder of offending strerror uses

2009-02-03 Thread Daniel P. Berrange
On Mon, Feb 02, 2009 at 06:08:20PM +0100, Jim Meyering wrote: > From: Jim Meyering > > * qemud/qemud.c (GET_CONF_STR): Use virStrerror, not strerror. > * qemud/remote.c (remoteDispatchDomainBlockPeek): Likewise. > (remoteDispatchDomainMemoryPeek, remoteDispatchAuthSaslInit): Likewise. > (remoteDi

Re: [libvirt] [PATCH 6/9] don't include raw errno in diagnostics

2009-02-03 Thread Daniel P. Berrange
On Mon, Feb 02, 2009 at 06:08:19PM +0100, Jim Meyering wrote: > From: Jim Meyering > > * src/uml_driver.c (umlStartVMDaemon): Don't print raw errno value. > * qemud/remote.c (remoteDispatchAuthSaslInit): Likewise. > --- > qemud/remote.c | 10 +- > src/uml_driver.c | 22 +++-

Re: [libvirt] [PATCH 5/9] qemud.c: use virStrerror, not strerror

2009-02-03 Thread Daniel P. Berrange
On Mon, Feb 02, 2009 at 06:08:18PM +0100, Jim Meyering wrote: > From: Jim Meyering > > --- > qemud/qemud.c | 65 +--- > 1 files changed, 43 insertions(+), 22 deletions(-) ACK Daniel -- |: Red Hat, Engineering, London -o- http://people.

Re: [libvirt] [PATCH 4/9] iptables.c: Use virStrerror, not strerror.

2009-02-03 Thread Daniel P. Berrange
On Mon, Feb 02, 2009 at 06:08:17PM +0100, Jim Meyering wrote: > From: Jim Meyering > > * src/iptables.c: Include "virterror_internal.h". > Use virStrerror, not strerror. > * src/virterror.c (virStrerror): Remove "static". > * src/virterror_internal.h (virStrerror): Declare it. > --- > src/iptabl

Re: [libvirt] [PATCH ] (type ioem) adding mode type = "pvxen" configuration option in to libvirt (XEN)

2009-02-03 Thread Gihan Munasinghe
Daniel P. Berrange wrote: On Thu, Dec 04, 2008 at 10:33:28PM +, Gihan Munasinghe wrote: Daniel P. Berrange wrote: As I mentioned before this should be handled with the existing XML element. ...no model element... -> Default QEMU nic + Paravirt Driv

Re: [libvirt] [PATCH 3/9] report OOMError

2009-02-03 Thread Daniel P. Berrange
On Mon, Feb 02, 2009 at 06:08:16PM +0100, Jim Meyering wrote: > From: Jim Meyering > > --- > src/qemu_driver.c |3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > > diff --git a/src/qemu_driver.c b/src/qemu_driver.c > index c40fda4..599af0b 100644 > --- a/src/qemu_driver.c > +++ b/

Re: [libvirt] [PATCH 2/9] remove duplicate *SetCloseExec and *SetNonBlock functions

2009-02-03 Thread Daniel P. Berrange
On Mon, Feb 02, 2009 at 06:08:15PM +0100, Jim Meyering wrote: > From: Jim Meyering > > * src/qemu_driver.c: Use virSetCloseExec and virSetNonBlock, > rather than qemuSet* functions. Suggested by Daniel P. Berrange. > * src/util.c (virSetCloseExec): Compile unconditionally. > * src/util.h (virSet

Re: [libvirt] [PATCH]: cleanup: remove useless if-before-VIR_FREE

2009-02-03 Thread Jim Meyering
Jim Meyering wrote: ... >> This made me realize our "avoid_if_before_free" syntax >> check should also be checking for uses of VIR_FREE, so >> I added that. That exposed a few more useless tests. >> The patch below corrects them: > > I'm about to push the following 4 change sets. > The first was

[libvirt] bridge-to-lan interfaces with network type

2009-02-03 Thread Zhengang Li
Hi All, The documentation on the libvirt website explains the way to define a bridge to LAN network interfaces with a 'bridge' type. E.g.: I'm working in a limited environment. Only 'network' type interfaces can be defined for a guest. Is it possible to define a bridge

Re: [libvirt] virGetLastError() disagrees with virConnGetLastError()

2009-02-03 Thread Daniel P. Berrange
On Mon, Feb 02, 2009 at 03:10:23PM -0500, John Levon wrote: > > If you edit virsh sources, you should find that on 'virsh dump Domain-0 > /var/tmp/foo', the conn error is correctly set, but the thread-load > error is not set. Isn't this a bug? I can't reproduce this problem with current CVS. I m

[libvirt] Sendkey after shutdown

2009-02-03 Thread Mario Wolff
Hello all, first post, first contact! I hope my english is at least understandable. I'm using libvirt to manage some kvm hosts with virtual Windows-Systems. If i call 'shutdown ' in virsh, i get "Domain is being shutdown" but on the system a window is displayed telling my about remote users. Witho

[libvirt] strange bug

2009-02-03 Thread Farkas Levente
hi, this strange bug always happened with me on centos-5 with virt-manager. our setup: - host: - Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz - Intel S3000AHV - 8GB RAM - CentOS-5.2 - kernel-2.6.18-92.1.22.el5 x86_64 64bit - guest-1: - CentOS-5.2 - 4 vcpu - kernel-2.6.18-92.1.22.el5 i