cri_vm.md 2.26 KB
Newer Older
1
2
3
4
5
# How to setup and use the PIE VM

This method allow you to have the PIE environment running in a VM on your
computer.

6
7
8
## Installation

### First step
9
10
11

Install [Virtual Box](https://www.virtualbox.org/).

12
13
On linux you can install it with your packet manager
([Debian](https://wiki.debian.org/VirtualBox) or
14
15
[ArchLinux](https://wiki.archlinux.org/index.php/VirtualBox)).

16
### Second step
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

Download our [VirtualBox appliance](https://static.cri.epita.fr/cri-vm.ova).

Open VirtualBox and go to `File > Import Appliance` and import the file you
just downloaded.

![appliance](assets/vm_external_1.PNG)

![import](assets/vm_external_2.PNG)

![folder](assets/vm_external_3.PNG)

When getting to the `Appliance settings` page, you may adjust the RAM and CPU
parameters. Be careful to have a least 2048 MB of RAM.

You can then click the `Import` button.

![settings](assets/vm_external_4.PNG)


37
### Third step
38
39

Inside Virtual Box select your newly created virtual machine and click on
40
41
42
the `Start` button.

![select](assets/vm_external_5.PNG)
43
44
45
46
47
48
49
50
51

In the familiar PXE menu, choose the `Prepare disk` entry.

Let it boot, a script will run automatically and your VM will shutdown once its
done.

![menu](assets/vm_external_6.PNG)


52
### Fourth step
53
54
55
56
57
58
59

You can now `Start` your VM again. You can now use the PXE menu as usual to
boot `Archlinux` image.

Be careful ! You should log with `epita` user and no password. Your data is in
`/home/epita`, this directory is kept between reboot, you will not lose files
each time you stop your VM.
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91


### Fifth step (optional)

You can restore your files by using the `afs-restore` command in a terminal.

## Common issues

### Error: failed to start Switch Root.

![error-switch-root](assets/vm_error_switch_root.png)

You probably didn't start the `Prepare disk` image, please do the third step
again.

### Black screen after starting the VM

Please ensure you are using VirtualBox 6.1 (you can check in
`Help -> About VirtualBox`).

### Not in a hypervisor partition

![virt-disabled](assets/vm_error_virt_disabled.png)

You need to enable Vt-x or AMD-V in your BIOS.

### Cannot enable nested VT-x/AMD-V without nested-paging

![nested](assets/vm_error_nested.png)

Go to the VM settings window and in the `System` page and `Processor` tab,
uncheck the `Enable nested Vt-x/AMD-V` box.