Re: [libvirt][qemu] unable to start guest under kvm

2009-09-07 Thread Anton Protopopov
2009/9/7 Mark McLoughlin > On Mon, 2009-09-07 at 14:40 +0400, Anton Protopopov wrote: > > > Also, what is the output of 'virsh capabilities' ? > > > > hvm > > > > 64 > > /usr/bin/qemu-system-x86_64 > > pc-0.11 > > pc > > pc-0.10 > > isapc > >

Re: [libvirt] 2 patches: dead increment and 4 useless (always-false) disjuncts

2009-09-07 Thread Jim Meyering
Daniel Veillard wrote: > On Mon, Sep 07, 2009 at 05:37:24PM +0200, Jim Meyering wrote: >> >> >From 74f57af2010f9cbe2315d625c6502a0b259e6802 Mon Sep 17 00:00:00 2001 >> From: Jim Meyering >> Date: Mon, 7 Sep 2009 10:03:22 +0200 >> Subject: [PATCH 1/2] xm_internal.c: remove dead increment of "data"

Re: [libvirt] [PATCH] 6 dead-store patches

2009-09-07 Thread Daniel Veillard
On Mon, Sep 07, 2009 at 06:12:32PM +0200, Jim Meyering wrote: > Daniel Veillard wrote: > ... > > > > Hum, those 3 look familiar, didn't we ACK them already ? maybe the > > last one is a cut'n paste thing it was in a different routine :-) > > Thanks for the reviews. > Sorry if I posted some twi

Re: [libvirt] [PATCH] xm_internal.c: remove dead store and associated leak

2009-09-07 Thread Daniel Veillard
On Mon, Sep 07, 2009 at 05:41:18PM +0200, Jim Meyering wrote: > This one took a little thinking. > > I'm not 100% sure that the comment in my log is sufficient > justification for removing the virGetDomain call. If we leave it, > we'll have to free it and remove the XXX comment. > > >From 324e07

Re: [libvirt] [PATCH] 6 dead-store patches

2009-09-07 Thread Jim Meyering
Daniel Veillard wrote: ... > > Hum, those 3 look familiar, didn't we ACK them already ? maybe the > last one is a cut'n paste thing it was in a different routine :-) Thanks for the reviews. Sorry if I posted some twice. -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com

Re: [libvirt] [PATCH] 6 dead-store patches

