[Lxc-users] Fwd: Fwd: LXC and sound in container -

2013-11-17 Thread brian mullan
Attached is a v2.0 writeup of how I configured Sound in my LXC containers.


Please note that this document is based on further research into how
PulseAudio can be configured and because of what I learned is both much
shorter  less complex to setup sound in LXC.

See the attached libreoffice .ODT file for the updated information.

Brian Mullan


Enabling Sound in LXC containers v2.odt
Description: application/vnd.oasis.opendocument.text
--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] Fwd: Fwd: LXC and sound in container -

2013-11-17 Thread Michael H. Warfield
Hey...

On Sun, 2013-11-17 at 11:44 -0500, brian mullan wrote: 
 Attached is a v2.0 writeup of how I configured Sound in my LXC
 containers.


 Please note that this document is based on further research into how
 PulseAudio can be configured and because of what I learned is both
 much shorter  less complex to setup sound in LXC.


 See the attached libreoffice .ODT file for the updated information.

That's really interesting.  Good job.

I also have a personal use case for this that, ironically, has nothing
to do with LXC Containers.  I've got a little backburner project at home
of setting up a little audioserver using a Raspberry Pi I can park
around (outdoors during the summer) and drive a remote setup connected
over WiFi.  For some reason, it never dawned on me to just remote the
audio over the network using PulseAudio.  Nice.

 Brian Mullan

Regards,
Mike 

 -- 
 This message has been scanned for viruses and 
 dangerous content by MailScanner, and is 
 believed to be clean. 
 --
 DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
 OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
 Free app hosting. Or install the open source package on any LAMP server.
 Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
 http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
 ___
 Lxc-users mailing list
 Lxc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/lxc-users

-- 
Michael H. Warfield (AI4NB) | (770) 978-7061 |  m...@wittsend.com
   /\/\|=mhw=|\/\/  | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9  | An optimist believes we live in the best of all
 PGP Key: 0x674627FF| possible worlds.  A pessimist is sure of it!



signature.asc
Description: This is a digitally signed message part
--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] Fwd: Fwd: LXC and sound in container -

2013-11-17 Thread brian mullan
Michael

For your RaspPi use-case you might want to read more here:

http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Network/


On Sun, Nov 17, 2013 at 1:05 PM, Michael H. Warfield m...@wittsend.comwrote:

 Hey...

 On Sun, 2013-11-17 at 11:44 -0500, brian mullan wrote:
  Attached is a v2.0 writeup of how I configured Sound in my LXC
  containers.


  Please note that this document is based on further research into how
  PulseAudio can be configured and because of what I learned is both
  much shorter  less complex to setup sound in LXC.


  See the attached libreoffice .ODT file for the updated information.

 That's really interesting.  Good job.

 I also have a personal use case for this that, ironically, has nothing
 to do with LXC Containers.  I've got a little backburner project at home
 of setting up a little audioserver using a Raspberry Pi I can park
 around (outdoors during the summer) and drive a remote setup connected
 over WiFi.  For some reason, it never dawned on me to just remote the
 audio over the network using PulseAudio.  Nice.

  Brian Mullan

 Regards,
 Mike

  --
  This message has been scanned for viruses and
  dangerous content by MailScanner, and is
  believed to be clean.
 
 --
  DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
  OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
  Free app hosting. Or install the open source package on any LAMP server.
  Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
 
 http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
  ___
  Lxc-users mailing list
  Lxc-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/lxc-users

 --
 Michael H. Warfield (AI4NB) | (770) 978-7061 |  m...@wittsend.com
/\/\|=mhw=|\/\/  | (678) 463-0932 |
 http://www.wittsend.com/mhw/
NIC whois: MHW9  | An optimist believes we live in the best of
 all
  PGP Key: 0x674627FF| possible worlds.  A pessimist is sure of it!


--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] Bonding inside LXC container

2013-11-17 Thread wang yao
Hi Jake,

First of all, thank you for your reply and I am very sorry for such a late
response.

Just as you said, I had ever tried the bonding style like this:

eth0--+--bound0--[veth]--eth0
eth1--/

But when I used mode=6(alb) of bonding following this way, there is 80%
packet loss in the container, I must patch the kernel to the problem.

On the other hand, my current approach:

eth0--[phys]--eth0--+--bound0
eth1--[phys]--eth1--/
My lxc configuration like this (Networking part) :








