No /dev/tty device within LXC guest?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

When I create a LXC guest(RHEL5.4) via libvirt, the guest could boot successfully. I could ping to guest, but can not ssh into the it. The secure log in the guest shows that this is due to lack of '/dev/tty' device:

# tail /path/to/rootfs/of/container/var/log/secure
Jul 27 04:25:25 xen2143v sshd[671]: Accepted password for zhangyufang from 10.0.0.1 port 34102 ssh2
Jul 27 04:25:25 xen2143v sshd[671]: pam_unix(sshd:session): session opened for user zhangyufang by (uid=0)
Jul 27 04:25:25 xen2143v sshd[671]: pam_loginuid(sshd:session): set_loginuid failed 
Jul 27 04:25:25 xen2143v sshd[671]: error: PAM: pam_open_session(): Cannot make/remove an entry for the specified session
Jul 27 04:25:25 xen2143v sshd[674]: error: open /dev/tty failed - could not set controlling tty: No such file or directory
Jul 27 04:25:25 xen2143v sshd[673]: Received disconnect from 10.0.0.1: 11: disconnected by user

The xml of the guest:
# virsh --connect lxc:/// dumpxml instance-00000034
<domain type='lxc' id='30090'>
  <name>instance-00000034</name>
  <uuid>8387e0f1-6df3-41c8-82ba-cde7d2b60844</uuid>
  <memory>524288</memory>
  <currentMemory>524288</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64'>exe</type>
    <init>/sbin/init</init>
  </os>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/libexec/libvirt_lxc</emulator>
    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/var/lib/nova/instances/instance-00000034/rootfs'/>
      <target dir='/'/>
    </filesystem>
    <interface type='bridge'>
      <mac address='fa:16:3e:3c:1d:95'/>
      <source bridge='demonetbr0'/>
      <target dev='veth0'/>
      <filterref filter='nova-instance-instance-00000034-fa163e3c1d95'>
        <parameter name='DHCPSERVER' value='10.0.0.1'/>
        <parameter name='IP' value='10.0.0.3'/>
      </filterref>
    </interface>
    <console type='pty' tty='/dev/pts/0'>
      <source path='/dev/pts/0'/>
      <target type='serial' port='0'/>
    </console>
  </devices>
</domain>

 
Could anyone point me to where the problem is? Thanks.

Best Regards.

Yufang
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]