2009-09-07 Thread Daniel Veillard
On Mon, Sep 07, 2009 at 05:39:31PM +0200, Jim Meyering wrote: > >From 129dc57243df4e73daa24aac671087bcd25f51ad Mon Sep 17 00:00:00 2001 > From: Jim Meyering > Date: Fri, 4 Sep 2009 16:49:37 +0200 > Subject: [PATCH 1/6] xm_internal.c: remove dead stores of local, "type" > > * src/xm_internal.c (xe

Re: [libvirt] 2 patches: dead increment and 4 useless (always-false) disjuncts

2009-09-07 Thread Daniel Veillard
On Mon, Sep 07, 2009 at 05:37:24PM +0200, Jim Meyering wrote: > > >From 74f57af2010f9cbe2315d625c6502a0b259e6802 Mon Sep 17 00:00:00 2001 > From: Jim Meyering > Date: Mon, 7 Sep 2009 10:03:22 +0200 > Subject: [PATCH 1/2] xm_internal.c: remove dead increment of "data" > > * src/xm_internal.c (xen

Re: [libvirt] [PATCH 4/4] Fix formatting of machine types in capabilities XML

2009-09-07 Thread Daniel Veillard
On Mon, Sep 07, 2009 at 02:44:14PM +0100, Mark McLoughlin wrote: > * src/capabilities.c: fix machine type formatting in > virCapabilitiesFormatXML() > --- > src/capabilities.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/src/capabilities.c b/src/capabilities.c

Re: [libvirt] [PATCH 1/4] Split up qemudGetOldMachines()

2009-09-07 Thread Daniel Veillard
On Mon, Sep 07, 2009 at 02:44:11PM +0100, Mark McLoughlin wrote: > We need to look at all the domain infos in guest capabilities, not > just the defaults. > > In order to allow that, split out a qemudGetOldMachinesFromInfo() > from qemudGetOldMachines(). We'll make more use of it in the next > pat

Re: [libvirt] [PATCH]: Fixed minor bugs in display and added OOM checks.

2009-09-07 Thread Daniel Veillard
On Mon, Sep 07, 2009 at 10:59:10AM +0200, Pritesh Kothari wrote: > Hi All, > > There was a minor bug in selecting the graphics type. if the graphics type > was > desktop it was assumed that display is set for it, and thus crashed on strdup, > so now checking if display is present before setting

[libvirt] [PATCH] xm_internal.c: remove dead store and associated leak

2009-09-07 Thread Jim Meyering
This one took a little thinking. I'm not 100% sure that the comment in my log is sufficient justification for removing the virGetDomain call. If we leave it, we'll have to free it and remove the XXX comment. >From 324e07f17e6a2ed6df236af955adc693670d1b16 Mon Sep 17 00:00:00 2001 From: Jim Meyeri

[libvirt] [PATCH] 6 dead-store patches

2009-09-07 Thread Jim Meyering
>From 129dc57243df4e73daa24aac671087bcd25f51ad Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 4 Sep 2009 16:49:37 +0200 Subject: [PATCH 1/6] xm_internal.c: remove dead stores of local, "type" * src/xm_internal.c (xenXMDomainConfigParse): Remove declaration and useless containing if-block,

[libvirt] 2 patches: dead increment and 4 useless (always-false) disjuncts

2009-09-07 Thread Jim Meyering
>From 74f57af2010f9cbe2315d625c6502a0b259e6802 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 7 Sep 2009 10:03:22 +0200 Subject: [PATCH 1/2] xm_internal.c: remove dead increment of "data" * src/xm_internal.c (xenXMDomainConfigParse): Don't increment it. --- src/xm_internal.c |1 - 1

Re: [libvirt] [PATCH] network_conf.c: remove dead store to "err"

2009-09-07 Thread Daniel Veillard
On Fri, Sep 04, 2009 at 07:16:26PM +0200, Jim Meyering wrote: > > > >From 66133e3b9d80e9fadefd810786b0ff2f5c8e6875 Mon Sep 17 00:00:00 2001 > From: Jim Meyering > Date: Fri, 4 Sep 2009 19:15:51 +0200 > Subject: [PATCH] network_conf.c: remove dead store to "err" > > * src/network_conf.c (virNetw

Re: [libvirt] merge-commit push prohibition now in place, for master

2009-09-07 Thread Daniel Veillard
On Mon, Sep 07, 2009 at 05:06:51PM +0200, Jim Meyering wrote: > Just today we noticed that it was possible to > push accidental merge commits to "master". > While the commit hook to prevent that was in place, > the config setting to enable the hook for "master" > was missing. I've just done this o

Re: [libvirt] [PATCH] xend_internal.c: Remove two dead stores to "ret"

2009-09-07 Thread Daniel Veillard
On Fri, Sep 04, 2009 at 07:14:32PM +0200, Jim Meyering wrote: > > > >From 99610dd77b95914623bd78f2bcac5d15a6c87024 Mon Sep 17 00:00:00 2001 > From: Jim Meyering > Date: Fri, 4 Sep 2009 19:14:09 +0200 > Subject: [PATCH] xend_internal.c: Remove two dead stores to "ret" > > * src/xend_internal.c (

Re: [libvirt] [PATCH] openvz_driver.c: avoid dead store to "err"

2009-09-07 Thread Daniel Veillard
On Fri, Sep 04, 2009 at 07:12:13PM +0200, Jim Meyering wrote: > > > >From 559c1ba31a89fd3a6ed54631d5d900fa16140187 Mon Sep 17 00:00:00 2001 > From: Jim Meyering > Date: Fri, 4 Sep 2009 19:11:31 +0200 > Subject: [PATCH] openvz_driver.c: avoid dead store to "err" > > * src/openvz_driver.c (openvz

Re: [libvirt] 3 more dead stores

2009-09-07 Thread Daniel Veillard
On Fri, Sep 04, 2009 at 07:08:06PM +0200, Jim Meyering wrote: > > >From 7a2202539b6445017c420644e5327ce64eaf3bac Mon Sep 17 00:00:00 2001 > From: Jim Meyering > Date: Fri, 4 Sep 2009 17:27:34 +0200 > Subject: [PATCH 1/2] domain_conf.c: remove two dead stores > > * src/domain_conf.c (virDomainSav

[libvirt] merge-commit push prohibition now in place, for master

2009-09-07 Thread Jim Meyering
Just today we noticed that it was possible to push accidental merge commits to "master". While the commit hook to prevent that was in place, the config setting to enable the hook for "master" was missing. I've just done this on the server: git --git-dir /git/libvirt.git config hooks.denymerge.m

Re: [libvirt] [PATCH 0/6] sVirt AppArmor security driver

2009-09-07 Thread Daniel Veillard
[ Sending again as my mail Sat, Sep 05, 2009 at 11:00:46AM +0200 didn't seem to have reach the list, Daniel ] On Fri, Sep 04, 2009 at 04:03:50PM -0500, Jamie Strandboge wrote: > On Fri, 04 Sep 2009, Daniel Veillard wrote: > > > On Fri, Sep 04, 2009 at 12:23:33PM -0500, Jamie Strandboge wrote: >

Re: [libvirt] Some close/fclose/closedir calls are missing

2009-09-07 Thread Daniel Veillard
On Sat, Sep 05, 2009 at 02:44:44AM +0200, Matthias Bolte wrote: > While debugging something that looked like an file descriptor leak, we > (Maximilian Wilhelm and me) found some places where > close/fclose/closedir calls are missing, mostly in error handling > if-branches. > > See attached patch.

Re: [libvirt] libvir: QEMU error : remoteDomainProcessEvent: unmarshalling msg

2009-09-07 Thread Kenneth Nagin
>Chris Lalancette wrote on 07/09/2009 17:29:10: > Chris Lalancette > 07/09/2009 17:29 > > To > > Kenneth Nagin/Haifa/i...@ibmil > > cc > > libvir-list@redhat.com > > Subject > > Re: [libvirt] libvir: QEMU error : remoteDomainProcessEvent: unmarshalling msg > > Kenneth Nagin wrote: > > I am moni

Re: [libvirt] [PATCH 0/6] sVirt AppArmor security driver

2009-09-07 Thread Chris Lalancette
Jamie Strandboge wrote: > I don't see that 'syntax-check' enforces not using *alloc, but I did > read in HACKING that *alloc are deprecated, though I had already written > the code before reading it. I do see other examples of *alloc in the > codebase, and I do properly check the return code of all

Re: [libvirt] libvir: QEMU error : remoteDomainProcessEvent: unmarshalling msg

2009-09-07 Thread Chris Lalancette
Kenneth Nagin wrote: > I am monitoring events using the example event monitor, event-test, but > remoteDomainProcessEvent is outputing an "unmarshalling msg" error > when creating a VM. > > I've installed libvirt 0.6.5. It is configured without XEN; otherwise it > is the default configuration.

[libvirt] [PATCH 10/10] Add a missing comment

2009-09-07 Thread Miloslav Trmač
... to be more consistent with other sections. * src/libvirt_private.syms: Add a missing comment. --- src/libvirt_private.syms |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 3cb707e..73a3a80 100644 --- a/src/libvi

[libvirt] [PATCH 08/10] Consolidate "cont" into qemudMonitorSendCont()

2009-09-07 Thread Miloslav Trmač
The interface allows qemudMonitorSendCont() to report errors that are not overridden by its callers. Also fix a potential infinite loop in qemuDomainCoreDump() if sending cont repeatedly fails. Changes since the fourth submission: - Replace the "error_reported" parameter by using virGetLastError(

[libvirt] [PATCH 09/10] Add support for qcow encrypted volumes to qemu.

2009-09-07 Thread Miloslav Trmač
Changes since the fourth submission: - Update for removed "error_reported" parameter to qemudMonitorSendCont() - Replace the "libvirt_internal_call" parameter of setValue() by VIR_SECRET_GET_VALUE_INTERNAL_CALL. * src/qemu_driver.c (findDomainDiskEncryption, * findVolumeQcowPassphrase, qemud

[libvirt] [PATCH 07/10] Provide missing passphrase when creating a volume.

2009-09-07 Thread Miloslav Trmač
If the element does not specify a secret during volume creation, generate a suitable secret and add it to the tag. The caller can view the updated tag using virStorageVolGetXMLDesc(). Similarly, when is specified while creating a qcow or qcow2-formatted volume, change the format to "qcow" and

[libvirt] [PATCH 06/10] Fix a pasto in storage_encryption_conf.c

2009-09-07 Thread Miloslav Trmač
* storage_encryption_conf.c: Fix a pasto in comment. --- src/storage_encryption_conf.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/storage_encryption_conf.c b/src/storage_encryption_conf.c index 7ec24af..7b9ee88 100644 --- a/src/storage_encryption_conf.c +++ b/src

[libvirt] [PATCH 05/10] Secret manipulation step 8: Add virsh commands

2009-09-07 Thread Miloslav Trmač
* src/virsh.c: Add virsh commands. * docs/virsh.pod, virsh.1: Update documentation. --- docs/virsh.pod | 43 src/virsh.c| 323 virsh.1| 34 ++- 3 files changed, 399 insertions(+), 1 deletions(-) diff --git a/do

[libvirt] [PATCH 04/10] Secret manipulation step 7: Local driver

2009-09-07 Thread Miloslav Trmač
This implementation stores the secrets in an unencrypted text file, for simplicity in implementation and debugging. (Symmetric encryption, e.g. using gpgme, will not be difficult to add. Because the TLS private key used by libvirtd is stored unencrypted, encrypting the secrets file does not curren

[libvirt] [PATCH 03/10] Add an internal XML handling API

2009-09-07 Thread Miloslav Trmač
Add a XML handling API, separate from the local driver, to avoid manually generating XML in other parts of libvirt. * src/secret_conf.c, src/secret_conf.h: New files. * po/POTFILES.in, src/Makefile.am: Add secret_conf. --- po/POTFILES.in |1 + src/Makefile.am |7 +- sr

[libvirt] [PATCH 02/10] Add VIR_SECRET_GET_VALUE_INTERNAL_CALL.

2009-09-07 Thread Miloslav Trmač
Add a VIR_SECRET_GET_VALUE_INTERNAL_CALL flag value, replacing the originally separate libvirt_internal_call parameter. The flag is used to differentiate external virSecretGetValue() calls from internal calls by libvirt drivers that need to use the secret even if it is private. * src/libvirt_inte

[libvirt] [PATCH 01/10] Add to docs

2009-09-07 Thread Miloslav Trmač
* docs/formatsecret.html.in, docs/formatsecret.html: Document , replacing stand-alone . * docs/schemas/secret.rng: Update schema to require --- docs/formatsecret.html| 19 --- docs/formatsecret.html.in | 25 - docs/schemas/secret.rng | 14 ++

[libvirt] Volume encryption missing pieces

2009-09-07 Thread Miloslav Trmač
Major changes since the previous submission: - Use one or two separate files per secret, using XML for metadata, instead of a single file for all secrets using a custom format. - Split XML handling from the local driver into secret_conf.[ch], use it when auto-generating secrets. - Use instead

[libvirt] [PATCH 2/4] Look up machine types from all domains in qemudGetOldMachines()

2009-09-07 Thread Mark McLoughlin
Rather than just looking at the default domain info, look at all domains * src/qemu_conf.c: look at all domains in qemudGetOldMachines() --- src/qemu_conf.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/qemu_conf.c b/src/qemu_conf.c index 50fbb3c..9993065

[libvirt] [PATCH 1/4] Split up qemudGetOldMachines()

2009-09-07 Thread Mark McLoughlin
We need to look at all the domain infos in guest capabilities, not just the defaults. In order to allow that, split out a qemudGetOldMachinesFromInfo() from qemudGetOldMachines(). We'll make more use of it in the next patch. * src/qemu_conf.c: split out qemudGetOldMachinesFromInfo() from qemudG

[libvirt] [PATCH 3/4] Probe machine types from kvm binary too

2009-09-07 Thread Mark McLoughlin
Currently we only probe the main qemu binary for machine types, but we should also probe the kvm binary. * src/qemu_conf.c: probe kvm binary machines in qemudCapsInitGuest() --- src/qemu_conf.c | 46 ++ 1 files changed, 38 insertions(+), 8 deletions(-

[libvirt] [PATCH 4/4] Fix formatting of machine types in capabilities XML

2009-09-07 Thread Mark McLoughlin
* src/capabilities.c: fix machine type formatting in virCapabilitiesFormatXML() --- src/capabilities.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/capabilities.c b/src/capabilities.c index 289180d..38fe7fc 100644 --- a/src/capabilities.c +++ b/src/capabilities.c

Re: [libvirt][qemu] unable to start guest under kvm

2009-09-07 Thread Mark McLoughlin
On Mon, 2009-09-07 at 14:40 +0400, Anton Protopopov wrote: > Also, what is the output of 'virsh capabilities' ? > > hvm > > 64 > /usr/bin/qemu-system-x86_64 > pc-0.11 > pc > pc-0.10 > isapc > > > > /usr/bin/kvm >

Re: [libvirt] [PATCH]: Fixed minor bugs in display and added OOM checks.

2009-09-07 Thread Chris Lalancette
Pritesh Kothari wrote: > Hi All, > > There was a minor bug in selecting the graphics type. if the graphics type > was > desktop it was assumed that display is set for it, and thus crashed on strdup, > so now checking if display is present before setting it. > > The second bug was while setting

Re: [libvirt][qemu] unable to start guest under kvm

2009-09-07 Thread Anton Protopopov
> What does 'virsh dumpxml $d | grep emulator' give? > /usr/bin/kvm Also, what is the output of 'virsh capabilities' ? > hvm 64 /usr/bin/qemu-system-x86_64 pc-0.11 pc pc-0.10 isapc /usr/bin/kvm

Re: [libvirt][qemu] unable to start guest under kvm

2009-09-07 Thread Mark McLoughlin
On Mon, 2009-09-07 at 14:07 +0400, Anton Protopopov wrote: > Hi, all. > > I have the following problem: when I creating a guest, libvirt > resolves > > to > > as provided by > http://www.mail-archive.com/libvir-list@redhat.com/msg15014.html > > When or machine="pc-0.10" ...> is set, I

Re: [libvirt] [PATCH 6/6] Try much harder to restore disk file labels

2009-09-07 Thread Daniel J Walsh
On 09/01/2009 02:20 PM, Stephen Smalley wrote: > On Tue, 2009-09-01 at 13:33 -0400, Stephen Smalley wrote: >> On Tue, 2009-09-01 at 18:10 +0100, Daniel P. Berrange wrote: >>> On Tue, Sep 01, 2009 at 01:00:13PM -0400, Stephen Smalley wrote: On Tue, 2009-09-01 at 16:28 +0100, Daniel P. Berrange

[libvirt][qemu] unable to start guest under kvm

2009-09-07 Thread Anton Protopopov
Hi, all. I have the following problem: when I creating a guest, libvirt resolves to as provided by http://www.mail-archive.com/libvir-list@redhat.com/msg15014.html When or is set, I get two following errors (which would happend is unpredictable) # virsh -c qemu:///system start $d

Re: [libvirt] Some close/fclose/closedir calls are missing

2009-09-07 Thread Chris Lalancette
Matthias Bolte wrote: > While debugging something that looked like an file descriptor leak, we > (Maximilian Wilhelm and me) found some places where > close/fclose/closedir calls are missing, mostly in error handling > if-branches. > > See attached patch. > > Max and Matthias Nice catches. ACK

[libvirt] [PATCH]: Fixed minor bugs in display and added OOM checks.

2009-09-07 Thread Pritesh Kothari
Hi All, There was a minor bug in selecting the graphics type. if the graphics type was desktop it was assumed that display is set for it, and thus crashed on strdup, so now checking if display is present before setting it. The second bug was while setting the 3d acceleration parameter, VIR_ALLOC