Multipass #
Multipass orchestrates virtual Ubuntu instances https://multipass.run
# 安装
snap install multipass
# Find available images
multipass find
# 使用本地 image
multipass launch --name k3s --mem 1G --disk 5G file://~/ubuntu-20.04-server-cloudimg-amd64.img
# 默认就是 cpus 1, mem 1G, disk 5G
# 参考:https://multipass.run/docs/launch-command
multipass launch --name rd-node-1 --cpus 10 --mem 20G --disk 20G
multipass launch --name rd-node-2 --cpus 10 --mem 20G --disk 20G
multipass launch --name qa-node-1 --cpus 10 --mem 20G --disk 20G
multipass launch --name qa-node-2 --cpus 10 --mem 20G --disk 20G
multipass launch --name qa-node-3 --cpus 10 --mem 20G --disk 20G
# 挂载
multipass mount /home/work/ecsp/deploy/ecsp-edge rd-node-1:/home/work/host
multipass mount /home/work/ecsp/deploy/ecsp-edge rd-node-2:/home/work/host
multipass mount /home/work/ecsp/deploy/ecsp-edge qa-node-1:/home/work/host
multipass mount /home/work/ecsp/deploy/ecsp-edge qa-node-2:/home/work/host
multipass mount /home/work/ecsp/deploy/ecsp-edge qa-node-3:/home/work/host
# 为 VM 启动一个 shell
multipass shell rd-node-1
multipass shell rd-node-2
multipass shell qa-node-1
multipass shell qa-node-2
multipass shell qa-node-3
# 安装需要的
sudo su
apt update
apt install net-tools selinux-utils
# 删除
# Delete instances
multipass delete ecsp-node-1
multipass delete ecsp-node-2
# Purge all deleted instances permanently
multipass purge
网络 #
使用的是桥接模式,因为:
- 主机可以 ping 通虚拟机
- 所以不是
NAT
- 所以不是
- 虚拟机之间可以 ping 通
- 所以不是
NAT
- 所以不是
- 虚拟机可以上网
- 所以不是
Host-Only
- 所以不是
叶王 © 2013-2024 版权所有。如果本文档对你有所帮助,可以请作者喝饮料。