用不惯VMware?试试这款更轻量级的虚拟机!
程序员的成长之路
共 4018字,需浏览 9分钟
·
2021-12-28 19:14
阅读本文大概需要 2.8 分钟。
来自:网络
说起虚拟机工具大家最熟悉的自然是 VMware,功能很多很强大,最让我认可的地方就是可以非常方便的修改虚拟机的配置,让虚拟机达到自己想要的性能~~
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
总结
相关链接
推荐阅读:
内容包含Java基础、JavaWeb、MySQL性能优化、JVM、锁、百万并发、消息队列、高性能缓存、反射、Spring全家桶原理、微服务、Zookeeper、数据结构、限流熔断降级......等技术栈!
⬇戳阅读原文领取! 朕已阅
评论