All of lore.kernel.org
 help / color / mirror / Atom feed
* xl vs. xm, possible bug in xl
@ 2011-09-08 16:42 Sven Köhler
  2011-09-08 17:07 ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 12+ messages in thread
From: Sven Köhler @ 2011-09-08 16:42 UTC (permalink / raw)
  To: xen-devel

Hi,

xl is supposed to superseed xm, is this correct? How mature is xl,
actually? I'm asking, because the maintainers of the gentoo's xen
packages are migrating the init.d-scripts from xm to xl, but xl is
causing a lot of trouble.

Well, xl basically fails to start domains on my system.
> # xl create /etc/xen/xen-sk1
> Parsing config file /etc/xen/xen-sk1
> libxl: error: libxl.c:2145:libxl_set_memory_target new target 0 for dom0 is below the minimum threshold
> libxl: error: libxl.c:2145:libxl_set_memory_target new target 0 for dom0 is below the minimum threshold
> libxl: error: libxl.c:2145:libxl_set_memory_target new target 0 for dom0 is below the minimum threshold
> failed to free memory for the domain

Consider, that autobaloon=1 in xl.conf.
With the autobaloon=0 the errors change to

> # xl create /etc/xen/xen-sk1
> Parsing config file /etc/xen/xen-sk1
> libxl: error: libxl_device.c:476:libxl__wait_for_device_model Device Model not ready
> xl: fatal error: libxl_create.c:535, rc=-1: libxl__confirm_device_model_startup


Note, that I use dom0_mem=512M in grub.conf. Also, xm top states, that
there are 2139432k free memory. Considering the first issue, it seems
like xl is trying to baloon memory away from dom0, which fails - which
seems obvious wrong considering that I use dom0_mem. CONFIG_XEN_BALLOON
is enabled for dom0

The second issue sounds more severe, and I'm pretty clueless.

Is this a bug in xl?
Starting the very same domain with xm works without a hassle.


dom0:
vanilla 3.0.0 with vga patch
xen 4.1.1

domU config:
kernel = "/usr/src/linux-domU/_domU/vmlinux"
memory = 2048
vcpus = 8

root = "/dev/xvda1"
extra = "ro"

disk = [
	"phy:/dev/md2,xvda1,w",
	"phy:/dev/md5,xvda2,w",
]
vif = [
	"bridge=xenbr0,mac=00:16:3E:00:00:01",
	"bridge=xenbr1,mac=00:16:3E:00:01:01",
]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: xl vs. xm, possible bug in xl
  2011-09-08 16:42 xl vs. xm, possible bug in xl Sven Köhler
