Skip to content

Commit 5980d22

Browse files
skara9bmcutler
andauthored
[Documentation:Developer] merge ARM docs for installation (#626)
Currently we have two separate pages: "VM Install using Vagrant" and "Vagrant QEMU on Apple Silicon". This PR merges the QEMU page into the main one. --------- Co-authored-by: Barb Cutler <[email protected]> Co-authored-by: Barb Cutler <Barb Cutler>
1 parent e593388 commit 5980d22

File tree

3 files changed

+125
-276
lines changed

3 files changed

+125
-276
lines changed

_docs/developer/getting_started/vm_install_using_vagrant.md

Lines changed: 124 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,9 @@ Unix/Linux). The installation process will create a new Virtual
1414
Machine (VM) on your computer and the VM will use the Ubuntu GNU/Linux
1515
operating system.
1616

17-
__Note:__ We only officially support and test development using VirtualBox.
18-
The instructions below are for VirtualBox. While alternatively using
19-
VMWare should work, we have not tested this, and do not provide these
20-
instructions.
21-
22-
---
23-
24-
_IMPORTANT NOTE: If you are using an Apple Mac computer
25-
with [Apple Silicon (e.g., M1 or M2)](https://support.apple.com/en-us/HT211814),
26-
first released in late 2020, you will follow
27-
the [Vagrant QEMU instructions](/developer/getting_started/vm_install_using_vagrant_apple_silicon).
28-
If you using an Intel-based Mac, you will follow the instructions below._
17+
***NOTE:** We only officially support and test development using
18+
VirtualBox for AMD and Intel machines and QEMU for
19+
M-Series ARM MacOS machines.*
2920

3021
---
3122

@@ -51,18 +42,24 @@ If you using an Intel-based Mac, you will follow the instructions below._
5142
backend, which will be slower and can cause instability in the
5243
VM.
5344

54-
**Note:**
55-
This may stop programs like Docker Desktop and WSL 2 from
45+
***NOTE:** This may stop programs like Docker Desktop and WSL 2 from
5646
working. If these programs are essential to your workflow, consider
5747
looking up how to add a separate boot entry with "hypervisorlaunchtype"
58-
set to "off" for use with VirtualBox.
48+
set to "off" for use with VirtualBox.*
5949

60-
**Note:**
61-
Installing WSL2 may also reconfigure your OS to use Hyper-V or Windows hypervisor
50+
***NOTE:** Installing WSL2 may also reconfigure your OS to use Hyper-V or Windows hypervisor
6251
platform and prevent VirtualBox from working correctly. It is recommended to not install
63-
or use WSL2 alongside Virtualbox for now.
52+
or use WSL2 alongside VirtualBox for now.*
53+
54+
5. If you're on an M-series ARM MacOS (e.g., M1, M2, M3),
55+
you will be using QEMU with SMB file sharing.
56+
To enable this, open **System Settings** and navigate to **General > Sharing**.
57+
Press the (i) button next to **File Sharing**, and in the popup window
58+
click "Options...". Then turn on "Share files and folders using SMB" and
59+
check the box next to your name in the list below.
6460

65-
5. The complete installation process could take an hour or more. Make
61+
6. The complete installation process could take an hour or more and
62+
will probably fail if paused or interrupted. Make
6663
sure your internet connection is strong and consistent. You'll
6764
probably want to plug in your laptop power cord. Check your
6865
computer settings and make sure the machine does not hibernate or
@@ -92,8 +89,9 @@ If you using an Intel-based Mac, you will follow the instructions below._
9289
8. Locate **Virtualization**, and enable it.
9390
(Note: Some motherboards may call it SVM, AMD-V, VT-x/Vanderpool.
9491
If you cannot find the option to enable virtualization,
95-
[search Google](http://tinyurl.com/enable-virtualization) for a tutorial on enabling it with your motherboard.)
96-
9. Reboot your computer.
92+
[search Google](http://tinyurl.com/enable-virtualization)
93+
for a tutorial on enabling it with your motherboard.)
94+
9. Reboot your computer.
9795

9896
* **Windows 11**
9997
1. Open **Change advanced start-up options** by searching for it in the search bar.
@@ -112,30 +110,38 @@ If you using an Intel-based Mac, you will follow the instructions below._
112110
3. Locate **Virtualization** and enable it. (Some motherboards may call it SVM, AMD-V, VT-x/Vanderpool)
113111
4. Be sure to choose **Hardware Virtualization** in the **System -> Acceleration**
114112
settings of the virtual machine you are using.
115-
5. **Note:** If using secure boot, Vagrant may fail to work with VirtualBox.
113+
5. **NOTE:** If using secure boot, Vagrant may fail to work with VirtualBox.
116114
You will then either need to disable secure boot from the boot menu/BIOS or
117115
follow [these steps](https://era86.github.io/2018/01/24/vagrant-virtualbox-secureboot-in-ubuntu-1604.html)
118116
to self-sign the necessary packages to run Vagrant and VirtualBox.
119117

120118
2. DOWNLOAD AND INSTALL THE LATEST DEPENDENCIES
119+
*Follow the instructions below specific to your host operating system*
121120

122-
* You will need:
123-
*Follow the instructions below specific to your host operating system*
124-
121+
* You will need:
125122
* [Ruby](https://www.ruby-lang.org/en/downloads)
126123
* [Git](https://git-scm.com/downloads)
127-
* [VirtualBox](https://www.virtualbox.org/wiki/Download_Old_Builds_6_1)
128124
* [Vagrant](https://www.vagrantup.com)
125+
* *M-SERIES ARM MacOS:* [QEMU](https://www.qemu.org)
126+
* *EVERYONE ELSE:* [VirtualBox](https://www.virtualbox.org/wiki/Download_Old_Builds_6_1)
129127

130128

131129
* **MacOS**
132130
You can either go to respective sites and download the necessary binaries or
133-
install [Homebrew](http://brew.sh/), if you don't have it, and then run:
131+
install [Homebrew](http://brew.sh/), if you don't have it, and then:
132+
133+
If you have an M-series ARM Mac, run:
134+
```
135+
brew install --cask vagrant
136+
brew install qemu
137+
vagrant plugin install vagrant-qemu
138+
```
139+
140+
Or if you have an older Intel-based Mac, run:
134141
135142
```
136-
brew install --cask virtualbox
137143
brew install --cask vagrant
138-
vagrant plugin install vagrant-timezone
144+
brew install --cask virtualbox
139145
```
140146
141147
* **Windows**
@@ -159,14 +165,14 @@ If you using an Intel-based Mac, you will follow the instructions below._
159165
160166
* For Fedora, the latest version of VirtualBox is recommended to
161167
prevent errors. Download the RPM from the VirtualBox
162-
website. Make sure your version of Fedora is up to date using
168+
website. Make sure your version of Fedora is up to date using:
163169
```
164170
sudo dnf update
165171
sudo dnf upgrade
166172
```
167173
168-
and inputting your password. Then install the Virtual Box rpm
169-
using:
174+
and then inputting your password when prompted.
175+
Then install the Virtual Box rpm using:
170176
```
171177
sudo dnf install VirtualBox-xxxxx.rpm
172178
```
@@ -176,9 +182,6 @@ If you using an Intel-based Mac, you will follow the instructions below._
176182
sudo dnf install vagrant
177183
```
178184
179-
* **Note:**
180-
When running vagrant up, use `vagrant up --provider=virtualbox` so it doesn't default to libvirt
181-
182185
* **Common errors when running vagrant up (Fedora/RHEL)**
183186
184187
1. Missing virtnetworkd:
@@ -195,22 +198,24 @@ If you using an Intel-based Mac, you will follow the instructions below._
195198
run `vagrant destroy` before re-running `vagrant up --provider=virtualbox` again.
196199
197200
198-
3. CLONE THE [SUBMITTY REPOSITORY](https://github.com/Submitty/Submitty)
201+
4. CLONE THE [SUBMITTY REPOSITORY](https://github.com/Submitty/Submitty)
199202
200203
* Clone it to a location on your computer (the "host").
201204
202205
```
203206
git clone https://github.com/Submitty/Submitty.git
204207
```
205208
206-
**Note:** If you are not currently part of the Submitty organization on GitHub, you may want to
209+
***NOTE:** If you are not currently part of the Submitty organization on GitHub, you may want to
207210
[fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo)
208-
the repo and use the git url from your fork instead, especially if you are looking to contribute.
211+
the repo and use the git url from your fork instead, especially if you are looking to
212+
contribute. You will then make PRs to the main Submitty repository from branches on your fork.*
213+
209214
210-
* _OPTIONAL: If you will be developing code in one of the companion
215+
* **OPTIONAL:** If you will be developing code in one of the companion
211216
Submitty repositories (e.g., AnalysisTools, Lichen,
212217
Localization, RainbowGrades, Tutorial), also clone those
213-
repositories to the same directory. For example:_
218+
repositories to the same directory. For example:
214219
215220
```
216221
home
@@ -225,62 +230,81 @@ If you using an Intel-based Mac, you will follow the instructions below._
225230
└── Tutorial (optional)
226231
```
227232
228-
_This host directory structure will be shared / synced between
229-
your host operating system and the Submitty virtual machine._
233+
*This host directory structure will be shared / synced between
234+
your host operating system and the Submitty virtual machine.*
230235
231236
232-
4. RUN VAGRANT
233-
234-
If you have an AMD processor you can choose to download a pre-made
235-
VM that is created weekly OR you can create the VM from scratch
236-
(which will take substantially more time). If you have an ARM chip
237-
(e.g., the Apple Silicon Mac M1/M2/M3), you must create the VM from
238-
scratch.
237+
5. RUN VAGRANT
239238
240239
241240
* Navigate into the Submitty repository on your computer in a
242-
shell/terminal. _On Windows, run CMD or PowerShell on administrator mode_.
241+
shell/terminal. *On Windows, run CMD or PowerShell on administrator mode.*
243242
244243
245244
* **Build pre-packaged VM**
246245
247-
If you are using VirtualBox as your provider, you will by default
248-
use a pre-packaged Submitty VM. This will have all of Submitty
249-
already setup. Vagrant will build your VM for you.
250-
251-
```
252-
vagrant up
253-
```
254-
255-
If you wish to use a specific version of the pre-packaged Submitty VM, on Linux or Mac type:
256-
```
257-
PREBUILT_VERSION={version} vagrant up
258-
```
259-
or on Windows, type:
260-
```
261-
SET PREBUILT_VERSION={version}
262-
vagrant up
263-
```
264-
*The version must be only the numbers, not including the `v` in front, for example `24.05.00.2405260215` not `v24.05.00.2405260215`*
265-
266-
*This process will take 10 minutes to maybe half an hour
267-
depending on your internet connection speed.*
268-
269-
270-
* **Build from scratch**
271-
272-
If you wish to run `vagrant up` from scratch, on Linux or Mac type:
246+
*NOTE: The pre-packaged Submitty VM is not (yet)
247+
available for QEMU / M-Series ARM Mac machines.*
248+
249+
If you are using VirtualBox as your provider, you will by default
250+
use a pre-packaged Submitty VM. This will have all of Submitty
251+
already setup. This is a recently built machine,
252+
but it may be slightly older than the current
253+
[main branch on GitHub](https://github.com/Submitty/Submitty).
254+
255+
256+
To create the virtual machine from the pre-packaged image, run:
257+
```
258+
vagrant up --provider=virtualbox
273259
```
274-
FROM_SCRATCH=1 vagrant up
260+
261+
If you wish to use a specific version of the pre-packaged Submitty VM, on Linux/MacOS type:
262+
```
263+
PREBUILT_VERSION={version} vagrant up --provider=virtualbox
275264
```
276265
277-
Or on Windows, type:
266+
or on Windows, type:
278267
```
279-
SET FROM_SCRATCH=1
280-
vagrant up
268+
SET PREBUILT_VERSION={version}
269+
vagrant up --provider=virtualbox
281270
```
271+
272+
*The version must be only the numbers, not including the `v` in front, for example `24.05.00.2405260215` not `v24.05.00.2405260215`*
273+
274+
*This process will take 10 minutes to maybe half an hour
275+
depending on your internet connection speed.*
276+
277+
278+
***Note:** The vagrant up command creates and provisions the virtual machine on the first run.
279+
The `--provider` flag is important if you have more than one provider
280+
installed on your machine (e.g., VirtualBox, VMWare, QEMU, libvirt).
281+
For subsequent runs of `vagrant up` (e.g., to re-start the VM),
282+
you do not need to append the `--provider` flag as the VM is
283+
already created.*
284+
282285
283-
*This process will take anywhere from 30 minutes to a few hours
286+
* **Build from scratch**
287+
288+
* Using QEMU on an M-Series Arm MacOS, type:
289+
```
290+
vagrant up --provider=qemu
291+
```
292+
293+
* On Linux or Intel-based Mac, type:
294+
```
295+
FROM_SCRATCH=1 vagrant up --provider=virtualbox
296+
```
297+
298+
* Or on Windows with `cmd`, type:
299+
```
300+
SET FROM_SCRATCH=1
301+
vagrant up --provider=virtualbox
302+
```
303+
304+
*As noted above, you do not need to append the `--provider` flag on
305+
subsequent runs of `vagrant up` after the VM is already created.*
306+
307+
*Building the VM from scratch will take anywhere from 30 minutes to a few hours
284308
depending on your internet speed.*
285309
286310
@@ -293,54 +317,64 @@ If you using an Intel-based Mac, you will follow the instructions below._
293317
users in the sample courses.*
294318
295319
296-
* **Build without sample submissions**
320+
* **Build from scratch without sample submissions**
297321
298322
If your development work *will not require sample assignment
299323
submissions or autograding results*, you may prepend
300324
`NO_SUBMISSIONS=1` to the previous command, which will skip the
301325
creation of these sample submissions and their autograding and
302326
decrease the time to complete installation.
303327
328+
* On M-series ARM Mac:
329+
```
330+
NO_SUBMISSIONS=1 vagrant up --provider=qemu
331+
```
304332
305-
* On Mac or Linux:
333+
* On Linux or Intel-based Mac:
306334
```
307-
NO_SUBMISSIONS=1 vagrant up
335+
NO_SUBMISSIONS=1 FROM_SCRATCH=1 vagrant up --provider=virtualbox
308336
```
309337
310-
* Or on Windows using `cmd`:
338+
* On Windows using `cmd`:
311339
```
312340
SET NO_SUBMISSIONS=1
313-
vagrant up
341+
SET FROM_SCRATCH=1
342+
vagrant up --provider=virtualbox
314343
```
315344
316-
Or on Windows using PowerShell, you will have to set the environment variable differently:
345+
On Windows using PowerShell, you will have to set the environment variables differently:
317346
```pwsh
318347
$Env:NO_SUBMISSIONS=1
348+
$Env:FROM_SCRATCH=1
319349
vagrant up
320350
```
321351
322-
If you want to unset the variable later in `cmd`, you can do:
352+
If you want to unset the variables later in `cmd`, you can do:
323353
```
324354
SET NO_SUBMISSIONS=
355+
SET FROM_SCRATCH=
325356
```
326357
327358
Or in PowerShell:
328359
```pwsh
329360
Remove-Item Env:\NO_SUBMISSIONS
361+
Remove-Item Env:\FROM_SCRATCH
330362
```
331363
332-
Similarly, you can check that the variable is set by doing:
364+
Similarly, you can check that the variables are set in `cmd` with:
333365
```
334366
SET NO_SUBMISSIONS
367+
SET FROM_SCRATCH
335368
```
336369
337370
Or in PowerShell:
338371
```pwsh
339372
$Env:NO_SUBMISSIONS
373+
$Env:FROM_SCRATCH
340374
```
341375
342376
343-
5. AND YOU ARE DONE!
377+
7. AND YOU ARE DONE!
344378
345379
When the installation has completed, you should see the message:
346380
```

0 commit comments

Comments
 (0)