Skip to content

Commit 653bcd9

Browse files
authored
Merge branch 'canonical:main' into snapcraft-create-snap
2 parents f54f4db + bdda5af commit 653bcd9

11 files changed

+2253
-8
lines changed

multipass/Linux.md

Lines changed: 320 additions & 0 deletions
Large diffs are not rendered by default.

multipass/Windows.md

Lines changed: 296 additions & 0 deletions
Large diffs are not rendered by default.

multipass/explanation.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

multipass/how-to-guides.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

multipass/how-to/get_started_with_multipas_linux.md

Lines changed: 320 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 378 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,378 @@
1+
saviq | 2024-04-09 11:52:50 UTC | #1
2+
3+
> See also: [How to use VirtualBox in Multipass on macOS](/t/16591), [How to use a different terminal on macOS](/t/14955)
4+
5+
**Contents:**
6+
7+
- [Check prerequisites](#heading--check-prerequisites)
8+
- [Install, upgrade, uninstall](#heading--install-upgrade-uninstall)
9+
- [Using the installer package](#heading--use-the-installer-package)
10+
- [Using `brew`](#heading--use-brew)
11+
- [Run](#heading--run)
12+
13+
14+
<a href="#heading--check-prerequisites"><h2 id="heading--check-prerequisites">Check prerequisites</h2></a>
15+
16+
<!--### Hypervisor.framework / hyperkit-->
17+
18+
The default backend on macOS is `qemu`, wrapping Apple's Hypervisor.framework. You can use any Mac (M1, M2, or Intel based) with _macOS 10.15 Catalina_ or later installed.
19+
20+
<a href="#heading--install-upgrade-uninstall"><h2 id="heading--install-upgrade-uninstall">Install, upgrade, uninstall</h2></a>
21+
22+
To install Multipass on macOS, you have two options: the installer package or [`brew`](https://brew.sh/). Upgrading and uninstallation options depend on this choice as well.
23+
24+
<a href="#heading--use-the-installer-package"><h3 id="heading--use-the-installer-package">Using the installer package</h3></a>
25+
26+
Download the latest installer from [here](https://multipass.run/download/macos). You can also get pre-release versions from [our GitHub releases page](https://github.com/canonical/multipass/releases/) - it's the `.pkg` package.
27+
28+
29+
If you want Tab completion on the command line, install [`bash-completion@2` from `brew`](https://formulae.brew.sh/formula/bash-completion@2) and follow these [instructions](https://docs.brew.sh/Shell-Completion) on updating your `.bashrc` file.
30+
31+
Activate the downloaded installer and it will guide you through the necessary steps. You will need an account with administrator privileges to complete the installation.
32+
33+
![Multipass installer on macOS|658x475](upload://oBqM17GtMd6dzpBJ2OWl3fexIP2.png)
34+
35+
To uninstall, run the script:
36+
```plain
37+
$ sudo sh "/Library/Application Support/com.canonical.multipass/uninstall.sh"
38+
```
39+
40+
<a href="#heading--use-brew"><h3 id="heading--use-brew">Using `brew`</h3></a>
41+
42+
If you don't have it already, [install Brew](https://brew.sh/). Then, to install Multipass simply execute:
43+
44+
```plain
45+
$ brew install multipass
46+
```
47+
48+
To uninstall while keeping your VMs and data, you can use:
49+
50+
```plain
51+
$ brew uninstall multipass
52+
```
53+
54+
[note type="caution"]
55+
**Caveats:**
56+
Although Brew supports the `--zap` option to remove all data, it does not allow Multipass to remove all the VMs and data properly. The Multipass daemon needs to be alive and running to unregister VMs from certain backends (e.g. VirtualBox). However, Brew executes the zap procedure strictly after the uninstall step. By then, the Multipass daemon is no longer available.
57+
58+
[This issue report](https://github.com/Homebrew/homebrew-cask/issues/85498) has more information. The workaround is to remove VMs manually *before* uninstalling:
59+
60+
1. `multipass delete --purge --all`
61+
2. `brew uninstall --zap multipass # to destroy all other data, too`
62+
[/note]
63+
64+
<a href="#heading--run"><h2 id="heading--run">Run</h2></a>
65+
66+
You’ve installed Multipass. Time to run your first commands! Use `multipass version` to check your version or `multipass launch` to create your first instance.
67+
68+
<!--PREVIOUS DRAFT:
69+
## Prerequisites
70+
71+
### Hypervisor.framework / hyperkit
72+
73+
The default backend on macOS is `hyperkit` on Intel, and `qemu` on the M1, wrapping Apple's Hypervisor.framework. You can use any M1 Mac, or a _2010_ or newer Intel Mac with _macOS 10.14 Mojave_ or later installed.
74+
75+
## Installation
76+
77+
To install Multipass on macOS, you have two options: the installer package or [`brew`](https://brew.sh/):
78+
79+
### Installer
80+
81+
Download the latest installer from [our GitHub releases page](https://github.com/CanonicalLtd/multipass/releases/) - it's the `.pkg` package.
82+
83+
If you want Tab completion on the command line, install [`bash-completion` from `brew`](https://formulae.brew.sh/formula/bash-completion) first.
84+
85+
Activate the downloaded installer and it will guide you through the steps necessary. You will need an account with Administrator privileges to complete the installation.
86+
87+
![Multipass installer on macOS|658x475](upload://oBqM17GtMd6dzpBJ2OWl3fexIP2.png)
88+
89+
There's a script to uninstall:
90+
```plain
91+
$ sudo sh "/Library/Application Support/com.canonical.multipass/uninstall.sh"
92+
```
93+
94+
### Brew
95+
Have a look at [`brew.sh`](https://brew.sh/) on instructions to install Brew itself. Then, it's a simple:
96+
```plain
97+
$ brew install --cask multipass
98+
```
99+
100+
To uninstall:
101+
```plain
102+
$ brew uninstall multipass
103+
# or, to destroy all data
104+
$ brew uninstall --zap multipass
105+
```
106+
107+
## First run
108+
109+
Once installed, open the **Terminal** app and you can use `multipass launch` to create your first instance.
110+
111+
With `multipass version` you can check which version you have running:
112+
113+
```plain
114+
$ multipass version
115+
multipass 1.9.0+mac
116+
multipassd 1.9.0+mac
117+
```
118+
119+
Have a look at [Working with instances](/t/working-with-multipass-instances/8422) to quickly get off the ground!
120+
121+
-->
122+
123+
-------------------------
124+
125+
alexsartin | 2019-06-29 03:20:41 UTC | #2
126+
127+
How do you uninstall multipass on Mac OS?
128+
129+
-------------------------
130+
131+
shuuji3 | 2019-10-07 15:17:32 UTC | #3
132+
133+
If we have [Homebrew](https://brew.sh/), we can install/uninstall multipass with the following commands:
134+
135+
**Install**
136+
137+
$ brew cask install multipass
138+
$ multipass version
139+
multipass 0.8.0+mac
140+
multipassd 0.8.0+mac
141+
142+
**Uninstall**
143+
144+
$ brew cask uninstall multipass
145+
146+
-------------------------
147+
148+
saviq | 2019-10-08 16:49:43 UTC | #4
149+
150+
Thanks @shuuji3 I've now incorporated that into the main post above.
151+
152+
-------------------------
153+
154+
shuuji3 | 2019-10-09 00:39:28 UTC | #5
155+
156+
Thanks for improving the documentation!
157+
It should help many developers. :slight_smile:
158+
159+
-------------------------
160+
161+
henryschreineriii | 2019-12-16 14:56:56 UTC | #6
162+
163+
By the way, you've left off the "cask" part of the uninstall commands, so they don't work, and give an "Error: Unknown command: zap" message, which isn't very helpful. It's `brew cask uninstall multipass` and `brew cask zap multipass`. Otherwise, thanks for the info!
164+
165+
-------------------------
166+
167+
saviq | 2019-12-18 00:07:30 UTC | #7
168+
169+
Hi @henryschreineriii sorry about that, thanks for noticing! Updated the post.
170+
171+
-------------------------
172+
173+
sven | 2019-12-18 19:33:03 UTC | #8
174+
175+
[quote="saviq, post:1, topic:8329"]
176+
multipass version
177+
[/quote]
178+
179+
Hi, many thanks for the tool and documentation.
180+
181+
Two things come to my mind:
182+
183+
1. Could you provide information here (as on the [Windows installation page](https://discourse.ubuntu.com/t/installing-multipass-for-windows/9547)) which prerequisites, especially virtualisation methods are used/available?
184+
185+
2. With the 1.0 release of today, can you update the output of `multipass version` at this page?
186+
187+
Thanks
188+
189+
-------------------------
190+
191+
saviq | 2019-12-18 21:08:08 UTC | #9
192+
193+
Hi @sven, I've now made the changes you mentioned. Thanks for prompting :).
194+
195+
-------------------------
196+
197+
saviq | 2020-02-07 09:22:54 UTC | #10
198+
199+
3 posts were split to a new topic: [Minimum macOS version for Multipass?](/t/minimum-macos-version-for-multipass/14301)
200+
201+
-------------------------
202+
203+
tgwaste | 2020-03-06 17:52:13 UTC | #12
204+
205+
If you did not use brew to install you can uninstall from macOS like this:
206+
207+
sudo sh "/Library/Application Support/com.canonical.multipass/uninstall.sh"
208+
209+
-------------------------
210+
211+
ya-bo-ng | 2021-03-09 16:30:23 UTC | #13
212+
213+
We have [received an issue](https://github.com/canonical-web-and-design/multipass.run/issues/120) on the website about this content.
214+
215+
TLDR;
216+
Homebrew sends GA events. Which can be disabled but the user needs to know-how. I would suggest adding a small comment with a link to docs to disable analytics.
217+
218+
-------------------------
219+
220+
apagiaro | 2020-12-08 10:42:59 UTC | #14
221+
222+
Is there a way to install multipass from the source code on macOS?
223+
224+
-------------------------
225+
226+
undefynd | 2020-12-11 00:16:08 UTC | #15
227+
228+
The `brew` command you guys specify in the documentation is outdated.
229+
230+
to install run
231+
> brew install --cask multipass
232+
233+
-------------------------
234+
235+
ricab | 2020-12-11 10:39:32 UTC | #16
236+
237+
Hi @apagiaro, we're keeping some macOS and Windows parts closed-source for now, so no, we don't currently provide a way to build or install from source on those platforms.
238+
239+
-------------------------
240+
241+
ricab | 2020-12-11 10:41:19 UTC | #17
242+
243+
Hi @undefynd, thanks for point that out. I have just updated those commands.
244+
245+
-------------------------
246+
247+
williamli | 2020-12-30 10:45:48 UTC | #18
248+
249+
I think the uninstall command to zap is
250+
251+
brew uninstall --zap --cask multipass
252+
253+
-------------------------
254+
255+
saviq | 2021-01-09 09:30:04 UTC | #19
256+
257+
[quote="williamli, post:18, topic:8329"]
258+
`brew uninstall --zap --cask multipass`
259+
[/quote]
260+
261+
Doesn't look it:
262+
263+
```
264+
Error: invalid option: --zap
265+
```
266+
267+
-------------------------
268+
269+
leon-mintz | 2023-02-10 08:36:34 UTC | #20
270+
271+
After installing with `brew` and adding my user to the admin group, I still need a `sudo` to use multipass, otherwise
272+
```
273+
$ multipass shell charm-dev-29
274+
shell failed: The client is not authenticated with the Multipass service.
275+
Please use 'multipass authenticate' before proceeding.
276+
```
277+
And authenticate doesn't seem to work: the passphrase gets rejected:
278+
```
279+
$ sudo multipass authenticate
280+
Password:
281+
Please enter passphrase:
282+
authenticate failed: Passphrase is not set. Please `multipass set local.passphrase` with a trusted client.
283+
```
284+
What's a trusted client?
285+
286+
-------------------------
287+
288+
ricab | 2023-02-10 12:43:44 UTC | #21
289+
290+
Hey @leon-mintz, have a look at at these docs on [security](https://multipass.run/docs/about-security) and [how to authenticate](https://multipass.run/docs/authenticating-clients). The daemon will only deal with clients/users that it trusts. On Linux, that's a) the first user belonging to the `sudo` group (+ `root`) who connects (presumably the one who installed the application) and b) clients that were able to authenticate with `multipass authenticate` thereafter.
291+
292+
So, when an administrator who installs multipass wants to allow others, he or she needs to set a password and share it with allowed users, who then need to `multipass authenticate` with it. You probably connected as root the first time, so only root is trusted by `multipassd`.
293+
294+
-------------------------
295+
296+
townsend | 2023-02-10 12:54:05 UTC | #22
297+
298+
Hi @leon-mintz!
299+
300+
I will add that since `sudo multipass ...` works, this indicates that you used `sudo multipass ...` first, so `root` is the trusted user, not your own user. Also, since `sudo` is the trusted user, you will need to do the following:
301+
```plain
302+
$ sudo multipass set local.passphrase
303+
Please enter passphrase:
304+
Please re-enter passphrase:
305+
$ multipass authenticate
306+
Please enter passphrase:
307+
```
308+
309+
Also, it's not advised to run `multipass` with `sudo`. Is there a reason why you've done that?
310+
311+
-------------------------
312+
313+
leon-mintz | 2023-02-10 15:17:27 UTC | #23
314+
315+
[quote="townsend, post:22, topic:8329"]
316+
it’s not advised to run `multipass` with `sudo`. Is there a reason why you’ve done that?
317+
[/quote]
318+
319+
I was using `sudo` because my user account doesn't have permissions in `/opt/brew`:
320+
```bash
321+
$ brew install --cask multipass
322+
Error: /opt/homebrew is not writable. You should change the
323+
ownership and permissions of /opt/homebrew back to your
324+
user account:
325+
sudo chown -R $(whoami) /opt/homebrew
326+
```
327+
328+
[quote="ricab, post:21, topic:8329"]
329+
You probably connected as root the first time, so only root is trusted by `multipassd`.
330+
[/quote]
331+
332+
Exactly.
333+
334+
Thank you!
335+
336+
-------------------------
337+
338+
garyKrause | 2023-04-12 14:21:07 UTC | #24
339+
340+
I just installed multipass using homebrew
341+
```
342+
└─(10:03:56)──> brew install --cask multipass
343+
Warning: Cask 'multipass' is already installed.
344+
345+
To re-install multipass, run:
346+
brew reinstall --cask multipass
347+
```
348+
349+
but it appears it's not part of my PATH
350+
```
351+
└─(10:06:16)──> multipass
352+
zsh: command not found: multipass
353+
```
354+
355+
I have tried restarting my shell as well with same results.
356+
357+
Edit: I installed with the package and had the same results. I am on Ventura 13.3 (22E252) using a 2021 MBP 16in M1 w/ 32GB RAM. Are there additionaly steps I'm missing?
358+
359+
-------------------------
360+
361+
bainmckay | 2023-09-15 18:36:17 UTC | #25
362+
363+
Hi can I move a multipass VM repository to another disk and run it? I know I can move the files (instance .iOS and .img) to another disk as a way to snapshot it. But can I move a VM and run it from another drive
364+
365+
-------------------------
366+
367+
georgeliaojia | 2023-09-18 18:20:11 UTC | #26
368+
369+
Hi @bainmckay , if I did not understand wrong, you want to move one VM instance directory instead of all multipassd data to another drive. Multipass CLI do not have such a support but maybe you can use create symbolic link (ln -s <old_directory> <new_directory>) between the new and old directory as a workaround.
370+
371+
-------------------------
372+
373+
bainmckay | 2023-11-03 07:12:57 UTC | #27
374+
375+
Yes. That may work. Thank you.
376+
377+
-------------------------
378+

0 commit comments

Comments
 (0)