@ 2011-09-08 17:07 ` Konrad Rzeszutek Wilk
  2011-09-08 17:44   ` David Vrabel
  2011-09-08 22:53   ` Sven Köhler
  0 siblings, 2 replies; 12+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-09-08 17:07 UTC (permalink / raw)
  To: Sven Köhler, david.vrabel; +Cc: xen-devel

On Thu, Sep 08, 2011 at 06:42:12PM +0200, Sven Köhler wrote:
> Hi,
> 
> xl is supposed to superseed xm, is this correct? How mature is xl,
> actually? I'm asking, because the maintainers of the gentoo's xen
> packages are migrating the init.d-scripts from xm to xl, but xl is
> causing a lot of trouble.
> 
> Well, xl basically fails to start domains on my system.
> > # xl create /etc/xen/xen-sk1
> > Parsing config file /etc/xen/xen-sk1
> > libxl: error: libxl.c:2145:libxl_set_memory_target new target 0 for dom0 is below the minimum threshold
> > libxl: error: libxl.c:2145:libxl_set_memory_target new target 0 for dom0 is below the minimum threshold
> > libxl: error: libxl.c:2145:libxl_set_memory_target new target 0 for dom0 is below the minimum threshold
> > failed to free memory for the domain
> 
> Consider, that autobaloon=1 in xl.conf.
> With the autobaloon=0 the errors change to
> 
> > # xl create /etc/xen/xen-sk1
> > Parsing config file /etc/xen/xen-sk1
> > libxl: error: libxl_device.c:476:libxl__wait_for_device_model Device Model not ready
> > xl: fatal error: libxl_create.c:535, rc=-1: libxl__confirm_device_model_startup
> 
> 
> Note, that I use dom0_mem=512M in grub.conf. Also, xm top states, that
> there are 2139432k free memory. Considering the first issue, it seems
> like xl is trying to baloon memory away from dom0, which fails - which
> seems obvious wrong considering that I use dom0_mem. CONFIG_XEN_BALLOON
> is enabled for dom0

Yeah, there is a bug there (in Linux kernel) that just got integrated in 3.1-rc5.
Will show up in 3.0.5.

Hm, but the migrating memory away from dom0 seems bizzare. Lets ping
David who has been in the thick of this. I have a feeling it is the
"delta" patches ..

> 
> The second issue sounds more severe, and I'm pretty clueless.
> 
> Is this a bug in xl?

> Starting the very same domain with xm works without a hassle.
> 
> 
> dom0:
> vanilla 3.0.0 with vga patch

You could upgrade to 3.0.4 and then you get the VGA patch for free
(and some bug-fixes too).

> xen 4.1.1
> 
> domU config:
> kernel = "/usr/src/linux-domU/_domU/vmlinux"
> memory = 2048
> vcpus = 8
> 
> root = "/dev/xvda1"
> extra = "ro"
> 
> disk = [
> 	"phy:/dev/md2,xvda1,w",
> 	"phy:/dev/md5,xvda2,w",
> ]
> vif = [
> 	"bridge=xenbr0,mac=00:16:3E:00:00:01",
> 	"bridge=xenbr1,mac=00:16:3E:00:01:01",
> ]
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: xl vs. xm, possible bug in xl
  2011-09-08 17:07 ` Konrad Rzeszutek Wilk
@ 2011-09-08 17:44   ` David Vrabel
  2011-09-08 22:53   ` Sven Köhler
  1 sibling, 0 replies; 12+ messages in thread
From: David Vrabel @ 2011-09-08 17:44 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: xen-devel, Sven Köhler

On 08/09/11 18:07, Konrad Rzeszutek Wilk wrote:
> On Thu, Sep 08, 2011 at 06:42:12PM +0200, Sven Köhler wrote:
>> Hi,
>>
>> xl is supposed to superseed xm, is this correct? How mature is xl,
>> actually? I'm asking, because the maintainers of the gentoo's xen
>> packages are migrating the init.d-scripts from xm to xl, but xl is
>> causing a lot of trouble.
>>
>> Well, xl basically fails to start domains on my system.
>>> # xl create /etc/xen/xen-sk1
>>> Parsing config file /etc/xen/xen-sk1
>>> libxl: error: libxl.c:2145:libxl_set_memory_target new target 0 for dom0 is below the minimum threshold
>>> libxl: error: libxl.c:2145:libxl_set_memory_target new target 0 for dom0 is below the minimum threshold
>>> libxl: error: libxl.c:2145:libxl_set_memory_target new target 0 for dom0 is below the minimum threshold
>>> failed to free memory for the domain
>>
>> Consider, that autobaloon=1 in xl.conf.
>> With the autobaloon=0 the errors change to
>>
>>> # xl create /etc/xen/xen-sk1
>>> Parsing config file /etc/xen/xen-sk1
>>> libxl: error: libxl_device.c:476:libxl__wait_for_device_model Device Model not ready
>>> xl: fatal error: libxl_create.c:535, rc=-1: libxl__confirm_device_model_startup
>>
>>
>> Note, that I use dom0_mem=512M in grub.conf. Also, xm top states, that
>> there are 2139432k free memory. Considering the first issue, it seems
>> like xl is trying to baloon memory away from dom0, which fails - which
>> seems obvious wrong considering that I use dom0_mem. CONFIG_XEN_BALLOON
>> is enabled for dom0
> 
> Yeah, there is a bug there (in Linux kernel) that just got integrated in 3.1-rc5.
> Will show up in 3.0.5.
> 
> Hm, but the migrating memory away from dom0 seems bizzare. Lets ping
> David who has been in the thick of this. I have a feeling it is the
> "delta" patches ..

