Multipass

Multipass #

canonical/multipass Github stars Github forks Language Last Tag Last commit

Multipass orchestrates virtual Ubuntu instances https://multipass.run

# 安装

# Find available images
multipass find

# 使用本地 image
multipass launch --name rd-node-1 --mem 1G --disk 5G file://~/multipass/ubuntu-22.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 file://~/multipass/ubuntu-22.04-server-cloudimg-amd64.img
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

本文访问量

本站总访问量

本站总访客数