lxc 容器需要很长时间才能分配 IP 或者无法获取 IP

lxc 容器需要很长时间才能分配 IP 或者无法获取 IP

获取 lxc vm 的 ip 地址需要花费大量时间。有时,ip 地址未分配。

lxd 主机详细信息:16 核和 32 GB 内存。

admin1@oc-vm:~/my-stuff$ cat /etc/os-release 
PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

lxd 版本:

admin1@oc-vm:~/my-stuff$ lxd --version
5.17

lxd 守护进程状态:

admin1@oc-vm:~/my-stuff$ systemctl status snap.lxd.daemon 
● snap.lxd.daemon.service - Service for snap application lxd.daemon
     Loaded: loaded (/etc/systemd/system/snap.lxd.daemon.service; static)
     Active: active (running) since Mon 2023-09-04 23:24:51 IST; 46min ago
TriggeredBy: ● snap.lxd.daemon.unix.socket
   Main PID: 1625 (daemon.start)
      Tasks: 0 (limit: 38413)
     Memory: 22.6M
     CGroup: /system.slice/snap.lxd.daemon.service
             ‣ 1625 /bin/sh /snap/lxd/25505/commands/daemon.start

Sep 04 23:24:51 oc-vm lxd.daemon[1782]: - proc_swaps
Sep 04 23:24:51 oc-vm lxd.daemon[1782]: - proc_uptime
Sep 04 23:24:51 oc-vm lxd.daemon[1782]: - proc_slabinfo
Sep 04 23:24:51 oc-vm lxd.daemon[1782]: - shared_pidns
Sep 04 23:24:51 oc-vm lxd.daemon[1782]: - cpuview_daemon
Sep 04 23:24:51 oc-vm lxd.daemon[1782]: - loadavg_daemon
Sep 04 23:24:51 oc-vm lxd.daemon[1782]: - pidfds
Sep 04 23:24:52 oc-vm lxd.daemon[1625]: => Starting LXD
Sep 04 23:24:53 oc-vm lxd.daemon[1814]: time="2023-09-04T23:24:53+05:30" level=warning msg=" - Couldn't find the CGroup blkio.weight, disk priority will be ignored"
Sep 04 23:24:57 oc-vm lxd.daemon[1625]: => LXD is ready

lxd 命令:

lxc launch images:ubuntu/22.04 infra-gitlab-01 --vm -c limits.cpu=3 -c limits.memory=3GiB --device root,size=10GiB

非常感谢您的帮助。提前致谢。

相关内容