C:\Users\Administrator>multipass mount E:\ubuntu\ ubuntu:/usr/houshuai/ mount failed: Mounts are disabled on this installation of Multipass.
See https://multipass.run/docs/set-command#local.privileged-mounts for information on how to enable them.
C:\Users\Administrator>multipass set local.privileged-mounts=true
C:\Users\Administrator>multipass mount E:\ubuntu\ ubuntu:/usr/houshuai/ mount failed: cannot connect to the multipass socket Please ensure multipassd is running and 'localhost:50051' is accessible
deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
ubuntu 22.04 清华源
1 2 3 4 5 6 7 8 9 10 11 12 13
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
# 预发布软件源,不建议启用 # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
ubuntu 22.04 中科大源
1 2 3 4 5 6 7 8 9 10
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
ubuntu 22.04 163源
1 2 3 4 5 6 7 8 9 10
deb http://mirrors.163.com/ubuntu/ jammy main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ jammy-security main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ jammy-updates main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ jammy-proposed main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ jammy-backports main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ jammy main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ jammy-security main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ jammy-updates main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ jammy-proposed main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ jammy-backports main restricted universe multiverse
root@gitlab:~# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 172.25.160.1 0.0.0.0 UG 0 0 0 eth0 172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0 172.20.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-1cd785becad1 172.25.160.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
注意这网关Gateway 是 172.25.160.1
修改配置文件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
root@gitlab:~# cd /etc/netplan/ root@gitlab:/etc/netplan# ls 50-cloud-init.yaml 50-cloud-init.yaml111 50-cloud-init.yaml222 root@gitlab:/etc/netplan# cat 50-cloud-init.yaml # This file is generated from information provided by the datasource. Changes # to it will not persist across an instance reboot. To disable cloud-init's # network configuration capabilities, write a file # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: # network: {config: disabled} network: ethernets: eth0: addresses: [172.25.160.160/24] #设置静态IP和掩码 gateway4: 172.25.160.1 #设置网关地址 dhcp4: false #禁用DHCP nameservers: addresses: [114.114.114.114, 8.8.8.8] # 设置主、备DNS version: 2 root@gitlab:/etc/netplan# sudo netplan apply