2014-06-05 1 views
1

기본 설정 파일 및 기본 fedora 템플릿을 사용하여 fedora-20에 lxc 컨테이너를 만들었습니다.lxc 컨테이너에 로그인 할 수 없습니다.

lxc-create -n root -t fedora 

컨테이너를 시작하려고하면 사용자 이름과 암호를 묻는 메시지가 표시됩니다.

우분투에서는 사용자 이름과 암호로 기본 "우분투"를 사용하는 것으로 보입니다. 나는 "root"와 같은 암호의 다른 조합을 시도했지만 로그인 할 수는 없었습니다.

[[email protected] ~]# lxc-start -n root 
systemd 208 running in system mode. (+PAM +LIBWRAP +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ) 
Detected virtualization 'lxc'. 

Welcome to Fedora 20 (Heisenbug)! 

Set hostname to <root.localdomain>. 
[ OK ] Reached target Remote File Systems. 
[ OK ] Created slice Root Slice. 
[ OK ] Created slice User and Session Slice. 
[ OK ] Created slice System Slice. 
[ OK ] Reached target Slices. 
[ OK ] Created slice system-getty.slice. 
[ OK ] Listening on /dev/initctl Compatibility Named Pipe. 
[ OK ] Listening on Delayed Shutdown Socket. 
Failed to open /dev/autofs: No such file or directory 
Failed to initialize automounter: No such file or directory 
[FAILED] Failed to set up automount Arbitrary Executable File...utomount Point. 
See 'systemctl status proc-sys-fs-binfmt_misc.automount' for details. 
Unit proc-sys-fs-binfmt_misc.automount entered failed state. 
[ OK ] Listening on udev Kernel Socket. 
[ OK ] Listening on udev Control Socket. 
[ OK ] Reached target Encrypted Volumes. 
[ OK ] Listening on Journal Socket. 
     Starting Apply Kernel Variables... 
     Mounting Debug File System... 
     Starting udev Coldplug all Devices... 
     Mounting Huge Pages File System... 
     Mounting POSIX Message Queue File System... 
     Mounting FUSE Control File System... 
     Starting Create static device nodes in /dev... 
     Mounting Configuration File System... 
     Starting Journal Service... 
[ OK ] Started Journal Service. 
[ OK ] Reached target Paths. 
[ OK ] Reached target Swap. 
     Starting Remount Root and Kernel File Systems... 
     Mounting Temporary Directory... 
[ OK ] Started Apply Kernel Variables. 
[ OK ] Mounted Debug File System. 
[ OK ] Mounted Huge Pages File System. 
[ OK ] Mounted POSIX Message Queue File System. 
[ OK ] Mounted FUSE Control File System. 
[ OK ] Started Create static device nodes in /dev. 
[ OK ] Mounted Configuration File System. 
[ OK ] Started Remount Root and Kernel File Systems. 
[ OK ] Mounted Temporary Directory. 
     Starting Load/Save Random Seed... 
     Starting Configure read-only root support... 
     Starting udev Kernel Device Manager... 
[ OK ] Reached target Local File Systems (Pre). 
<30>systemd-udevd[24]: starting version 208 
[ OK ] Started Load/Save Random Seed. 
[ OK ] Started udev Kernel Device Manager. 
[ OK ] Started Configure read-only root support. 
[ OK ] Reached target Local File Systems. 
     Starting Trigger Flushing of Journal to Persistent Storage... 
     Starting Create Volatile Files and Directories... 
[ OK ] Started udev Coldplug all Devices. 
[ OK ] Started Create Volatile Files and Directories. 
     Starting Update UTMP about System Reboot/Shutdown... 
<46>systemd-journald[18]: Received request to flush runtime journal from PID 1 
[ OK ] Started Trigger Flushing of Journal to Persistent Storage. 
[ OK ] Started Update UTMP about System Reboot/Shutdown. 
[ OK ] Reached target System Initialization. 
[ OK ] Reached target Timers. 
[ OK ] Listening on D-Bus System Message Bus Socket. 
[ OK ] Reached target Sockets. 
[ OK ] Reached target Basic System. 
     Starting System Logging Service... 
     Starting Permit User Sessions... 
     Starting Login Service... 
     Starting D-Bus System Message Bus... 
[ OK ] Started D-Bus System Message Bus. 
[ OK ] Started Permit User Sessions. 
     Starting Getty on tty3... 
[ OK ] Started Getty on tty3. 
     Starting Getty on tty4... 
[ OK ] Started Getty on tty4. 
     Starting Getty on tty2... 
[ OK ] Started Getty on tty2. 
     Starting Getty on tty1... 
[ OK ] Started Getty on tty1. 
     Starting Console Getty... 
[ OK ] Started Console Getty. 
[ OK ] Reached target Login Prompts. 
     Starting Cleanup of Temporary Directories... 
[ OK ] Started System Logging Service. 
[ OK ] Started Cleanup of Temporary Directories. 
[ OK ] Reached target Sound Card. 
[ OK ] Started Login Service. 
[ OK ] Reached target Multi-User System. 

Fedora release 20 (Heisenbug) 
Kernel 3.11.10-301.fc20.x86_64 on an x86_64 (console) 

root login: root 
Password: 
Last failed login: Thu Jun 5 08:37:20 UTC 2014 on console 
There were 3 failed login attempts since the last successful login. 

Cannot make/remove an entry for the specified session 

Fedora release 20 (Heisenbug) 
Kernel 3.11.10-301.fc20.x86_64 on an x86_64 (console) 

root login: 

답변

2

검사 시도는/var/lib 디렉토리/LXC/$의 CONTAINER_NAME/첫 번째 성공적인 로그인시 만료됩니다

파일이 이름을 지정해야합니다 tmp_root_pass

:

이 출력됩니다.

LS는/var/lib 디렉토리/LXC/OVS/나 lxc-attach -n root 작품

+0

아니요. 그러한 파일이 없습니다. 예 : 내 컨테이너는 "cn1"입니다./var/lib/lxc/cn1/rootfs/폴더에서 볼 수있는 것은 bin/dev/home/등 다양한 os 관련 폴더입니다.하지만 tmp_root_pass와 같은 파일은 없습니다. –

+0

하나의 디렉토리를 시도하십시오 :) (/ var/lib/lxc/cn1) –

0

tmp_root_pass 구성 rootfs. 그것은 시스템에 chroot하고 거기에서 루트 암호를 설정할 수 있습니다.