LXD によって作成された VM 内でターミナルを使用するためにログインとパスワードが要求されました

LXD によって作成された VM 内でターミナルを使用するためにログインとパスワードが要求されました

私は Linux コンテナについてはまだあまり詳しくありません。

私は以下の指示に従いました:Ubuntu 16.04 で、Ubuntu 16.04 LTS がリリースされました。Ubuntu 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

これにより、コンテナ上にルート シェルが作成されます。

関連情報