Re: [libvirt] Redesigning Libvirt: Adopting use of a safe language

2017-11-27 Thread Martin Kletzander
On Mon, Nov 20, 2017 at 04:57:56PM +, Daniel P. Berrange wrote: On Mon, Nov 20, 2017 at 05:36:24PM +0100, Martin Kletzander wrote: On Mon, Nov 20, 2017 at 03:25:33PM +, Daniel P. Berrange wrote: > > I shouldn't have used the word "allocation" in my paragraph above. As > you say, both

[libvirt] 答复: 答复: 答复: Help:Can libvirt restore several xen snapshots more faster at same time?

2017-11-27 Thread Chenjia (C)
Dear libvirt expert: Thanks for your replay, we are not restore from the same state file twice, only one time. we have 40 process, each process handle it's own VM and VM state file, and each process will do following things cycle: While(1) {

Re: [libvirt] 答复: Re: [PATCH v2] qemu_domain: Error out eariler when configuring IDE controller incorrectly

2017-11-27 Thread John Ferlan
On 11/19/2017 08:58 AM, Lin Ma wrote: > > John Ferlan 2017/11/10 星期五 上午 7:01 >>> >> >> >>On 10/23/2017 08:53 AM, Lin Ma wrote: >>> Move error handling of IDE controller from qemuBuildControllerDevStr to >>> qemuDomainDeviceDefValidate for reminding users eariler. >>

Re: [libvirt] [PATCH] news: Document qemu image locking

2017-11-27 Thread John Ferlan
On 11/23/2017 01:32 PM, Peter Krempa wrote: > --- > docs/news.xml | 13 + > 1 file changed, 13 insertions(+) > It's awkward to read, but I cannot think of a better way to say it. Reviewed-by: John Ferlan John -- libvir-list mailing list

[libvirt] [PATCH] audit: Log only an info message if audit_level < 2 and audit is not supported

2017-11-27 Thread Marc Hartmayer
Replace the error message during startup of libvirtd with an info message if audit_level < 2 and audit is not supported by the kernel. Audit is not supported by the current kernel if the kernel does not have audit compiled in or if audit is disabled (e.g. by the kernel cmdline). Signed-off-by:

Re: [libvirt] [PATCH v3 26/28] qemu: Require QEMU_CAPS_DEVICE_ISA_SERIAL for isa-serial

2017-11-27 Thread Pavel Hrdina
On Sun, Nov 26, 2017 at 11:25:47PM +0100, Andrea Bolognani wrote: > We should make sure the isa-serial device is available before > formatting it on the QEMU command line. > > Signed-off-by: Andrea Bolognani > --- > src/qemu/qemu_command.c | 7 +++ >

Re: [libvirt] [PATCH v3 25/28] qemu: Add QEMU_CAPS_DEVICE_ISA_SERIAL

2017-11-27 Thread Pavel Hrdina
On Sun, Nov 26, 2017 at 11:25:46PM +0100, Andrea Bolognani wrote: > All other serial devices have an associated capability. > > Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina But see my note about pl011, I'm OK with adding capability checks

Re: [libvirt] [PATCH v3 20/28] conf: Add target type and model for pl011

2017-11-27 Thread Pavel Hrdina
On Sun, Nov 26, 2017 at 11:25:41PM +0100, Andrea Bolognani wrote: > We can finally introduce a specific target model for the pl011 device > used by mach-virt guests, which means isa-serial will no longer show > up to confuse users. > > We make sure migration works in both directions by

Re: [libvirt] [PATCH v3 18/28] conf: Add target type and model for spapr-vty

