换掉VMware?轻量级虚拟机,横空出世!
Java项目开发
共 10327字,需浏览 21分钟
·
2022-01-11 16:42
大家好,我是小编。
Multipass
开始使用
$ multipass version
创建Ubuntu虚拟机
$ multipass find
Image Aliases Version Description
snapcraft:core18 20201111 Snapcraft builder for Core 18
snapcraft:core20 20201111 Snapcraft builder for Core 20
core core16 20200818 Ubuntu Core 16
core18 20200812 Ubuntu Core 18
16.04 xenial 20210128 Ubuntu 16.04 LTS
18.04 bionic 20210129 Ubuntu 18.04 LTS
20.04 focal,lts 20210223 Ubuntu 20.04 LTS
20.10 groovy 20210209 Ubuntu 20.10
appliance:adguard-home 20200812 Ubuntu AdGuard Home Appliance
appliance:mosquitto 20200812 Ubuntu Mosquitto Appliance
appliance:nextcloud 20200812 Ubuntu Nextcloud Appliance
appliance:openhab 20200812 Ubuntu openHAB Home Appliance
appliance:plexmediaserver 20200812 Ubuntu Plex Media Server Appliance
$ multipass launch --name dg
Launched: dg
$ multipass exec dg -- lsb_release -d
Description: Ubuntu 18.04.4 LTS
操作虚拟机
Name State IPv4 Image
dg Running 192.168.24.5 Ubuntu 18.04 LTS
$ multipass info --all
Name: dg
State: Running
IPv4: 192.168.24.5
Release: Ubuntu 18.04.4 LTS
Image hash: fe3030933742 (Ubuntu 18.04 LTS)
Load: 0.00 0.00 0.00
Disk usage: 1.5G out of 4.7G
Memory usage: 112.1M out of 985.7M
$ multipass shell dg
# 暂停
$ multipass stop dg
# 启动
$ multipass start dg
# 删除
$ multipass delete dg
# 释放
$ multipass purge dg
$ multipass launch --name ubuntu --cloud-init config.yaml
#cloud-config
runcmd:
- curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
- sudo apt-get install -y nodejs
- wget https://releases.leanapp.cn/leancloud/lean-cli/releases/download/v0.21.0/lean-cli-x64.deb
- sudo dpkg -i lean-cli-x64.deb
总结
相关链接
怎么接私活?这个渠道你100%有用!请收藏!
喜欢文章,点个在看
评论