<div dir="ltr"><div class="gmail_default" style="font-size:small">I did this long ago but only using XVNC on the containers. It works, but performance is bad, since you have many Xservers and many Xvnc servers.<br></div><div class="gmail_default" style="font-size:small">I don't think you can share the same graphics hardware from multiple containers. That would be possible only a very powerful card made by Nvidia, designed specifically to have 3D computing on virtual machines.<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 17, 2016 at 9:32 PM, Rahul Rawail <span dir="ltr"><<a href="mailto:rhlrawail@gmail.com" target="_blank">rhlrawail@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks Fajar for your answers, I still have some questions, please help:<span class=""><div><br></div><div><span style="font-size:12.8px">> Thanks Simos for your answer, Just few questions and they may be dumb<br>> questions, if LXD is running on top of a host OS and host machine has<br>> graphic card I thought that it will be able to give it a call  and I<br>> understand that since LXD still uses core functions of host OS hence if I<br>> will create 100 containers then all of them will have access to all the host<br>> hardware including video and audio.<br><br><br></span><span style="font-size:12.8px">Yes, and no. Depending on what you want, and how you setup the containers.</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">One way to do it is to give containers access to the hardware</span><br style="font-size:12.8px"><span style="font-size:12.8px">directly, often meaning that only one of them can use the hardware at</span><br style="font-size:12.8px"><span style="font-size:12.8px">the same time.</span><br></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div></span><div>----> The reason I asked this question was to understand that in LXD presentation they said that LXD has the capability to replace all existing VM's as they run complete OS but if you can't put a DE on it then its not of much use.</div><div>Sorry for this but when you said Yes and No what do you mean, I guess Yes means as you explained "<span style="font-size:12.8px">to give containers access to the hardware </span><span style="font-size:12.8px">directly, often meaning that only one of them can use the hardware at the same time." I understand that but like VM do we have the capability to put the drivers again in container or have virtual drivers so that all containers can use hardware in parallel rather than only one using it at any one point of time.If they are replacement for VM then they should work like VM, am i wrong with my expectation?</span></div><span class=""><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">><br>> I have tried  <a href="https://www.stgraber.org/2014/02/09/lxc-1-0-gui-in-containers/" rel="noreferrer" target="_blank">https://www.stgraber.org/2014/02/09/lxc-1-0-gui-in-containers/</a><br><br><br></span><span style="font-size:12.8px">That's another way to do it: give containers access to host resources</span><br style="font-size:12.8px"><span style="font-size:12.8px">(e.g. X, audio) via unix sockets by setting bind mounts manually</span><br style="font-size:12.8px"></div><div><br></div></span><div>---------> what will happen in this case, will they all work in parallel and have access to all the hardware of host machine at the same time??? </div><span class=""><div><br></div><div><br></div><div><span style="font-size:12.8px">> Also, I thought that container should be able to use host os X server and<br>> there should not be any need of another X server.<br><br></span><span style="font-size:12.8px">correct for the second way.</span><br></div><div><span style="font-size:12.8px"><br></span></div></span><div><span style="font-size:12.8px">-------> I am assuming all containers have access to same X server in parallel and the hardware in parallel.</span></div><span class=""><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br>> Can the container desktop environment be called from another remote machine<br>> for remote access.<br><br><br></span><span style="font-size:12.8px">... and that's the third way. Treat containers like another headless</span><br style="font-size:12.8px"><span style="font-size:12.8px">server, and setup remote GUI access to it appropriately. My favorite</span><br style="font-size:12.8px"><span style="font-size:12.8px">is xrdp, but vnc or x2go should work as well (I haven't tested sound</span><br style="font-size:12.8px"><span style="font-size:12.8px">though, didn't need it)</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">Note that if you need copy/paste and file transfer support in xrdp,</span><br style="font-size:12.8px"><span style="font-size:12.8px">your containers need to be privileged with access to /dev/fuse</span><br style="font-size:12.8px"><span style="font-size:12.8px">enabled. If you don't need that feature, the default unpriv container</span><br style="font-size:12.8px"><span style="font-size:12.8px">is fine.</span><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div></span><div><span style="font-size:12.8px">-------------> I have not tried this but I am assuming if I am not able to get the DE up in container due to "</span><span style="font-size:1em;line-height:19.006px;white-space:pre-wrap">xf86OpenConsole: Cannot open /dev/tty0 (no such file found) " error then xrdp or x2go are just going to show me the terminal on the client side and not desktops, am I right with my assumption?</span></div><div><span style="font-size:1em;line-height:19.006px;white-space:pre-wrap"><br></span></div><div><span style="font-size:1em;line-height:19.006px;white-space:pre-wrap">All I want to do in the first stage is bring up an LXD container and then bring up a new window on the current desktop like any other VM and have another desktop environment in it for container and I should be able to do this for every container and hence have multiple desktops on my current desktop with all having access to host hardware in parallel, at the same time maintaining the same bare metal performance without adding any performance overhead. Will </span><span style="line-height:19.006px;white-space:pre-wrap">xrdp or x2go still reap the same benefit as LXD or add performance overhead. Next stage is then I want to take it to remote client which you already explained</span> <span style="line-height:19.006px;white-space:pre-wrap">before, is there any other option, why I am asking this because I read somewhere that LXD by default have the ability to connect to another LXD or LXD server.</span></div><div><span style="line-height:19.006px;white-space:pre-wrap"><br></span></div><div><span style="line-height:19.006px;white-space:pre-wrap">One last request to you or to anyone, if possible can someone please give their half an hour to one hour over the phone (we will call) just to help us out please, we have been struggling for weeks and asking for help everywhere and the most help has come out of this forum, your expertise in this area and one hour of time can save our weeks effort in future and help us make decision that if this is the right way to go for us. We will be highly indebted. Please share your number, you can send direct emails with number.</span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 18, 2016 at 6:48 AM, Fajar A. Nugraha <span dir="ltr"><<a href="mailto:list@fajar.net" target="_blank">list@fajar.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Fri, Jun 17, 2016 at 9:44 PM, Rahul Rawail <<a href="mailto:rhlrawail@gmail.com" target="_blank">rhlrawail@gmail.com</a>> wrote:<br>
> Thanks Simos for your answer, Just few questions and they may be dumb<br>
> questions, if LXD is running on top of a host OS and host machine has<br>
> graphic card I thought that it will be able to give it a call  and I<br>
> understand that since LXD still uses core functions of host OS hence if I<br>
> will create 100 containers then all of them will have access to all the host<br>
> hardware including video and audio.<br>
<br>
<br>
</span>Yes, and no. Depending on what you want, and how you setup the containers.<br>
<br>
One way to do it is to give containers access to the hardware<br>
directly, often meaning that only one of them can use the hardware at<br>
the same time.<br>
<span><br>
><br>
> I have tried  <a href="https://www.stgraber.org/2014/02/09/lxc-1-0-gui-in-containers/" rel="noreferrer" target="_blank">https://www.stgraber.org/2014/02/09/lxc-1-0-gui-in-containers/</a><br>
<br>
<br>
</span>That's another way to do it: give containers access to host resources<br>
(e.g. X, audio) via unix sockets by setting bind mounts manually<br>
<span><br>
<br>
> Also, I thought that container should be able to use host os X server and<br>
> there should not be any need of another X server.<br>
<br>
</span>correct for the second way.<br>
<span><br>
> Can the container desktop environment be called from another remote machine<br>
> for remote access.<br>
<br>
<br>
</span>... and that's the third way. Treat containers like another headless<br>
server, and setup remote GUI access to it appropriately. My favorite<br>
is xrdp, but vnc or x2go should work as well (I haven't tested sound<br>
though, didn't need it)<br>
<br>
Note that if you need copy/paste and file transfer support in xrdp,<br>
your containers need to be privileged with access to /dev/fuse<br>
enabled. If you don't need that feature, the default unpriv container<br>
is fine.<br>
<span><font color="#888888"><br>
--<br>
Fajar<br>
</font></span><div><div>_______________________________________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org" target="_blank">lxc-users@lists.linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a></div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a><br></blockquote></div><br></div>