This patch:

http://lists.xensource.com/archives/html/xen-devel/2011-08/msg00813.html

is only relevant if the initial number of pages overlaps with gaps in
the memory map (typically more than 3 GB).  With dom0_mem=512M you
shouldn't be hitting this. So I don't think any of the patches in that
series are relevant here (but you could give them a try anyway).

>> The second issue sounds more severe, and I'm pretty clueless.
>>
>> Is this a bug in xl?
> 
>> Starting the very same domain with xm works without a hassle.
>>
>>
>> dom0:
>> vanilla 3.0.0 with vga patch
> 
> You could upgrade to 3.0.4 and then you get the VGA patch for free
> (and some bug-fixes too).
> 
>> xen 4.1.1
>>
>> domU config:
>> kernel = "/usr/src/linux-domU/_domU/vmlinux"
>> memory = 2048
>> vcpus = 8
>>
>> root = "/dev/xvda1"
>> extra = "ro"
>>
>> disk = [
>> 	"phy:/dev/md2,xvda1,w",
>> 	"phy:/dev/md5,xvda2,w",
>> ]
>> vif = [
>> 	"bridge=xenbr0,mac=00:16:3E:00:00:01",
>> 	"bridge=xenbr1,mac=00:16:3E:00:01:01",
>> ]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: xl vs. xm, possible bug in xl
  2011-09-08 17:07 ` Konrad Rzeszutek Wilk
  2011-09-08 17:44   ` David Vrabel
@ 2011-09-08 22:53   ` Sven Köhler
  2011-09-09 11:27     ` Stefano Stabellini
  1 sibling, 1 reply; 12+ messages in thread
From: Sven Köhler @ 2011-09-08 22:53 UTC (permalink / raw)
  To: xen-devel



Am 08.09.2011 19:07, schrieb Konrad Rzeszutek Wilk:
> On Thu, Sep 08, 2011 at 06:42:12PM +0200, Sven Köhler wrote:
>> Hi,
>>
>> xl is supposed to superseed xm, is this correct? How mature is xl,
>> actually? I'm asking, because the maintainers of the gentoo's xen
>> packages are migrating the init.d-scripts from xm to xl, but xl is
>> causing a lot of trouble.
>>
>> Well, xl basically fails to start domains on my system.
>>> # xl create /etc/xen/xen-sk1
>>> Parsing config file /etc/xen/xen-sk1
>>> libxl: error: libxl.c:2145:libxl_set_memory_target new target 0 for dom0 is below the minimum threshold
>>> libxl: error: libxl.c:2145:libxl_set_memory_target new target 0 for dom0 is below the minimum threshold
>>> libxl: error: libxl.c:2145:libxl_set_memory_target new target 0 for dom0 is below the minimum threshold
>>> failed to free memory for the domain
>>
>> Consider, that autobaloon=1 in xl.conf.
>> With the autobaloon=0 the errors change to
>>
>>> # xl create /etc/xen/xen-sk1
>>> Parsing config file /etc/xen/xen-sk1
>>> libxl: error: libxl_device.c:476:libxl__wait_for_device_model Device Model not ready
>>> xl: fatal error: libxl_create.c:535, rc=-1: libxl__confirm_device_model_startup
>>
>>
>> Note, that I use dom0_mem=512M in grub.conf. Also, xm top states, that
>> there are 2139432k free memory. Considering the first issue, it seems
>> like xl is trying to baloon memory away from dom0, which fails - which
>> seems obvious wrong considering that I use dom0_mem. CONFIG_XEN_BALLOON
>> is enabled for dom0
> 
> Yeah, there is a bug there (in Linux kernel) that just got integrated in 3.1-rc5.
> Will show up in 3.0.5.

A bug will show up in 3.0.5/3.1-rc5 or the fix for it?

Also, you seem to be replying to the first problem, the on about memory.