*# Networkinglxc.network.type = macvlanlxc.network.flags =
uplxc.network.link = eth0lxc.network.name http://lxc.network.name =
eth0lxc.network.ipv4 = 172.19.8.168/16
http://172.19.8.168/16lxc.network.mtu = 1500lxc.network.hwaddr =
fe:67:f5:42:40:14*







*lxc.network.type = macvlanlxc.network.flags = uplxc.network.link =
eth1lxc.network.name http://lxc.network.name = eth1lxc.network.ipv4 =
172.19.8.169/16 http://172.19.8.169/16lxc.network.mtu =
1500lxc.network.hwaddr = fe:67:f5:42:40:15*
*...*

I did the bonding in the container, the bonding configuration is the same
as what I did before on the host.  When I started bonding device in the
container, this message came out:
Bringing up interface bond0: bonding device bond0 does not seem to be
present, delaying initialization.

I'm not sure but I doubt it may be Network namespace or something similar
that brings about this problem.

What's your idea?

Regards,
Yao


2013/11/15 Jäkel, Guido g.jae...@dnb.de

 Dear Yao,

 as I understand, you want to bound two physical interfaces of the host
 hardware to and use the bound inside a container.

 eth0--[phys]--eth0--+--bound0
 eth1--[phys]--eth1--/

 Because no other -- neither host nor another container -- may use one of
 NICs in addition, I would suggest to put the virtual bounding interface on
 the host and reach through the bound into the container via a veth. To me
 it's seems to be a better separation of concerns.

 eth0--+--bound0--[veth]--eth0
 eth1--/

 Following this way, you may also share the bound to more than one
 container by putting a virtual bridge between the virtual bounding
 interface and the virtual Ethernet adapters of the Containers.


 By the way, I don't see a clear reason why your current approach may fail.
 May you please present you configuration here?


 Greetings

 Guido


 -Original Message-
 From: wang yao [mailto:yaowang2...@gmail.com]
 Sent: Friday, November 15, 2013 4:33 AM
 To: lxc-users@lists.sourceforge.net
 Subject: [Lxc-users] Bonding inside LXC container
 
 Hi all,
 I tried to bond two NICs (eth0 and eth1) in the container, but when I
 finished the bonding configuration (I think my configuraion is correct)
 and started bonding device inside container, this message came out:
 Bringing up interface bond0:  bonding device bond0 does not seem to be
 present, delaying initialization.
 So I want to know if LXC can't support the way of bonding configuration
 as I did, or I can do something to make this achieved.
 I am glad to talk about Bonding and LXC with someone who has interest
 in it.
 Regards,
 Yao

--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] Recommended kernel/lxc version for Ubuntu 12.04

2013-11-17 Thread Robert Pendell
On Mon, Nov 18, 2013 at 12:54 AM, Jérôme Petazzoni
jerome.petazz...@docker.com wrote:



 On Fri, Nov 15, 2013 at 12:37 AM, Robert Pendell shi...@elite-systems.org
 wrote:

 I apologize for the noobish question here.  What's the recommended LXC
 version and Kernel version combination for Ubuntu 12.04.2?


 I'd recommend to get at least kernel 3.8, as previous kernels have some race
 conditions when you create/delete lots of containers in a rapid succession.
 Regarding LXC version, if you don't need fancy features, 0.7.5 (the default)
 is fine; but have a look at more recent versions to see if they have
 features that you like.


Thanks for replying.  I ended up getting the ppa daily build (because
I like living dangerously) and setting up kernel 3.11.0 from Ubuntu
Saucy.  To be honest I'm not expecting amazing performance here with
my environment.  I'm running on Xen-PV using PV-Grub (PyGrub is a more
common name for it I think).  The kernel is running through that setup
as the host provided kernels don't have the necessary supports
enabled.  Prior testing showed that LXC is viable in the environment
and worked in the past but bridging won't work due to the way the host
has their switches setup (no foreign mac addresses are allowed...) so
it will be nat only for me.

--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] Recommended kernel/lxc version for Ubuntu 12.04

2013-11-17 Thread Jérôme Petazzoni
On Fri, Nov 15, 2013 at 12:37 AM, Robert Pendell
shi...@elite-systems.orgwrote:

 I apologize for the noobish question here.  What's the recommended LXC
 version and Kernel version combination for Ubuntu 12.04.2?


