Re: [lxc-users] How to run GUI apps in an LXD container (with graphics acceleration)
On Tue, May 2, 2017 at 5:09 PM, wrote: > May 2, 2017 1:19 PM, "Simos Xenitellis" wrote: > >> Hi All! >> >> I wrote the following on how to run GUI apps in an LXD container, >> https://blog.simos.info/how-to-run-wine-graphics-accelerated-in-an-lxd-container-on-ubuntu >> The common case is when we run already Ubuntu desktop and we want to >> get a GUI app >> to run in a container and the window to appear in the host's X server. >> >> I made some effort to minimize the requirements and in my case, I did >> not even have to add the "gpu" device in LXC. >> I tried these with LXC 2.13. >> >> It would be great if you could try the instructions as well, and >> report if it works for you. >> As a testing app, you can use "glxgears". >> > > Thanks for the HOW-To, but why would you want to do: > lxc exec wine-games -- sudo --login --user ubuntu > ubuntu@wine-games:~$ sudo apt update > ubuntu@wine-games:~$ sudo apt install x11-apps > ubuntu@wine-games:~$ sudo apt install mesa-utils > ubuntu@wine-games:~$ exit > > Sounds silly to me to go from a root shell to change to an user to execute > root commands via sudo? > There are different ways to present the commands, including "lxc exec wine-games apt update", etc. When writing a tutorial, the goal is to get rookies to complete the tutorial, and not piss off the advanced users. For the former, the subsequent commands (those with sudo) show familiarity with other tutorials. For the latter, you tell me. Simos ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] Support types (Was: Re: discuss.linuxcontainers.org experiment)
On Tue, Apr 25, 2017 at 11:29 PM, Iain Grant wrote: > Seriously? Ubuntu Advantage? > > Who really needs that If you have a good sysadmin team...? > If you are big business that heavily depends on the IT infrastructure, you pay for these things. If you are smaller business, then you may be able to go through a downtime of several hours or a day without much damage. Simos > On Tue, Apr 25, 2017 at 9:09 PM, Sean McNamara wrote: >> >> Ron, >> >> If you are using LXD as part of line of business or mission critical >> infrastructure for an enterprise, I would have expected that you would >> already have purchased a comprehensive Ubuntu Advantage support plan >> from Canonical. That's the most reliable way to get relevant, >> up-to-date, "official" advice from Canonical as to best practices and >> usability tips. >> >> The point of Ubuntu Advantage is that you're getting "official" help >> from the source, and IIRC it comes with a response time SLA so you can >> be sure that if the developers get busy with deadlines, you'll still >> get a response within X hours/days. >> >> Full disclosure: I used to be an Ubuntu Advantage customer, and had a >> good experience, but I have no financial or social incentive to >> promote a Canonical offering... I just think it'd be good to have if >> you don't have it already. And if you do have it, use it! >> >> You can also ask on Discourse or the mailing list, but keep in mind >> that Discourse and the mailing list are open to the user community, so >> you're going to get "unofficial" responses that might be wrong or not >> applicable to your situation (such as mine ;)). >> >> To me, it would be a little weird to have some sort of officially >> blessed set of Canonical-only official posts on the Discourse. Isn't >> the purpose of the Discourse to be open to the community? (Including >> posts by core devs, who might be Canonical employees, but are speaking >> on behalf of themselves as an individual, not on behalf of the >> company.) >> >> If having the official advice of the company as a legal entity is >> critical to you, I can only give you a positive endorsement of Ubuntu >> Advantage as a fellow customer. >> >> Sean >> >> >> >> >> On Tue, Apr 25, 2017 at 4:01 PM, Ron Kelley wrote: >> > Stéphane, >> > >> > Thanks for setting up the discussion group. I just joined… >> > >> > As a suggestion, it would be great if we could have an official “best >> > practices” section supported/endorsed by the Canonical team. Or, a section >> > whereby people can contribute their designs and others can add their >> > viewpoints. I know many people use LXC/LXD for home/personal use, but many >> > of use are using this technology in data center production environments. >> > >> > Some ideas off the top of my head: >> > * How to manage tens/hundreds of LXD servers (single host, multi-host, >> > or multi-geo locations) >> > * How to quickly find mis-behaving containers (consuming too much >> > resources, etc) >> > * How to get container run-time stats per LXD server >> > * Best practices when backing up, restoring, cloning containers >> > * Best practices when deploying containers (same UID, different UID per >> > container, etc) >> > >> > As we adopt LXD more and more in our DC designs, it becomes increasingly >> > important for our organization to leverage best practices from the industry >> > experts. >> > >> > Thanks, >> > >> > -Ron >> > >> > >> > On Apr 25, 2017, at 1:50 PM, Stéphane Graber >> > wrote: >> >> >> >> Hey there, >> >> >> >> We know that not everyone enjoys mailing-lists and searching through >> >> mailing-list archives and would rather use a platform that's dedicated >> >> to discussion and support. >> >> >> >> We don't know exactly how many of you would prefer using something like >> >> that instead of the mailing-list or how many more people are out there >> >> who would benefit from such a platform. >> >> >> >> But we're giving it a shot and will see how things work out over the >> >> next couple of months. If we see little interest, we'll just kill it >> >> off >> >> and revert to using just the lxc-users list. If we see it take off, we >> >> may start recommending it as the preferred place to get support and >> >> discuss LXC/LXD/LXCFS. >> >> >> >> >> >> The new site is at: https://discuss.linuxcontainers.org >> >> >> >> >> >> We support both Github login as well as standalone registration, so >> >> that >> >> should make it easy for anyone interested to be able to post questions >> >> and content. >> >> >> >> The site is configured to self-moderate, so active users who post good >> >> content and help others will automatically get more privileges. That >> >> should let the community shape how this space works rather than have me >> >> and the core team babysit it :) >> >> >> >> >> >> Discourse (the engine we use for this) supports notifications by e-mail >> >> as well as responses and topic creation by e-mail. So for those of you >> >> who don't like dealing with w
Re: [lxc-users] discuss.linuxcontainers.org experiment
Seriously? Ubuntu Advantage? Who really needs that If you have a good sysadmin team...? On Tue, Apr 25, 2017 at 9:09 PM, Sean McNamara wrote: > Ron, > > If you are using LXD as part of line of business or mission critical > infrastructure for an enterprise, I would have expected that you would > already have purchased a comprehensive Ubuntu Advantage support plan > from Canonical. That's the most reliable way to get relevant, > up-to-date, "official" advice from Canonical as to best practices and > usability tips. > > The point of Ubuntu Advantage is that you're getting "official" help > from the source, and IIRC it comes with a response time SLA so you can > be sure that if the developers get busy with deadlines, you'll still > get a response within X hours/days. > > Full disclosure: I used to be an Ubuntu Advantage customer, and had a > good experience, but I have no financial or social incentive to > promote a Canonical offering... I just think it'd be good to have if > you don't have it already. And if you do have it, use it! > > You can also ask on Discourse or the mailing list, but keep in mind > that Discourse and the mailing list are open to the user community, so > you're going to get "unofficial" responses that might be wrong or not > applicable to your situation (such as mine ;)). > > To me, it would be a little weird to have some sort of officially > blessed set of Canonical-only official posts on the Discourse. Isn't > the purpose of the Discourse to be open to the community? (Including > posts by core devs, who might be Canonical employees, but are speaking > on behalf of themselves as an individual, not on behalf of the > company.) > > If having the official advice of the company as a legal entity is > critical to you, I can only give you a positive endorsement of Ubuntu > Advantage as a fellow customer. > > Sean > > > > > On Tue, Apr 25, 2017 at 4:01 PM, Ron Kelley wrote: > > Stéphane, > > > > Thanks for setting up the discussion group. I just joined… > > > > As a suggestion, it would be great if we could have an official “best > practices” section supported/endorsed by the Canonical team. Or, a section > whereby people can contribute their designs and others can add their > viewpoints. I know many people use LXC/LXD for home/personal use, but many > of use are using this technology in data center production environments. > > > > Some ideas off the top of my head: > > * How to manage tens/hundreds of LXD servers (single host, multi-host, > or multi-geo locations) > > * How to quickly find mis-behaving containers (consuming too much > resources, etc) > > * How to get container run-time stats per LXD server > > * Best practices when backing up, restoring, cloning containers > > * Best practices when deploying containers (same UID, different UID per > container, etc) > > > > As we adopt LXD more and more in our DC designs, it becomes increasingly > important for our organization to leverage best practices from the industry > experts. > > > > Thanks, > > > > -Ron > > > > > > On Apr 25, 2017, at 1:50 PM, Stéphane Graber > wrote: > >> > >> Hey there, > >> > >> We know that not everyone enjoys mailing-lists and searching through > >> mailing-list archives and would rather use a platform that's dedicated > >> to discussion and support. > >> > >> We don't know exactly how many of you would prefer using something like > >> that instead of the mailing-list or how many more people are out there > >> who would benefit from such a platform. > >> > >> But we're giving it a shot and will see how things work out over the > >> next couple of months. If we see little interest, we'll just kill it off > >> and revert to using just the lxc-users list. If we see it take off, we > >> may start recommending it as the preferred place to get support and > >> discuss LXC/LXD/LXCFS. > >> > >> > >> The new site is at: https://discuss.linuxcontainers.org > >> > >> > >> We support both Github login as well as standalone registration, so that > >> should make it easy for anyone interested to be able to post questions > >> and content. > >> > >> The site is configured to self-moderate, so active users who post good > >> content and help others will automatically get more privileges. That > >> should let the community shape how this space works rather than have me > >> and the core team babysit it :) > >> > >> > >> Discourse (the engine we use for this) supports notifications by e-mail > >> as well as responses and topic creation by e-mail. So for those of you > >> who don't like dealing with web stuff, you can tweak the e-mail settings > >> in your account and then interact with it almost entirely through > >> e-mails. > >> > >> Just a note on that bit, the plaintext version of those e-mails isn't so > >> great right now, it's not properly wrapped, contains random spacing and > >> the occasional html. I subscribed myself to receive all notifications > >> and will try to tweak the discourse e-mail code for those of
[lxc-users] [pepani...@gmail.com: Managing tarballs in lxd]
- Forwarded message from Javier López Sánchez - Date: Mon, 24 Apr 2017 14:04:34 +0200 From: Javier López Sánchez To: christian.brau...@ubuntu.com Subject: Managing tarballs in lxd Hello Christian, I don't know where to publish this. To help anybody who need, this is how I make backups and restore my containers on lxd. (Sorry my horrid English). Backup cd /var/lib/lxd/storage-pools/lxd/containers lxc stop zfs mount lxd/containers/ tar --create --verbose --gzip --file /.tgz zfs umount lxd/containers/ lxc start Restore After crash, assuming the containers does not exist cd tar --extract --verbose --file=//.tgz zfs create lxd/containers/ -o mountpoint=/var/lib/lxd/storage-pools/lxd/containers/ ln -s /var/lib/lxd/storage-pools/lxd/containers/ /var/lib/lxd/containers/ mv /var/lib/lxd/storage-pools>lxd/containers/ lxd import lxc start If version of LXD<2.13 before "lxd import": mkdir /var/lib/lxd/storage-pools/lxd/snapshots mkdir /var/lib/lxd/storage-pools/lxd/snapshots/ I hope it helps anyone who needs it. Thanks and best regards - End forwarded message - ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] How to run GUI apps in an LXD container (with graphics acceleration)
May 2, 2017 1:19 PM, "Simos Xenitellis" wrote: > Hi All! > > I wrote the following on how to run GUI apps in an LXD container, > https://blog.simos.info/how-to-run-wine-graphics-accelerated-in-an-lxd-container-on-ubuntu > The common case is when we run already Ubuntu desktop and we want to > get a GUI app > to run in a container and the window to appear in the host's X server. > > I made some effort to minimize the requirements and in my case, I did > not even have to add the "gpu" device in LXC. > I tried these with LXC 2.13. > > It would be great if you could try the instructions as well, and > report if it works for you. > As a testing app, you can use "glxgears". > Thanks for the HOW-To, but why would you want to do: lxc exec wine-games -- sudo --login --user ubuntu ubuntu@wine-games:~$ sudo apt update ubuntu@wine-games:~$ sudo apt install x11-apps ubuntu@wine-games:~$ sudo apt install mesa-utils ubuntu@wine-games:~$ exit Sounds silly to me to go from a root shell to change to an user to execute root commands via sudo? Cheers, Sjoerd ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] Access /dev/mem in lxc
On 04/27/2017 12:49 AM, Ganesh Sathyanarayanan wrote: Hi All, This is similar to a post by a John sometime in Aug-2010. He was trying to run Xorg in an lxc which required access to /dev/mem. Am trying to run a custom/proprietary application that needs the same (access to /dev/mem). I have a privileged container - as in I've created the container as root on my device and start it as root. (root is the usually only user on embedded devices, unlike PC) I have been trying to ‘expose’ the /dev/mem device to my container because the application I run there needs it. However, am unable to do so - I always end up with a “Operation not permitted” error when I try to open /dev/mem. The following are the different things I tried 1) lxc-cgroup.devices.allow = c 1 1 in the conf file (and doing a "mknod /dev/mem c 1 1" on the container) 2) lxc-device -n -- add /dev/mem to a running container (this causes /dev/mem to appear in the container without having to run any extra commands such as mknod. But opening it still fails) 3) lxc.aa_profile = unconfined (along with steps 1 & 2) Please advise what I can do to make /dev/mem accessible in lxc. A simple test am doing prior to running my actual application, is something like "head /dev/mem" in the container and check that it displays anything (other than Operation not permitted error). This is something we're interested in as well. We also are developing an embedded device with root as the only user--everything runs in a privileged mode. Can containers in an LXC based environment access /dev/mem? Peter ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
[lxc-users] How to run GUI apps in an LXD container (with graphics acceleration)
Hi All! I wrote the following on how to run GUI apps in an LXD container, https://blog.simos.info/how-to-run-wine-graphics-accelerated-in-an-lxd-container-on-ubuntu/ The common case is when we run already Ubuntu desktop and we want to get a GUI app to run in a container and the window to appear in the host's X server. I made some effort to minimize the requirements and in my case, I did not even have to add the "gpu" device in LXC. I tried these with LXC 2.13. It would be great if you could try the instructions as well, and report if it works for you. As a testing app, you can use "glxgears". Simos ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] LXD move, how to reduce downtime without live migration
Dear Fajar, with respect, imho this time you go too far. It's definite not in the responsibility of any common application to be data-consistent at every point in time. In the opposite, there are well-known and well-respected signaling mechanisms at both sides -- application and operating system -- to deal in an appropriate way with an "abnormal halt" condition. At the Unix platform, a termination signal is send to the program and the program have to should down as fast and as good as possible. Exactly this is defined to treat as the "correct behavior" and common application following this are "correct"! Of course, every developer and every operator will be well advised to have a plan about to deal with the situation where even this ungly but controlled shutdowns failed. But it's an absolute no-go to *build* normal workflows on instruments that should be reservered for exceptional cases. With another picuture: You can try to repair your car in case of a traffic accident. But I hope you don't want to vote here to align the common driving stile on this. To my eyes, a snapshot of anything is just a "better than nothing", but far away from something that should be called a resilient solution to satisfy requirements of safety. One may use it as a comfortable solution to restore things by hand, but it's not suitable for any automatism. I use and rely on this feature too: Ups, I just forget to backup a configuration file before editing. No matter, it wasn't changed before last automatic snapshot and I may draw for the mandatory backup from this source. Greetings Guido >-Original Message- >From: lxc-users [mailto:lxc-users-boun...@lists.linuxcontainers.org] On Behalf >Of Fajar A. Nugraha >Sent: Tuesday, May 02, 2017 4:00 AM >To: LXC users mailing-list >Subject: Re: [lxc-users] LXD move, how to reduce downtime without live >migration >If you have one of those apps, I highly recommend you fix it, or find another >one that behave correctly. You don't want to be >left out cold when a real power interruption (or server crash) happens. > >-- >Fajar ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users