Any clue, that the second problem is about?
> # xl create /etc/xen/xen-sk1
> Parsing config file /etc/xen/xen-sk1
> libxl: error: libxl_device.c:476:libxl__wait_for_device_model Device Model not ready
> xl: fatal error: libxl_create.c:535, rc=-1: libxl__confirm_device_model_startup


>> dom0:
>> vanilla 3.0.0 with vga patch
> 
> You could upgrade to 3.0.4 and then you get the VGA patch for free
> (and some bug-fixes too).

Done. No improvement.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: xl vs. xm, possible bug in xl
  2011-09-09 11:27     ` Stefano Stabellini
@ 2011-09-09 11:27       ` Sven Köhler
  2011-09-09 12:05         ` Stefano Stabellini
  0 siblings, 1 reply; 12+ messages in thread
From: Sven Köhler @ 2011-09-09 11:27 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1237 bytes --]

Am 09.09.2011 13:27, schrieb Stefano Stabellini:
>> Any clue, that the second problem is about?
>>> # xl create /etc/xen/xen-sk1
>>> Parsing config file /etc/xen/xen-sk1
>>> libxl: error: libxl_device.c:476:libxl__wait_for_device_model Device Model not ready
>>> xl: fatal error: libxl_create.c:535, rc=-1: libxl__confirm_device_model_startup
> 
> That means that qemu failed to start. Could you please cat
> /var/log/xen/qemu-dm-domainname.log?

There is no such file (my domain config lacks a name="something" line).
However qemu-dm-test.log does exist and is of recent date, and it says
that qemu cannot be started. This is very plausible, since qemu is not
even installed. This machine is supposed to start paravirt guests only.
And xen has been compiled without support for hvm guests. (Not sure
right now, what the gentoo people do to disable support support for hvm
guests).

Does my config file for the domain (see one of my previous emails in
this thread) indicate, that the machine is a hvm domain? How can I tell
xl that this a paravirt domain, and qemu is not needed and should not be
used?

(As previously mentioned, xm works just fine with the very same domain
config file)


Regards,
  Sven


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: xl vs. xm, possible bug in xl
  2011-09-08 22:53   ` Sven Köhler
@ 2011-09-09 11:27     ` Stefano Stabellini
  2011-09-09 11:27       ` Sven Köhler
  0 siblings, 1 reply; 12+ messages in thread
From: Stefano Stabellini @ 2011-09-09 11:27 UTC (permalink / raw)
  To: Sven Köhler; +Cc: xen-devel

