multipass 切换成 lxd 后端之后,创建新的 vm时报错

multipass 切换成 lxd 后端之后,创建新的 vm时报错

multipass launch -m 4G -n master --bridged
----------------------------------------------------------------
launch failed: Cannot connect to /var/snap/lxd/common/lxd/unix.socket: QLocalSocket::connectToServer: Invalid name
----------------------------------------------------------------

解决问题路径

systemctl status snap.multipass.multipassd.service

-------------------------------------------------------------------
snap.multipass.multipassd.service - Service for snap application multipass.multipassd
     Loaded: loaded (/etc/systemd/system/snap.multipass.multipassd.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2022-04-27 10:21:42 CST; 4min 20s ago
   Main PID: 995 (multipassd)
      Tasks: 11 (limit: 38329)
     Memory: 89.9M
        CPU: 1.926s
     CGroup: /system.slice/snap.multipass.multipassd.service
             └─995 /snap/multipass/6904/bin/multipassd --verbosity debug --logger platform

4月 27 10:21:44 jeffse-pc multipassd[995]: Could not update manifest: failed to download from 'https://cdimage.ubuntu.com/ubuntu-core/16/stable/current/ubuntu-core-16-amd64.img.xz': Hos>
4月 27 10:21:44 jeffse-pc multipassd[995]: Cannot retrieve headers for https://cloud-images.ubuntu.com/buildd/releases/bionic/release/bionic-server-cloudimg-amd64-disk.img: Host cloud-i>
4月 27 10:21:44 jeffse-pc multipassd[995]: Could not update manifest: failed to download from 'https://cloud-images.ubuntu.com/buildd/releases/bionic/release/bionic-server-cloudimg-amd6>
4月 27 10:21:44 jeffse-pc multipassd[995]: Error getting https://codeload.github.com/canonical/multipass-workflows/zip/refs/heads/main: Host codeload.github.com not found - trying cache.
4月 27 10:21:44 jeffse-pc multipassd[995]: gRPC listening on unix:/var/snap/multipass/common/multipass_socket, SSL:on
4月 27 10:21:44 jeffse-pc multipassd[995]: Cannot connect to /var/snap/lxd/common/lxd/unix.socket: QLocalSocket::connectToServer: Invalid name
4月 27 10:21:44 jeffse-pc multipassd[995]: Starting Multipass 1.8.0
4月 27 10:21:44 jeffse-pc multipassd[995]: Daemon arguments: /snap/multipass/6904/bin/multipassd --verbosity debug --logger platform
4月 27 10:23:15 jeffse-pc multipassd[995]: Cannot retrieve headers for https://cloud-images.ubuntu.com/buildd/releases/focal/release/focal-server-cloudimg-amd64-disk.img: Network timeout
4月 27 10:23:15 jeffse-pc multipassd[995]: Could not update manifest: failed to download from 'https://cloud-images.ubuntu.com/buildd/releases/focal/release/focal-server-cloudimg-amd64->
--------------------------------------------------------------

问题分析

#看日志镜像下载不下来导致的问题,原因是镜像的地址有问题
https://cdimage.ubuntu.com/ubuntu-core/16/stable/current/ubuntu-core-16-amd64.img.xz':
https://cloud-images.ubuntu.com/buildd/releases/bionic/release/bionic-server-cloudimg-amd64-disk.img:
多了 ': 和 :
# 实际上不是,是因为没有安装 lxd
sudo snap install lxd

再重新启动宿主机,问题解决
可以参考我写的这篇: https://www.jianshu.com/p/560d63615318

你可能感兴趣的:(multipass 切换成 lxd 后端之后,创建新的 vm时报错)