WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Error: Device 769 (vbd) could not be connected...Limit o

To: "Zhao, Yunfeng" <yunfeng.zhao@xxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Error: Device 769 (vbd) could not be connected...Limit of 25 domains. SOLVED.
From: Thomas Karsten <thomas@xxxxxxxxxxx>
Date: Fri, 28 Jul 2006 09:58:30 +0800
Delivery-date: Thu, 27 Jul 2006 19:02:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <08B1877B2880CE42811294894F33AD5C68C3B8@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <08B1877B2880CE42811294894F33AD5C68C3B8@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Reply-to: thomas@xxxxxxxxxxx
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.8.2
Hallo,

thanks for your suggestion.

On Thursday 20 July 2006 18:15, you wrote:
> This is a known issue.
> It has been fixed in xen unstable.
> The problem is loop device is not leased after the guest destroyed.
> If execute "losetup -d /dev/loopX" in domain0, the problem will be solved 
> temporarily.

Since I have 255 loopback devices installed in my system, I am not running
out of loopback devices (because this limitation also occures when starting
the domUs for the first time).

However, after some testing I manage the handling of the loopback devices on
my own now and pass each loopback device (physical device) to Xen rather than
the image file (file backed vbd):

        for ((i=10; i < 130; i++)); do
            loop_device=$(losetup -f)
            losetup $loop_device /xen-images/guestdom1.img
            xm create /etc/xen/guestdoms \
                    name="guestdom$i" \
                    dev="phy:$loop_device,sda1,ro"
        done

This works well and it does not end up in the error message. Of course, I also
have to take care of detaching the image from each loopback device after the
guest shut down.

Using this method I am able to create up to 111 concurrent running domUs,
afterwards I get the error message "Error: (12, 'Cannot allocate memory')".
This is a known limitation caused by Xen's internal heap of 16 MB
(http://lists.xensource.com/archives/html/xen-devel/2006-04/msg00321.html).

I just wonder, why I get a problem using the file backed vbds, but why I
don't run into this problem using the physical device. I thought that Xen
internally also attaches the image file to a free loopback device. If this
was the case, then why can Xen create so many domUs when physical devices are
passed to it, but has a problem with using file backed vbd? Any ideas for
this?

By the way, I also found out that Xen will create a guest faster when passing
the physical device to it than just passing the image file.

Thanks,
Thomas

> >On Wednesday 19 July 2006 18:18, Thomas Karsten wrote:
> >> Hello,
> >>
> >> I am running Xen 3.0.2 in an Ubuntu 6.06 Linux system (kernel
> >> 2.6.16-xen). Xend is running and works well.
> >>
> >> I would like to use Xen to run about 80 domains (for testing purpose).
> >> All domains share the same image file (which therefor is mounted
> >> 'readonly' by Xen) and each domain is configured to use only 10 MB of
> >> RAM. I am using a script to generate name, hostname and IP address for
> >> each guest (it simply loops over i and calls:'xm create name=guestdom$i
> >> hostname=$i ip=192.168.1. $i').
> >>
> >> Everything works fine, but after 25 concurrent running domains Xen
> >> refuses to create any further domains, giving me the error:
> >>
> >> Error: Device 769 (vbd) could not be connected. Hotplug scripts not
> >> working.
> >>
> >> On this mailing list I found several threads dealing with this error
> >> message. However, I did not find that anybody is facing this kind of
> >> limitation that I have. For your information, the number of loopback
> >> devices in my system is 132. Also, I am not running out of memory, this
> >> would be stated by Xen (I have 1500 MB of RAM, where 500 MB are
> >> occupied by Xen).
> >>
> >> I can remove a guest domain and create a new one, this is no problem.
> >> However, on my system I am not able to create more than 25 domains at
> >> the same time. Can anybody help please?
> >>
> >> Thank you very much, all ideas are appreciated,
> >> Thomas
> >
> >_______________________________________________
> >Xen-users mailing list
> >Xen-users@xxxxxxxxxxxxxxxxxxx
> >http://lists.xensource.com/xen-users
> 

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

<Prev in Thread] Current Thread [Next in Thread>