[-- Attachment #1: Type: text/plain, Size: 2282 bytes --]

On Thu, 8 Sep 2011, Sven Köhler wrote:
> Am 08.09.2011 19:07, schrieb Konrad Rzeszutek Wilk:
> > On Thu, Sep 08, 2011 at 06:42:12PM +0200, Sven Köhler wrote:
> >> Hi,
> >>
> >> xl is supposed to superseed xm, is this correct? How mature is xl,
> >> actually? I'm asking, because the maintainers of the gentoo's xen
> >> packages are migrating the init.d-scripts from xm to xl, but xl is
> >> causing a lot of trouble.
> >>
> >> Well, xl basically fails to start domains on my system.
> >>> # xl create /etc/xen/xen-sk1
> >>> Parsing config file /etc/xen/xen-sk1
> >>> libxl: error: libxl.c:2145:libxl_set_memory_target new target 0 for dom0 is below the minimum threshold
> >>> libxl: error: libxl.c:2145:libxl_set_memory_target new target 0 for dom0 is below the minimum threshold
> >>> libxl: error: libxl.c:2145:libxl_set_memory_target new target 0 for dom0 is below the minimum threshold
> >>> failed to free memory for the domain
> >>
> >> Consider, that autobaloon=1 in xl.conf.
> >> With the autobaloon=0 the errors change to
> >>
> >>> # xl create /etc/xen/xen-sk1
> >>> Parsing config file /etc/xen/xen-sk1
> >>> libxl: error: libxl_device.c:476:libxl__wait_for_device_model Device Model not ready
> >>> xl: fatal error: libxl_create.c:535, rc=-1: libxl__confirm_device_model_startup
> >>
> >>
> >> Note, that I use dom0_mem=512M in grub.conf. Also, xm top states, that
> >> there are 2139432k free memory. Considering the first issue, it seems
> >> like xl is trying to baloon memory away from dom0, which fails - which
> >> seems obvious wrong considering that I use dom0_mem. CONFIG_XEN_BALLOON
> >> is enabled for dom0
> > 
> > Yeah, there is a bug there (in Linux kernel) that just got integrated in 3.1-rc5.
> > Will show up in 3.0.5.
> 
> A bug will show up in 3.0.5/3.1-rc5 or the fix for it?
> 
> Also, you seem to be replying to the first problem, the on about memory.
> 
> Any clue, that the second problem is about?
> > # xl create /etc/xen/xen-sk1
> > Parsing config file /etc/xen/xen-sk1
> > libxl: error: libxl_device.c:476:libxl__wait_for_device_model Device Model not ready
> > xl: fatal error: libxl_create.c:535, rc=-1: libxl__confirm_device_model_startup

That means that qemu failed to start. Could you please cat
/var/log/xen/qemu-dm-domainname.log?

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: xl vs. xm, possible bug in xl
  2011-09-09 11:27       ` Sven Köhler
@ 2011-09-09 12:05         ` Stefano Stabellini
  2011-09-09 12:06           ` Stefano Stabellini
  2011-09-09 12:43           ` Sven Köhler
  0 siblings, 2 replies; 12+ messages in thread
From: Stefano Stabellini @ 2011-09-09 12:05 UTC (permalink / raw)
  To: Sven Köhler; +Cc: xen-devel, Stefano Stabellini

[-- Attachment #1: Type: text/plain, Size: 3079 bytes --]

On Fri, 9 Sep 2011, Sven Köhler wrote:
> Am 09.09.2011 13:27, schrieb Stefano Stabellini:
> >> Any clue, that the second problem is about?
> >>> # xl create /etc/xen/xen-sk1
> >>> Parsing config file /etc/xen/xen-sk1
> >>> libxl: error: libxl_device.c:476:libxl__wait_for_device_model Device Model not ready
> >>> xl: fatal error: libxl_create.c:535, rc=-1: libxl__confirm_device_model_startup
> > 
> > That means that qemu failed to start. Could you please cat
> > /var/log/xen/qemu-dm-domainname.log?
> 
> There is no such file (my domain config lacks a name="something" line).
> However qemu-dm-test.log does exist and is of recent date, and it says
> that qemu cannot be started. This is very plausible, since qemu is not
> even installed. This machine is supposed to start paravirt guests only.
> And xen has been compiled without support for hvm guests. (Not sure
> right now, what the gentoo people do to disable support support for hvm
> guests).
> 
> Does my config file for the domain (see one of my previous emails in
> this thread) indicate, that the machine is a hvm domain? How can I tell
> xl that this a paravirt domain, and qemu is not needed and should not be
> used?

I think I have found the issue: if blktap2 is not enabled xl is going to
start qemu (to provide a disk backend) even if it is not actually needed
because the user wants to use blkback.

We have a patch upstream to fix this issue but it hasn't been backported
to 4.1:



# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1300213187 0
# Node ID d4ca456c0c25c3c3daedc216c657296f2895482a
# Parent  3caed2112c65791855e8bf0fd34c15e3160bbc78
libxl: do not start a xenpv qemu solely for tap devices if blktap is available

qemu is used as a fallback for DISK_BACKEND_TAP if no blktap is
available but if blktap is available, or for DISK_BACKEND_PHY, we
don't need a qemu process.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>

diff -r 3caed2112c65 -r d4ca456c0c25 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c	Tue Mar 15 10:14:27 2011 +0000
+++ b/tools/libxl/libxl_dm.c	Tue Mar 15 18:19:47 2011 +0000
@@ -828,8 +828,29 @@ int libxl__need_xenpv_qemu(libxl_ctx *ct
         goto out;
     }
 
-    if (nr_disks > 0 && !libxl__blktap_enabled(&gc))
-        ret = 1;
+    if (nr_disks > 0) {
+        int blktap_enabled = -1;
+        for (i = 0; i < nr_disks; i++) {
+            switch (disks[i].backend) {
+            case DISK_BACKEND_TAP:
+                if (blktap_enabled == -1)
+                    blktap_enabled = libxl__blktap_enabled(&gc);
+                if (!blktap_enabled) {
+                    ret = 1;
+                    goto out;
+                }
+                break;
+
+            case DISK_BACKEND_QDISK:
+                ret = 1;
+                goto out;
+
+            case DISK_BACKEND_PHY:
+            case DISK_BACKEND_UNKNOWN:
+                break;
+            }
+        }
+    }
 
 out:
     LIbxl__free_all(&gc);

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: xl vs. xm, possible bug in xl
  2011-09-09 12:05         ` Stefano Stabellini
@ 2011-09-09 12:06           ` Stefano Stabellini
  2011-09-09 12:43           ` Sven Köhler
  1 sibling, 0 replies; 12+ messages in thread
From: Stefano Stabellini @ 2011-09-09 12:06 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: xen-devel, Sven Köhler

[-- Attachment #1: Type: text/plain, Size: 3342 bytes --]

CC'ing IanJ to make sure he is going to read this

On Fri, 9 Sep 2011, Stefano Stabellini wrote:
> On Fri, 9 Sep 2011, Sven Köhler wrote:
> > Am 09.09.2011 13:27, schrieb Stefano Stabellini:
> > >> Any clue, that the second problem is about?
> > >>> # xl create /etc/xen/xen-sk1
> > >>> Parsing config file /etc/xen/xen-sk1
> > >>> libxl: error: libxl_device.c:476:libxl__wait_for_device_model Device Model not ready
> > >>> xl: fatal error: libxl_create.c:535, rc=-1: libxl__confirm_device_model_startup
> > > 
> > > That means that qemu failed to start. Could you please cat
> > > /var/log/xen/qemu-dm-domainname.log?
> > 
> > There is no such file (my domain config lacks a name="something" line).
> > However qemu-dm-test.log does exist and is of recent date, and it says
> > that qemu cannot be started. This is very plausible, since qemu is not
> > even installed. This machine is supposed to start paravirt guests only.
> > And xen has been compiled without support for hvm guests. (Not sure
> > right now, what the gentoo people do to disable support support for hvm
> > guests).
> > 
> > Does my config file for the domain (see one of my previous emails in
> > this thread) indicate, that the machine is a hvm domain? How can I tell
> > xl that this a paravirt domain, and qemu is not needed and should not be
> > used?
> 
> I think I have found the issue: if blktap2 is not enabled xl is going to
> start qemu (to provide a disk backend) even if it is not actually needed
> because the user wants to use blkback.
> 
> We have a patch upstream to fix this issue but it hasn't been backported
> to 4.1:
> 
> 
> 
> # HG changeset patch
> # User Ian Campbell <ian.campbell@citrix.com>
> # Date 1300213187 0
> # Node ID d4ca456c0c25c3c3daedc216c657296f2895482a
> # Parent  3caed2112c65791855e8bf0fd34c15e3160bbc78
> libxl: do not start a xenpv qemu solely for tap devices if blktap is available
> 
> qemu is used as a fallback for DISK_BACKEND_TAP if no blktap is
> available but if blktap is available, or for DISK_BACKEND_PHY, we
> don't need a qemu process.
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
> 
> diff -r 3caed2112c65 -r d4ca456c0c25 tools/libxl/libxl_dm.c
> --- a/tools/libxl/libxl_dm.c	Tue Mar 15 10:14:27 2011 +0000
> +++ b/tools/libxl/libxl_dm.c	Tue Mar 15 18:19:47 2011 +0000
> @@ -828,8 +828,29 @@ int libxl__need_xenpv_qemu(libxl_ctx *ct
>          goto out;
>      }
>  
> -    if (nr_disks > 0 && !libxl__blktap_enabled(&gc))
> -        ret = 1;
> +    if (nr_disks > 0) {
> +        int blktap_enabled = -1;
> +        for (i = 0; i < nr_disks; i++) {
> +            switch (disks[i].backend) {
> +            case DISK_BACKEND_TAP:
> +                if (blktap_enabled == -1)
> +                    blktap_enabled = libxl__blktap_enabled(&gc);
> +                if (!blktap_enabled) {
> +                    ret = 1;
> +                    goto out;
> +                }
> +                break;
> +
> +            case DISK_BACKEND_QDISK:
> +                ret = 1;
> +                goto out;
> +
> +            case DISK_BACKEND_PHY:
> +            case DISK_BACKEND_UNKNOWN:
> +                break;
> +            }
> +        }
> +    }
>  
>  out:
>      LIbxl__free_all(&gc);

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: xl vs. xm, possible bug in xl
  2011-09-09 12:05         ` Stefano Stabellini
  2011-09-09 12:06           ` Stefano Stabellini
@ 2011-09-09 12:43           ` Sven Köhler
  2011-09-09 12:54             ` Stefano Stabellini
  1 sibling, 1 reply; 12+ messages in thread
From: Sven Köhler @ 2011-09-09 12:43 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1699 bytes --]

Am 09.09.2011 14:05, schrieb Stefano Stabellini:
> On Fri, 9 Sep 2011, Sven Köhler wrote:
>> Am 09.09.2011 13:27, schrieb Stefano Stabellini:
>>>> Any clue, that the second problem is about?
>>>>> # xl create /etc/xen/xen-sk1
>>>>> Parsing config file /etc/xen/xen-sk1
>>>>> libxl: error: libxl_device.c:476:libxl__wait_for_device_model Device Model not ready
>>>>> xl: fatal error: libxl_create.c:535, rc=-1: libxl__confirm_device_model_startup
>>>
>>> That means that qemu failed to start. Could you please cat
>>> /var/log/xen/qemu-dm-domainname.log?
>>
>> There is no such file (my domain config lacks a name="something" line).
>> However qemu-dm-test.log does exist and is of recent date, and it says
>> that qemu cannot be started. This is very plausible, since qemu is not
>> even installed. This machine is supposed to start paravirt guests only.
>> And xen has been compiled without support for hvm guests. (Not sure
>> right now, what the gentoo people do to disable support support for hvm
>> guests).
>>
>> Does my config file for the domain (see one of my previous emails in
>> this thread) indicate, that the machine is a hvm domain? How can I tell
>> xl that this a paravirt domain, and qemu is not needed and should not be
>> used?
> 
> I think I have found the issue: if blktap2 is not enabled xl is going to
> start qemu (to provide a disk backend) even if it is not actually needed
> because the user wants to use blkback.
> 
> We have a patch upstream to fix this issue but it hasn't been backported
> to 4.1:

Thanks, sounds like this will fix my problem.

Is there any chance that this is going to be in 4.1.2 final?


Regards,
  Sven


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: xl vs. xm, possible bug in xl
  2011-09-09 12:43           ` Sven Köhler
@ 2011-09-09 12:54             ` Stefano Stabellini
  2011-09-09 14:16               ` Ian Campbell
  0 siblings, 1 reply; 12+ messages in thread
From: Stefano Stabellini @ 2011-09-09 12:54 UTC (permalink / raw)
  To: Sven Köhler; +Cc: Ian Jackson, xen-devel, Keir Fraser, Stefano Stabellini

[-- Attachment #1: Type: text/plain, Size: 1772 bytes --]

On Fri, 9 Sep 2011, Sven Köhler wrote:
> Am 09.09.2011 14:05, schrieb Stefano Stabellini:
> > On Fri, 9 Sep 2011, Sven Köhler wrote:
> >> Am 09.09.2011 13:27, schrieb Stefano Stabellini:
> >>>> Any clue, that the second problem is about?
> >>>>> # xl create /etc/xen/xen-sk1
> >>>>> Parsing config file /etc/xen/xen-sk1
> >>>>> libxl: error: libxl_device.c:476:libxl__wait_for_device_model Device Model not ready
> >>>>> xl: fatal error: libxl_create.c:535, rc=-1: libxl__confirm_device_model_startup
> >>>
> >>> That means that qemu failed to start. Could you please cat
> >>> /var/log/xen/qemu-dm-domainname.log?
> >>
> >> There is no such file (my domain config lacks a name="something" line).
> >> However qemu-dm-test.log does exist and is of recent date, and it says
> >> that qemu cannot be started. This is very plausible, since qemu is not
> >> even installed. This machine is supposed to start paravirt guests only.
> >> And xen has been compiled without support for hvm guests. (Not sure
> >> right now, what the gentoo people do to disable support support for hvm
> >> guests).
> >>
> >> Does my config file for the domain (see one of my previous emails in
> >> this thread) indicate, that the machine is a hvm domain? How can I tell
> >> xl that this a paravirt domain, and qemu is not needed and should not be
> >> used?
> > 
> > I think I have found the issue: if blktap2 is not enabled xl is going to
> > start qemu (to provide a disk backend) even if it is not actually needed
> > because the user wants to use blkback.
> > 
> > We have a patch upstream to fix this issue but it hasn't been backported
> > to 4.1:
> 
> Thanks, sounds like this will fix my problem.
> 
> Is there any chance that this is going to be in 4.1.2 final?

I think it should be!

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: xl vs. xm, possible bug in xl
  2011-09-09 12:54             ` Stefano Stabellini
@ 2011-09-09 14:16               ` Ian Campbell
       [not found]                 ` <alpine.DEB.2.00.1109091307080.12963@kaball-desktop>
  0 siblings, 1 reply; 12+ messages in thread
From: Ian Campbell @ 2011-09-09 14:16 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: Keir Fraser, xen-devel, Ian Jackson, Sven Köhler

On Fri, 2011-09-09 at 08:54 -0400, Stefano Stabellini wrote:
> > > We have a patch upstream to fix this issue but it hasn't been backported
> > > to 4.1:
> > 
> > Thanks, sounds like this will fix my problem.
> > 
> > Is there any chance that this is going to be in 4.1.2 final?
> 
> I think it should be!

Ack!

I'm sure I asked for it before, must've fallen through the cracks.

Ian.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: xl vs. xm, possible bug in xl (fwd) [and 1 more messages]
       [not found]                 ` <alpine.DEB.2.00.1109091307080.12963@kaball-desktop>
@ 2011-09-21 16:13                   ` Ian Jackson
  0 siblings, 0 replies; 12+ messages in thread
From: Ian Jackson @ 2011-09-21 16:13 UTC (permalink / raw)
  To: Ian Campbell, Stefano Stabellini; +Cc: xen-devel, Keir Fraser, Sven Köhler

Stefano Stabellini writes ("Re: [Xen-devel] Re: xl vs. xm, possible bug in xl (fwd)"):
> I think I have found the issue: if blktap2 is not enabled xl is going to
> start qemu (to provide a disk backend) even if it is not actually needed
> because the user wants to use blkback.
> 
> We have a patch upstream to fix this issue but it hasn't been backported
> to 4.1:

Thanks, I have applied it to 4.1.

Ian.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-09-21 16:13 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-08 16:42 xl vs. xm, possible bug in xl Sven Köhler
2011-09-08 17:07 ` Konrad Rzeszutek Wilk
2011-09-08 17:44   ` David Vrabel
2011-09-08 22:53   ` Sven Köhler
2011-09-09 11:27     ` Stefano Stabellini
2011-09-09 11:27       ` Sven Köhler
2011-09-09 12:05         ` Stefano Stabellini
2011-09-09 12:06           ` Stefano Stabellini
2011-09-09 12:43           ` Sven Köhler
2011-09-09 12:54             ` Stefano Stabellini
2011-09-09 14:16               ` Ian Campbell
     [not found]                 ` <alpine.DEB.2.00.1109091307080.12963@kaball-desktop>
2011-09-21 16:13                   ` Re: xl vs. xm, possible bug in xl (fwd) [and 1 more messages] Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.