2017-11-27 Thread Pavel Hrdina
On Sun, Nov 26, 2017 at 11:25:39PM +0100, Andrea Bolognani wrote: > We can finally introduce a specific target model for the spapr-vty > device used by pSeries guests, which means isa-serial will no longer > show up to confuse users. > > We make sure migration works in both directions by

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-27 Thread Paolo Bonzini
On 27/11/2017 14:44, Michal Privoznik wrote: > On 11/27/2017 12:09 PM, Paolo Bonzini wrote: >> On 24/11/2017 19:13, Michal Privoznik wrote: >>> On 11/24/2017 06:18 PM, Paolo Bonzini wrote: On 24/11/2017 18:07, Michal Privoznik wrote: > The helper is going to be daemonized (for the same

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-27 Thread Michal Privoznik
On 11/27/2017 12:09 PM, Paolo Bonzini wrote: > On 24/11/2017 19:13, Michal Privoznik wrote: >> On 11/24/2017 06:18 PM, Paolo Bonzini wrote: >>> On 24/11/2017 18:07, Michal Privoznik wrote: The helper is going to be daemonized (for the same reason that qemu process is) => there's no

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-27 Thread Paolo Bonzini
On 27/11/2017 14:35, Michal Privoznik wrote: >>> But can you also test _more_ permissions if you want? So if QEMU passed >>> to the helper a file for which it has "lock" but not "ioctl" access, >>> would it make sense for the helper to let it through? Together with the >>> socket MAC, this

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-27 Thread Michal Privoznik
On 11/27/2017 02:29 PM, Daniel P. Berrange wrote: > On Mon, Nov 27, 2017 at 02:01:06PM +0100, Paolo Bonzini wrote: >> On 27/11/2017 13:57, Daniel P. Berrange wrote: Got it. My problem here is that ioctl permission might be too strict. One use case for the helper is to bypass the ioctl

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-27 Thread Daniel P. Berrange
On Mon, Nov 27, 2017 at 02:01:06PM +0100, Paolo Bonzini wrote: > On 27/11/2017 13:57, Daniel P. Berrange wrote: > >> Got it. My problem here is that ioctl permission might be too strict. > >> One use case for the helper is to bypass the ioctl permission, and only > >> grant SCSI passthrough

Re: [libvirt] [PATCH v3 17/28] qemu: Remove redundancy in qemuBuildSerialChrDeviceStr()

2017-11-27 Thread Pavel Hrdina
On Sun, Nov 26, 2017 at 11:25:38PM +0100, Andrea Bolognani wrote: > Instead duplicating the capability check for each possible target > model, introduce a small helper that matches the target model with > the corresponding capability and collapse all existing checks into > a single one. > >

Re: [libvirt] [PATCH v3 15/28] qemu: Validate target model for serial devices

2017-11-27 Thread Pavel Hrdina
On Sun, Nov 26, 2017 at 11:25:36PM +0100, Andrea Bolognani wrote: > Target model and target type must agree for the configuration > to make sense, so check that's actually the case and error out > otherwise. > > Signed-off-by: Andrea Bolognani > --- >

Re: [libvirt] [PATCH v3 13/28] conf: Parse and format virDomainChrSerialTargetModel

2017-11-27 Thread Pavel Hrdina
On Sun, Nov 26, 2017 at 11:25:34PM +0100, Andrea Bolognani wrote: > This information will be used to select, and store in the guest > configuration in order to guarantee ABI stability, the concrete > (hypervisor-specific) model for serial devices. > > Signed-off-by: Andrea Bolognani

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-27 Thread Paolo Bonzini
On 27/11/2017 13:57, Daniel P. Berrange wrote: >> Got it. My problem here is that ioctl permission might be too strict. >> One use case for the helper is to bypass the ioctl permission, and only >> grant SCSI passthrough access for the specific case of persistent >> reservation commands. Would

Re: [libvirt] [PATCH v3 07/28] conf: Improve error handling in virDomainChrDefFormat()

2017-11-27 Thread Pavel Hrdina
On Sun, Nov 26, 2017 at 11:25:28PM +0100, Andrea Bolognani wrote: > We don't need to store the return value since we never modify it. > > Signed-off-by: Andrea Bolognani > --- > src/conf/domain_conf.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-)

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-27 Thread Paolo Bonzini
On 27/11/2017 13:18, Daniel P. Berrange wrote: > On Mon, Nov 27, 2017 at 12:51:33PM +0100, Paolo Bonzini wrote: >> On 27/11/2017 12:37, Daniel P. Berrange wrote: >>> On Mon, Nov 27, 2017 at 12:13:24PM +0100, Paolo Bonzini wrote: Hm, I see what you mean now. But it would be "just" a

Re: [libvirt] [PATCH v3 12/28] qemu: Improve qemuDomainChrTargetDefValidate()

2017-11-27 Thread Pavel Hrdina
On Sun, Nov 26, 2017 at 11:25:33PM +0100, Andrea Bolognani wrote: > Instead of validating each target type / address type combination > separately, create a small helper to perform the matching and > collapse all existing checks into a single one. > > Signed-off-by: Andrea Bolognani

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-27 Thread Daniel P. Berrange
On Mon, Nov 27, 2017 at 01:49:41PM +0100, Paolo Bonzini wrote: > On 27/11/2017 13:18, Daniel P. Berrange wrote: > > On Mon, Nov 27, 2017 at 12:51:33PM +0100, Paolo Bonzini wrote: > >> On 27/11/2017 12:37, Daniel P. Berrange wrote: > >>> On Mon, Nov 27, 2017 at 12:13:24PM +0100, Paolo Bonzini

Re: [libvirt] [PATCH v3 08/28] conf: Check virDomainChrSourceDefFormat() return value

2017-11-27 Thread Pavel Hrdina
On Sun, Nov 26, 2017 at 11:25:29PM +0100, Andrea Bolognani wrote: > The function can fail, but none of the caller were accounting > for that. > > Signed-off-by: Andrea Bolognani > --- > src/conf/domain_conf.c | 34 -- > 1 file changed, 24

Re: [libvirt] [PATCH v3 01/28] docs: Improve documentation for serial consoles

2017-11-27 Thread Pavel Hrdina
On Sun, Nov 26, 2017 at 11:25:22PM +0100, Andrea Bolognani wrote: > Our current documentation is missing some information and doesn't > do a great job at explaining how the and elements > are connected. Let's try to fix that. > > Signed-off-by: Andrea Bolognani > --- >

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-27 Thread Daniel P. Berrange
On Mon, Nov 27, 2017 at 12:51:33PM +0100, Paolo Bonzini wrote: > On 27/11/2017 12:37, Daniel P. Berrange wrote: > > On Mon, Nov 27, 2017 at 12:13:24PM +0100, Paolo Bonzini wrote: > >> Hm, I see what you mean now. But it would be "just" a qemu-pr-helper > >> bug that it trusts the caller to have

Re: [libvirt] [PATCH] s390: qemu-capabilities: Avoid error message when missing non-kvm host cpu info

2017-11-27 Thread Boris Fiuczynski
Jiri, thanks for the ack and pushing. The nits you fixed need a tiny cleanup in the textual description of the return values. I will send a patch. On 11/24/2017 04:56 PM, Jiri Denemark wrote: On Fri, Nov 24, 2017 at 09:02:02 +0100, Boris Fiuczynski wrote: From: "Jason J. Herne"

[libvirt] [PATCH] qemu-capabilities: Adjust function header comments of virQEMUCapsInitCPUModel*

2017-11-27 Thread Boris Fiuczynski
Adjust function descriptions of virQEMUCapsInitCPUModelS390 and virQEMUCapsInitCPUModel to the changes introduced with commitID 74fc32a955. Signed-off-by: Boris Fiuczynski Reviewed-by: Marc Hartmayer --- src/qemu/qemu_capabilities.c | 8

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-27 Thread Paolo Bonzini
On 27/11/2017 12:37, Daniel P. Berrange wrote: > On Mon, Nov 27, 2017 at 12:13:24PM +0100, Paolo Bonzini wrote: >> Hm, I see what you mean now. But it would be "just" a qemu-pr-helper >> bug that it trusts the caller to have "ioctl" permissions on the file >> descriptor, wouldn't it? >> >> And it

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-27 Thread Daniel P. Berrange
On Mon, Nov 27, 2017 at 12:13:24PM +0100, Paolo Bonzini wrote: > On 27/11/2017 11:59, Daniel P. Berrange wrote: > > On Mon, Nov 27, 2017 at 11:57:56AM +0100, Paolo Bonzini wrote: > >> On 27/11/2017 10:40, Daniel P. Berrange wrote: > >>> > >>> If we had one daemon per QEMU, then we would give the

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-27 Thread Paolo Bonzini
On 27/11/2017 11:59, Daniel P. Berrange wrote: > On Mon, Nov 27, 2017 at 11:57:56AM +0100, Paolo Bonzini wrote: >> On 27/11/2017 10:40, Daniel P. Berrange wrote: >>> >>> If we had one daemon per QEMU, then we would give the daemon the same >>> MCS label as QEMU. The kernel will thus enforce this

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-27 Thread Paolo Bonzini
On 24/11/2017 19:13, Michal Privoznik wrote: > On 11/24/2017 06:18 PM, Paolo Bonzini wrote: >> On 24/11/2017 18:07, Michal Privoznik wrote: >>> The helper is going to be daemonized (for the same reason >>> that qemu process is) => there's no SIGCHLD for libvirtd to receive. >> >> Couldn't (or

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-27 Thread Daniel P. Berrange
On Mon, Nov 27, 2017 at 11:57:56AM +0100, Paolo Bonzini wrote: > On 27/11/2017 10:40, Daniel P. Berrange wrote: > > > > If we had one daemon per QEMU, then we would give the daemon the same > > MCS label as QEMU. The kernel will thus enforce this label matches the > > label on the QEMU process

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-27 Thread Paolo Bonzini
On 27/11/2017 10:40, Daniel P. Berrange wrote: > > If we had one daemon per QEMU, then we would give the daemon the same > MCS label as QEMU. The kernel will thus enforce this label matches the > label on the QEMU process when it connects to the UNIX socket. The kernel > will also validate the

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-27 Thread Daniel P. Berrange
On Fri, Nov 24, 2017 at 04:42:00PM +0100, Paolo Bonzini wrote: > On 24/11/2017 15:52, Daniel P. Berrange wrote: > >> So what has been suggested so far is: > >> > >> > >> > >> > >> > >> > > without an inner element leaves libvirtd with > the choice of a daemon per QEMU, or

Re: [libvirt] [PATCH] virsh: fixing virsh prompt when connection changes to readonly mode.

2017-11-27 Thread Pavel Hrdina
On Mon, Nov 27, 2017 at 10:20:02AM +0100, Erik Skultety wrote: > On Sun, Nov 26, 2017 at 10:18:11PM -0200, Julio Faracco wrote: > > This commit, fixes the virsh prompt when reconnection to the same URI is > > called: `virsh # connect --readonly` (Reconnect). The problem is happening > > because

Re: [libvirt] [PATCH] virsh: fixing virsh prompt when connection changes to readonly mode.

2017-11-27 Thread Erik Skultety
On Sun, Nov 26, 2017 at 10:18:11PM -0200, Julio Faracco wrote: > This commit, fixes the virsh prompt when reconnection to the same URI is > called: `virsh # connect --readonly` (Reconnect). The problem is happening > because the code is considering URI (name) as a mandatory parameter to change >

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-27 Thread Peter Krempa
On Mon, Nov 27, 2017 at 07:27:17 +0100, Michal Privoznik wrote: > On 11/26/2017 09:32 AM, Peter Krempa wrote: > > On Fri, Nov 24, 2017 at 15:38:54 +0100, Michal Privoznik wrote: > >> On 08/22/2017 06:27 PM, Paolo Bonzini wrote: [...] > >> However, we want to be able to turn it on/off or not