I'd recommend to get at least kernel 3.8, as previous kernels have some
race conditions when you create/delete lots of containers in a rapid
succession.
Regarding LXC version, if you don't need fancy features, 0.7.5 (the
default) is fine; but have a look at more recent versions to see if they
have features that you like.
--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] Bonding inside LXC container

2013-11-17 Thread Jäkel , Guido
Dear Yao,

I have no experience with the macvlan device because I even can't find a clear 
documentation and I wonder if there is one her to give an abstract and howto 
for it. In my diagram I meant to use lxc.network.type = phys to directly reach 
through the NIC device.

Reading https://www.kernel.org/doc/Documentation/networking/bonding.txt i got 
the notion that the bonding driver is strongly related to the physical network 
drivers. I don't think that it will work with virtual devices like macvlan or 
even veth as basic devices, but I may be wrong with this.

I'm not sure but I doubt it may be Network namespace or something similar that 
brings about this problem.
I was able to google out a thread Bonding simplifications and netns support 
on the kernel.org mailing list. It's from end of 2009 but I think it's 
irrelevant nowadays.




-Original Message-
From: wang yao [mailto:yaowang2...@gmail.com]
Sent: Monday, November 18, 2013 5:09 AM
To: Jäkel, Guido
Cc: lxc-users@lists.sourceforge.net
Subject: Re: [Lxc-users] Bonding inside LXC container

Hi Jake,

First of all, thank you for your reply and I am very sorry for such a late 
response.

Just as you said, I had ever tried the bonding style like this:

eth0--+--bond0--[veth]--eth0
eth1--/

But when I used mode=6(alb) of bonding following this way, there is 80% packet 
loss in the container, I must patch the kernel to the
problem.

On the other hand, my current approach:

eth0--[phys]--eth0--+--bond0
eth1--[phys]--eth1--/

My lxc configuration like this (Networking part) :

# Networking
lxc.network.type = macvlan
lxc.network.flags = up
lxc.network.link = eth0
lxc.network.name = eth0
lxc.network.ipv4 = 172.19.8.168/16
lxc.network.mtu = 1500
lxc.network.hwaddr = fe:67:f5:42:40:14

lxc.network.type = macvlan
lxc.network.flags = up
lxc.network.link = eth1
lxc.network.name = eth1
lxc.network.ipv4 = 172.19.8.169/16
lxc.network.mtu = 1500
lxc.network.hwaddr = fe:67:f5:42:40:15
...

I did the bonding in the container, the bonding configuration is the same as 
what I did before on the host.  When I started bonding device
in the container, this message came out:
Bringing up interface bond0: bonding device bond0 does not seem to be 
present, delaying initialization.

I'm not sure but I doubt it may be Network namespace or something similar that 
brings about this problem.

What's your idea?

Regards,
Yao


2013/11/15 Jäkel, Guido g.jae...@dnb.de


   Dear Yao,

   as I understand, you want to bound two physical interfaces of the host 
 hardware to and use the bond inside a container.

   eth0--[phys]--eth0--+--bond0
   eth1--[phys]--eth1--/

   Because no other -- neither host nor another container -- may use one 
 of NICs in addition, I would suggest to put the virtual
bonding interface on the host and reach through the bound into the container 
via a veth. To me it's seems to be a better separation of
concerns.

   eth0--+--bond0--[veth]--eth0
   eth1--/

   Following this way, you may also share the bound to more than one 
 container by putting a virtual bridge between the virtual
bonding interface and the virtual Ethernet adapters of the Containers.


   By the way, I don't see a clear reason why your current approach may 
 fail. May you please present you configuration here?


   Greetings

   Guido



   -Original Message-
   From: wang yao [mailto:yaowang2...@gmail.com]
   Sent: Friday, November 15, 2013 4:33 AM
   To: lxc-users@lists.sourceforge.net
   Subject: [Lxc-users] Bonding inside LXC container
   
   Hi all,
   I tried to bond two NICs (eth0 and eth1) in the container, but when I 
 finished the bonding configuration (I think my configuraion
is correct)
   and started bonding device inside container, this message came out:
   Bringing up interface bond0:  bonding device bond0 does not seem to 
 be present, delaying initialization.
   So I want to know if LXC can't support the way of bonding 
 configuration as I did, or I can do something to make this achieved.
   I am glad to talk about Bonding and LXC with someone who has 
 interest in it.
   Regards,
   Yao




--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users