X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 3AB0EDC199C for ; Fri, 28 Sep 2012 11:39:22 +0000 (UTC) Received: by bkcjf20 with SMTP id jf20so2371377bkc.13 for ; Fri, 28 Sep 2012 04:39:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=gGWsmdXMzOe2KqxKs5iA7uzbqzCgX7ZGKAyY7ael+mk=; b=LYE60hh/JGM8j6jxg/88rviqG36i8XNxtVbx3Kpayt8sElwIg64IgmXb1kq1pAgWVV Ewx5F7bnRK3+JF4/woeyRCHCtoNgjsDe5MmmHC0gKyizFfip3IdzhQRiQw9a7t8KquTG A1oRopVJ7NKKhMwF4ZibKudcehxJA0OoP/OgOnyBZ76atLutSYZ1BQ9AlT+vEMP2xoBT 88r2BdgS6JnbSPJVyhNLYPwGiPMvgeQPKu1Eq6pFgAXOPY1bwhgRKH9k61et1iOnqmxX HqhBWqBU/Avl45fKChqZKKhOF896OolIqAC/4kIKHYREHa+eXdzkOc5f8iDBt6ulCG6w Z87w== X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Received: by 10.152.135.41 with SMTP id pp9mr5816092lab.7.1348832361449; Fri, 28 Sep 2012 04:39:21 -0700 (PDT) Sender: royger@gmail.com Received: by 10.114.0.20 with HTTP; Fri, 28 Sep 2012 04:39:21 -0700 (PDT) Received: by 10.114.0.20 with HTTP; Fri, 28 Sep 2012 04:39:21 -0700 (PDT) In-Reply-To: <1348830659.21090.19.camel@df1844j> References: <1348823298.21090.14.camel@df1844j> <50656E8C.6070206@citrix.com> <1348830659.21090.19.camel@df1844j> Date: Fri, 28 Sep 2012 12:39:21 +0100 X-Google-Sender-Auth: TSkePYV7P-K-jKvmh5qta1Hcyxs Message-ID: Subject: Re: [alpine-devel] Xen: first experiments From: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= To: Leonardo Cc: Alpine Development , Roger Pau Monne Content-Type: multipart/alternative; boundary=f46d044270cac4090d04cac1817d --f46d044270cac4090d04cac1817d Content-Type: text/plain; charset=UTF-8 On 28 Sep 2012 12:11, "Leonardo" wrote: > > On Fri, 2012-09-28 at 10:31 +0100, Roger Pau Monne wrote: > > Leonardo wrote: > > > > Hello! > > > > Thanks for trying Xen with Alpine! > > > > > Hi, > > > > > > I've just started to play with alpine-xen-2.4.5-x86_64 iso + libvirt, > > > and I've hit the first issues. > > > > > > So far I've followed http://wiki.alpinelinux.org/wiki/Xen_LiveCD, setup > > > my local storage, installed and started libvirt. > > > > So I assume you are running it from RAM? If you are interested in this > > kind of setup, I would recommend that you create a new ISO/USB with the > > dom0_mem command line option [1], something like dom0_mem=512M or maybe > > dom0_mem=1024M, since you seem to have quite a lot of memory. This will > > prevent errors from the ballon driver, which as far as I know can be a > > little slow and I'm not sure if it plays well with ramfs. > > I've added "dom0_mem=512M,max:512M" and this fixed the problem. If you set the "max" to the same value there's no need to use it, just use dom0_mem=512M. Sorry if the reply is mangled, I'm on my mobile phone now. > > > > > Could you also paste the output from `free -m` and `df -h`? > > # free -m > total used free shared buffers > Mem: 425 252 172 0 3 > -/+ buffers: 249 175 > Swap: 0 0 0 > > # df -h > Filesystem Size Used Available Use% Mounted on > mdev 1.0M 0 1.0M 0% /dev > shm 212.8M 0 212.8M 0% /dev/shm > /dev/usbdisk 3.7G 105.9M 3.6G 3% /media/usb > tmpfs 212.8M 115.5M 97.3M 54% / > tmpfs 212.8M 176.0K 212.6M 0% /run > rc-svcdir 1.0M 72.0K 952.0K 7% /lib/rc/init.d > cgroup_root 10.0M 0 10.0M 0% /sys/fs/cgroup > /dev/loop0 46.1M 46.1M 0 100% /.modloop > /dev/sda2 68.1G 1.4G 63.4G 2% /var > > > > > > Anyway, I would recommend making sure that everything works with xl, and > > then try to use libvirt (I've never used it, so I'm not sure of how well > > it works). > > Yeah. That's why I want to use "xl". And I'm also interested in fixing > libvirt. If you want to fix libvirt I wold recommend using edge with Xen 4.2, that introduced libxl API changes. I don't know if someone already ported libvirt to that version, but the 4.2 API is going to be the stable one, so there won't be a need to change libvirt for every Xen release. > > > > > When creating a new domain via libvirt, it reports this error: > > > > > > xc: detail: Failed allocation for dom 2: 2048 extents of order 0 > > > xc: error: Could not allocate memory for HVM guest. (16 = Device or > > > resource busy): Internal error > > > > > > Googling around I've found this: > > > > > > "Sufficient memory was not reserved for fully virtualized guests when > > > creating new guests. Memory listed as available by the xm info command > > > could not be fully allocated to the guest. When attempting create a > > > fully virtualized guest with more than or equal to the maximum available > > > memory value, the following error message would appear: > > > Error: (1, 'Internal error', 'Could not allocate memory for HVM guest.\n (16 = Device or resource busy)') > > > This issue has been resolved by improving the memory balloon driver to > > > correctly allocate memory for fully virtualized guests and fully > > > virtualized guests using the Intel VT-d extensions for PCI passthrough. > > > (BZ#512041)" > > > > > > (from http://www.centos.org/docs/5/html/5.5/Technical_Notes/xen.html > > > ) > > > > > > This is what "xl info" reports: > > > > > > kvbn1:~# xl info > > > host : kvbn1 > > > release : 3.3.8-grsec > > > version : #4-Alpine SMP Tue Jul 17 13:08:00 UTC 2012 > > > machine : x86_64 > > > nr_cpus : 8 > > > nr_nodes : 2 > > > cores_per_socket : 4 > > > threads_per_core : 1 > > > cpu_mhz : 2128 > > > hw_caps : > > > bfebfbff:28100800:00000000:00003b40:009ce3bd:00000000:00000001:00000000 > > > virt_caps : hvm hvm_directio > > > total_memory : 8179 > > > free_memory : 909 > > > free_cpus : 0 > > > xen_major : 4 > > > xen_minor : 1 > > > xen_extra : .2 > > > xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 > > > hvm-3.0-x86_32p hvm-3.0-x86_64 > > > xen_scheduler : credit > > > xen_pagesize : 4096 > > > platform_params : virt_start=0xffff800000000000 > > > xen_changeset : unavailable > > > xen_commandline : > > > cc_compiler : gcc version 4.6.3 (Alpine 4.6.3-r0) > > > cc_compile_by : buildozer > > > cc_compile_domain : alpinelinux.org > > > cc_compile_date : Fri Jun 22 14:59:04 UTC 2012 > > > xend_config_format : 4 > > > > > > > > > I'd like also to try creating a domain without libvirt, and I tried > > > following this http://wiki.xen.org/wiki/Xen_Beginners_Guide. However I > > > cannot find on Alpine a xen-tools package to run "xen-create-image", for > > > creating a config file to feed to "xl" in order to create a domain. > > > > xen-create-image is a Debian tool, which is not present in Alpine. If > > you wish, you can try creating a Alpine Linux DomU [2] or a Debian DomU > > with NetInstall [3]. > > Sorry, I've missed the wiki doc about AL PV DomU. > > Thank you! > > - leonardo --f46d044270cac4090d04cac1817d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On 28 Sep 2012 12:11, "Leonardo" <rnalrd@gmail.com> wrote:
>
> On Fri, 2012-09-28 at 10:31 +0100, Roger Pau Monne wrote:
> > Leonardo wrote:
> >
> > Hello!
> >
> > Thanks for trying Xen with Alpine!
> >
> > > Hi,
> > >
> > > I've just started to play with alpine-xen-2.4.5-x86_64 i= so + libvirt,
> > > and I've hit the first issues.
> > >
> > > So far I've followed http://wiki.alpinelinux.org/wiki/Xen_LiveCD, setup=
> > > my local storage, installed and started libvirt.
> >
> > So I assume you are running it from RAM? If you are interested in= this
> > kind of setup, I would recommend that you create a new ISO/USB wi= th the
> > dom0_mem command line option [1], something like dom0_mem=3D512M = or maybe
> > dom0_mem=3D1024M, since you seem to have quite a lot of memory. T= his will
> > prevent errors from the ballon driver, which as far as I know can= be a
> > little slow and I'm not sure if it plays well with ramfs.
>
> I've added "dom0_mem=3D512M,max:512M" and this fixed the= problem.

If you set the "max" to the same value there's no need to = use it, just use dom0_mem=3D512M. Sorry if the reply is mangled, I'm on= my mobile phone now.

>
> >
> > Could you also paste the output from `free -m` and `df -h`?
>
> # free -m
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0total =C2=A0 =C2=A0 = =C2=A0 =C2=A0 used =C2=A0 =C2=A0 =C2=A0 =C2=A0 free =C2=A0 =C2=A0 =C2=A0 sh= ared =C2=A0 =C2=A0 =C2=A0buffers
> Mem: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 425 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0252 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0172 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A00 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A03
> -/+ buffers: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A024= 9 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0175
> Swap: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A00 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00
>
> # df -h
> Filesystem =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Size= =C2=A0 =C2=A0 =C2=A0Used Available Use% Mounted on
> mdev =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A01.0M =C2=A0 =C2=A0 =C2=A0 =C2=A0 0 =C2=A0 =C2=A0 =C2=A01.0M = =C2=A0 0% /dev
> shm =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 212.8M =C2=A0 =C2=A0 =C2=A0 =C2=A0 0 =C2=A0 =C2=A0212.8M =C2=A0 0% /dev= /shm
> /dev/usbdisk =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A03.7G =C2= =A0 =C2=A0105.9M =C2=A0 =C2=A0 =C2=A03.6G =C2=A0 3% /media/usb
> tmpfs =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 2= 12.8M =C2=A0 =C2=A0115.5M =C2=A0 =C2=A0 97.3M =C2=A054% /
> tmpfs =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 2= 12.8M =C2=A0 =C2=A0176.0K =C2=A0 =C2=A0212.6M =C2=A0 0% /run
> rc-svcdir =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1.0M= =C2=A0 =C2=A0 72.0K =C2=A0 =C2=A0952.0K =C2=A0 7% /lib/rc/init.d
> cgroup_root =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A010.0M =C2= =A0 =C2=A0 =C2=A0 =C2=A0 0 =C2=A0 =C2=A0 10.0M =C2=A0 0% /sys/fs/cgroup
> /dev/loop0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 46.1M =C2= =A0 =C2=A0 46.1M =C2=A0 =C2=A0 =C2=A0 =C2=A0 0 100% /.modloop
> /dev/sda2 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A068.1G= =C2=A0 =C2=A0 =C2=A01.4G =C2=A0 =C2=A0 63.4G =C2=A0 2% /var
>
>
> >
> > Anyway, I would recommend making sure that everything works with = xl, and
> > then try to use libvirt (I've never used it, so I'm not s= ure of how well
> > it works).
>
> Yeah. That's why I want to use "xl". And I'm also in= terested in fixing
> libvirt.

If you want to fix libvirt I wold recommend using edge with Xen 4.2, tha= t introduced libxl API changes. I don't know if someone already ported = libvirt to that version, but the 4.2 API is going to be the stable one, so = there won't be a need to change libvirt for every Xen release.

> >
> > > When creating a new domain via libvirt, it reports this erro= r:
> > >
> > > xc: detail: Failed allocation for dom 2: 2048 extents of ord= er 0
> > > xc: error: Could not allocate memory for HVM guest. (16 =3D = Device or
> > > resource busy): Internal error
> > >
> > > Googling around I've found this:
> > >
> > > "Sufficient memory was not reserved for fully virtualiz= ed guests when
> > > creating new guests. Memory listed as available by the xm in= fo command
> > > could not be fully allocated to the guest. When attempting c= reate a
> > > fully virtualized guest with more than or equal to the maxim= um available
> > > memory value, the following error message would appear:
> > > Error: (1, 'Internal error', 'Could not allocate= memory for HVM guest.\n (16 =3D Device or resource busy)')
> > > This issue has been resolved by improving the memory balloon= driver to
> > > correctly allocate memory for fully virtualized guests and f= ully
> > > virtualized guests using the Intel VT-d extensions for PCI p= assthrough.
> > > (BZ#512041)"
> > >
> > > (from http://www.centos.org/docs/5/html/5.5/Technical_Notes/= xen.html
> > > )
> > >
> > > This is what "xl info" reports:
> > >
> > > kvbn1:~# xl info
> > > host =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 : kvbn1
> > > release =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0: 3.3.8-grsec
> > > version =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0: #4-Alpine SMP Tue Jul 17 13:08:00 UTC 2012
> > > machine =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0: x86_64
> > > nr_cpus =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0: 8
> > > nr_nodes =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 : = 2
> > > cores_per_socket =C2=A0 =C2=A0 =C2=A0 : 4
> > > threads_per_core =C2=A0 =C2=A0 =C2=A0 : 1
> > > cpu_mhz =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0: 2128
> > > hw_caps =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0:
> > > bfebfbff:28100800:00000000:00003b40:009ce3bd:00000000:000000= 01:00000000
> > > virt_caps =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0: = hvm hvm_directio
> > > total_memory =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 : 8179
> > > free_memory =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0: 909 > > > free_cpus =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0: = 0
> > > xen_major =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0: = 4
> > > xen_minor =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0: = 1
> > > xen_extra =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0: = .2
> > > xen_caps =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 : = xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32
> > > hvm-3.0-x86_32p hvm-3.0-x86_64
> > > xen_scheduler =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0: credit
> > > xen_pagesize =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 : 4096
> > > platform_params =C2=A0 =C2=A0 =C2=A0 =C2=A0: virt_start=3D0x= ffff800000000000
> > > xen_changeset =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0: unavailabl= e
> > > xen_commandline =C2=A0 =C2=A0 =C2=A0 =C2=A0:
> > > cc_compiler =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0: gcc v= ersion 4.6.3 (Alpine 4.6.3-r0)
> > > cc_compile_by =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0: buildozer<= br> > > > cc_compile_domain =C2=A0 =C2=A0 =C2=A0: alpinelinux.org
> > > cc_compile_date =C2=A0 =C2=A0 =C2=A0 =C2=A0: Fri Jun 22 14:5= 9:04 UTC 2012
> > > xend_config_format =C2=A0 =C2=A0 : 4
> > >
> > >
> > > I'd like also to try creating a domain without libvirt, = and I tried
> > > following this http://wiki.xen.org/wiki/Xen_Beginners_Guide. However I
> > > cannot find on Alpine a xen-tools package to run "xen-c= reate-image", for
> > > creating a config file to feed to "xl" in order to= create a domain.
> >
> > xen-create-image is a Debian tool, which is not present in Alpine= . If
> > you wish, you can try creating a Alpine Linux DomU [2] or a Debia= n DomU
> > with NetInstall [3].
>
> Sorry, I've missed the wiki doc about AL PV DomU.
>
> Thank you!
>
> - leonardo

--f46d044270cac4090d04cac1817d-- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---