Ubuntu Multipass 尝鲜

Ubuntu Multipass 尝鲜Multipass 是 Ubuntu 推出的一个跨平台的虚拟机管理工具 支持 Windows macOS 和 Linux 操作系统

Multipass 是 Ubuntu 推出的一个跨平台的虚拟机管理工具,支持:Windows, macOS 和 Linux 操作系统。

官方网站: Multipass orchestrates virtual Ubuntu instancesMultipass is a CLI to launch and manage VMs on Windows, Mac and Linux that simulates a cloud environment with support for cloud-init. Get Ubuntu on-demand with clean integration to your IDE and version control on your native platform.Ubuntu Multipass 尝鲜https://multipass.run/

在 Windows 平台上,底层依赖 Hyper-V 提供的虚拟化环境。

本次尝鲜在 Windows 10 操作系统上进行。

下载安装包: multipass-1.8.0+win-win64.exe  ( 21M 大小 )

安装完成后,显示如下文件:

PS X:\...\Multipass\bin> dir Directory: X:\xxx\Multipass\bin Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 6/12/2021 12:02 PM platforms -a---- 18/10/2021 9:35 PM  concrt140.dll -a---- 26/10/2021 12:38 AM  dbghelp.dll -a---- 26/03/2021 5:34 AM  libcrypto-1_1-x64.dll -a---- 26/10/2021 12:38 AM 86528 libgcc_s_sjlj-1.dll -a---- 26/10/2021 12:38 AM  libglib-2.0-0.dll -a---- 26/10/2021 12:38 AM 79707 libgthread-2.0-0.dll -a---- 26/10/2021 12:38 AM  libiconv-2.dll -a---- 26/10/2021 12:38 AM  libintl-8.dll -a---- 26/03/2021 5:34 AM  libssl-1_1-x64.dll -a---- 26/10/2021 12:38 AM 18944 libssp-0.dll -a---- 18/10/2021 9:35 PM  msvcp140.dll -a---- 18/10/2021 9:35 PM 23952 msvcp140_1.dll -a---- 18/10/2021 9:35 PM  msvcp140_2.dll -a---- 18/10/2021 9:35 PM 56208 msvcp140_atomic_wait.dll -a---- 18/10/2021 9:35 PM 20368 msvcp140_codecvt_ids.dll -a---- 26/10/2021 12:29 AM  multipass.exe -a---- 26/10/2021 12:29 AM  multipass.gui.exe -a---- 26/10/2021 12:29 AM  multipassd.exe -a---- 25/10/2021 11:59 PM 18886 multipass_wt.ico -a---- 26/10/2021 12:38 AM  PocoFoundation.dll -a---- 26/10/2021 12:38 AM  PocoZip.dll -a---- 17/06/2015 2:37 AM  qemu-img.exe -a---- 26/10/2021 12:38 AM  Qt5Core.dll -a---- 26/10/2021 12:38 AM  Qt5Gui.dll -a---- 26/10/2021 12:38 AM  Qt5Network.dll -a---- 26/10/2021 12:38 AM  Qt5Widgets.dll -a---- 26/10/2021 12:38 AM  ssh.dll -a---- 26/10/2021 12:29 AM  sshfs_server.exe -a---- 18/10/2021 9:35 PM 97168 vcruntime140.dll -a---- 18/10/2021 9:35 PM 37240 vcruntime140_1.dll

上述文件中比较关键的文件包含: ssh 、qemu 等文件。

Ubuntu Multipass 尝鲜

 

默认 Multipass 会安装在 C 盘的系统目录中,如果系统空间不足,会出现以下提示信息:

PS C:\Users\xxxx> multipass launch --name foo launch failed: Conversion of image to vhdx failed with error: SetEndOfFile error: 112 qemu-img.exe: error while writing sector : Input/output error

在安装 VM 虚拟机的过程中,加入了收集用户使用信息的步骤:

PS C:\Users\xxxx> multipass launch --name foo One quick question before we launch … Would you like to help the Multipass developers, by sending anonymous usage data? This includes your operating system, which images you use, the number of instances, their properties and how long you use them. We’d also like to measure Multipass’s speed. Send usage data (yes/no/Later)?

为支持 ssh 登陆的密钥保存目录:

C:\Users\xxx\AppData\Roaming\multipass\client-certificate
 Directory: C:\Users\xxx\AppData\Roaming\multipass\client-certificate Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 6/12/2021 12:02 PM 595 multipass_cert.pem -ar--- 6/12/2021 12:02 PM 241 multipass_cert_key.pem
PS C:\Users\xxx> multipass launch --name ubuntu_0001 launch failed: Invalid arguments supplied Invalid instance name supplied: ubuntu_0001 PS C:\Users\xxx> multipass launch --name foo launch failed: Conversion of image to vhdx failed with error: SetEndOfFile error: 112 qemu-img.exe: error while writing sector : Input/output error
PS C:\Users\xxx> multipass launch --name foo Waiting for initialization to complete -

 

PS C:\Users\xxx> multipass launch --name foo Launched: foo

 

PS C:\Users\xxx> multipass exec foo -- lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focal
PS C:\Users\xxx> multipass list Name State IPv4 Image foo Running 172.26.167.168 Ubuntu 20.04 LTS PS C:\Users\xxx> multipass delete foo PS C:\Users\xxx> multipass purge
PS C:\Users\xxx> multipass find Image Aliases Version Description core core16  Ubuntu Core 16 core18  Ubuntu Core 18 18.04 bionic  Ubuntu 18.04 LTS 20.04 focal,lts  Ubuntu 20.04 LTS 21.04 hirsute  Ubuntu 21.04 21.10 impish  Ubuntu 21.10 appliance:adguard-home  Ubuntu AdGuard Home Appliance appliance:mosquitto  Ubuntu Mosquitto Appliance appliance:nextcloud  Ubuntu Nextcloud Appliance appliance:openhab  Ubuntu openHAB Home Appliance appliance:plexmediaserver  Ubuntu Plex Media Server Appliance anbox-cloud-appliance latest Anbox Cloud Appliance minikube latest minikube is local Kubernetes

虚拟机文件的存储路径:

C:\Windows\System32\config\systemprofile\AppData\Roaming\multipassd\vault

Ubuntu Multipass 尝鲜

 

Ubuntu Multipass 尝鲜

 

从测试过程来看 Multipass 整体上和 windows 集成的操作流程很顺畅,可以作为一个备选的开发环境。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/201013.html原文链接:https://javaforall.net

(0)
上一篇 2026年3月20日 上午10:07
下一篇 2026年3月20日 上午10:07


相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号