LXD에서 생성한 VM 내에서 터미널을 사용하도록 로그인 및 비밀번호를 요청했습니다.

LXD에서 생성한 VM 내에서 터미널을 사용하도록 로그인 및 비밀번호를 요청했습니다.

저는 Linux 컨테이너를 처음 접했습니다.

나는 다음과 같은 지시 사항을 따랐습니다.https://linuxcontainers.org/lxd/getting-started-cli/#ubuntuUbuntu 20.04에서 LXD를 설치하고 사용하려면

(base) raphy@pc:~$ snap install lxd
lxd 4.16 from Canonical✓ installed


(base) raphy@pc:~$ lxd init
Would you like to use LXD clustering? (yes/no) [default=no]: no
Do you want to configure a new storage pool? (yes/no) [default=yes]: yes
Name of the new storage pool [default=default]: lxd
Name of the storage backend to use (btrfs, dir, lvm, zfs, ceph) [default=zfs]: zfs
Create a new ZFS pool? (yes/no) [default=yes]: yes
Would you like to use an existing empty block device (e.g. a disk or partition)?     
(yes/no) [default=no]: no
Size in GB of the new loop device (1GB minimum) [default=30GB]: 
Would you like to connect to a MAAS server? (yes/no) [default=no]: 
Would you like to create a new local network bridge? (yes/no) [default=yes]: 
What should the new bridge be called? [default=lxdbr0]: 
The requested network bridge "lxdbr0" already exists. Please choose another name.
What should the new bridge be called? [default=lxdbr0]: 
The requested network bridge "lxdbr0" already exists. Please choose another name.
What should the new bridge be called? [default=lxdbr0]: lxdbr1
What IPv4 address should be used? (CIDR subnet notation, “auto” or “none”)   
[default=auto]: 
What IPv6 address should be used? (CIDR subnet notation, “auto” or “none”) 
[default=auto]: 
Would you like the LXD server to be available over the network? (yes/no) 
[default=no]: no
Would you like stale cached images to be updated automatically? (yes/no) 
[default=yes] 
Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]: yes
config: {}
networks:
- config:
    ipv4.address: auto
    ipv6.address: auto
  description: ""
  name: lxdbr1
  type: ""
  project: default
storage_pools:
- config:
    size: 30GB
  description: ""
  name: lxd
  driver: zfs
profiles:
- config: {}
  description: ""
  devices:
    eth0:
      name: eth0
      network: lxdbr1
      type: nic
    root:
      path: /
      pool: lxd
      type: disk
  name: default
projects: []
cluster: null

그런 다음 Ubuntu 20:4를 기반으로 컨테이너를 만들었습니다.

lxc launch ubuntu:20.04 ubuntuone

ubuntuone하지만 컨테이너 내부에서 터미널을 실행하려고 하면 loginpassword.

이것들은 무엇 login이며 password?

답변1

명령을 실행한 호스트 머신에서:-

lxc launch ubuntu:20.04 ubuntuone명령.

새 LXD 인스턴스에 액세스하려면 다음 명령을 실행하세요.

lxc exec ubuntuone bash

그러면 컨테이너에 루트 셸이 제공됩니다.

관련 정보