Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

虚拟机 #205

Open
vislee opened this issue Jun 15, 2024 · 0 comments
Open

虚拟机 #205

vislee opened this issue Jun 15, 2024 · 0 comments

Comments

@vislee
Copy link
Owner

vislee commented Jun 15, 2024

ubuntu公司推出一款虚拟机multipass可以在linux/Win/macOS系统上运行ubuntu系统。

安装

https://multipass.run/install

macOS可以使用brew安装

brew install multipass

安装好后查看版本和帮助

multipass -h
multipass --version

查看虚拟机支持的镜像

multipass find

22.04                       jammy             20240614         Ubuntu 22.04 LTS

安装虚拟机

multipass launch -h
multipass launch -n ubt -c 2 -m 2G -d 10G jammy --network en0

设置网络

multipass networks
multipass set local.bridged-network=en0

查看已经安装好的虚拟机实例

multipass list
multipass ls

进入虚拟机实例:

multipass shell  ubt -----虚拟机名称

启停虚拟机实例

multipass start ubt
multipass stop ubt

挂载/卸载目录

multipass mount ./src ubt:/home/ubuntu/src
multipass umount ubt:/home/ubuntu/src

文件传输

multipass transfer

错误处理

multipass ls
list failed: cannot connect to the multipass socket

sudo launchctl unload /Library/LaunchDaemons/com.canonical.multipassd.plist
sudo launchctl load /Library/LaunchDaemons/com.canonical.multipassd.plist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant