<div dir="ltr">Hello,<div><br></div><div>I am starting the system container without "/"  directory So that it can share the host /bin /sbin /lib and /lib64 and i have sepeartely mounted /var, /etc and /usr directory for the container</div>

<div>Below is xml file</div><div> <domain type='lxc'></div><div><name>test6</name></div><div><memory>102400</memory></div><div><os></div><div>  <type>exe</type></div>

<div>  <init>/sbin/init</init></div><div></os></div><div><vcpu>1</vcpu></div><div><clock offset='utc'/></div><div><on_poweroff>destroy</on_poweroff></div><div><on_reboot>restart</on_reboot></div>

<div><on_crash>destroy</on_crash></div><div><br></div><div><devices></div><div>  <console type='pty'/></div><div>  <emulator>/usr/libexec/libvirt_lxc</emulator></div><div>  <filesystem type='mount' accessmode='passthrough'></div>

<div>    <source dir='/lxc/test6/etc'/></div><div>    <target dir='/etc'/></div><div>  </filesystem></div><div>  </div><div>  <filesystem type='mount' accessmode='passthrough'></div>

<div>    <source dir='/lxc/test6/var'/></div><div>    <target dir='/var'/></div><div>  </filesystem></div><div>  <filesystem type='mount' accessmode='passthrough'></div>

<div>    <source dir='/lxc/test6/usr'/></div><div>     <target dir='/usr'/></div><div>  </filesystem></div><div><br></div><div>  <filesystem type='mount' accessmode='passthrough'></div>

<div>    <source dir='/pg_data/'/></div><div>    <target dir='/pg_data'/></div><div>  </filesystem></div><div><br></div><div>  <filesystem type='ram' accessmode='passthrough'></div>

<div>    <source usage='0' units='KiB'/></div><div>    <target dir='/dev/shm'/></div><div>   </filesystem></div><div>   <interface type='bridge'></div><div>     <source bridge='br0' /></div>

<div>   </interface></div><div></devices></div><div></domain></div><div><br></div><div><br></div><div>when i start the container it get start , but when i try to access console it get stuck</div><div><div>
<br></div><div><div>virsh # list</div><div> Id    Name                           State</div><div>----------------------------------------------------</div><div> 18238 test4                          running</div><div> 20435 test6                          running</div>
</div><div><br></div><div><br></div><div>virsh #</div><div><br></div></div><div><div>virsh # start test6</div><div>Domain test6 started</div><div><br></div><div>virsh # console test6</div><div>Connected to domain test6</div>
<div>Escape character is ^]</div><div><br></div><div><br></div></div><div>But when i mount the "/" in xml it works, i have also share host /bin,/sbin, /lib and /lib64.</div><div><br></div><div><div><domain type='lxc'></div>
<div><name>test4</name></div><div><memory>102400</memory></div><div><os></div><div>  <type>exe</type></div><div>  <init>/sbin/init</init></div><div></os></div><div>
<vcpu>1</vcpu></div><div><clock offset='utc'/></div><div><on_poweroff>destroy</on_poweroff></div><div><on_reboot>restart</on_reboot></div><div><on_crash>destroy</on_crash></div>
<div><br></div><div><devices></div><div>  <console type='pty'/></div><div>  <emulator>/usr/libexec/libvirt_lxc</emulator></div><div><div><filesystem type='mount' accessmode='passthrough'></div>
<div>    <source dir='/lxc/test4/'/></div><div>    <target dir='/'/></div><div>  </filesystem></div></div><div>  <filesystem type='mount' accessmode='passthrough'></div>
<div>    <source dir='/bin'/></div><div>    <target dir='/bin'/></div><div>  </filesystem></div><div>  </div><div>  <filesystem type='mount' accessmode='passthrough'></div>
<div>    <source dir='/sbin'/></div><div>    <target dir='/sbin'/></div><div>  </filesystem></div><div>  <filesystem type='mount' accessmode='passthrough'></div><div>
    <source dir='/lib'/></div><div>     <target dir='/lib'/></div><div>  </filesystem></div><div><div>  </filesystem></div><div>  <filesystem type='mount' accessmode='passthrough'></div>
<div>    <source dir='/lib64'/></div><div>     <target dir='/lib64'/></div><div>  </filesystem></div></div><div>  <filesystem type='mount' accessmode='passthrough'></div>
<div>    <source dir='/pg_data/'/></div><div>    <target dir='/pg_data'/></div><div>  </filesystem></div><div><br></div><div>  <filesystem type='ram' accessmode='passthrough'></div>
<div>    <source usage='0' units='KiB'/></div><div>    <target dir='/dev/shm'/></div><div>   </filesystem></div><div>   <interface type='bridge'></div><div>     <source bridge='br0' /></div>
<div>   </interface></div><div></devices></div><div></domain></div></div><div><br></div><div>as i am new , can anyone explain me why my test6 container get stuck?</div><div>And in system container if we need to share host filesystem y we need to mount them explicitly?</div>
<div><br></div><div>Thanks,</div><div>Aarti Sawant</div><div>NTTDATA OSS Center Pune</div></div>