- 显示所有的虚拟机
multipass list
multipass stop primary
multipass delete primary
创建一个虚拟机
- 默认
multipass launch --name foo
- 指定核与内存
multipass launch -n bar -c 4 -m 4G -d 40G
multipass launch -n vm01 -c 4 -m 4G -d 40G
修改配置(文件地址):
sudo vim /var/root/Library/Application\ Support/multipassd/multipassd-vm-instances.json
/var/root/Library/Application Support/multipassd/multipassd-vm-instances.json
使用命令 df -h
查看硬盘空间。
df -h,修改以后:
建立映射
multipass mount /Users/liweiwei1419/share vm01:/home/ubuntu/data
参考资料:
multipassd 修改 CPU 个数和磁盘内存:https://www.atpeaz.com/change...
按照 Change Multipass instance memory and CPU allocation after launch 修改配置:
步骤 1:
sudo launchctl unload /Library/LaunchDaemons/com.canonical.multipassd.plist
步骤 2:
sudo vi /var/root/Library/Application\ Support/multipassd/multipassd-vm-instances.json
步骤 3:
sudo launchctl load /Library/LaunchDaemons/com.canonical.multipassd.plist
cat /proc/cpuinfo | grep processor | wc -l